Failed to lock the fileVMware vSphere ESXi 6.5 U1 - Build: 5310538 or above
VMware vSphere ESXi 6.7
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
VMware vSphere ESXi 9.x
The issue is caused by the snapshot consolidation process maintaining an exclusive lock on the VMDK files, which prevents the VMX process from initializing a power-on sequence.
This is expected behavior of the snapshot consolidation task currently running on a VM when it is powered off.
Note: There is no supported way to stop snapshot consolidation and attempts to do so may result in data corruption. Do NOT cancel the task. Do NOT restart host management agents during this task.
Option 1
Wait for the snapshot consolidation process to fully finish before attempting to power on the VM.
Option 2
Restore the VM from backup to a new VM object (example of "VM_NAME_Restored"). In some cases this may be quicker than waiting for the disk consolidation to complete and get the VM powered on. This will require additional storage space, processing on the target storage and may still require disk consolidation be run at a later point.
Consolidation of large disks can take several hours, during which the VM will remain unavailable.
Consolidating/Committing snapshots in VMware ESXi
Best practices for using VMware snapshots in the vSphere environment
Unable to power on a virtual machine after cancelling snapshot consolidation
Collecting information about tasks in VMware ESXi