Problem:
Unbale to power on few virtual machines. VM names got changed suddenly with name similar to /vmfs/volumes/xxxx.
While browsing datastore, .vmx file icon is not showing as virtual machine file. Also the files .vmx.lck and .vmx~ are visible in virtual machine folder.
Reason:
This issue occurs whenever .vmx or vmdk is locked by any other esxi hosts. This locks preventing the files to lock by another esxi hosts.
Normally VM files are locked by host during power on and locks are released during power off. But some situations locks are not getting released even after VM is off and this issue occures.
Solution:
Identify which host is making this lock and clear the locks by killing the process or rebooting the esxi hosts. Some situations we cannot see any running process related to this locked file, in that situation only solution is to reboot the host.
Steps to Identify Lock:
1. Login to esxi host using SSH.
2. Execute command
vmfsfilelockinfo -p <File path staring with /vmfs/volumes....> -v <vCenter IP> -u "administrator@vsphere.local"
Example:
vmfsfilelockinfo -p /vmfs/volumes/4444456-f3c44426-030f-3622222f000de/VM-0001/VM-0001.vmx -v 172.20.20.12 -u "administrator@vsphere.local"
3. This command will list the ESXi Host which have lock on this file. Identify the ESXi host and reboot it.
Awesome information! Such a wonderful reference! Thanks for all the hard work you have obviously put into this!
ReplyDeletebravo
ReplyDeleteTech Kiranangal: Vsphere 6.7: Vm Name Is Shows As /Vmfs/Volumes/Xxxx, Unable To Power On Vm, Vm Files Showing .Vmx.Lck And .Vmx~ >>>>> Download Now
ReplyDelete>>>>> Download Full
Tech Kiranangal: Vsphere 6.7: Vm Name Is Shows As /Vmfs/Volumes/Xxxx, Unable To Power On Vm, Vm Files Showing .Vmx.Lck And .Vmx~ >>>>> Download LINK
>>>>> Download Now
Tech Kiranangal: Vsphere 6.7: Vm Name Is Shows As /Vmfs/Volumes/Xxxx, Unable To Power On Vm, Vm Files Showing .Vmx.Lck And .Vmx~ >>>>> Download Full
>>>>> Download LINK UC