After transferring and/or trying to restart a VM in ESX you may be presented with the error message “Unable to access a file since it is locked”.
Now what you need to do is work out what is actually locking this file and then (unsurprisingly) find a way to unlock it. Generally the problem will be caused by one of three things.
1. Process Lock: There is a process on the ESX server that still has hold of a file(s) used by the VM. This is one of the most common causes. To resolve this there have been a couple of good VMware Forum postings here and here that have been consolidated to this useful posting over at GabesVirtualWorld.com (*Note: It is worth checking out the comment by Kent at the bottom of the posting). Also, check out Tecumseh’s posting here.
2. Disk Naming Conflict: Two or more disks with the same VMDK name. This can be caused by another disk with the same VMDK file name being referenced by the VM. This may have occurred due to a VM move where the VM used have disks located on different LUN’s or similar which have now been moved onto the same LUN and VM directory. If this is the case rename one of the matching VMDK files (preferably not the one used as the boot drive) and with the VM powered down remove the renamed disk and reattach it (using its new name).
3. Corrupt VMX file: There is a possibility that the VM’s VMX file has corrupted. You can look through the VMX file and try and troubleshoot the issue though it is quite often quicker to recreate a new VMX file. This can be achieved by creating a new VM and attaching the existing disks to it (ie: rather than creating a new VM with new a new disk).
So here are three potential problem areas that you may want to consider when getting a “Unable to access a file since it is locked” within ESX.
Related posts:
- VMware Workstation – “Cannot open one of the virtual disks needed by this VM because it is larger that the maximum size supported by the host file system” After moving a VMware Workstation VM from one PC...
- VMware vCenter Mobile Access – Now Available for Download. A few days ago in my post here I...
- Coming Soon – VMware vCenter Mobile Access! The new VMware vCenter Mobile Access (vCMA) will be...
- Link – VMware vSphere Virtual Disk Types & Thin Provisioning Here is a really good article on whether to...

January 16th, 2009
Kiwi Si
Posted in 







My name is Simon Seagrave and I am a London (UK) based Technical Architect. 










kill Process is file lock
fuser -k
[Reply]
fuser -k file path / file name
[Reply]
just shutdown most esx servers. add the machine from datastore to the only running esx and power it up. now you can power on all the other esx hosts
[Reply]