Are VHDs compatible between Hyper-V and Virtual Server and Virtual PC?

This question frequently comes up, but most often is not the question people mean to ask. As written, the answer to the question is yes – there is no change to the VHD format specification used between any of these virtualization solutions. The real question usually is:  “If I build a virtual machine on a VHD in one virtualization solution, will it be compatible with another virtualization solution”.   This blog post focuses on answering the revised question. As you’d expect, the answer isn’t that straightforward.

Let’s start by looking at the obvious cases where the answer is “No, they are not compatible”. Assume you build a virtual machine using Hyper-V, and it is 64-bit. Here, the answer is no as Virtual Server and Virtual PC do not support 64-bit virtual machines.

What about a 32-bit virtual machine built under Hyper-V? Generally the answer is again no. This is because most operating system will detect the presence of an IO-APIC in the virtual machine environment and install an appropriate HAL in the operating system image. Once that image is started on Virtual Server or Virtual PC where an IO-APIC is not present, the image will fail to boot. In theory it is possible to swap the HAL, but not in a Microsoft supported manner (except on Vista and Windows Server 2008 – that’s a post for another day). So the answer remains no. [Maybe an exception would be where an operating system is able to dynamically switch between IO-APIC and PIC modes (this is not the case in Windows Server 2003 or Windows Server 2008 or any OS I’m myself familiar with). I guess that some Linux flavours with appropriate boot switches may be OK, but I’m no expert in this area.]

Now let’s look at some “yes” scenarios. These are the ones where the virtual machine is built under Virtual PC or Virtual Server initially. If you take a VHD image and create a new VM in Hyper-V usng that VHD and simply boot it, yes, it will be fine. If you do not install the Integration Components and subsequently take the VHD back to Virtual PC or Virtual Server, yes, it will also boot fine.

Following on from the previous paragraph, if you install the Integration Components (and let’s stick to Windows Server 2003 for the example), then we swap the HAL to an APIC HAL as the first part of the installer. At this point, the VHD will no longer boot under Virtual PC and Virtual Server.

Hopefully that helps!
Cheers,
John.