Vmware snapshots not consolidating
In this case, snapshots consolidation function should be used (Consolidate option in context menu): Deleting snapshots, both with Delete All button and with Consolidate function, is called consolidation.First, let’s see factors that affect time of virtual machine snapshots consolidation process: It should be mentioned here, that consolidation process is very demanding towards I/O subsystem, so it is not recommended to make it during working hours when production virtual machines are loaded.It did…at least just this particular problem VM in the backup job. I next went into the Datastore this problem VM was on & looked at the VM’s directory. (hence why I received a notification this problem VM needed consolidated) Well, I couldn’t consolidate as noted above due to a file lock, so to try to remove the lock I attempted a VMotion of this problem VM.I then specifically looked at the error for this VM in the backup job (“Error: Failed to open VDDK disk datastore-name] VM-directory/VM-name-000014.vmdk] ( is read-only mode – [true] ) Failed to open virtual disk Logon attempt with parameters [VC/ESX: [vcenter-name]; Port: 443; Login: [domain\user]; VMX Spec: [moref=vm-101]; Snapshot mor: [snapshot-17944]; Transports: [nbd]; Read Only: [true failed because of the following errors: Failed to open disk for read. v Center again returned an error: This was better information because it let me know the explicit disk (the parent vmdk & not any of its subsequent deltas) that was locked.
I believe this is mostly due to VDR sometimes not handling snapshots the way it should, but I am sure there are other common ways it happens as well. Wait a second though, when I check the VM for snapshots, it says it doesn’t have any though 🙁 So then all these disks are there for no reason? I was first alerted to this issue when v Center prompted me there was something going on…]]
First I would recommend to login directly to the host and check if the VM has a running task. From the KB, first find the VM_ID of your VM: ~ # vmware-vim-cmd vmsvc/getallvms Vmid Name File Guest OS Version Annotation 112 VM-1 [Datastore] VM-3/VM-3win Longhorn Guest vmx-04 128 VM-2 [Datastore] VM-3/VM-3win XPPro Guest vmx-04 144 VM-3 [Datastore] VM-3/VM-3win Net Standard Guest vmx-04 This is a pretty quick test to see if there is a snapshot commit in progress.
And how can you automate the consolidation of the virtual machine’s disks? Power CLI command to list all virtual machines that need disk consolidation.
The Power CLI command in listing 2 will consolidate the disks of a virtual machine called My VM.
At some point you may need to delete/consolidate virtual machine snapshots (Delete All button in Snapshot Manager), which is quite time-consuming and demanding in terms of storage performance.
Thus it would be a good thing to know in advance how much time it takes.