To resolve this issue, consolidate snapshots on the ESXi host.
To consolidate snapshots on the ESXi host:
- Log in to the ESXi console through iLO/DRAC or ssh as a root user.
- Navigate to the virtual machine directory containing the .vmdk files. (/vmfs/volumes/<Data store>/<VM folder> )
- Run this command to list files in the directory:
ls -ltrh *.vmdk
- Locate snapshot files similar to VM_NAME-00000#.vmdk or VM_NAME-00000#-delta.vmdk.
Note: The delta files should have the current timestamp
- Run this command to get a list of virtual machines and the VMID for each virtual machine:
vim-cmd vmsvc/getallvms
Note the VMID of the virtual machine for which the snapshot is not detected.
- Run this command to verify if the snapshot exists:
vim-cmd vmsvc/snapshot.get VMID
- Run this command to remove all snapshots:
vim-cmd vmsvc/snapshot.removeall VMID
If the snapshot.removeall command fails with the error Cannot find VMID, run these commands:
- Run this command to create a new snapshot:
vim-cmd vmsvc/snapshot.create VMID snapshotName description includeMemory quiesced
Where includeMemory and quiesced variables are Boolean values. Set the value to 1 to enable or 0 to disable the snapshot option.
For example:
# vim-cmd vmsvc/snapshot.create 10 my_snapshot snapshot_test 0 0
- Run this command to remove all snapshots:
vim-cmd vmsvc/snapshot.removeall VMID