Sunday, February 24, 2008

VMWare Virtual Machine 'Failed to Lock the File'

Scary moment occurred last week when one of my virtual machines failed to start from VMWare Workstation. The reported error was "failed to lock the file". A bit of searching revealed that I needed to delete the .LCK file in the VM's folder.

The cause for this (I think) was that I had opened the virtual disk of this VM as a mapped drive on the host machine (TIP: very useful feature to get at files from the VM without powering it up - just right click on the .VMDK file in Windows Explorere, and you'll see a couple of options there to map the disk as a drive). That drive was still mapped when trying to start the VM, meaning that the host machine was accessing the VM's files.

43 comments:

Gulzar said...

Great, Your suggestion worked for me in resolving my issue.


Thanks

DrGradus said...

I was on the verge of packing out. A google search quickly pointed me to your blog. And I here I found the answer.

Thanks!

andy ballard said...

Helped me too,
Thanks

Tommy Butler said...

Thanks :D

John said...

Thanks! Very helpful today as I got hit with a power outage.

However, I'm running VMWare server and the lock files end with ".WRITELOCK"

Radiocom1 said...

Thanks. Your suggestion worked very well. Not sure if this is relevant but I use Server 2003 / VMWare 2.0 and found that I had to delete all files and folders with .lck extensions in the copied back up VM to make it work.

Fu Fei said...

Thanks!, it helps

Jose Angel Rivera said...

Thanks!!! It worked for me...I was on panic...lol

aaron said...

Thanks!

Rob said...

Awesome!! Thank you for the post! This fixed my issue. I sweating for a minute. Thanks again!

Family Reunion said...

I was stressing a little - I thought i corrupted my VM files... useful feature, i must say.

Thanks

Ajit Singh said...

Thanks a million for such a useful piece of advice. I have thrown nearly 5 virtual machines due to this problem thinking that they have got corrupted. Thanks again.

Michael said...

Your suggestion was Number 1 on Google. Thank you very very much.

Jimbras said...

YOU ARE THE MAN!!!!!JESUS YOU SAVE MY DAY!!

Many Thanks,
SP from the country of sun,PORTUGAL

Jean Pierre said...

THANK YOU VERY MUCH, YOU SAVE MY DAY !!!!!

Marcelo said...

PERFECT! Thank you!!!

WilG said...

Very Very helpful. Thxs a million.

soops said...

A very helpfull post, many thanks

Dulcardo said...

GREAT!

calebfinley said...

Great, on VMware's site It was so problematic to find a solution. Thanks for posting this, worked like a charm

Ben said...

Thanks very much, another persons problem solved :)

Mizael Longuini de Morais said...

Thank you so much!

jorge said...

Good tip, a failed to lock the file google search brought be straight to your blog and indeed solved the problem in seconds, for people having problems loading the vmware-server ui you should point to localhost as: https://127.0.0.1:8333/ui/ and this should solve the problem.

Aozaki said...

Thank you very much for posting this.

Rostand Abear said...

Thank you, it worked for me too...

Jude said...

Thanks Dude. Very Helpful!

Jude said...

Thanks Dude. It helps a lot

Jude said...

Thanks Dude. It helps a lot

Lucas said...

I did not have any *.lck files in the VM's disk folder but I managed to get it working by removing the Hard Disk from its settings and adding it back in again (VMWare Server).

Darcy said...

This solution really saved my bacon this morning. I left VM running over night and my automatic back up had to shut down the VM. I think this was the reason it locked. Thanks for posting the resolution!

Live Life On Fire said...

Ditto

Ralph Hulslander said...

Gee a year later and it still is helping out.

You'd think it would be documented by now.
Ralph

Reinaldo Ferreira said...

A simple tip solved a huge issue! Thanks a lot!!
Reinaldo

Mohammad said...

Thanks a lot, this helped me on vmware server.

Alain said...

Thank you!

This helped me solve my problem!

Anton said...

Thank you!

This helped me solve my problem too!

GUINEO said...

thanks it works in my laptop , i'm runnin' ubuntu

Kooby said...

Thank you. Great help!

Nate said...

Thought I just lost the shell program that I moved from my flash drive to VM (and deleted from the flash drive afterwards). Google pointed me here. Nice tip, thanks!

mojo said...

Thanks!

I had 80 directories with the LCK extension...moved them to a temp directory and everything booted up.

C said...

Saved my life, great job researching it!!!

Randy said...

THANKS!

This post was the first hit on Google, and saved my bacon. A power outage was followed by the fact that VMWare Fusion would no longer load my Windows XP virtual machine.

I searched my host computer, a Mac, for .lck files and moved them all into a temp folder. VMWare loaded Windows XP no problem after that was done.

Faradade said...

Thanks a lot , it was so helpful