A snapshot of a windows 5.5 vCenter was taken before a minor update.
The admin forgot the remove the snapshot days later.
Deletion of the snapshot only ends up working for the OS disk. A “Virtual Machine disks consolidation is needed” appears for the VC VM.
Since there are no backups at the datastore layer (VMDK) the plan is to hot clone the VC VM before running the consolidation task as the backup.
The hot clone fails with “error occured while saving the snapshot msg:snapshot.error-QUIESINGERROR” due to heavy IO.
The game plan is to shut down the VC VM. Connect to the ESXi host that the VM is register to and cold clone the 2nd disk drives VMDK as the backup. Then run the consolidation task via the c# client while the VM is power off.
SSH into the ESXI host where the VC VM is register to.
CD into the datatstore folder . ex. cd /vmfs/volumes/Datastore/VM/
Determine the current mounted vmdks/snapshots via: grep vmdk VM-NAME.vmx
In my case you can see the first disk (OS) does not have snapshot:
[root@esxi55-2:/vmfs/volumes/70dc278a-b17240df/test-vm] cd /vmfs/volumes/htpc-tv/test-vm
[root@esxi55-2:/vmfs/volumes/70dc278a-b17240df/test-vm] grep vmdk test-vm.vmx
scsi0:0.fileName = “test-vm.vmdk”
scsi0:1.fileName = “test-vm_1-000001.vmdk”
[root@esxi55-2:/vmfs/volumes/70dc278a-b17240df/test-vm]
Create a new folder on a different datastore that the clone VMDK will be stored. Ensure there is enough disk space,
mkdir /vmfs/volumes/sandbox/test-vm-cold-clone/
Open a c# client connection to the ESXi host the VC VM is registered to.
Stop the VMware Virtual Center Service. Shut down windows.
Following VMwares KBA “Cloning a virtual machine disk with delta files or snapshots” run the following command replacing the VMDK file location and destination folder and VMDK file name.
vmkfstools -i /vmfs/volumes/htpc-tv/test-vm/test-vm_1-000001.vmdk /vmfs/volumes/sandbox/test-vm-cold-clone/test-vm-cold.vmdk
Validate the file size is the same (ex. 10GB) of the -flat VMDK in the destination datastore.
ls -lah /vmfs/volumes/sandbox/test-vm-cold-clone/
-rw——- 1 root root 10.0G Dec 31 23:31 test-vm-cold-flat.vmdk
-rw——- 1 root root 523 Dec 31 23:32 test-vm-cold.vmdk
via the C# client to the ESXi host
right click on the VC VM
Snapshot
Consolidate
Re-run grep vmdk test-vm.vmx to confirm the -000001.vmdk is gone.
[root@esxi55-2:/vmfs/volumes/70dc278a-b17240df/test-vm] grep vmdk test-vm.vmx
scsi0:0.fileName = “test-vm.vmdk”
scsi0:1.fileName = “test-vm_1.vmdk”
Otherwise, run the delete snapshot task and consolidate task again.
Power on the VC VM once the consolidate task is done and validate the OS/VC services and D drive.
Note – The Consolidate task tool longer than the clone task.
If somehow the consolidation “broke” the VMDK you can remove the disk and add the cloned VMDK as a new disk. You can s-vmotion this disk later on. A consolidation is not needed for the cloned VMDK.
Screen caps via the c# client – VM, Edit Settings, Hard Disk, Remove, OK, Edit Settings, Hard Disk Add, Attach cloned vmdk.