Today I wanna share a solution to a technical challenge I encountered - Exporting a Virtual PC Windows XP Mode VM to VirtualBox.
Reason: Virtual PC is a good virtualization framework but I wanted to have all my VMs in a single place - VirtualBox.
A long search didn't yield any magic solution for this, so I had to think on a strategy.
The most Intuitive solution will be to create a new VirtualBox VM which will use the Windows XP Mode vhd (Virtual Hard Disk). It didn't succeed because this VM is more complex than it looks like:
It composed of a vhd for the specific Windows XP Mode instance and a parent vhd for all the Windows XP Mode instances in Virtual PC.
I can see why this design is efficient but it damages VM portability - The user will have to copy two vhds to set the same VM on a different machine.
In addition, this concept isn't standard and isn't supported in other frameworks so exporting the VM is not trivial at all.
TL;DR ? The solution: disk2vhd from the legendary SysInternals Suite !
The first task will be to export Windows XP Mode VM as independent VM:
1. run disk2vhd on the Windows XP Mode VM and choose all partitions
2. checkboxes:
- _ Prepare for use in Virtual PC
- _ Use Vhdx
- V Use Volume Shadow Copy
4. Hit create button !
Now we have a vhd with our complete Windows XP VM, independent from Windows Virtual PC.
The second task will be to import it to VirtualBox:
1. create new Windows XP VM
2. choose "Existing hard drive" and use the path of the vhd file we created.
3. start the machine :)
Some notes:
* while copying the vhd file from the guest to host, make sure the system doesn't go to sleep ... otherwise the copy will fail
Solved !