Expected Snapshot Merge Behavior for a Highly Available VM
Hello my name is Sean Dwyer, and I'm a Support Escalation Engineer working in the Windows CORE team here at Microsoft.
While working with snapshots that are attached to a highly available VM in a Cluster, you may notice after deleting a snapshot, it does not merge as expected. You'll notice the merge process almost immediately ends and the VM begins to restart.
Let's explore a scenario I ran myself into the other day and then I'll explain why you may see this behavior.
Fig. 1.
Here I have configured a HA-VM of XP SP2 in Fig 1. and it is Online and happy, within the Cluster.
Fig. 2.
Switching to the Hyper-V Management MMC in Fig. 2, I've decided that my testing is over with this VM, and I need to clean up the snapshots. The 'Now' state is where I want the VM to remain, so I'm going to issue a Delete Snapshot Subtree command.
Fig. 3.
I choose 'Yes', and the snapshots are removed from the VM in Fig. 3.
Next, I choose to shut down the VM in Fig. 4, as I want to commit the merge now, and not wait until later.
Fig. 4.
The Merge process starts, but immediately finishes and the VM is restarting as seen in Fig. 5 and Fig. 6.
Fig. 5.
Fig. 6.
The merge didn't complete! What just happened?
Failover Cluster is doing its job!
When deleting a snapshot for a VM that is configured as a Highly Available Resource, you're taking action against the VM outside of the Cluster Management UI, and therefore, the Cluster service considers any shutdown events, or reboots, a failure of the resource and takes appropriate action.
In my example, the default behavior is restarting the VM as shown in Fig.7.
Fig. 7.
The end result is that the snapshot merge process has NOT taken place and I've still got AVHDs out there shown in Fig. 8.
Fig. 8.
So, what do we do, to get the Snapshots merged successfully? Easy!
We need to configure the Clustered VM Resource to allow the Snapshot Merge process to complete without being interrupted.
Open up the Properties of the VM, and then select the Offline Actions Tab.
You'll note, in Fig. 9, the default behavior is to Save the VM.
Fig. 9.
In Fig. 10, let's change this default behavior temporarily to Shutdown.
Fig. 10.
Once the change has been made, you can then choose to shutdown the VM either through Hyper-V Manager or through the Clustering UI, and the Snapshot Merge process will begin.
Once the Merge completes, reset the behavior of the VM in the Offline Actions Tab for the VM back to Save as shown in Fig. 11.
Fig. 11.
Once you start the VM, you'll be back in business!
I hope this blog post will help you continue to use our Clustering and Virtualization products successfully!
Sean Dwyer
Support Escalation Engineer
Microsoft Enterprise Platforms Support
Comments
- Anonymous
January 01, 2003
This way works, but if you choose shutdown within the cluster administrator, not Hyper-V manager or within the VM itself, the VM will stay shutdown allowing the merge to happen. Also, if you use SCVMM and choose shutdown from the SCVMM console, the VM will also stay shutdown even in a clustered config. This will also allow the merge to happen. Rob - Anonymous
January 01, 2003
HiI'm following with interest the improvement of Hyperv but sadly I've to admit I'm a little disappointed by the lack of integration between Hyper-V and clustering service.If it has to compete , seriously , with vmware'esx ( now vsphere ) much improvements should be made.Firstly taking down a HA VM from Hyperv console or SCVVM should "trigger" something in cluster service which prevent it from restarting the VM ( as it would in a real failure case )It should not be accepted manual intervention int "option tab" of the clustered resource.Second the snapshot feature is long behind the vmware counterpart. Is it acceptable that VM has to be taken down "only" to delete a snapshot ? I realy think is notAs far as I know such problems still apply on upcoming R2Best regardsStefano Colombo - Anonymous
January 01, 2003
HiI'm following with interest the improvement of Hyperv but sadly I've to admit I'm a little disappointed by the lack of integration between Hyper-V and clustering service.If it has to compete , seriously , with vmware'esx ( now vsphere ) much improvements should be made.Firstly taking down a HA VM from Hyperv console or SCVVM should "trigger" something in cluster service which prevent it from restarting the VM ( as it would in a real failure case )It should not be accepted manual intervention int "option tab" of the clustered resource.Second the snapshot feature is long behind the vmware counterpart. Is it acceptable that VM has to be taken down "only" to delete a snapshot ? I realy think is notAs far as I know such problems still apply on upcoming R2Best regardsStefano Colombo - Anonymous
January 01, 2003
Does the setting for offline actions have to be changed for each machine in the evironment separtely, or is there a way to do this for a set of computers at one shot?