Monday, December 15, 2008

VMware server 1.0.7 on Ubuntu, "Cannot open the disk... Failed to lock the file" error.

My searches turned up a number of hits, but nothing specific for VMware server 1.07 build-108231 or Ubuntu 8.10. In any case, my Windows XP guest instance wouldn't start, reporting an error of "Cannot open the disk 'somefile.vmdk' or one of the snapshot disks it depends on. Reason: Failed to lock the file". The scenario that prompted this was that the host OS was shutdown hard while the guest was still in the process of shutting down.

If you check out the path of the problem guest instance... (e.g. /var/lib/vmware/Virtual Machines/ProblemGuest), you should see a few *.WRITELOCK files. Just rename those *.WRITELOCk files to something else... like *.OLDWRITELOCK. After doing so, go back to the VMware Server console and startup your guest - it should fire-up without incident.

1 comment:

Nick said...

And if Vmware server fails to start-up at some point, run a "sudo" and bounce through the reconfig.