Saturday, April 16, 2011

The selected virtual machine is not recognized on this system

I encountered the following error while trying to add a vmware workstation 7.1 VM to a VMWare Server 2.x.
The selected virtual machine is not recognized on this system. The cause of this problem may be that the virtual machine's .vmx file is corrupted, or that the virtual machine version is newer than is recognized by the host. You can remove the virtual machine from the inventory if you believe that it is not recoverable


Have you ever encountered this error? Well, TBH I did, last night, and spent a sleepless night and a greater part of today figuring out the reason behind this.
I had a VMware Server 2.0 VM which had a few snapshots. It was occupying around 20-30GB space on my host and this wasn't something I wanted. VMWare server doesnt support more than one snapshot!
I had to move the VM to a machine where I had VMWare workstation 7.1 installed, remove the snapshots and move it back to the server. Just as I thought things were done, I stumbled upon the above error.
On googling I found that the VMs on VMware workstation and VMware server are compatible and there is no migration procedure as per VMWare. Along with an ex-colleague of mine (VMWare vSphere & Hyper-V expert), we concluded that it must be something in the .vmx file which is causing VMware Server to throw this error on adding the VM to its inventory.
Further googling ensured I ran into a cul-de-sac, so thought I should try to read the files myself to see if there are any new parameters which workstation 7.x has introduced.
Finally I zeroed in on two places which had the following entry:
.encoding = "windows-1252" in the VM machine's .vmx file.
.encoding = "windows-1252" in the VM machine's .vmsd file.

I removed the two lines which had .encoding entry (both .vmx and .vmsd) and again tried to add the VM to the inventory of VMWare Server. And viola, it worked.

Hope this helps someone.

Cheers.

No comments: