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.
Thanks! Worked for me.
–BT
BT
27 Sep 08 at 9:34 pm
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
tex
29 Sep 08 at 10:57 pm
Thank you for your post, it worked great! thanks for sharing the knowledge!
Ragu
22 Nov 08 at 4:15 pm
Works! Great Tip
kotwun10
22 Nov 08 at 6:07 pm
Wow i did it. Great thanks.
Ngo viet yen
1 Dec 08 at 10:24 am
Worked for me as well!
thanx
Simon
4 Dec 08 at 2:04 pm
Thanks so much for sharing this with us.
anonymous
30 Dec 08 at 1:33 pm
Yep ty, worked 4 me.
John
13 Jan 09 at 12:19 am
tks a lot
boby2k
19 Jan 09 at 7:18 am
Very very thanks!
nye
23 Feb 09 at 4:18 pm
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
Captain Solo
26 Feb 09 at 5:07 pm
Thanks worked for me as well and I was running Ubuntu on VM not windows!
Me
2 Mar 09 at 8:14 am
Worked. Thanks.
Tarcio
6 Mar 09 at 3:40 pm
Worked. Thanks.
Dopu
11 Mar 09 at 1:29 pm
Thanks… it worked
belson
18 Mar 09 at 2:23 pm
You are the best
P4W3R
26 Mar 09 at 2:29 pm
Grasia fiera, me rre sirbio
carlo
9 Apr 09 at 2:52 am
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
Gilbert M Hale
26 Apr 09 at 9:21 pm
Wow, thanks a lot, u saved so much of my time
ruch
12 May 09 at 11:04 am
Thanks a million that worked
leezo
13 May 09 at 7:24 pm
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
ugo montorsi
14 May 09 at 7:30 pm
Thanks a million… worked for me and saved my VM!
Brian
28 May 09 at 5:35 pm
Cheers, Works Like A Beauty
Pallav
2 Jun 09 at 1:12 pm
thanks
mj
8 Jun 09 at 9:24 am
gracias fiera me sirvio mucho ya lo daba por muerto mi maquina virtual
roly
19 Jun 09 at 12:20 am
Thanks dude. It worked………
pk
27 Jun 09 at 11:03 am
Awesome. You are my hero.
Jeff
9 Jul 09 at 3:32 pm
Excellent!!!!! It works for us, thankyou very much!
Babu
22 Jul 09 at 2:03 pm
Thanks it worked great for me
Prasanjit
28 Jul 09 at 10:17 am
Thanks. It worked for me aswell!
Jokohanho
3 Aug 09 at 10:58 am
Great, worked perfectly! Cheers!
Rich
6 Aug 09 at 2:46 pm
Nice! It worked!
Biliballa
21 Aug 09 at 12:55 pm
Just wanted to add my name to the long list of people who solved their problem from this tip. Thanks.
Niels Brinch
27 Aug 09 at 9:22 am
thanks… worked for me too. good job.
dom
2 Sep 09 at 3:51 pm
Thanks a bunch!!….You saved so much of my time!
Mehr
3 Sep 09 at 10:32 am
Thanks!!
philip
3 Sep 09 at 1:18 pm
thanks a lot … it really saved a lot of time .it was great help .
Prashant
7 Sep 09 at 4:54 pm
thanks it worked
totad
21 Sep 09 at 9:13 am
Thanks, great information, solved my issue
Klaus
10 Oct 09 at 11:55 am
muy bien, muchas gracias. Thanks.
Rherrera
13 Oct 09 at 6:55 pm
dzieki wszytko dział!
thx everty thing work
beny
20 Oct 09 at 6:48 pm
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!
Paul
22 Oct 09 at 12:08 pm
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.
Ahasan Kabir
3 Nov 09 at 6:28 pm
Excelente!!!
Rigo
7 Nov 09 at 3:30 am
I ran into the same problem when I moved from VMWare server to VMWare Workstation. Your solution worked for me too. Thanks for sharing!
Oberon
13 Nov 09 at 1:57 pm
[...] http://www.networknet.nl/apps/wp/archives/396/comment-page-1 Tags: 3, a, archive, boot, C, di, file, files, il, isc, nt, on, open, PEN, R, server, the, virtual, [...]
CANNOT OPEN THE DISK FAILED TO LOCK THE FILE: VMWARE | Secoforma
20 Nov 09 at 11:48 am
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~
Ced
14 Dec 09 at 1:47 am
Exactly what I needed. Thanks a ton
Bryan
28 Dec 09 at 8:19 pm
Excellent! That is all i need to know! Worked great.
Roderick
29 Dec 09 at 12:46 am
Thanks!
Zembold
29 Dec 09 at 4:49 pm
Perfect. Thanks for sharing.
johnkmx
5 Jan 10 at 9:08 pm
thanks….it worked
futureOpen
19 Jan 10 at 2:53 am
[...] Солюшн нашел здесь Failed to lock the file! VMWare virtual disk (vmdk) [...]
Vmware Server 2.0.2 on BackTrack4 « KiRCh1984`s webblog
1 Feb 10 at 3:40 pm
Thank u so much it worked !!!!
Aswin
16 Feb 10 at 10:37 pm
thanks
dani
28 Feb 10 at 6:07 pm
I am not a vmware techie and know enough to be dangerous…have the lock file situation and understand the fix but do no know how to get to the folders\files on the vm to delete them. Any help greatly appreciated.
Rob
6 Mar 10 at 6:09 pm
Thanks, saved my bacon. Otherwise I would have to rebuild the vm’s.
Ismael
11 Mar 10 at 2:36 pm
Thanks…!! it works..but I could not understand why it was happened ?
Sangy
19 Mar 10 at 6:54 pm