This article provides information related to committing a snapshot that is present in a virtual machine, using the command line in the Service Console.
Note: This article is for ESX. To commit snapshots on the command-line of an ESXi host, see Committing snapshots on ESXi host from command line (1026380).
VMware recommends having free space equal to the snapshots and base disk size before committing snapshots.
If you do not have enough free space, migrate to another disk that has enough free space and consolidate the snapshots into a new virtual disk file (VMDK).
To commit snapshots to a base disk from the command-line:
# vmware-cmd -l
/vmfs/volumes/volume-UUID-or-name/vm1/vm1.vmx
/vmfs/volumes/volume-UUID-or-name/vm2/vm2.vmx
# vmware-cmd /vmfs/volumes/volume-UUID-or-name/vm1/vm1.vmx hassnapshot
The output looks like:hassnapshot() =
hassnapshot() = 1
If the result is not equal to one (1), there are no snapshots for the virtual machine and there is no reason to proceed further.# vmware-cmd /vmfs/volumes/volume-UUID-or-name/vm1/vm1.vmx removesnapshots
removesnapshots() = 1
If the result is one (1), the snapshots have been successfully committed. If the result is something other than one (1), file a Support Request with VMware Support and note this KB Article ID in the problem description. Notes:
vmsd
file. For more information. see Committing snapshots when there are no snapshot entries in the snapshot manager (1002310).