The procedure is not exactly straightforward; one must navigate around several obstacles:
- At install-time, Windows XP stores ("remembers") the HW signature of the IDE/SATA controller it was installed to, and will refuse to boot from any other controller. This behavior can be disabled by making certain changes to the Registry. This is accomplished using the MergeIDE utility.
- Once you get past the controller obstacle and get the virtualized XP instance to boot, it will still think it's running on different hardware (even when it isn't), because it also remembers DMI information from the BIOS.
- The DMI information can be dumped and then programmed into the virtual machine configuration file (XML). How exactly to do this is not clear to me, but there are some pointers below.
- In terms of licensing, once the virtualized instance of Windows XP is up and running, one should purchase a new license for it, just to be on the safe side. Stay legal, folks, and by "legal" I mean whatever Microsoft says it means.
Here are some links:
- How to migrate existing Windows installations to VirtualBox (includes link to MergeIDE utility)
- Running your physical Windows XP partition as a VM using Virtualbox
Salient part of the latter:
"The Windows XP volume license registers your license key against the BIOS for that machine. When Virtualbox loads your guest operating system it presents virtual BIOS information to that OS, which obviously invalidates the license you currently have installed for XP since from it's point of view it's now on a different machine.
In order to fix this you have to modify the settings of your VM config file in order to report your physical BIOS information.
First you have to get the information using the dmidecode command. To get the DMI bios information and the the DMI system information run:
You then have to append this information as a set of key-value pairs to your virtual machine settings. A list of all the variables can be found in section 9.13 of the VirtualBox user guide."