XenServer Installation Guide 4.1.0 Published March 2008 1.
XenServer Installation Guide XenServer Installation Guide: Release 4.1.0 Published March 2008 Copyright © 2008 Citrix Systems, Inc. Xen®, Citrix®, XenServer™, XenCenter™ and logos are either registered trademarks or trademarks of Citrix Systems, Inc. in the United States and/or other countries. Other company or product names are for informational purposes only and may be trademarks of their respective owners.
XenServer Installation Guide 3
Table of Contents 1. Introducing XenServer .................................................................................................. 1 1.1. About this document ......................................................................................... 1 1.2. How this Guide relates to other documentation ................................................... 1 1.3. What's new in XenServer 4.1.0 .......................................................................... 1 1.4. What is XenServer? ..........
Chapter 1. Introducing XenServer Thank you for choosing XenServer™ from Citrix Systems, Inc., the creators of the Xen® hypervisor and leaders of the open source Xen project. 1.1. About this document This document is an installation guide for XenServer, the platform virtualization solution from Citrix. The XenServer package contains all you need for creating a network of virtual x86 computers running on Xen®, the open-source paravirtualizing hypervisor with near-native performance.
Introducing XenServer • Enhanced XenApp™ support: A dedicated XenApp VM template provides the fastest way to virtualize XenApp installations. 1.4. What is XenServer? XenServer is a server virtualization platform that offers near bare-metal virtualization performance for server and client operating systems. XenServer uses the Xen hypervisor to virtualize each server on which it is installed, enabling each to host multiple Virtual Machines simultaneously with guaranteed performance.
Introducing XenServer attacks. Xen is fully open to scrutiny by the security community and its security is continuously tested. Xen is also the foundation for a Multi-Level Secure System architecture being developed by Citrix, IBM and Intel.
Introducing XenServer • enabling easy import and export of Virtual Machines in the virtual hard disk formats of all major vendors, as well as offering raw block storage to Virtual Machines • leveraging shared storage technologies, where present, as a core building block of XenServer resource pools, to facilitate live-relocation of running Virtual Machines and easy relocation of workload to achieve optimal utilization of pool resources XenServer, uniquely amongst all virtualization products on the market, of
Introducing XenServer • the Xen hypervisor • installers for both the XenServer Host and for XenCenter • a tool for creating Linux VMs by converting existing physical installations of supported Linux distributions (P2V) • XenCenter, a Windows client application.
Chapter 2. System Requirements XenServer requires at least two separate physical x86 computers: one to be the XenServer Host, and the other to run the XenCenter application. The XenServer Host machine is dedicated entirely to the task of hosting VMs and is not used for other applications. The computer that runs XenCenter can be any general-purpose Windows computer that satisfies the hardware requirements, and can be used to run other applications simultaneously. 2.1.
System Requirements • Windows Vista VMs are allocated a root device of 16 GB, and other Windows VMs default to 8 GB. Network 100 Mbit/s or faster network interface card (NIC). A gigabit NIC is recommended for faster P2V and export/import data transfers and for live relocation of VMs. 2.2. XenCenter requirements The remote XenCenter application for managing the XenServer Host can be installed and run on any Windows 2003, Windows XP, Windows Vista workstation or laptop.
Chapter 3. Installing XenServer Any XenServer network, from the simplest to the most complex deployment, is made up of one or more XenServer Hosts, each running some number of VMs, and one or more workstations running XenCenter to administer the XenServer Hosts. In order to create resource pools and enable XenMotion (live migration of VMs), a means of shared storage also needs to be deployed on the network.
Installing XenServer 2. burn it to a physical CD if installing from a DVD/CD drive, or set it up for PXE installation as described in Appendix C, PXE installation of XenServer Host 3. insert the CD when prompted for the Linux Pack during XenServer Host installation Note If you decide later to add Linux support, mount the Linux Pack installation CD or ISO image on the XenServer Host and run the script install.sh, located in the root of the CD. Procedure 3.1.
Installing XenServer 8. If you have multiple local hard disks, you are asked to choose the Primary Disk for the installation. Select the desired disk and choose OK to proceed. After selecting the primary one, you are also prompted to choose if you want any of the other drives to be formatted for use by XenServer for VM storage. Select and choose OK to proceed. If the computer has a single hard disk, these two screens do not appear. 9.
Installing XenServer 15. If you selected Using NTP in the preceding step, you are prompted to identify the time server or servers you want to use. You can check NTP is configured by my DHCP server and the time server will be set by DHCP. Otherwise, enter at least one NTP server name or IP address in the fields below. Choose OK to proceed. Otherwise, the installation script moves to the next step; you will be prompted for the manually-entered time later, near the end of the installation.
Installing XenServer If you selected not to install support for Linux VMs, a completion message is displayed. Note If you decide later to add Linux support, mount the Linux Pack installation CD or ISO image on the XenServer Host and run the script install.sh, located in the root of the CD. 20. Select Reboot. Upon reaching the login prompt, the system should now be ready to be managed via XenCenter. To connect to it, you will need the IP address or hostname of the XenServer Host.
Installing XenServer 3. A list of programs installed on the computer is displayed. Scroll down if necessary and select XenCenter. 4. In Windows XP or 2003, click the Remove button. In Windows Vista, select Uninstall from the toolbar above the list of programs. This will remove the Citrix application. At the end, a message is displayed. Click OK to close the message box. 3.3.
Installing XenServer Note To be part of a resource pool, the XenServer Hosts and the server or servers providing the shared NFS storage need to have static IP addresses. Procedure 3.5. Basic procedure 1. Install XenServer Host software on server(s) 2. Install XenCenter on workstation(s) 3. Set up the NFS server 4. Run XenCenter and connect to XenServer Hosts 5. Choose one XenServer Host as a pool master and join other XenServer Hosts to its pool. 6.
Installing XenServer 4. Edit the file /etc/exports and add the line / *(rw,no_root_squash,sync) Save and close the file. 5. Restart the portmap and nfs daemons as follows: service portmap restart service nfs restart The should now be exported on the network and you should be able to use XenCenter to point to it using the Storage wizard. See the XenCenter online help for details. Procedure 3.7. Create an SR on the NFS share at the pool level 1.
Installing XenServer • a server providing a shared directory via iSCSI Note To be part of a resource pool, the XenServer Hosts and the server or servers providing the shared iSCSI storage need to have static IP addresses. Procedure 3.8. Basic procedure 1. Install XenServer Host software on server(s) 2. Install XenCenter on workstation(s) 3. Prepare the iSCSI storage 4. If necessary, enable your iSCSI device for multiple initiators 5. Run XenCenter and connect to XenServer Hosts 6.
Installing XenServer 2. Repeat for each XenServer Host in the pool. Procedure 3.11. To create an SR on the iSCSI share at the pool level via the CLI 1.
Appendix A. Troubleshooting If you experience odd behavior, crashes, or have other issues during installation, this chapter is meant to help you solve the problem if possible and, failing that, describes where logs are located and other information that can help your Citrix Solution Provider and Citrix track and resolve the issue. Note We recommend that you follow the troubleshooting information in this chapter solely under the guidance of your Citrix Solution Provider or Citrix Support.
Appendix B. Maintenance Procedures This chapter documents some miscellaneous procedures for maintaining XenServer Hosts. B.1. Preparing XenServer Hosts for maintenance operations Before performing maintenance operations on a XenServer Host that is part of a resource pool, you should disable it (which prevents any VMs from being started on it), then migrate its VMs to another XenServer Host in the pool.
Maintenance Procedures xe host-enable then restart any halted VMs and/or resume any suspended VMs. B.2. Applying updates Between releases of XenServer software, Citrix occasionally releases updates to the software. These updates typically contain accumulated bug fixes and feature improvements. When an update is released, it is made accessible on the Internet and an email announcement is sent to all XenServer customers.
Maintenance Procedures Procedure B.3. To apply an update to a XenServer Host or XenServer Host pool using the CLI 1. Download the update to a local directory. Note the path to the update file you have downloaded. (It is also possible to download the update directly to an appropriate location on the server, e.g. /root, using standard Linux commands, but it is usually best to download it to a remote client.) 2. Upload the update to your server or pool.
Maintenance Procedures The following procedure describes how to reinstall the current version of the XenServer Host over an existing installation of XenServer Host 4.1.0, and preserve settings an VMs. When reinstalling your host, be aware that any custom RPMs which you might have installed on the XenServer Host control domain will not be preserved. Procedure B.4. To reinstall XenServer Host from version 4.1.0 1. Perform an orderly shutdown on the VMs hosted on the XenServer Host.
Maintenance Procedures B.4.2. Performing a rolling pool upgrade The correct sequence for upgrading a pool of XenServer installations to a newer version is as follows: 1. Eject any CDs from your Virtual Machines before starting the rolling upgrade. Having CDs inserted during rolling upgrade can prevent migrations from working correctly, and due to the mode of operation of the pool whilst the rolling upgrade is taking place, it is required that this be done before the rolling upgrade is started. 2.
Maintenance Procedures The following procedure describes how to install the current version of the XenServer Host over an existing installation of XenServer Host 3.2.0 When upgrading from version 3.2.0 to the current version, be aware of the following: • any custom RPMs which you might have installed on the XenServer Host control domain will not be preserved • existing Windows VMs will need to have the paravirtualized device drivers reinstalled Procedure B.5. To upgrade XenServer Host from version 3.2 1.
Maintenance Procedures vhd-update -f -j .journal This will validate the specified journal file, then proceed to transform the bitmaps and rewrite filename. There is also a rollback operation vhd-update -f -j .journal -r which will write the bitmaps from filename.journal to filename without transforming them (this is probably only useful for testing and debugging). Note • The vhd-update utility should not be used with live (i.e., plugged) VHDs.
Maintenance Procedures B.7.1.1. Backing up single host installations The CLI must be used to backup the pool database. To obtain a consistent pool metadata backup file, run xe pool-dump-database against the XenServer Host and archive the resulting file. The backup file will contain sensitive authentication information about the pool, so ensure it is securely stored. To restore the pool database, use the xe pool-restore-database from a previous dump file.
Maintenance Procedures This section describes the XenServer Host control domain backup and restore procedures. These procedures do not back up the storage repositories that house the VMs, but only the privileged control domain that runs Xen and the XenServer agent.
Maintenance Procedures restores it to its normal form, but it is written to another partition (/dev/sda2) and does not overwrite the current version of the filesystem. 2. To actually use the restored version of the root filesystem, you need to reboot the XenServer Host using the XenServer installation CD and select the Restore from backup option. After the restore from backup is completed, reboot the XenServer Host and it will start up from the restored image.
Appendix C. PXE installation of XenServer Host This appendix describes setting up a TFTP server to enable PXE booting of XenServer Host installations. It also describes the use of an XML answerfile, which allows you to perform unattended installations. C.1.
PXE installation of XenServer Host to disable = no 4. Restart the xinetd service, which manages tftp: # service xinetd restart 5. Make a directory inside /tftpboot called xenserver. 6. Copy the files mboot.c32 and pxelinux.0 from /usr/lib/syslinux to the /tftboot directory. 7. Copy the files install.img, vmlinuz, and xen.gz from the Base Pack CD (found in the root of the Base Pack CD, and in its /boot directory respectively), and place them in /tftpboot/xenserver. 8.
PXE installation of XenServer Host This will perform an unattended installation using the answerfile at the URL specified. Note Also, if you want to use the serial console to do an installation, be sure to include the argument output=ttyS0 on the kernel command-line (e.g. after "vmlinuz") in addition to any other appropriate console= values. For details on creating an answerfile for unattended installation, see Section C.2, “Creating an answerfile for unattended PXE installation”.
PXE installation of XenServer Host named XenServer_4.1.0 and then copy the directory packages.main from the Base Pack disk to XenServer_4.1.0/packages.main. 2. If Linux support is also desired, copy packages.linux from the Linux Pack disk to XenServer_4.1.0/packages.linux. This structure allows you to install either both packages by having the answerfile's source element contain the enclosing directory XenServer_4.1.
PXE installation of XenServer Host All nodes should be within a root node named installation. The following is a summary of the elements. All values should be PCDATA within the nodes, unless otherwise stated. Required elements are indicated. Element Description Required? The name of the storage device where the Dom0 should be installed, equivalent to the choice made on the Select Primary Disk step of the interactive installation process.
PXE installation of XenServer Host Element Description Required? Attributes: type: url, nfs, or local If url or nfs, put the url or NFS path in the PCDATA; if local, leave the PCDATA empty. For example, http://server/scripts server:scripts The single network interface to be used as the host administration interface. N Attributes: proto: dhcp or static name: eth0 for example.
PXE installation of XenServer Host installation lives with the existing-installation element, and leave the primary-disk and guest-disk elements unspecified. For example: sda us mypassword http://pxehost.example.com http://pxehost.example.
PXE installation of XenServer Host C.3.2. Installation media repository metadata The XS-REPOSITORY file is used to describe a Citrix-format installation media repository. It has four fields, separated by newlines: • repository id • repository name • intended target product • intended target version Repository IDs should be alphanumeric strings that provide a machine identifier for the repository. They should be unique within a target product and version.
PXE installation of XenServer Host If the type is driver, the subsequent fields are source filename and destination (${KERNEL_VERSION} will be substituted with the Xen-kernel version.) Example: firmware_example 77001 3452c04dfcc237cde11c63d43e97a303 driver \ firmware_example.ko \ /lib/modules/${KERNEL_VERSION}/extra/firmware_example.ko If the type is firmware, the subsequent field is destination filename (no path is necessary - it is automatically prefixed with /lib/firmware/).
Appendix D. Xen Memory Usage When calculating the memory footprint of a Xen host there are two components that must be taken into consideration. First there is the memory consumed by the Xen hypervisor itself; then there is the memory consumed by the host's control domain. The control domain is a privileged VM that provides low-level services to other VMs, such as providing access to physical devices. It also runs the management tool stack. D.1.