Use VHD disk from Virtual PC / Hyper-V on VMware
Lately I’ve been working with Virtual PC’s that use VHD’s disks. As I don’t have Hyper-V on my computer, I wasn’t able to load the VHD disk I got that contained a 64-bit OS, because neither Virtual PC 2007 nor Microsoft Virtual PC support 64-bit guest OS’s.
So I needed to use it on VMware, that supports 64-bit guests, to configure some stuff and then return the VHD file to my team. The best way to go around this, as they need to use that modified disk again on the Hyper-V environment, was to create a differential disk from the VHD so I only share with them the resulting diff disc (else I’d have to upload a 40GB disk with all the changes through my slow internet connection).
But the problem is that, there’s no way to transform it to VMDK and back to VHD and keep only the differential disk. So transforming it to VMDK and later moving it back to VHD is not a possibility.
I’ve found that there’s a way to import it inside VMware and share the VHD instead of using a copy, so I thought it may be of help for others.
- Create Differencing VHD
- First, to create the differencing VHD disk, open up Windows Virtual PC or Microsoft Virtual PC 2007.
- Create a new Virtual PC.
- When creating the virtual hard disk, select Create a virtual hard disk using advanced options, and click Next.
- Select Differencing.
- Type in the name of the Differencing VHD.
- Select the original VHD file (it should be read-only just to be safe you don’t modify it).
- Click on Create. This will create a new Virtual PC based on the VHD disk with a new differencing disk that you’ll now import into VMware.
- Import Virtual PC into VMware
- Open VMware.
- Go to File, select Import or Export.
- For Source Type, select Other.
- Select the VMC file for the Virtual PC you previously created.
- In Source Data, select Convert all disks and mantain size.. This step is very important, as if you select anything else you won’t be able to use the VHD as source and VMware will force you to convert the disk to VMDK format.
- For Destination Type, select Other Virtual Machine.
- Type in the name of the VM you want to create.
- Now select Share source, this option is only enabled because you previously selected Convert all disks and mantain size.. This allows VMware to use VHD instead of VMDK as the virtual hard drive.
- Carry on with the rest of the wizard and the summary screen should look like this.
- After the process ends, you should end up with a screen similar to this one.