no edit summary
In earlier chapters we have looked at using disk images and physical disks as filesystems for a Xen based domainU. Another option is to use the disk images used by QEMU. In this chapter we will cover the steps necessary to create a QEMU disk image, install an operating system into it and then use ''pygrub'' to boot the system as a Xen guest system (domainU).
== Creating a QEMU Disk Image for the Xen domainU ==
The first step in the process of using QEMU disk images with Xen is to create a disk image. This is achieved using the ''qemu-img'' tool. QEMU supports a number of different image types. For
this purposes of this chapter we will use the ''raw'' type which is the standard and portable disk image used by QEMU by default. The following command-line created a new QEMU 4Gb disk image called ''XenQemu.img'':
== Installing the Guest Operating System ==
At this point we have a raw QEMU disk image which is ready to have an operating system installed within it. In order to install the operating system we will use the QEMU emulator to boot and install from a Linux installation CD. In order to boot from the CDROM drive we need to tell QEMU the CDROM device on the host system (in this case it is /dev/hdc but will be different depending on the Linux distribution and hardware
configuration0 together with the ''-boot d'' command-line argument. Finally, we need to reference the QEMU disk image created above with the ''-hda'' flag and the amount of memory to be allocated using ''-m'':