I recently had an issue powering on a VMware guest after a HA problem with one of my host, when I attempted to power on the guest I received the message “Failed to lock the file” in vCentre.
Within the vmware.log file for the guest it gave the name of the file that was locked.
- On one of my hosts I enabled and logged on as root using SSH https://kb.vmware.com/s/article/2004746
- Running the command vmfsfilelockinfo -p with the full path of the locked file from the vmware.log file showed which host was locking the file.
- I then put the host identified by vmfsfilelockinfo into maintenance mode and simply restarted it
- The lock was then cleared and I could power on the guest