Personal tools
     DOCUMENTATION

Virtual Appliances:Xen Dom0 on rPath Linux

From rPath Wiki

Jump to: navigation, search
Virtual Appliances --> Xen --> Xen Dom0 on rPath Linux

Contents

Xen™ is a virtual machine monitor (VMM) for x86-compatible computers capable of executing multiple virtual machines, each virtual machine running its own operating system, at near native performance on a single physical computer. For example, on a Linux-based host computer running a Xen hypervisor domain (called a Dom0), you can execute multiple guest operating system domains (each called a DomU), each running its own operating systems.

Image:Bulbgraph.png   Though ports of Xen are underway for running the Dom0 under operating systems other than Linux, this guide focuses on running a Linux-based Dom0 and, specifically, running a Dom0 on the rPath Linux distribution.

Establish an rPL Xen Dom0 in one of the following ways:

Pre-Installation Specifications

Use the following specifications when planning an installation or update to an rPL Xen Dom0.

CPU
x86 architecture: Intel Pentium Pro, Celeron, Pentium II, Pentium III, Pentium IV, Xeon, and AMD equivalents: AMD Duron, AMD Athlon
x86/64 architecture: Intel EM64T and AMD Opteron
Symmetric Multi-Processor (SMP) and Hyperthreading (SMT) is supported.
Memory
x86 architecture: Up to 64 GB of physical memory is addressable with Intel Physical Addressing Extensions (PAE)
x86/64 architecture: Up to 1 TB of physical memory is addressable
A system with 512 MB of physical memory allows for evaluation and testing, but 1 GB of physical memory in the Dom0 system is recommended for production use.
Image:Bulbgraph.png   For x86, usage of PAE must be consistent between the dom0 and domUs.
Installation Disc Creation
Appropriate optical storage hardware is required when creating bootable images for your chosen rPL installation media (CD or DVD burner).
Logical Volume Management
rPath recommends configuring the Dom0 system to use the majority of its physical disk capacity for logical volumes with logical volume management (LVM). For use in production scenarios, this includes an LVM-based virtual block device (VBD) for each DomU instance. Define LVM during installation or add LVM capability to an installed system. See the LVM VBD for Production Use section of the Xen DomU Guide for more information on LVM.

Install an rPL Xen Dom0

The most direct means to enable an rPL Xen Dom0 is to install an rPL version that includes the Xen Dom0 functionality. Use the following installation process to establish the rPL Xen Dom0 as a new installation:

  1. Obtain an rPL Xen Dom0 ISO release. (Latest release for x86) (Latest release for x86_64)
  2. Write the image to bootable media.
  3. Boot the target system to the rPath Linux installation media.
  4. Install rPath Linux. (LVM recommended)
  5. Restart the system and verify installation.
  6. Obtain and deploy an example DomU image. (See the Xen DomU Guide for more information.)

Update rPL for Xen Dom0 Support

You can update an existing installation of rPL and implement a Xen Dom0 environment using packages flavored for Xen support, which are available from the rPL repositories.

Image:Bulbgraph.png   The following instructions are NOT required for those using rPL with Xen Dom0 support. Use the command uname -a to verify your running kernel version string contains xen, indicating that you are currently running rPL with Xen Dom0 support.

Update Packages for Xen

To implement a Xen Dom0 in an existing rPL installation, the correct flavors of the following packages need to be present:

  • kernel
  • xen
  • distro-release
  • bridge-utils
  • glibc

Update group-dist with the Xen Dom0 flavor to update these packages:

[root@yourhost ~]# conary update group-dist[xen,dom0] --resolve

If you do not have group-dist as part of your current system, update the kernel first from the install label path conary.rpath.com@rpl:1-xen, then update the remaining packages. Use the following commands.

[root@yourhost ~]# conary update kernel=conary.rpath.com@rpl:1-xen[xen,dom0] xen[xen,dom0]
[root@yourhost ~]# conary update distro-release[xen,dom0]
[root@yourhost ~]# conary update bridge-utils[xen,dom0]
[root@yourhost ~]# conary update glibc[xen,dom0]

Boot with Xen Support

After installing or updating rPL for Xen Dom0 support, restart the system and choose the Xen-flavored kernel from the boot menu.

   rPath recommends disabling the standard balloon driver. The standard balloon driver for Xen Dom0 has proven to be unstable on some configurations. This can be done by editing /etx/xen/xend-config.sxp and setting (dom0-min-mem 0) (to disable the balloon driver) and adding dom0_mem=256M. to rPath Linux Xen Kernel boot options for a Dom0 (to provide the amount of memory to use). dom0_mem=256M is a fixed allocation for a Dom0 with nothing other than Xen and SSH installed and enabled. More may be required if other services are running in the Dom0.

Recognize a Xen-flavored kernel by locating xen in its version string followed by dom0 or domu. For the rPL Xen Dom0, the version string will include .xen.dom0.

When booting the Xen-flavored kernel, you will see messages from (XEN) in addition to the usual boot messages.

Verify Xen Installation

After booting with Xen support, log in and verify the Dom0 environment status with the Xen management tool, xm:

[root@yourhost ~]# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0      461     2 r-----     59.2

The example output above shows a descriptive name of the virtual machine (Domain-0), the number of the domain ID (0), memory size of the machine in megabytes (461), the number of virtual CPUS (2), the current state (r=running), and how much CPU time the domain has used, measured in seconds (59.2).

If your output is similar in nature to the example output above, and the state is r (for running), then you have a running Xen Dom0 environment on your rPL system.

Image:Bulbgraph.png   After verifying a working Dom0 environment, you may wish to remove extraneous kernels from your installation and ensure the Xen-flavored kernel boots by default.

Xen Daemons

There are two initialization scripts associated with with Xen's daemons which can be manipulated with the chkconfig(8) and service commands. rPL will configure these scripts to start the Xen daemons at boot time as part of installing or updating rPL to enable Xen Dom0 support. The scripts and their associated daemons are defined below:

  • /etc/init.d/xend : The Xen control daemon script
  • /etc/init.d/xendomains : This script starts DomUs automatically if their configuration file in /etc/xen is symbolically linked to the /etc/xen/auto directory, and stops DomUs when the Dom0 is shutting down.

Additional Resources

In addition to the Xen Troubleshooting Guide, which offers information on Xen Dom0 and DomU issues, the following resources are helpful for a more complete understanding of Xen:

Xen DomUs

To learn more about installing and using DomU images, see the Xen DomU Guide.

Xen Links