I'm sure many of you have seen the new Snapshot > Consolidate option in the drop-down menu of Virtual Machines in vSphere 5.0, and are probably wandering what the use case is. If you haven't seen it, here it is:
The reason this feature is introduced is to address a rather large supportability issue. Occasionally we saw where a snapshot commit/delete operation request would not merge the snapshot delta files with the VMs base disk (what we term a consolidate operation). Unfortunately, this failure to consolidate was not apparent via the UI, and usually only became noticeable to the end user when the delta files grew very large, possibly resulting in a full VMFS or NFS volume if they were attached to very large VMs. Support engineers from GSS (VMware's Global Support Services) would then have you use their many tricks of the trade to consolidate the snapshot deltas into the VM base disk. The issue is that although support resolves most if not all of these cases, it is a very time consuming & repetitive task.
This new option allows end-users, in the event of a consolidate failure, to do the consolidate operation for themselves without opening a Service Request with VMware. But how do we know whether a consolidate was successful or not? Well, if a commit/delete operation doesn't manage to merge the snapshot delta disks into the VM's base disk, a new warning is surfaced in the UI as shown here:
An administrator can now use the Snapshot Consolidate option to merge them.
Can I test it?
There is a way to test this via the PowerCLI if you so wish. We now ship the RemoveAllSnapshots method with an option to not consolidate snapshots when it is invoked. The steps to test are quite simple:
- Select a VM & manually create a snapshot on it.
- Launch vSphere 5.0 PowerCLI
- At the PowerCLI prompt, type $VM = get-VM <VM_Name> | Get-View where <VM-Name> is the name of the VM with the snapshot.
- At the PowerCLI prompt, type $VM.RemoveAllSnapshots(0) where the boolean value 0 represents the directive to not consolidate.
A 'Configuration Issue' warning should now be surfaced in vCenter, same as that shown above. If you login to the ESXi shell, and examine the home folder of the VM, you will notice that the snapshot delta file still exists. Also, if you examine the contents of the .vmsd (snapshot descriptor) file, you will notice that it contains a new parameter snapshot.needConsolidate = "TRUE".
You can now use the UI to select the VM > Snapshot > Consolidate. This will pop-up an "are you sure" type message. Click yes, and the snapshot delta(s) will be merged with the VM base disk.
And of course you could also consolidate the delta disk(s) using PowerCLI using $VM.ConsolidateVMDisks_Task(). Thanks to my colleage Alan Renouf for the PowerCLI guidance.
This new feature should save you a lot of time when dealing with any future snapshot consolidation issues.
Get notification of these blogs postings and more VMware Storage information by following me on Twitter: VMwareStorage