The Case of the Pending VM Snapshot Merge
Posted Friday, December 10, 2010 in Alternative Solutions 0 comments
Over on the Microsoft TechNet blog, Jeremy Hagan speaks of the woes of native snapshots in Microsoft Hyper-V:
"When a snapshot is deleted, the virtual machine must be powered off, not merely rebooted, in order for the data in the differencing disk to merge into the parent VHD. The VM must remain powered off until the merge is complete. If the machine is booted back up again before the merge is completed then the merge process stops until the machine is powered off again. The bigger the AVHD, the longer the merge takes. And while SCVMM and Hyper-V manager have an indication in the GUI that a snapshot exists, when a snapshot is deleted it is deleted from the GUI straight away even though the snapshot hangs around until the merge is complete. So if there is a VM in this state there is no visible indication of it."
Whoa. Seriously? This is the way snapshots are supposed to work? I don't think so.
Jeremy then explains how this resulted in problems for his environmnent, and he kindly shared a bunch of code that will alert him to the problems when they happen next time.
My reaction to reading this is, why all the hacking to deal with what seems like a design bug in native VHD snapshots?
Snapshots are supposed to make life easier
Virtualization makes it possible to do many things differently, much more efficient, better, and easier. Enter virtual machine snapshots and cloning. Say you need to repeatedly run a set of tests, and you want the test process to be reproducible. What better way than to create a snapshot of a VM, clone it every time you start a test, and run the test against the clone. Every run starts from the same exact state. Perfect!
Now imagine you did find a problem. VM snapshotting helps again. Take a snapshot of an erroneous state so that it can be reviewed later. Even better!
Things go pretty well for a while. Then you either run out of space, or simply become overwhelmed with the number of snapshots to keep track of. So you want to cleanup, which means you need to delete some snapshots. As Jeremy's TechNet post has shown, that can be quite a painful situation.
It makes you feel like all the air went out of the wonderful balloon you were using. Those snapshots are useful until you have to delete them, then the trouble begins.
An alternative is to use Virsto One snapshots. Virsto snapshots and clones are designed to not only perform well when they run, but when they are being deleted. With Virsto, there are no limitation like Jeremy and other Hyper-V users have to deal with. With Virsto, a VM could be happily running while its snapshots are being deleted. No need to power down the VM.
Another case to think about: backup. Isn't it natural to use snapshots for backup? I mean you can take a snapshot of a VM and use it for backup while it runs. So far so good. But wait a minute. After the backup is done you probably want the snapshot deleted, right? Is it ok for the VM to be powered off and remain powered off until the snapshot delete is completed?
I must say it didn't occur to us when we were designing Virsto One that the kind of limitations Jeremy wrote about would be acceptable! There are a number of use cases for snapshots in a VM environment, and all of them tax traditional technologies. That's why we designed Virsto One to be a lean mean snapshotting machine!





Leave a Comment