Yea, this is for Windows XP images. I haven't tried to convert Windows 7
images because I don't have Windows 7 images. But I'm pretty sure they
have different boot loader. And I think you can also disable some other
services using virt-win-reg if you know how to set the registry values for
The following information is the xml file I used for my test. One
important thing is you need to set the target dev of the disk is "<target
dev='hda' bus='ide'/>. If you need more information, please let me know.
<type arch='x86_64' machine='rhel6.0.0'>hvm</type>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
Young Hyun Oh
IBM, Tivoli CTO Technology and Architecture
From: Andy Kurth <andy_ku...@ncsu.edu>
Date: 12/02/2011 10:28 AM
Subject: Re: Converting VMware Windows Images into KVM images
Thanks Young. This information is very much appreciated. I'm
assuming this is an XP image? I have tried it on a Win7 image and was
able to get it to boot without having to do the registry merge step.
I'm assuming this is because of the different boot loader. I haven't
tried it on other versions yet. One important detail was that I had
to enable ACPI in the XML for the VM.
As Aaron mentioned, we should be able to automate this in the code.
The guest OS tools for KVM are pretty cool. There are many things we
can do using virt-win-reg to access the registry along with guestfish
to access the offline image filesystem. For example, we could disable
Sysprep and VMware Tools on existing images before they boot under
KVM. We should also be able to inject drivers.
I'd also be curious to see what settings ISAAC is adding to the XML
file. I'm working on integrating the KVM code contributed by Xianqing
Yu. There may be some settings I'm not aware of which could be
On Thu, Dec 1, 2011 at 11:24 AM, Young h Oh <o...@us.ibm.com> wrote:
> Hi All,
> I've working on the integration between IBM SmartCloud Provisioning and
> and I found some useful tips and issues on converting VMware Windows
> into KVM images.
> For the VMware Linux image case, you could directly convert VMware Linux
> images into KVM (libvirt) images using 'qemu-img' command.
> $ qemu-img convert Your-VMware-Linux-flat.vmdk -O raw (/qcow2)
> However, if you try to directly convert a VMware Windows images into KVM
> images using 'qemu-img' command, you might have the BOD (blue screen of
> Death) issue on boot of the converted images in KVM. The main reason for
> BOD problem is that most VMware Windows images are installed on SCSI
> virtual disk but KVM requires IDE device driver for converted images. To
> solve this problem, you might have different methods but I'd like to
> introduce how I solved that problem. I updated the Windows Registry of
> images offline to using libguestfs library in RHEL 6 (host). The
> steps are follows:
> 1. Prepare OS
> - RHEL 6 X86_64
> Notes: libguestfs-winsupport package is only needed on RHE 6 hosts
> 2. Install packages (qemu-img, all libguestfs related packages:
> http://libguestfs.org/ )
> $ yum install qemu-img '*libguestfs*'
> 3. Download and install 'libguestfs-winsupport' (windows support
> $ rpm -i libguestfs-winsupport-1.0-7.el6.x86_64.rpm
> => You will see virt-win-reg command now (virt-win-reg manual :
> http://libguestfs.org/virt-win-reg.1.html#currentcontrolset_etc_ )
> 4. Download and modify mergeide.reg
> (http://www.proxmox.com/downloads/proxmox-ve/misc/59-mergeide )
> => Replace all CurrentControlSet => ControlSet001
> e.g) vi mergeide.reg
> 5. Define KVM xml file
> 6. Converting Images
> $ qemu-img convert Your-VMware-Windows-flat.vmdk Your-KVM-Windows.img
> $ virt-win-reg --merge Your-KVM-Windows.img mergeide.reg
> $ virsh --connect qemu:///system define Your_Image.xml
> $ virsh start Your_Image_Domain
> Note: I do NOT have any issues on this method but you might do this at
> own risks.
> Young Hyun Oh
> IBM, Tivoli CTO Technology and Architecture