converting vmware vmdk to xen - config problem

Discussion in 'Server Operation' started by dschmid, Dec 17, 2007.

  1. dschmid

    dschmid New Member

    Hello, I've followed the instructions from perfect xen howto for etch on a pacifica platform. I expanded it to use sw raid5 and lvm on it. Creating multiple domUs using debootstrap isn't a problem. But I can't find out howto convert an existing etch vmware image to an domU xen lvm. I followed this http://ian.blenke.com/vmware/vmdk/xen/hvm/qemu
    Howto and done:

    1. vmware-vdiskmanager -r etch.vmdk -t 0 etch-flattened.vmdk

    2. qemu-img convert etch-flattened.vmdk etch.img

    3. lvcreate -L 8G -n etch-hda raid

    4. dd if=etch.img of=/dev/raid/etch-hda bs=1M

    5. cp /etch/xen/otherxen.mydomain.local.cfg /etch/xen/etch.mydomain.local.cfg

    6. Then I changed in the new config file the this variables:

    disk = [ 'phy:raid/etch-hda,sda1,w' ]

    name = 'etch.mydomain.local'

    vif = [ 'ip=192.168.1.110' ]


    When I now try to start the domain with

    xm create /etc/xen/etch.mydomain.local

    the output is:

    Code:
    Using config file "/etc/xen/etch.mydomain.local.cfg".
    Started domain etch.mydomain.local
    
    But an
    Code:
    xm list
    don't show up the domain and I can't connect to it using xm console ...

    cat /var/log/xen/xend.log gives me some errors telling me the domain is already running - see atachment.

    I hope somebody had succesfully converted an vmdk to xen. Because I can't find something usefull on google
     

    Attached Files:

  2. djtremors

    djtremors New Member

    I followed some link once on converting vmware using qemu.
    I tried the trixbox vmware image and had issues getting the server started.

    What i had to go to get it working was mount the image locally, then copy the kernel module version I wanted to use into the /lib/modules/kernel.x.x.x.xen/ and then chroot to the root filesystem of that image and then run mkinitrd to create a new initrd.

    it worked when started it but I noticed is that it never worked from command line and only through virt-manager.. weird but there's some difference in the way 'xm create' and virt-manager start their domU's.

    PHP:
    kernel "/boot/vmlinuz-2.6.18-53.1.4.el5xen"
    # new initrd
    ramdisk "/boot/2.6.18-53.1.4.el5xen-trixbox.img"
    uuid "7a9dbaa3-ad6c-bad3-b515-806bd0e37320"
    memory 128
    vif 
    = [ "mac=00:16:29:36:e3:c4, bridge=xenbr0" ]
    vfb = [ "type=vnc,vncdisplay=10,vncpasswd=trixbox" ]
    root "/dev/sda1 ro"
    disk = [ "file:/xen/trixbox/trixbox2.4.img,sda,w" ]
    name "trixbox"
    #bootloader="/usr/bin/pygrub"
    on_poweroff "destroy"
    on_reboot "restart"
    on_crash "restart"
    maxmem 256
     

Share This Page