Stay Connected
Failed to lock the file! VMWare virtual disk (vmdk)
I copied one of my Windows XP virtual machine running on a VMWare Server 1.02 host locally to my workstation. After the files were copied I opened the vmx file with VMWare Workstation 6 and received the error below after trying to start the virtual machine. I made one snapshot on the VMWare Server host.
Cannot open the disk ‘C:\VM-machines\Windows XP-001\Windows XP Professional-000001.vmdk’ or one of the snapshot disks it depends on. Reason: Failed to lock the file.

Locate the virtual machine in Windows Explorer and delete any .lck folders
Start the virtual machine. If this fails try to Map the virtual hard disk to Z:\

I than disconnect the virtual hard disk and retried. The virtual machine boot without any problem; my snapshot was valid.
| Print article | This entry was posted by Ivan Versluis on March 12, 2008 at 5:20 pm, and is filed under VMWare. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |

about 1 year ago
Thanks! Worked for me.
–BT
about 1 year ago
I virtualized a fisical machine but when i tried to open on workstation i got the same error: failed to lock the file. So i removed the 2 folders .lck but when starting again the machine i get this error: Cannot connect virtual device ide1:1. No corresponding device is available on the host.
It tries to open but as soon as windows screen appears i get a blu screen! i tried to map the drive to z as you suggested but i get the same error.
Can you helpme please. thanks
about 1 year ago
Thank you for your post, it worked great! thanks for sharing the knowledge!
about 1 year ago
Works! Great Tip
about 1 year ago
Wow i did it. Great thanks.
about 1 year ago
Worked for me as well!
thanx
about 1 year ago
Thanks so much for sharing this with us.
about 1 year ago
Yep ty, worked 4 me.
about 1 year ago
tks a lot
about 1 year ago
Very very thanks!
about 1 year ago
I had a similar problem after a power outage. In /var/lib/vmware/Virtual Machines/ there are 2 folders which end in .lck. Deleting both of these solved my problem
about 1 year ago
Thanks worked for me as well and I was running Ubuntu on VM not windows!
about 1 year ago
Worked. Thanks.
about 1 year ago
Worked. Thanks.
about 1 year ago
Thanks… it worked
about 1 year ago
You are the best
about 1 year ago
Grasia fiera, me rre sirbio
about 1 year ago
Renaming the .lck files (safer than deleting until I verified it would work ) worked perfectly for me. I am running VMware Server 2 under an Ubuntu Server v-8.04 64 bit platform, Dell Precision T3400 8Gb RAM machine.
I had been running several VMware Workstation machines under XP Pro with VMware Workstation v-6.5 with a Dell Vostro 220 4Gb RAM machine, and wanted to migrate the virtual machines to the VMWare Server 2 for better load balancing, and on a higher RAM machine for greater concurrent virtual machine density. Imagine my surprise when the first imported machine worked great. The others did not, until I renamed the .lck files. Your post saved me hours of setting up new virtual machines.
Thank You!
Gil
about 1 year ago
Wow, thanks a lot, u saved so much of my time
about 1 year ago
Thanks a million that worked
about 1 year ago
ho lo stesso problema ho fatto le seguenti prove:
ho la vmware server con windows 2003 server su server linux red hat 5 enterprise edition
1: cliccando su start mi dà l’errore:
Unable to Power On virtual machine with “A General System error occurred: Internal error”
2: ps -eaf|grep vmware
root 26375 19955
Message from hyperion.sin.it: Cannot open the disk ‘/u03/VMachine/W2k3PLA/W2k3PLA.vmdk’ or one of the snapshot disks it depends on. Reason: Failed to lock the file.
qual’è il pid è 26375 o 19955
3: devo fare kill 26375 o kill 19955
e riavviare la virtual machine?
aspetto una mail di risposta.
grazie cordiali saluti
dott. ugo montorsi
about 1 year ago
Thanks a million… worked for me and saved my VM!
about 1 year ago
Cheers, Works Like A Beauty
about 1 year ago
thanks
about 1 year ago
gracias fiera me sirvio mucho ya lo daba por muerto mi maquina virtual
about 1 year ago
Thanks dude. It worked………
about 1 year ago
Awesome. You are my hero.
about 1 year ago
Excellent!!!!! It works for us, thankyou very much!
about 1 year ago
Thanks it worked great for me
about 1 year ago
Thanks. It worked for me aswell!
about 1 year ago
Great, worked perfectly! Cheers!
about 1 year ago
Nice! It worked!
about 1 year ago
Just wanted to add my name to the long list of people who solved their problem from this tip. Thanks.
about 1 year ago
thanks… worked for me too. good job.
about 1 year ago
Thanks a bunch!!….You saved so much of my time!
about 1 year ago
Thanks!!
about 12 months ago
thanks a lot … it really saved a lot of time .it was great help .
about 11 months ago
thanks it worked
about 10 months ago
Thanks, great information, solved my issue
about 10 months ago
muy bien, muchas gracias. Thanks.
about 10 months ago
dzieki wszytko dział!
thx everty thing work
about 10 months ago
I’d just like to add my thanks too! I had my heart in my mouth when I thought I’d possible lost yesterdays development work but everything is running again. Thanks!
about 10 months ago
Thanks a lot. It is grate solution.
When i upgrade from VMServer 1.8 to VMWare Server 2.0, I can’t open my os. I am confuse what i can do, after that i try to find the solution. From this site i get solution. Just i delete the two lock the from vm directory as per recommendation. Thanks a lot.
about 10 months ago
Excelente!!!
about 9 months ago
I ran into the same problem when I moved from VMWare server to VMWare Workstation. Your solution worked for me too. Thanks for sharing!
about 8 months ago
The error occurs most of the times because VMware finds a lock directory in the same directory as the VHD.
)
The simple solution is to remove this directory (you’ll recognize it by the extension ‘.lck’)
The error is most likely caused by a wrong shutdown of VMware (either it crashed, or your PC crashed, or you just broke it. whatever applies
Happy virtualizing~
about 8 months ago
Exactly what I needed. Thanks a ton
about 8 months ago
Excellent! That is all i need to know! Worked great.
about 8 months ago
Thanks!
about 8 months ago
Perfect. Thanks for sharing.