Details
You cannot create a virtual machine snapshot
You see this failed message similar to: The attempted operation cannot be performed in the current state (powered off) Or The attempted operation cannot be performed in the current state (powered on)
You see this error on the ESXi command line (vmware-cmd /vmfs/volumes/my-vmfs3/sample-vm-name.vmx createsnapshot sample-name sample-description 0 0): VMControl error -3: Invalid arguments
Solution
This issue may occur if the snapshot.current in the .vmsd metadata file points to a non-existent snapshot UID. If the snapshot.current points to a non-existent snapshot UID, attempting to create a snapshot causes the virtual machine to power off.In this example, the snapshot.current points to 38. This issue occurs if none of the snapshots have a UID of 38:root@bshp020 my-vm1]# cat sample-vm-name.vmsdsnapshot.lastUID = "39"snapshot.numSnapshots = "0"snapshot.current = "38"snapshot0.uid = "39"snapshot0.filename = "sample-vm-name-Snapshot39.vmsn"snapshot0.displayName = "Consolidate Helper"snapshot0.description = "Helper snapshot for online consolidate."snapshot0.createTimeHigh = "274900"snapshot0.createTimeLow = "-753698745"snapshot0.numDisks = "1"snapshot0.disk0.fileName = "sample-vm-name.vmdk"snapshot0.disk0.node = "scsi0:0"snapshot.needConsolidate = "FALSE"To resolve this issue, perform one of these options:
If the virtual machine does not have any snapshots, delete the existing .vmsd file. The file is recreated the next time a snapshot is created or the next time the virtual machine is powered ON.If the virtual machine has existing snapshots:
Modify snapshot.current in the .vmsd so that it points to an existing snapshot.When the virtual machine is up and running, commit all the snapshots, power off the virtual machine, then delete the virtual machine's .vmsd file. The file is recreated the next time a snapshot is created or the next time the virtual machine is powered ON.