VMware:- How to remove a locked VM
Removing the Lock:
Power off the virtual machine holding the lock
Reboot the ESXi host that holds the lock
Removing the .lck file (NFS only)
Power down the virtual machine and remove lck-#### files in the virtual machines directory.
Caution: Only remove the lck files of a powered off virtual machine
Note: VMFS volumes do not have lck files. The locking mechanism for VMFS volumes is handled within VMFS metadata on the volume.
If above steps not removed the lock please follow below steps.
Enable SSH access to the ESXi host where problematic VM reside
Type below command
esxcli vm process list
This will list the VMs on the host and most importantly the VM’s World ID and its storage location of the VMX File.
After confirming that the VM is the one with the issue, you can power off the VM with the command:
esxcli vm process kill -t [soft,hard,force] -w WorldNumber
so for example:
esxcli vm process kill -t hard -w 123456789
NB.
Soft = Graceful
Hard = Immediate shutdown
Force = Nuclear option
Comments
Post a Comment