It’s not the first time today that I’ve faced this situtation where I started up my vmware virutal machine and it tells me that vmdk is corrupted. Just the other day, I tried to open another vmware image and I can’t even find the *.vmx file even though I was still using the virtual machine last night.
What can you do?
1. If your vmdk file is corrupted, it’s very likely that you can’t start your vm anymore. The least that you can do to cut your losses is look into the folder where your vm is located and try to run a utility call “VMWare Disk Mount Utility” to mount vmdk files which are still “healthy” and copy files which are still retrievable out from those disk images.
2. If for some reasons your vmx file is lost, the magnitude of losses is not be as bad as losing a vmdk. vmx is simply a text configuration file that stores properties of the vm image such as operating systems, image disk size, allocated RAM for the VM etc.
I don’t have a solution yet for this problem but heard other people saying that you could create a new vm (in a new folder) and copy all the files over from the ailing VM. Or, you can try to create your own vmx file too using this online tool.
From both of my experience above, I guess I can draw the following conclusion:
1. NEVER do an illegal shutdown by turning off the power of your computer/removable disk while the vm is still running.
2. I used to pause a virtual machine and resume the next day. Nowadays I shut them down completely.
3. I had occasions where I hibernate my main machine while a vm is still running. The next time I resume my main machine, the vm doesn’t play nice anymore, and some times it does. I would suggest that you shut down or pause any vm before you hibernate or shut down your main machine.
Please leave a comment if you’ve heard about better workarounds or solutions in regards to this matter.
* If you’re thinking of buying or upgrading VMware software, please read this VMware discount coupon code promo article to see how you can get a discount.
mennuruspvd says
Hi there,
the work around to replace the corrupted .vmx file is as below.
search for the vmware.log file and identify the “CONFIGURATION” section.
Copy all the text just below this Configuration section.
we need to do some house keeping here like editing this section.
for example:
DEC 43 11:11:47.499: vmx| DICT config.version = 8
DEC 43 11:11:47.499: vmx| DICT virtualHW.version = 4
DEC 43 11:11:47.499: vmx| DICT floppy0.present = TRUE
remove the the text and just copy only the below text:
config.version = 8
virtualHW.version = 4
floppy0.present = TRUE
-this shows that we have the original VM hardware configuration information with us now, with this info we can rebuild the .vmx file.
Now, save this text file with same name as earlier the .vmx config file was and remove/delete the corrupted .vmx file from the folder.
Now, try give power ON the VM and it should boot and come up normally.
If this does’nt work, the only solution is to create a new VM with same Hardware configuration as to earlier corrupted VM (.vmx file) and while attaching the data store we need to attach the old VMs .vmdk file data store. This is because we know that .vmdk files are healthy and in working condition as there is no issue with VMFS file system (or) .vmdk disk files.
Thankyou,
mennuruspvd
David says
Hey mennuruspvd, thanks for contributing such a detailed comment. This will help lots of other vmware users for sure!
Jan says
Thanks mennuruspvd, I run windows check disk on drive c: and after windows restart, VMWare machine was working fine again…
beck says
Can you help me to fix my .VMX file corrupt . I see some document but still do not how to fixed it.
David says
did you read the article and tried those tips? what errors are you getting?
ias1 says
This worked for me 🙂 The only additional steps that I needed to perform was to set the guest operating system for the vm through the Virtual Machine Setting window, after a window appeared with the message below:
“The configuration file does not specify a guest operating system. Select a guest operating system from the General page on the options tab of the Virtual Machine Settings.”
Also, I had to add back all of the Hardware Devices that were previously configured, within the Virtual Machine Settings window.