Migrating Virtual PC Windows servers to KVM

Windows XP / 2003 have always been treacherously unstable when moving them between hardware, so much so that fresh installs are wired into my head as being the only option. I’m tired of having three different virtualization platforms, and I don’t want to rebuild these machines. ‘Virtual Server 2005 R2’ is the first to go.

To deal with getting 0x000000ce / 0xce BSOD’s with processr.sys, set both/either of these key/values to ‘4’ in the registry before migrating the machine, or on the first startup:

To avoid getting a 0x0000007b / 0x7b BSOD on startup due to the mass storage controller changing, run the registry modifications in MS KB 314082. I save the text inside the “copy here” block to a .reg file and ran it before converting below, and it was enough.

Then use the free VMWare vCenter Converter to convert the Virtual PC image (it has to be off) to a vmware image. On the third step of the wizard, under options, I set the disk controller from automatic to ide. Copy the resulting vmdk file to your KVM host.

Use qemu-img or kvm-img to convert the disk image from vmdk to qcow2:

kvm-img convert -O qcow2 server-ide.vmdk server-ide.qcow2

You can then use KVM to run this disk image. I use libvirt, I simply copied another libvirt xml file, removed the MAC addresses from it, removed the uuid, updated the guest name, and point it to this disk, specifying ‘ide’ as the ‘bus’ in the disk’s target element.

It takes the keyboard and mouse a few moments to work on the console the first time, I assume the devices are being detected in the background. I had one ‘PCI device’ detected without a driver, I let it stay that way. I set the resolution up by hand. On an early run I had issues with the VGA driver, but I can no longer recreate this.

If you were using a static address, you may need to follow the directions in MS KB 269155 to delete the old network interface that is now hidden or you’ll get an error about the address being in use.

Definitely leave a comment about how this works for you. It’s like playing with fire.

Here’s a libvirt xml for kicks:

<domain type='kvm'>
    <type arch='i686' machine='pc'>hvm</type>
    <boot dev='hd'/>
  <clock offset='utc'/>
    <disk type='file' device='disk'>
      <source file='/srv/kvm/server/server-ide.qcow2'/>
      <target dev='hda' bus='ide'/>
    <interface type='bridge'>
      <source bridge='br0'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen=''/>

7 thoughts on “Migrating Virtual PC Windows servers to KVM

  1. thesethings

    Nice write-up. Did your licensing squawk at all? I did a similar transplant. Everything was fine for about 24 hours, and then activation complained a little. I had a workaround, but it still made me a little nervous.

  2. btm Post author

    A couple machines needed to be reactivated on startup because of the significant underlying hardware changes that is tied to activation. They went fine and I haven’t heard a peep out of activation since.

  3. Tom H

    Very cool Bryan. You know how I like to play with fire.. *beavis voice*.. fire fire! đŸ˜‰ Have you had any HAL issues with drivers or power management? How about networking? Virtual server has some weird networking quirks I have ran into in the past.

  4. btm Post author

    @Tom, the Processor/Intelppm registry key settins are power management work around. the 0x7b is your standard mass storage driver failure. No HAL issues, it should be easy enough to emulate different hardware configurations if you did.

    @peter, not to libvirt, but I did use the vmware converter tools once to convert bare hardware to a vmware server guest. I would imagine one could simply replace the early steps in this process with that.

  5. Pingback: Convert VMware growable, splitted and snapshoted disks « falstaffs Reise durchs Internet

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.