While this is no longer possible with Windows Activation Technologies in Win 7, Windows XP allows using Hardware Profiles for a shared installation that can be run either physically or virtually (e.g. using the KVM virtualization stack built into recent Linux kernels, which is a lot more convenient than VMWare Player with its kernel module dependencies, at the price of 3D graphics acceleration).
The recommended sequence for such a setup:
- Install Windows XP physically (where applicable, using the IDE mode of your SATA host controller)
- Create a second Hardware Profile for virtualization, reboot using that new Hardware Profile and let hardware detection run its course
- Swap the hard disk controller drivers to VirtIO (for KVM) and AHCI (if you have a SATA host controller, that is)
- Installing Windows using the standard IDE driver allows for being able to boot the same installation in KVM as well.
- The separate Hardware Profile ensures that Windows doesn't go through lengthy hardware detection after each switch from physical to virtual boot-up and back.
- The somewhat tricky bit is swapping to the right hard disk controller drivers afterwards, for decent I/O performance. For KVM VirtIO that is relatively easy - simply add a small VirtIO device to the configuration and let hardware detection install the drivers from the KVM driver vfd floppy image at Fedora.
You may then use
virsh edit to change the original disk configuration from
<target dev='hda' bus='ide'/> to
<target dev='vda' bus='virtio'/> (and drop the dummy device).
Switching the physical Windows setup from IDE to AHCI cannot be achieved in that easy way, if you have an AMD SB800 south bridge that has different PCI device IDs for IDE (4390) and AHCI (4391) mode (consequently thwarting parallel installation). There, some registry tweaking is required after you have copied
ahcix86.sys from the unpacked AMD driver package to
"DisplayName"="ATI AHCI Compatible RAID Controller"
With the AHCI driver thus enabled, you may reboot and switch the BIOS SATA setting from IDE to AHCI without facing the typical "Unknown boot device" BSOD in result.