Hyper-V Program Manager
A lot of people have asked me what happens “under the covers” when they delete a snapshot. Unfortunately, the answer is relatively complicated as there are multiple things that could happen.
As previously discussed – a snapshot is composed of a configuration file, saved state files and differencing disks (AVHDs). When you delete a snapshot the snapshot configuration file and saved state files are always deleted immediately – and the snapshot entry is removed from the user interface.
What happens to the AVHD depends on the situation of the snapshot and the state of the virtual machine. Here I have a virtual machine setup with a bunch of snapshots:
Let’s look at what would happen if I deleted various snapshots associated with this virtual machine:
This answer has probably raised some questions in your mind – so let me take a shot at answering some of them:
Cheers, Ben
First: Thanks for your blog!! It’s always well written and very informative.
My questions are somewhat off-topic and pertain to the next version of Hyper-V (Windows Server 2008 R2)
1) I've seen max number of processors used by a Hyper-V Server has been increased, but I don't see anywhere talking about increasing a Vm's assigned processors. Will the max number of processors per VM be increased from 4? to perhaps 8?
2) Will Copy and Paste work like in a RDP window? (and like VMware's VM management tools: Vi Center, Vm Server, Vm Workstation). I know I can always open a RDP window, but I do software dev + testing and spend a lot of time in a bunch of different VMs and find the Hyper-V Manager's [Connect...] *much* more convenient. Except when I need to copy and paste text into (or out-of) the VM - it's a big a pain if I need to copy any more than a little text (typed text takes too long and truncates after a just a too few characters). And it's a pain to copy text from the VM to my host - I typically keep a .txt file on a network share to replace the missing copy and paste functionality :-(
Other than these two issues, I'm becoming a Hyper-V convert and slowing leaving behind the world of VmWare, ESX, VmWorkstationa and VmServer.
Also, are there any other interesting UI or performance enhancements to the next Hyper-V version? I’m waiting for the RC before I try out Windows Server 2008 R2.
Great article, however how could you "shrink" or "defrag" the disks after deleting some snapshots, I undestand if you delete from a sub-tree they would merge but I am having a hard time to makde this snapshots cleanup reflect in to the disk size.
I have several Images set for differents projects and the snapshots grow daily, I have exported them and obtained the same size of the images I have exported with less snapshots, as being said the snapshot deletion does not "flush" data from the disk, what would be the solution?
Thanks!
How can we detect that a merge is going on in the background?
Good article - thanks. I used it as the basis for my snapshot cleanup process...
"Also – many people would be confused by what “Merging a snapshot” actually meant"
If they are confused about that they shouldn't be in IT
What is the effect of running off a snapshot over a long period on a highly transactional server like Exchange. I can only imagine this will have a advers effect on normal operation and backup operation.
Well, it is still does not works as described here.
I had a single snapshot, afterthat the guest machine runned several days.
I did "delete snapshot" action, which is supposed to merge existing single AVHD with the original VHD.
The snapshot indeed disappeared from UI.
I shut down the machine, and started the machine again.
The machine did not merged AVHD with VHD, but happiliy continued to use AVHD.
Now i need to merge these VHDs manually.
I have a great respect to mircrosoft, but, MS folks, by yourselves you just push people to try VMWare, how one can resist ?
<rant>Why the heck cant it say merge when you merge a snapshot, and delete when you delete one. Everytime I have to go spend 20 mins googling to make sure I dont revert my virtual machine back to some worthless state it was in months or years ago... This entire system is semi retarted.. If you run on a snapshot for too long and dont have enough disk space to merge the snapshot into the vhd - it will basically crash your host!! Grrr...</rant>