Hi Everyone.
I Have Cluster With 4 Hosts and 20 VMs.After PowerFailure, Servers Turn on and all VMs Work Correctly Except Two of them.
They show same Error. I think That .vmx file lock ! I cannot Unlock .vmx file.
Here are some Erros that I faced.
When I want to move the VMDK:
Because Of vmfsfilelock info command, My VMX Locked and I can't Unlock it.
Cannot Register Vm and .vmx File Icon Change!
Thanks,
There are 2 solution
1. unregistered vm and register on 192.168.165.204
2. Put server 192.168.165.204 on maintenance and reboot host the power on vm
You will try to restart management services on all ESXi hosts in Ckutser and release lock.
Run services.sh restart on each host and try to power on VM
Thanks for Reply,
Vm is Unregistered on my host but Cannot Register it again.(Because of .VMX Icon, Register vm Icon is grayedout.)
I put Server on maitenance mode and restart my server but nothing happened.
Best Regards,
Try to move vmx.lck and vmx~ files out of VM folder and after it try to re-register VM
I Faced this Error when I want to move the files that you said!
"Unable to Access File [File location] VMfolder/VMName.vmx"
Will you can shutdown al lenvironment?
If you can do those steps:
1. Shutdown all VMs in an environment
2. Shutdown all ESXi hosts in an environment
3. Power on "only" one ESXi host
4. Power on vCenter Server
5. Register VM on this host and power on it
I think you have duplicate registration of those VMs on ESXi hosts. (because you have file vmx~)
Did you try to restart services on all ESXi? If yes and you still have an problem - try my plan with shutdown. It was work for me any time when i or my customers have a problems after power failures
vmx.lck file shows that the vmx file has been locked may be some stale process are running.
Try login to ESXi host console > enter user name and password, restart the management services and check the VM status on host, if the VM status is showing orphaned then try un-register and re-register VM still not working try to find the lock on vmx file by running the command
vmkfstools -D <file name>
it will show you the lock owner, find the mac address of ESXi host vmnic0 and check which host is having the MAC showing after running the command, go to that host and try to register the VM, if not working restart the management services on other host whose mac showing after running the command this should remove the stale lock and you should be able to re-register VM.
Thanks