A VM's snapshots are unable to be deleted or consolidated.
Note: While this issue is typically observed from the vSphere web GUI, the error thrown when consolidating or deleting snapshots is rather generic. To confirm this particular issue effects a VM, verify by tracing Steps 1-5 of Method 1 and Method 2 in the Resolution section below. If the templateVM parameter is set to FALSE, then this issue is not the cause of the snapshot deletion and consolidation failures.
Symptoms:
YYYY-MM-DDTHH:MM:SS.Z verbose hostd[2xxxx8] [Originator@6876 sub=Vigor.Vmsvc.vm:/vmfs/volumes/<Datastore>/<VM_Directory>/<VM_Name.vmx> opID=xxxxxxxxxxxxxx] Delete snapshot 1 and its children message:
An error occurred while deleting a snapshot:
The virtual machine is a template.
YYYY-MM-DDTHH:MM:SS.Z In(05) vmx 47839-118772-auto-2jn9-h5:70024065-9-ed-e857 SNAPSHOT: Snapshot_Delete failed: The virtual machine is a template (19)
Note: Timestamps and opID numbers in the log entries above are strictly shown for example. File paths have also been altered with placeholder values.
vCenter Server 7.0.x
vCenter Server 8.0.x
vSphere ESXi 7.0.x
vSphere ESXi 8.0.x
This can occur if a VM was deployed using a public OVF template downloaded from a third party vendor that specified the value templateVM = "True" in the VM's .vmx file. While the VM may appear and behave as a normal VM in the GUI, this value will prevent snapshot deletion/consolidation.
Note: Brief downtime will be required to resolve this issue as the VM will need to be powered off.
Method 1 - vSphere GUI:
Method 2 - ESXi Host GUI:
Method 3 - CLI:
vi /vmfs/volumes/VM_Datastore/VM_Directory/VM_Name.vmx
templateVM = "TRUE"
TRUE
and replace the value with FALSE
:wq!
and press Enter to save changes. Verify the changes saved by using the same command from Step 3, or the following command:
less /vmfs/volumes/VM_Datastore/VM_Directory/VM_Name.vmx