VMware Cloud Community
Shadow23
Contributor
Contributor

Cannot Power On Virtual Machine After Host PowerOff Suddenly

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:

InkedScreenshot_2020-06-21 vSphere - esx04-LSiR10-1 - Files(1)_LI.jpg

Because Of vmfsfilelock info command, My VMX Locked and I can't Unlock it.

Picture1_LI.jpg

Cannot Register Vm and .vmx File Icon Change!

Screenshot_2020-06-21 vSphere - esx04-LSiR10-1 - Files(2)_LI.jpg

Thanks,

Reply
0 Kudos
7 Replies
RajeevVCP4
Expert
Expert

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

Rajeev Chauhan
VCIX-DCV6.5/VSAN/VXRAIL
Please mark help full or correct if my answer is use full for you
Reply
0 Kudos
anandrey
Contributor
Contributor

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

Reply
0 Kudos
Shadow23
Contributor
Contributor

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,

Reply
0 Kudos
anandrey
Contributor
Contributor

Try to move vmx.lck and vmx~ files out of VM folder and after it try to re-register VM

Reply
0 Kudos
Shadow23
Contributor
Contributor

I Faced this Error when I want to move the files that you said!

"Unable to Access File [File location] VMfolder/VMName.vmx"

Reply
0 Kudos
anandrey
Contributor
Contributor

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

Reply
0 Kudos
Noorealam1
Contributor
Contributor

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

Noor Alam
Reply
0 Kudos