|
|||
Setting Up Xen From ScratchXen is a virtual machine monitor for x86 that supports executing multiple guest operating systems with high levels of performance and resource isolation. The following explains how to set up and run a Linux system with one or more Xen domains. Prerequisites include an installed and networked Fedora Core 4 system and the following required packages:
Installing the Required PackagesThe Xen package and dependencies can be installed by using the following YUM command:
Additionally, the Xen domain0 and user domain kernels need to be installed.
This will also create an entry in the /boot/grub/menu.lst file so that the domain0 kernel can be booted. Domain0 is where the Xen daemon is started and further domains can be created. Creating a Xen Domain File SystemDomain is the term Xen developers use to describe a virtual machine. Any number of domains can be created on a host machine as long as sufficient resources are available. Although it is possible to create a domain file system of any Linux flavor (or NetBSD or FreeBSD), the following information outlines how to create a Debian Linux file system. The first step is to create the file system and swap images. Depending on the amount of software you want installed in the domain, these images will vary in size. For a minimal install, the file system image can be as small as 200 MB. The swap image should be the same size as the amount of RAM you want the domain to allocate.
Then, initialize.
Note: The next steps must be done on an Ubuntu or Debian system. The required debootstrap program to create a minimal Debian install is only available on Ubuntu and Debian systems. Optionally, you can use the program alien to convert the Debian package to an RPM and install it on an rpm-based system.
Mount the newly created file system image.
Create the base Debian installation.
At this point your system is an unconfigured base system. Edit the following files to establish a valid configuration.
The following entries should be made to /etc/fstab:
The following should be listed in /etc/sources.list:
Edit the /etc/network/interfaces file to set up networking. The following setup uses DHCP to obtain network settings:
Creating a Domain Configuration FileThere are two ways to set domain parameters before starting a domain. One way is to specify all the domain parameters in a configuration file. Alternatively, you can set the necessary parameters at run time. The following is an example configuration file for the file system just created:
The new domain can now be started. First start Xen if it's not running, then create the domain:
You should now see the new domain booting up. Log in as root (no password) and go ahead and update apt and install any additional packages needed.
Shared /usr DirectoryTo further cut-down on file system image size, it is possible to share a common NFS-mounted /usr directory between multiple domains. To do this, create an NFS export in domain0. All software that is installed will then be common to each domain that is run. Custom IP AddressXen does not allow setting the domain IP via the configuration file. To work around this, you can pass in kernel parameters with the extra="xxx=yyy aaa=bbb" domain configuration parameter. Then, custom startup scripts can be created and called from /etc/init.d/rcS to catch these parameters and set up the /etc/network/interfaces file as required. See Also
Searches Moab documentation only
|
|||
| © 2001-2010 Adaptive Computing Enterprises, Inc. | |||