Changes

Jump to: navigation, search

Using QEMU Disk Images for Xen DomainU Systems

49 bytes added, 18:52, 29 May 2016
m
Text replacement - "<htmlet>xen<htmlet>" to "<htmlet>xen</htmlet>"
<htmlet>xen</htmlet>  In earlier chapters we have looked at using raw 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 the 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 creates a new QEMU 4Gb 4GB disk image called ''XenQemu.img'':
<pre>
== 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 configuration) 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'':
<pre>
Once the system has booted the next step is to install Xen support into the guest. This can be achieved either using the package management system for your chosen distribution or by copying the appropriate kernel and initial RAM images into the /boot directory.
If you choose to manually install the Xen kernel and initial RAM inages images then it will be necessary to add appropriate entries to the GRUB configuration file. The following example shows a ''/boot/grub/grub.conf'' file modified to allow the system to boot a Xen enabled kernel:
<pre>
== Booting the Xen domainU System ==
Once we have everything configured it is time to boot the Xen guest (domainU) system. This is achieved using ''xm create'' combined with out without Xen domainU configuration file which we have named ''XenQemu.cfg'':
<pre>
* [[Xen CentOS/Fedora/Red Hat Guest OS Hangs During Boot]]
* [[Xen domainU Boot Fails with Invalid kernel / ERROR: Not a Xen-ELF image Message]]
 
 
<htmlet>xen</htmlet>
 
<hr>

Navigation menu