VMWare Workstation powering on virtual machine error: “Failed to lock the file”
When I powered on a Virtual machine in VMWare Workstation 10, I got this error: “Failed to lock the file”. The problem occurred when the PC was powered off due to some power issues while the Virtual machine was up and running. When I tried to power on the Virtual machine, it gave this error and halted.
The screenshot of the error is as follows:
This is due the fact that the files are in use by some other application and the locks on these files are still active. Then, I checked the files in the filesystem for this virtual machine and found some lock files, like the ones given below:
564d10be-b62c-927b-6434-5c7cecffeb69.vmem.lck
Red Hat Linux.vmdk.lck
Red Hat Linux.vmdk.lck
I deleted these lock files from the Virtual machine filesystem directory and tried to boot the virtual machine.
It worked fine and the virtual machine booted successfully.