How to dual-boot Windows physically and virtually

(0 comments)

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:

  1. Install Windows XP physically (where applicable, using the IDE mode of your SATA host controller)
  2. Create a second Hardware Profile for virtualization, reboot using that new Hardware Profile and let hardware detection run its course
  3. Swap the hard disk controller drivers to VirtIO (for KVM) and AHCI (if you have a SATA host controller, that is)
    The Details:

      1. Installing Windows using the standard IDE driver allows for being able to boot the same installation in KVM as well.
      2. 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.
      3. 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 system32/drivers:

        [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci#ven_1002&dev_4391]
        "Service"="ahcix86"
        "ClassGUID"="{4D36E97B-E325-11CE-BFC1-08002BE10318}"

        [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ahcix86]
        "Type"=dword:00000001
        "Start"=dword:00000000
        "ErrorControl"=dword:00000001
        "Tag"=dword:00000021
        "ImagePath"="system32\\drivers\\ahcix86.sys"
        "Group"="SCSI Miniport"
        "DisplayName"="ATI AHCI Compatible RAID Controller"

        [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ahcix86\Parameters\PnpInterface]
        "5"=dword:00000001

        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.

Currently unrated

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required