Windows Server TechCenter > Windows Server Forums > Hyper-V > Mystery AVHD file and no snapshots lists in Hyper-v

Answered Mystery AVHD file and no snapshots lists in Hyper-v

  • Sunday, September 13, 2009 7:46 PM
     
     
    Need some serious help here.

    I was the victim of the runaway shapshot eating all the availble disk space last year - that was a fun 30 hours to fix.  I still hold the record of having a 400GB snapshot.  Snapshot are evil in production - never to be used again.

    Anyway...

    I have one virtualized exchange server and in Hyper-V mangare, there is no snapshots listed (this is good, since it is an Exchange server and it is in production).

    But, we are running out of diskpace again.  I check the drive and there is a 151GB snapshot (which is active and being used by the Exchange server).  A AVHD file - your basic snapshot differential file. 

    So, it looks like this blight of snapshots is not completely gone.  How do I get rid of this snapshot?  

    I would like some suggestions before I start working on a production system.



Answers

  • Wednesday, September 16, 2009 4:34 PM
     
     Answered
    Thanks for all of your help.

    Yes, the .xml file does refer to the snapshot in question.  There is nothing in hyper-v manager that says there are any snapshots for that VM.

    There is no AV running on the hyper-v.

    We had in the past had to merge in VHD files (several of them) during Snapshothell and those worked just fine.

    I checked the start date and it was created two months after Snapshothell even happened. 

    We do have a backup (wbadmin) that runs every night - and we are down to 17GB's of free disk space.  Could that be a possible problem?  One of the correlations is that this only happens at night and in the morning, we have to restart the servers.

All Replies

  • Monday, September 14, 2009 1:44 AM
     
     

     Even though you deleted it in the GUI the snapshot is not removed until you power down the guest VM in this case your Exchange server.  It will take some time as it looks like a larger snapshot.  I have seen snapshots that are 145GB take about 6-8 hours to merge properly.

    As for suggestions, make sure you have a good backup and give yourself plenty of down time.


    Joseph Noga MCITP, MCSE, MCSA, MCTS CCNA,CCDA,CCVP Managing Consultant VSD Technologies
  • Monday, September 14, 2009 2:49 AM
     
     
    Hi Joseph,

    Thanks for the response.

    I'm wondering if any additional hard drive space is required to perform the merge since the hard drive in question currently has ~10GBs free.

    I believe we have 50GBs we CAN free up, but otherwise need to make room...I suppose running the pre-compactor at this point would take quite a while as well?

    Ben
  • Monday, September 14, 2009 2:53 AM
     
     

    It shouldn’t take any more space but each environment is different.  The more space you have the better.


    Joseph Noga MCITP, MCSE, MCSA, MCTS CCNA,CCDA,CCVP Managing Consultant VSD Technologies
  • Monday, September 14, 2009 9:12 AM
    Moderator
     
     

    Hi,

     

    Generally speaking, we don’t recommend that you use snapshot in a production environment.

     

    Please perform Joseph’s suggestions to power off the problematic VM and then let it merge the snapshot to the parent VHD. More free disk space will be better.

     

    Hyper-V Virtual Machine Snapshots: FAQ

    http://technet.microsoft.com/en-us/library/dd560637(WS.10).aspx

     

    Managing Snapshots with Hyper-V

    http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/16/managing-snapshots-with-hyper-v.aspx

     

    Virtual Machine Snapshotting under Hyper-V

    http://blogs.msdn.com/virtual_pc_guy/archive/2008/03/11/virtual-machine-snapshotting-under-hyper-v.aspx

     

     

    Best Regards,

    Vincent Hu

     

  • Monday, September 14, 2009 4:01 PM
     
     
    Thank you very much for the responses.

    So, all I do is pick a down time for the client and turn off the Virtual Machine (Exchange).

    And wait..............

    Are there any indicators?  Or do we press the refresh key every hour and see if that AVHD file disapears?  

    Normally, when you merge in a file, it requires a tonne of disk space.  If we have a 200GB VHD file, and a 100GB AVHD file, we need 300GB's free for the merge to be completed. From my understanding, hyper-v creates another completely new VHD  file and merges the results together.  Once it is done, it deletes the AVHD and old VHD file and make the new merged VHD file the master file.

    Is this true?
  • Monday, September 14, 2009 7:50 PM
     
     

    Not a problem.  Yes there are indicators that it’s working as you will see the percentage in the Hyper-V Manager window. 

    As for Hyper-V making a new VHD when deleteing snapshots I don’t think that is the case with Hyper-V.  I just deleted a snapshot on my test Hyper-V server and I didn’t see any new VHD’s created. 

    Let me verify this again with a larger shapshot tree.  I have some MP’3 that I can use to fill up a disk rather quickly.


    Joseph Noga MCITP, MCSE, MCSA, MCTS CCNA,CCDA,CCVP Managing Consultant VSD Technologies
  • Monday, September 14, 2009 9:50 PM
     
     

    So I had a VM that was aprox 2GB in size took a snapshot and then added some MP3's.  So this gave me an AVHD file of 2.3GB in addition to the 2GB VHD..  I then deleted the snapshot tree and watched the disk spce on my data drive.  It didn't change more than 1GB during the merge process.  Once the merge was done it modified the original VHD file it didn't make a new one. 08



    Joseph Noga MCITP, MCSE, MCSA, MCTS CCNA,CCDA,CCVP Managing Consultant VSD Technologies
  • Tuesday, September 15, 2009 6:05 AM
     
     
    We have had the server off for 6 hours now.

    I will update later on this morning with the results.

    Thanks again for your assistance.

    Regarding the progress bar, there are no visible snapshots in the Hyper-V Manager, it is just the .avhd file in the snapshots directory with a recent modification date (and the name of the server in question).
  • Tuesday, September 15, 2009 12:56 PM
     
     
    Good morning,

    We gave the server just short of 13 hours with no change. I definitely did not see the "Merge in Progress" in Hyper-V Manager.

    It seems to not know that this .avhd file exists. Any ideas?

    Ben
  • Tuesday, September 15, 2009 2:30 PM
     
     

    Take a look in the VM config file if the snapshot is still there.  That will indicate if the VM is using the snapshot file.  Also do you have any antivirus on the host server?  If so are the snapshot and the vhd's excluded?
    Joe

     

     

     


    Joseph Noga MCITP, MCSE, MCSA, MCTS CCNA,CCDA,CCVP Managing Consultant VSD Technologies
  • Wednesday, September 16, 2009 4:34 PM
     
     Answered
    Thanks for all of your help.

    Yes, the .xml file does refer to the snapshot in question.  There is nothing in hyper-v manager that says there are any snapshots for that VM.

    There is no AV running on the hyper-v.

    We had in the past had to merge in VHD files (several of them) during Snapshothell and those worked just fine.

    I checked the start date and it was created two months after Snapshothell even happened. 

    We do have a backup (wbadmin) that runs every night - and we are down to 17GB's of free disk space.  Could that be a possible problem?  One of the correlations is that this only happens at night and in the morning, we have to restart the servers.
  • Wednesday, October 14, 2009 10:12 PM
     
     
    I actually had to contact MS tech support.

    There are such things as snapshots that do not appear in hyper-v.  Here is what I had to do:

    1) Backup my guest and snapshot
    2) Use Ghost to capture a complete image of the server to a Ghost Cast server
    3) Blow away my guest and snapshot (hopefully my backups will work if this fails)
    4) Create a new Virtual Machine, mount the Ghost Boot CD as an ISO
    5) Use Ghost Cast server to push all the data back
    6) Run the Integration Utility again get get the NICs to work
    a) this does cause another network adapter to be loaded since the origional is hidden and virutual and can't be removed easily.

    According to MS: This is a known problem with Hyper-V sometimes a snapshot just gets created and they don't know why.
  • Monday, November 23, 2009 4:56 AM
     
     

    We have had the same problem when we did physical to vitrual transfer of one of our servers by SCVMM 2008 R2 to Windows Server 2008 R2 host with Hyper-V role.
    I think that the reason was that when transfer was processing it was somewhat like "live" transfer with taking snapshot of the disk state before transferring and storing all data changes on this disk while transferring P2V to somewhat like "temp datastore'. Thus when all data from server disk snapshot were transferred to new VM .VHD disk, after that SCVMM 2008 R2 transferred to VM also all data changes made to Physical server while being transferring to Virtual Machine from "temp datastore" but SCVMM 2008 R2 transferred them not in created before .VHD but in new .AVHD disk. And if you do not shut down new VM after transferring P2V you'll not start your host Hyper-V to merge this .AVHD disk into .VHD disk and Hyper-V will continue to use that .AVHD file to store all data changes in our new started and working VM instead of using .VHD file. But if you start and after that shut down you newly created VM Hyper-V will immediately start to merge .AVHD into .VHD. By the way - you do not need much space for this to accure successfully - we had 65Gb .VHD, 35 Gb .AVHD and only 15 Gb of free space on all host machine disks and everything went just fine.

  • Thursday, March 04, 2010 6:06 PM
     
     Proposed Answer
    It would have worked with using Disk2Vhd from sysinternals or any other p2v tools at hand also
    http://technet.microsoft.com/nb-no/sysinternals/ee656415(en-us).aspx
    • Proposed As Answer by z_lives Thursday, October 20, 2011 3:51 PM
    •