A SERVICE OF

logo

© Novell Inc. All rights reserved
45
Convert VMware image to Xen image
dd if=/dev/zero of=disk.img bs=32k count=32k
#Virtual Hard Disk to Network Block Device mapper
vmware-loop -p SLES9-0.vmdk
modprobe nbd
vmware-loop SLES9-0.vmdk 2 1
#Extract VMware partition from the device to the image file SLES9.img:
dd if=/dev/nbd1 of=/tmp/SLES9.img bs=32k
#inject the root FS into the Qemu image.
file disk.img
disk.img: x86 boot sector, FREE-DOS Beta 0.9 MBR
fdisk disk.img
..
Units = cylinders of 16065 * 512 = 8225280 bytes
..
Device Boot Start End Blocks Id System
disk.img1 1 15 120456 82 Linux swap / Solaris
disk.img2 16 130 923737+ 83 Linux
fdisk disk.img
#need to skip swap space, swap space ends at 16065*(16-1) bytes
16065*15=240975
dd of=disk.img seek=240975 if=/tmp/SLES9.img
#fdisk: make partition active, to boot from it