Changes

Jump to: navigation, search
m
Text replacement - "<htmlet>xen<htmlet>" to "<htmlet>xen</htmlet>"
In the preceding chapters of [[Xen Virtualization Essentials]] we looked at a variety of ways of creating the root filesystem for a Xen guest domain (domainU) through the cloning of the root filesystem host operating system.<htmlet>xen</htmlet>
 In the preceding chapters of [[Xen Virtualization Essentials]] we looked at a variety of ways of creating the root filesystem for a Xen guest domain (domainU) through the cloning of the root filesystem of host operating system. Instead of cloning the host root filesystem, this chapter will focus on the creation of a Xen guest root filesystem from Linux distribution repositories using the ''yum'' and ''rpm'' tools. It is intended that the following steps works work with any Linux distribution which uses yum and rpm for package management (including Fedora, CentOS and Red Hat).
== An Overview of Repository Based Installation ==
Linux distributions are essentially a collection of many different software packages combined with a Linux kernel. These packages are stored in ''repositories'' which may be accessed online to install and update Linux distributions. The key tools for performing these tasks on systems such as Red Hat Linux, Fedora and CentOS are called ''yum'' and ''rpm''. Other Linux distributions (such as Debian and Ubuntu ) use a different package management system which will be covered in [[whereBuilding a Debian or Ubuntu Xen Guest Root Filesystem using debootstrap]]).
In terms of creating a Xen guest domain the yum and rpm tools can be used to install the base root filesystem on a blank disk image or partition by downloading the necessary packages from an online repository. This contrasts with the approach described in previous chapters whereby the the root filesystem is simply copied from the host operating system
== Preparing to Create a Xen Guest Root Filesystem from Repositories ==
A Xen guest domain needs, at a minimum, a Xen configuration file, a root filesystem, swap space, a Linux kernel and , an initial RAM Diskand ideally some swap space. In previous chapters we looked at a number of approaches to providing swap space and a root filesystem including the use of disk images, disk partitions and logical volume management. The remainder of this chapter assumes that suitable storage has been configured to hold the root filesystem, that swap space has been configured and a suitable Xen configuration file exists. If you have not yet configured swap space and a suitable filesystem for the root files refer to the following chapters (omitting the sections on cloning the host root filesystem) before proceeding with this chapter:
* [[Building a Xen Virtual Host Guest Filesystem on a Disk Image (Cloning Host System)]]
* [[Building a Xen Virtual Host Guest Filesystem on a Physical Disk Partition (Cloning Host System)]]
* [[Building a Xen Virtual Host Guest Filesystem using Logical Volume Management (LVM)]]
== Beginning the Installation ==
A recent CentOS 5 file is located at:
[http://mirror.centos.org/centos/5.2/os/i386/CentOS/centos-release-5-1.02.el5.centos.1.i386.rpm http://mirror.centos.org/centos/5.2/os/i386/CentOS/centos-release-5-1.02.el5.centos.1.i386.rpm]
Alternatively, a Fedora 8 RPM can be found at:
[http://ftp.linux.ncsu.edu/pub/fedora/linux/releases/810/Fedora/i386/os/Packages/fedora-release-810-31.noarch.rpm http://ftp.linux.ncsu.edu/pub/fedora/linux/releases/810/Fedora/i386/os/Packages/fedora-release-810-31.noarch.rpm]
Once the package has been downloaded install it as follows:
</pre>
Finally, use ''yum'' to install the full set of base packages for the operating system. The following command will download all required packages from the repository and install itthem:
<pre>
== Booting the Xen Guest System ==
Now all that remains is to boot the guest operating system. Before issuing the command to do so it is important to note that the system may not boot for a number of reasons. If the system fails to boot be sure to read the Xen Guest Boot Problems section at the end of this chapter.
If the system fails to boot be sure to read the Xen Guest Boot Problems section at the end of this chapter. before Before booting the guest system it is important to first unmount the guest root filesystem:
<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>

Navigation menu