Tuesday, October 4, 2011

Convert Xen XP domU to KVM

Recently I needed to take a windows XP VM under Xen from my workstation and move it to my laptop running KVM.

The Xen VM uses an LVM block device. I was able to use qemu-img to convert the raw LVM block filesystem into the compressed qcow2 format:
qemu-img convert -c -f raw -O qcow2 /dev/vgxen/xp xp.qcow2
This took over an hour, since the filesystem is 100GB.

Back over on my laptop, importing the qcow2 image was a breeze. I simply launched "Virtual Machine Manager" and selected "importing existing disk image", and pointed to the image.

XP booted fine, but I did have to re-activate windows due to hardware "changes" that windows saw.

The qcow2 format is nice since it's compressed, but there is definitely a performance hit. I plan on experimenting with moving the VM to an external eSATA drive, on a raw block device, and see how much it helps performance.

No comments:

Post a Comment