In our day to day operational activity into the vCenter we usually encounter with issue, like unable to power on the VM. VM failed to lock the file or file has been locked.
To resolve the issue, I have some very usefull command which you can execute to immediatly idently where the .vmdk is being locked.
As most of you know that vmkfstools -D is used to identify the lock on the .vmdk where its gives the mac address of the VM or Host where the lock exist and we can identify the lock from Esxcli.
ie (vmkfstools -D /vmfs/volumes/abcd.vmdk)
Apart from this there is one beautiful command which we can use to identify the lock on the .vmdk.
The command to identify the lock is "vmkfsfilelockinfo -p (location of .vmdk)
vmfsfilelockinfo -p (/vmfs/volumes….)
Here this command will give you exect answer that lock is on Host whose IP is 192.168.1.1
Verify the Host and identify it. possibility it require a reboot to release the lock.
Happy Sharing... :)