wiki:Doc/OS/Xen

Version 2 (modified by /C=IE/O=Grid-Ireland/OU=cs.tcd.ie/L=RA-TCD/CN=Stephen O. Childs, 16 years ago) (diff)

--

Introduction

It is possible to integrate the configuration and installation of Xen guest virtual machines (VM) quite closely with an existing QWG setup. Using pypxeboot and suitable Xen packages (such as those available from CERN Linux support here, it is possible to perform a fully-automated install of Xen guest VMs, with all relevant configuration automatically extracted from the guest's own templates.

The aim of our procedure is to integrate VM configuration as closely as possible with the configuration of "normal" machines. This means:

  • Guest VMs are normally installed using the automated PXE/Kickstart installation configured by Quattor's AII software.
  • Guest VMs are installed on virtual "hardware" described in its own hardware template. For example, MAC addresses, disk sizes and names, CPU architecture, etc. can all be specified in the VMs hardware template, and will then be used to generate appropriate configuration files for guest VMs.

Install server configuration

You will need to install Xen kernels for use during the initial PXE boot of the Xen guest VM. The following table shows where these should be installed and provides links to the relevant files.

/osinstall/nbp/slc308_i386_xen http://linuxsoft.cern.ch/cern/slc308/i386/images/xen/
/osinstall/nbp/sl450-x86_64_xen http://ftp.scientificlinux.org/linux/scientific/45/x86_64/images/xen/

Host configuration

There are two components to the configuration of a Xen host: the configuration of the host's own software and the creation of Xen configuration files for the guests. The template config/xen/host includes the template config/xen/configure_guests which will configure a set of guests in a pre-defined way according to the contents of their hardware templates. This means:

  • The disk size defined in
  • Make sure the OS defined for your VM is correct. Check the Quattor template os_version_db.tpl and edit it if necessary to ensure that your host has the correct OS selected.
  • Define the variable XEN_GUESTS to be a list of the guests you want to install on the host, using the names of their templates. (N.B. there is currently a restriction that the host and guest templates must be in the same cluster.) For example:
    variable XEN_GUESTS = list("testui.example.org","testwn.example.org");
    
  • Include the template config/xen/host: this will set up some basic configuration and also pull in the correct RPMs.
  • The configuration of the host is controlled by a set of variables with default values. These can be customised if required.
Variable Default value Comments
XEN_BOOT_DEVICE "/dev/sda2" Root FS of host (for grub configuration)
XEN_VG "vg01" Base volume group to create guest VM FS on
XEN_GUESTS None A list of FQDNs for guest VMs (e.g. list("gridgate.cs.tcd.ie", "gridui.cs.tcd.ie"))
XEN_BOOTLOADER_DEFAULT "/usr/bin/pypxeboot" Default bootloader for VMs. Change this to e.g. pygrub if no DHCP server is available
XEN_BOOTLOADER nlist mapping VM names to bootloader to override default, e.g. nlist("gridgt4.cs.tcd.ie","/usr/bin/pypxeboot")
XEN_BOOTARGS "vif[0]" Argument needed by pypxeboot, set to "" for pygrub
XEN_CREATE_FILESYSTEMS true Whether ncm-xen should try and create filesystems defined for VMs
XEN_CREATE_DOMAINS true Whether ncm-xen should try and create (i.e. start up) domains when it runs
XEN_PROFILE_PREFIX Not needed at GI as FQDNs are used for node names

Guest configuration

Attachments (1)

Download all attachments as: .zip