Hyper-V Program Manager
A number of people have been asking me how snapshots actually work "under the covers". So here we go: When you take a snapshot of a running virtual machine:
Once the snapshot is completed we have a set of the virtual machine configuration file, the virtual machine saved state files and the snapshot differencing disks (.AVHDs) stored in a folder under the virtual machine's snapshot directory.
This is now treated as a read-only "point in time" image of a virtual machine. You can apply a virtual machine, in which case we set the virtual machine to start from a copy of the snapshot. You can change the virtual machine settings after applying a snapshot - but you cannot change the snapshot settings themselves.
You can also delete a snapshot. If you delete a snapshot that has no descendants (snapshot with differencing disks that reference the snapshot being deleted) then the files associated with the snapshot will just be deleted. If you delete a snapshot with only one descendant the configuration and saved state files for the snapshot will be deleted and the snapshot differencing disks will be merged with those of it's descendant. If you delete a snapshot with more than one descendant the snapshot configuration and saved state files will be deleted - but the differencing disks will not be merged until the number of descendant snapshots is reduced to one.
I wish I would have read more into snapshots before clicking that button in hyper-V console. I thought it would simply be a redundant backup type, where I could revert to it if needed. I had no clue that it actually stops storing on your VHD file, creates a new avhd file that records changes, then has to merge the two when shut down if deleted... what a ridiculous method. I ran out of disk space on the C: of the host server because of this, and now our business has been down all day while the darn thing is merging after I deleted the snapshots. They need to clarify this process within the console, perhaps an acceptance screen of sorts. I will not use snapshot again. Is there a quicker method to get the VM back up and running without the avhd file but keeping the current state of the VM?
My question is, when a snapshot is corrupted or lost from the middle of a chain in VM-Mangager, how do you recover?
I have a corrupt or lost avhd from the middle of a snapshot chain and the system is telling me that I am stuck. Am I facing deleting the whole machine?
James Adamski -
Unfortunately there is nothing you can do to recover if you have deleted / lost an AVHD from the middle of a chain.
Why does my Hpyer-V Snap shot continue to grow untill it fills my drive ? What is it writing to the snapshot file after the VM is backup adn running? I took a live snapshot, it said it completes, l applied my patches to my VM reboot and it came backup running fine. I took this snapshot a week ago and everyday I check the snapshot grows initaly it was 1Gb now it is 136GB . Does the snapshot continually get updated by the VM ? If so what is writing to the snapshot ? And can I delete the snapshot at any time after I see the VM is up and running ok ?
I know this has been posted prior but I cannot grasp why Hyper V says snapshot complete, yet it continues to grow.
Why does it continue to write to a snapshot that is supposed to be an restore point so I can go back to a previous configuration prior to patching ?
Thank you and