Chapter 7. Installation Recipes

Installation of XenServer can be accomplished in minutes using a variety of methods. Selecting the correct method will depend in part on the scale of your intended deployment and your hardware configuration.  In addition to covering installation of XenServer, this chapter also covers driver management and the installation of extra components via supplemental packages.

Manual Installation

Problem

Installation of XenServer is desired to either perform a proof-of-concept or creation of a small XenServer pool.

Solution

Download the installation media from http://xenserver.org/download, and either burn it to a CD/DVD or create a bootable USB Flash device.

Discussion

In a manual installation, the XenServer installation ISO is either burned to a bootable CD or copied to a bootable Flash device. The target XenServer host then boots from the installation media and can be installed. Manual installation is typically used when the number of hosts to be deployed is small, and either physical access to the host exists or access to a remote host console such as HP iLO or the Dell Remote Access Console. During a manual installation, the user will be prompted for a variety of information, but the most important configuration items relate to networking. Please refer to the section “Define Network Topologies” in Chapter 5 for more information.

Creating a Bootable USB Device

Problem

The ISO that Citrix ships for the XenServer installation media uses an ISO 9660 filesystem appropriate for use with a CD burner, but your server lacks a CD or DVD drive.

Solution

Create a bootable USB key that contains the XenServer installer.

Discussion

Because bootable USB devices make use of the legacy FAT32 filesystem, the ISO shipped by Citrix and available from citrix.com and xenserver.org must be converted from ISO 9660 to FAT32. The easiest tool to use for this task is Rufus. Rufus is freely available for multiple platforms and is open source. It is able to create the FAT filesystem, master boot record, and install a version of SYSLINUX, which can then be used to start the standard XenServer installer. No deep knowledge or experience with SYSLINUX is required, nor is there a requirement for a Windows or DOS bootable disk.

Follow these steps to make a bootable USB drive:

  1. Download the installation ISO from http://xenserver.org/download.
  2. Obtain Rufus from https://rufus.akeo.ie/.
  3. Insert a USB key into your computer with at least 1 GB capacity. Note that installation of the XenServer installer will reformat the drive and delete all data.
  4. Create a bootable disk using the ISO option.

In Case the USB Drive Doesn’t Boot Right

Note that Rufus defaults for cluster size and legacy BIOS alignment should be correct for most USB keys and fairly modern computers. If the USB key fails to boot correctly, decrease the cluster size to 2048 and select the advanced formatting option for legacy BIOSes. It may also be required to perform a full format of the USB stick to be successful.

Unattended Installation

Problem

Installation of XenServer is desired where the installation is performed via PXE boot.

Solution

XenServer supports installation via network boot. Obtain the installation media from http://xenserver.org/download and follow the instructions in the following discussion.

Discussion

XenServer supports installation using network boot. In this model, a PXE or DHCP server with TFTP service available is used. The installation media is extracted from the source ISO and placed in an FTP, HTTP, or NFS location.

Validate on One Server First!

This discussion assumes you’ve already installed XenServer on one server and validated that no additional drivers are required. It also assumes that you’ve configured you server BIOS to be identical across all servers, and that PXE is supported on the NIC used as the management network. One key item in the preparation is that the servers are set to boot in legacy BIOS mode and not UEFI.

First, you’ll need to collect some information by doing the following:

  1. Obtain the XenServer installation ISO media.
  2. Extract the entire contents of XenServer installation ISO file to either a HTTP, FTP, or NFS location (in this procedure, we’ll be using NFS).
  3. Collect the information shown in Example 7-1:
Example 7-1. Required configuration parameters
Hostname: xenserver
Root password: password
Keyboard locale: us
NTP server address: 0.us.pool.ntp.org
DNS server address: dns.local
Time zone:  America/New_York 
Location of extracted ISO file: nfsserver:/
TFTP server IP address: pxehost

Configure the TFTP server to supply XenServer installer by following these steps. Example 7-2 contains a script that can be used to perform these steps; simply modify the XenServer ISO extract location to be where you extracted the XenServer files.

  1. In the /tftpboot directory, create a new directory called xenserver.
  2. Copy the mboot.c32 and pxelinux.0 files from the /boot/pxelinux directory of the XenServer ISO file to the /tftpboot directory.
  3. Copy the install.img file from the root directory of the XenServer ISO file to the /tftpboot/xenserver directory.
  4. Copy the vmlinuz and zen.gz files from the /boot directory of the XenServer ISO file to the /tftpboot/xenserver directory.
  5. In the /tftpboot directory, create a new directory called pxelinux.cfg.
Example 7-2. Configuration script for tftp server
mkdir /mnt/xsinstall
mount [XenServer ISO Extract Location] /mnt/xsinstall
cd ./tftpboot
mkdir xenserver
cp /mnt/xsinstall/boot/pxelinux/mboot.c32 ./
cp /mnt/xsinstall/boot/pxelinux/pxelinux.0 ./
cp /mnt/xsinstall/install.img ./xenserver
cp /mnt/xsinstall/boot/vmlinuz ./xenserver 
cp /mnt/xsinstall/boot/zen.gz./xenserver 
  1. In the /tftpboot/pxelinux.cfg directory, create a new configuration file called default.

  2. Edit the default file to contain the information shown in Example 7-3. Note that this command includes remote logging to a SYSLOG server.

Example 7-3. Example default file
default xenserver-auto
label xenserver-auto
	kernel mboot.c32
	append xenserver/xen.gz dom0_max_vcpus=1-2 
        dom0_mem=752M,max:752M com1=115200,8n1 
        console=com1,vga --- xenserver/vmlinuz 
        xencons=hvc console=hvc0 console=tty0 
        answerfile=http://[pxehost]/answerfile.xml 
        remotelog=[SYSLOG] install --- xenserver/install.img 

Unattended installation of XenServer requires an answer file. Place the answer file in the root directory of your NFS server (Example 7-4). Please note that there are many more options than are listed here, but the information shown in Example 7-3 will suffice for most installations.

Example 7-4. XenServer answer file
<?xml version="1.0"?> 
<installation mode="fresh" srtype="lvm"> 
  <bootloader>extlinux</bootloader> 
  <primary-disk gueststorage="yes">sda</primary-disk> 
  <keymap>[keyboardmap]</keymap> 
  <hostname>[hostname]</hostname> 
  <root-password>[password]</root-password> 
  <source type="nfs">[XenServer ISO Extract Location]</source> 
  <admin-interface name="eth0" proto="dhcp"/> 
  <name-server>dns.local</name-server> 
  <timezone>[Time zone]</timezone> 
  <time-config-method>ntp</time-config-method> 
  <ntp-server>[NTP Server Address]</ntp-server> 
  <script stage="filesystem-populated" type="nfs">
     [XenServer ISO Extract Location]/post-install-script.sh
  </script> 
</installation>

Boot from SAN

Problem

The server you wish to use for XenServer lacks any physical disk.

Solution

XenServer supports the ability to boot from a remote SAN when either a Fibre Channel or iSCSI HBA with an HBA BIOS enables the XenServer host to locate the boot media on a SAN. The following instructions assume a multipath installation is desired.

Discussion

Manual installation

When performing a manual installation at the setup prompt, press “F2” and then enter “multipath” as the boot option.

PXE installation

When performing a PXE-based install, the PXE configuration file will need to be modified to support device_mapper_multipath, as shown in Example 7-5.

Example 7-5. Modified PXE configuration file to support multipath
default xenserver-auto label xenserver-auto
    kernel mboot.c32
    append xenserver/xen.gz dom0_max_vcpus=1-2 
    dom0_mem=752M,max:752M com1=115200, 
    install --- xenserver/install.img

Installation of Supplemental Packs

Some XenServer features are released as supplemental packs. A supplemental pack will contain an installer and is delivered as an ISO.

Problem

A desired feature from a supplemental pack needs to be installed.

Solution

Obtain the supplemental pack and either copy it to dom0, or place it into an ISO storage repository.

Discussion

Optional XenServer components are delivered using “supplemental packs” in ISO format. A supplemental pack can contain any functionality that requires modification of dom0. Because a supplemental pack modifies dom0, it’s important to note that older supplemental packs are not supported on newer XenServer installations. Additionally, installed supplemental packs are likely to be disabled during version upgrades to ensure stable operation. In some instances, the contents of a supplemental pack have been directly incorporated into dom0, while in others, core architecture changes render the supplemental pack invalid. The latter is often the case with management agents from third parties until the third party issues a replacement supplemental pack. Installation of a supplemental pack can be done during installation but is more commonly done using the XenServer command line. Examples 7-6 and 7-7 show two different ways of installing a supplemental pack.

Example 7-6. Installation of supplemental pack from local ISO
$ xe-install-supplemental-pack {path to ISO}
Example 7-7. Installation of supplemental pack from ISO library
$ xe-install-supplemental-pack /var/run/sr-mount/{ISO library}/{ISO}

Driver Disks

While a standard XenServer installation contains drivers for a large number of hardware devices, like any operating system driver disks will occasionally be required. Drivers are created using the XenServer Device Driver Kit (DDK) with the full procedure being documented in the XenServer Driver Development Kit Guide for each version of XenServer. The DDK is used by hardware vendors to create drivers for hardware that wasn’t available at the time of shipping and by Citrix support with the help of vendors to address hardware and firmware issues.

Problem

Driver disks can be required for hardware at boot time but can also be required to address performance issues in a live system.

Solution

Work with the device vendor and Citrix to obtain the correct driver for your hardware. Note that third-party driver disk development often lags behind the release of a new version of XenServer, so it’s important to verify driver availability prior to upgrading. In other words, don’t rely on a vendor proactively including previously developed drivers in updated XenServer releases.

Discussion

If you needed a driver disk to install or recognize your hardware, it’s important to understand how driver disks work in a XenServer system and how they impact operational decisions. Drivers are interfaces between the physical hardware and an operating system. In the context of XenServer, they interface with the custom Linux kernel in dom0. Because a given XenServer update might include an updated Linux kernel, if you have used a custom driver, it’s important to validate if a kernel update is included. If a kernel update is part of a given XenServer update, then you will need to further validate if an updated driver exists for this new kernel. It’s not uncommon for driver updates to lag behind kernel updates for a number of reasons, so check first to minimize downtime.

Manual installation

When installing XenServer manually, the installer will prompt for driver disks. At this prompt, press F9 on the keyboard and insert the driver media. The installer will automatically load the driver and continue.

Unattended installation

When installing XenServer using an answer file, driver disks can be required to access the network and thus the answer file. In such situations, you will need to modify the XenServer installation media to include the desired driver.

If the driver isn’t required to access the answer file, the driver location can be included in the answer file using the driver-source with a type of either nfs or url, as shown in Example 7-8.

Example 7-8. Specifying driver disk source in answer file
<driver-source "url">ftp://[ip-address]/[driver]/</driver-source>

Resolving driver conflict

Occasionally, XenServer will have a default driver that is incorrectly loaded for a given hardware and prevents the driver disk contents from being used. If the installation is unattended, the driver disk contents should be added to the installer using the process described in the recipe “Slipstreaming Drivers and Supplemental Packs”. If the installation is manual, you can resolve the driver conflict using this procedure:

  1. At the installation boot prompt, type shell.
  2. At the command prompt, type rmmod [driver] where [driver] is the name of the driver in conflict. If no error occurs, the driver has been unloaded and the conflict resolved. 
  3. Type exit and then supply the driver disk manually as outlined previously.

Updating driver post-installation

Because a driver disk is really a special case of a supplemental pack, the easiest way to install a driver disk on a running system is to treat it as supplemental pack, as shown in Examples 7-9 and 7-10.

Example 7-9. Installation of driver from local ISO
$ xe-install-supplemental-pack {path to driver ISO}
Example 7-10. Installation of driver from ISO library
$ xe-install-supplemental-pack /var/run/sr-mount/{ISO library}/{driver ISO}

Slipstreaming Drivers and Supplemental Packs

Problem

Your installation requires either third-party drivers or additional features that are delivered on supplemental packs. The goal is to ensure that all XenServer hosts have a consistent installation.

Solution

In order to ensure that all required drivers or supplemental packs are present during the installation, the installation media can be extended to include the additional items.

Discussion

As mentioned previously, XenServer is extended via both driver disks and supplemental packs, both of which are delivered in supplemental pack form. Any supplemental pack can be slipstreamed into the installation media without requiring the installer itself to be modified. The following procedure will create installation media with slipstreamed features:

  1. Download the installation ISO for the version of XenServer you wish to deploy.
  2. Download the driver disks and/or supplemental packs you wish include.
  3. Open the ISO with your favorite ISO editor.
  4. Create a single directory for each item to be added. For example, a network device driver might be placed into a directory named device.NIC. If more than one item is to be added, each item must be in a unique directory.
  5. Into each directory, place the contents of the driver disk or supplemental pack you wish to include.
  6. In the root directory of the ISO, edit the XS-REPOSITORY-LIST file and include the directories you created in step 4 after the existing items. Only one directory is permitted on a line, and every line must be newline terminated.
  7. Re-create the ISO in bootable format.

At this point, you will now have a XenServer installer that includes your slip-streamed features. Installation will proceed with the core XenServer binaries, and all additional features will be installed afterward.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.197.201