Link to home
Start Free TrialLog in
Avatar of danbrown_
danbrown_Flag for United States of America

asked on

VMware ESXi 4.1 - Failed to lock the file

Hello Experts - I am regularly having backup issues using Veeam and ESXi 4.1.  I replicate all of my backups offsite each evening using Veeam 7.  Every few weeks I start seeing errors that a replication has failed.  Checking the Veeam logs always shows its a problem with file locking.  If I attempt to "Revert to current snapshot" in VMware I get the following error:

A general system error occurred: Failed to lock the file

There are no .lck files in the datastore.  I'd like to understand why this happens and how I can unlock the file without restarting the physical host each time.
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

A process has locked the file.

The VM does not have a snapshot attached?

Or the virtual disk is attached to the Veeam VM.

The method of finding which process has locked the file is a difficult one and requires the use of the command

PS with grep in the console....

Also looking for the lock on the file....

It can often result in a waste of time!

And reboot host is quicker....

Is the Veeam job failing..?
Avatar of danbrown_

ASKER

Hi Andrew!  Here is a screenshot of the VM that won't replicate with a couple of snapshots:

User generated image
The Veeam server does not have any of the virtual disks attached.  I get that rebooting the host may be the fastest way to unlock the file but I'd like to understand why this keeps happening.  Why would a process lock a file and refuse to unlock it without a reboot?  And what can I do to prevent it from happening?
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have an open ticket with Veeam but as it is in every case I've ever opened with them they refer me back to VMware since the core issue is there.  VMware provides no support for 4.1 any longer.
Are you on the latest and last builds of ESXi 4.1 ?

Locks still occur with 5.5 U2!

We've been working on one today, for 6-7 hours!
Ouch, so even upgrading ESX won't really solve the locking problem.  Maybe its just my lack of understanding but I just don't get why an operating system can't be programmed to easily identify and unlock whatever process is locking a file.  Its a very common problem that you would think would have been addressed by now!  Thanks for your help Andrew, very much appreciated.
Its third party vendors which cause the issue!
And with any OS sometimes locks and processes cannot be killed or shutdown.