VMs were running fine - then storage system went down. After storage system came back up I can't power on a number of VMs. Getting this error when I try to power them on:
Cannot power On vmname on esxhostname.xxxxx.com. Unable to access file <unspecified filename> since it is locked
error
Note: VMFS volumes do not have .lck files. The locking mechanism for VMFS volumes is handled within VMFS metadata on the volume.
*****you need to kill the process that is locked, if it does not, you probably will have to restart the VMware host.
I tell you from experience very likely to end up rebooting it.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=10051
Please, don't forget the awarding points for "helpful" and/or "correct" answers.
Mauro Bonder - Moderator
enjoy and good luck
I'm working through the steps with much enjoyment and got to the step where I run "tail /var/log/vmkernel" and try to find the MAC address of the host that has the locked file.
(In this case I've identified the locked file as virtualmachinename-9fb5b0a5.vswp file).
I pasted the results below. Something doesn't look right though. It says look for the line that says "owner" but that line has e61f13c5ac53
is that really the MAC address that is locking the file? Thanks again
Note: VMFS volumes do not have .lck files. The locking mechanism for VMFS volumes is handled within VMFS metadata on the volume.
*****you need to kill the process that is locked, if it does not, you probably will have to restart the VMware host.
I tell you from experience very likely to end up rebooting it.
If the file that is locked is a .vswp file, what is the impact of just deleting it?
That would be fine but you can't delete a locked file.
Stage,
Don´t worry, no problems. vswap is re created when virtual machine powered on.
Message was edited by: MauroBonder
I would try an ESXi host restart if you can't kill the hung process. Follow the KB article. If you can't kill the process or a restart doesn't help I would call VMware Support. There may be some file system corruption or ???
After restarting ESX host still same problem. Then deleted locked file - still doesn't work but now there's a new error:
Power On virtual machine
vmbldlnx15
Could not create '/vmfs/volumes/<UUID>/<VMName>/<VMName>.nvram': Failed to
lock the file
Did you there just one host VMware ? If you, you need check if have any processor of this virtual machine running in another host VMware.
Please, don't forget the awarding points for "helpful" and/or "correct" answers.
Mauro Bonder - Moderator
I would edit the VMX file and remove the nvram reference.
Edited vmx file and removed reference to .nvram file. The VM now boots!!! Mauro and DStavert thanks again.
Glad you are back running again.
Good luck.