Friday, May 13, 2011

Convert VMWare Server VM Image to a Hyper-V VM Image

Mission: Convert VMWare Server VM Image to a Hyper-V image:
This article assumes some working knowledge of both VMWare & Hyper-V environments. This article was written assuming you do not have access to MS-SCVMM.
1.Shut down the VMWare Server VM & inspect the vmware server virtual machine files.
2.If it is configured with a single VMDK file, proceed to step 5
3. If No Continue
4. Convert the vmware vm using a VMware vCenter Converter to a vmware VM with a single VMDK file. i.e single file for each drive/HDD in the VM OS.
5. Goto starwind website, register & download StarWind V2V Converter and convert the vmware server image to a vhd file. It might be mentioned as a MS virtual PC image, but it works with Hyper-V too.
6. Convert all vmdks to VHD and copy them over to your hyper-v macine.
7. You still have work to do.
8. Create a hyper-v vm with existing vhd file and select the vhd file with C: or root partition as primary.
9. Add a NIC (make sure its in a different VLAN or in a isolated network so that it doesn't affect the primary VM if its in production) & other HDD as secondary HDD
10. Start the hyper-v VM
11. Remove VMWAre tools (This can be done before the VMDK to VHD conversion also)
12. Restart the VM
13. Install Integration services for Hyper-V
14. Restart the VM
15. Change the machine name and rejoin it to the domain if needed
16. DONEEEE!!!! You are ready to go

Your comments & inputs appreciated.

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.


The image file DFS Replication is valid, but is for a machine type other than the current machine

I was testing DFS on a couple of Windows 2003 x86 boxes with windows 2003 domain controller last week when I hit a roadblock with this error.
"The image file DFS Replication is valid, but is for a machine type other than the current machine"

I could not figure out what had gone wrong as DFS configuration went off smoothly but the DFS service would not start.
On deeper investigation I found that I had accidentally inserted the wrong CD when the DFS configuration was going on.
I inserted windows 2003 64-bit R2 CD instead of the 32-bit one.
To rectify the same I had to remove the fileserver role on the two Windows boxes in question, then remove DFS from Control Panel >> Add/Remove Windows components and then restart the entire process of adding fileserver role and enabling DFS.
Hope this helps someone.