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'> <name>server</name> <memory>786432</memory> <currentMemory>786432</currentMemory> <vcpu>1</vcpu> <os> <type arch='i686' machine='pc'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <source file='/srv/kvm/server/server-ide.qcow2'/> <target dev='hda' bus='ide'/> </disk> <interface type='bridge'> <source bridge='br0'/> </interface> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'/> </devices> </domain>
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.
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.
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.
fantastic timing, i have to do this this week. attempted/had any luck moving from bare hardware to libvirt?
@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.
I used Disk2VHD ( http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx ) to create my HDD Image from running Windows system.
The VHD File (MS Virtual PC Image) can be converted with qemu-img too:
qemu-img convert -O qcow2 WINDOWS.VHD windows.qcow2
Thanks for the hint with the regkey. After running it i could start my VM in KVM. Without this key it only runs in Virtual Box.
Pingback: Convert VMware growable, splitted and snapshoted disks « falstaffs Reise durchs Internet