As a developer, I tend to use VMs extensively to test new features and deploy software that I wouldn’t like running on my main machine. VMware is brilliant in that it offers a free tool to create and run VMs - VMware Player.
As handy and great VMs are, they are also quite volatile and tend to break or get corrupt easily. If your host machine restarts unexpectedly or if the VM is not shut down properly etc. you may then experience issues the next time you try to restart. Below I have described how to resolve 3 of the most common corruption errors. The best place to look for issues, if not otherwise advised by the actual player is in the VMware log file which can be found at the directory where your VM is running from. I have a c:\Virtual Machines directory for all my VMs.
1. The VM takes for ever to load/startup or presents you with a black screen and no progress
Close down VMware Player. Go to the directory where your VM files reside, search for and delete all directories and files ending in .lck
2. Warning: the system was unable to load a page of memory; this can be caused by network problems or a failing hard disk drive.
Go to the directory that your VM files reside, search for and delete all .vmem and .vmss files. These files hold the state of you VM before it was last shut down and are used to restore it to this state during start-up. If these files are corrupt for some reason, the VM startup will show the error above. Deleting these files allows you to reboot your VM OS with a clean slate.
3. Cannot open the disk ‘path of vmdk’ or one of the snapshot disks it depends on. Reason: the specific virtual disk needs repair
In this case, one of the vmdk files I corrupt and needs repairing. To fix this error, download and install the Virtual Disk Development Kit here (registration is required i'm afraid!)
Follow the steps below:
- Open the command line (cmd.exe)
- Navigate to the local installation of your VMware Dev kit (mine is the default C:\Program Files\VMWare\Virtual Disk Development Kit\bin
- Type the following command “vmware-vsdiskmanager.exe” –R “the fully qualified path to your corrupt vmdk”
- Hit Enter
You should see the following message:
“The virtual disk “path of your corrupt vmdk file” was corrupted and has been successfully repaired.