VMware ESX – “Unable to access a file since it is locked”

VMware

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.

VMware ESX Unable to access a file since it is locked

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.

 

No related posts.

You can leave a response, or trackback from your own site.

5 Responses to “VMware ESX – “Unable to access a file since it is locked””

  1. Khai says:

    kill Process is file lock

    fuser -k

  2. Khai says:

    fuser -k file path / file name

  3. tt says:

    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

  4. zinto says:

    Removed vm from inventory and re-added it – started OK then.

  5. Jeena Me says:

    I had the same problem and to unlock such file nothing helped but a tool available at http://pathtoodeep.com

Leave a Reply

Powered by Sweet Captcha
Verify your real existence,
Drag the "sale!" on the sticker.
  • captcha
  • captcha
  • captcha
  • captcha

StarWind Software
AppAssure
VMware vSphere Recommended Reads
Veeam #1
TrainSignal - vSphere Pro
Trilead
TechHead Needs You - Top 25 Blog Sites