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
beneficial.

Thanks,
Andy

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 VCL
> and I found some useful tips and issues on converting VMware Windows images
> 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)
> KVM-Linux.img
>
> 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 the
> images offline to  using libguestfs library in RHEL 6 (host). The detailed
> 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 package)
> (
> http://rpm.pbone.net/index.php3/stat/4/idpl/16605602/dir/scientific_linux_6/com/libguestfs-winsupport-1.0-7.el6.x86_64.rpm.html
>  )
> $ 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
> :1,$s/CurrentControlSet/ControlSet001/g
>
> 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 your
> own risks.
> ===============================
>
> Thanks,
> --------------------------------------------------------------------
> Young Hyun Oh
> IBM, Tivoli CTO Technology and Architecture
>

Reply via email to