XenServer Virtual Machine Installation Guide 5.5.0 Published July 2009 1.
XenServer Virtual Machine Installation Guide: Release 5.5.0 Published July 2009 Copyright © 2009 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. This product contains an embodiment of the following patent pending intellectual property of Citrix Systems, Inc.
1. About this document .................................................................................................... 1 Overview ................................................................................................................. 1 How this Guide relates to other documentation .......................................................... 1 2. Creating VMs .............................................................................................................. 2 Overview ................
XenServer Virtual Machine Installation Guide CentOS 4 ...................................................................................................... CentOS 5 ...................................................................................................... Oracle Enterprise Linux 5 ............................................................................... SUSE Enterprise Linux 9 ................................................................................ SUSE Enterprise Linux 10 SP1 ...
Chapter 1. About this document Overview This document is a guide to creating Virtual Machines with XenServer™, the platform virtualization solution from Citrix®. It describes the various methods of getting VMs up and running on XenServer hosts for each of the supported operating systems. This section summarizes the rest of the guide so that you can find the information you need.
Chapter 2. Creating VMs This chapter provides an overview of how VMs are created and lists virtual memory and virtual disk size minimums, describes the differences in virtual device support for the members of the XenServer product family. This chapter also discusses physical to virtual conversion (P2V), cloning templates, and importing previously-exported VMs. Overview VMs are created from templates.
XenServer Virtual Machine Installation Guide Creating VMs 3 Operating System Minimum RAM Maximum RAM Disk space Windows Server 2008 32-bit/64bit 512MB minimum supported, 2GB or more recommended 32GB Minimum 10GB, 40GB or more recommended Windows Vista 32-bit 512MB minimum supported, 768MB or more recommended 32GB 16GB Windows 2003 128MB minimum supported; 256MB or more recommended 32GB 2GB Windows XP SP2/3 128MB minimum supported; 256MB or more recommended 32GB 1.
XenServer Virtual Machine Installation Guide Creating VMs Virtual device Linux VMs Windows VMs Number of virtual CD-ROM drives 1 1 Number of virtual NICs 7 † 4 7 * A maximum of 8 VCPUs are supported via XenCenter. except for SLES 10 SP1 and RHEL 3.x and 4.x, which support 3. RHEL 5.0/5.1/5.2 support 3, but can support 7 when the kernel is patched with the Citrix Tools for Virtual Machines. The same applies for Oracle and CentOS 5.0/5.1/5.
XenServer Virtual Machine Installation Guide Creating VMs 5 General Guidelines for Virtualizing Physical Servers When considering how to best begin virtualizing a collection of physical servers, it is best to gain some comfort level and experience with virtualizing servers that are more simply configured, moving later to servers with more complex configurations.
XenServer Virtual Machine Installation Guide Creating VMs 6 a template, but be sure to follow the appropriate preparation procedure for the VM (see the section called “Preparing to clone a Windows VM” for Windows and the section called “Preparing to clone a Linux VM” for Linux). Templates cannot be used as normal VMs. XenServer has two mechanisms for cloning VMs: a full copy, or a faster Copy-on-Write (CoW) mode which only writes modified blocks to disk.
XenServer Virtual Machine Installation Guide Creating VMs 7 Note Be sure to include the .xva extension when specifying the export filename. If the exported VM does not have this extension and you attempt to import it via XenCenter, it might fail to recognize the file as a valid XVA file. 3. The export process might take some time to complete. When finished, the command prompt returns. Importing a VM An exported VM file can be imported using XenCenter or the CLI. This section describes using the CLI.
Chapter 3. Installing Windows VMs XenServer allows you to install Windows 2000 SP4, Windows Server 2003 (32-/64- bit), Windows Server 2008, Windows XP SP2/3, or Windows Vista as a VM. Installing Windows VMs on a XenServer host requires hardware virtualization support (Intel VT or AMD-V).
XenServer Virtual Machine Installation Guide Installing Windows VMs 9 Making the ISO available to XenServer hosts To make an ISO library available to XenServer hosts, create an external NFS or SMB/CIFS share directory. The NFS or SMB/CIFS server must allow root access to the share. For NFS shares, this is accomplished by setting the no_root_squash flag when you create the share entry in /etc/exports on the NFS server.
XenServer Virtual Machine Installation Guide Installing Windows VMs 10 Warning Be extremely careful with copying ISOs directly onto the control domain filesystem, as it has limited space available. A network share is a much safer mechanism for storing large numbers of ISO images. If the control domain does fill up, unpredictable behavior will result.
XenServer Virtual Machine Installation Guide Installing Windows VMs 11 To enable the Windows XenServer VSS provider 1. Install the Windows PV drivers. 2. Navigate to the directory where the drivers are installed (by default c:\Program Files\Citrix\XenTools, or the value of HKEY_LOCAL_MACHINE\Software\Citrix\XenTools\Install_dir in the Windows Registry). 3. Double-click the install-XenProvider.cmd command to activate the VSS provider.
XenServer Virtual Machine Installation Guide Installing Windows VMs 12 sysprep modifies the local computer SID to make it unique to each computer. The sysprep binaries are on the Windows product CDs in the \support\tools\deploy.cab file. The steps that you need to take to clone Windows VMs are: Cloning Windows VMs 1. Create, install, and configure the Windows VM as desired. 2. Apply all relevant Service Packs and updates. 3. Install the Citrix Tools for Virtual Machines. 4.
XenServer Virtual Machine Installation Guide Installing Windows VMs 13 General Windows Issues • When installing Windows VMs, start off with no more than three virtual disks. Once the VM and Citrix Tools for Virtual Machines tools have been installed you can add additional virtual disks. The boot device should always be one of the initial disks so that the VM can successfully boot without the Citrix Tools for Virtual Machines.
Chapter 4. Installing Linux VMs XenServer supports the installation of many Linux distributions as PV VMs. There are four installation mechanisms: • complete distributions provided as built-in templates • Physical-to-Virtual (P2V) conversion of an existing native instance (see the section called “Physical to Virtual Conversion (P2V)”) • using the vendor media in the server's physical DVD/CD drive • using the vendor media to perform a network installation.
XenServer Virtual Machine Installation Guide Distribution Built-in Installing Linux VMs P2V 15 Vendor Install from CD Vendor Install from network repository SUSE Linux Enterprise Server 10 SP1/2 32-bit/64-bit X X SUSE Linux Enterprise Server 11 32-bit/64-bit X X CentOS 4.5, 4.6 X X CentOS 4.7 X CentOS 5.0-5.3 32-bit X X CentOS 5.0-5.3 64-bit X X Oracle Enterprise Linux 5.0-5.2 32bit X X Oracle Enterprise Linux 5.0-5.
XenServer Virtual Machine Installation Guide Installing Linux VMs 16 Installing a Debian Lenny VM using the xe CLI 1. Create a VM using the Debian Lenny template. The UUID of the VM is returned: xe vm-install template=Debian\ Lenny\ 5.0 new-name-label= 2.
XenServer Virtual Machine Installation Guide Installing Linux VMs 17 • Oracle Enterprise Linux 5.0-5.2, 64-bit Other Linux operating systems need to be installed from a network installation server. See the section called “Installing Linux from a network installation server to a VM”. To install a supported Linux VM from vendor media using the CLI 1. 2. 3. Insert the vendor installation CD into the CD drive on the XenServer host.
XenServer Virtual Machine Installation Guide Installing Linux VMs 18 screens. Choosing to continue using VNC and setting a password will enable the Switch to Graphical Console button. Installing Linux from a network installation server to a VM The XenServer guest installer allows you to install an operating system from a network-accessible copy of vendor media onto a VM.
XenServer Virtual Machine Installation Guide 3. Installing Linux VMs 19 Create a VIF to connect the new VM to this network: xe vif-create vm-uuid= network-uuid= mac=random device=0 4. Set the install-repository key of the other-config parameter to the path of your network repository. For example, to use http://server/RedHat/5.0 as the URL of the vendor media: xe vm-param-set uuid= \ other-config:install-repository= 5.
XenServer Virtual Machine Installation Guide Installing Linux VMs 20 real IP addresses already in use in your network. The default range of IP addresses is 192.168.128.1 to 192.168.128.254, and the default netmask is 255.255.255.0. To change the guest installer network values 1. Open a console on the XenServer host. 2. Find the guest installer network: xe network-list The command returns the list of networks available to the XenServer host. The to use has the namelabel Guest installer network. 3.
XenServer Virtual Machine Installation Guide 2. Installing Linux VMs 21 Mount the image onto the guest by running the command: mount /dev/xvdd /mnt 3. Execute the installation script as the root user: /mnt/Linux/install.sh 4. If the kernel has been upgraded, or the VM was upgraded from a previous version, reboot the VM now. Note CD-ROM drives and ISOs attached to Linux Virtual Machines appear as /dev/xvdd instead of as /dev/ cdrom as you might reasonably expect.
XenServer Virtual Machine Installation Guide Installing Linux VMs 22 If the VM uses persistent names, the best thing to do is to turn these rules off. If for some reason you do not want to turn persistent names off, be aware that you will need to reconfigure networking inside the VM in the usual way, and the information shown in XenCenter will be out of sync with reality.
XenServer Virtual Machine Installation Guide Installing Linux VMs 23 [servers] 0=VNC [server-VNC] name=VNC command=/usr/bin/Xvnc -geometry 800x600 -PasswordFile /etc/vncpass BlacklistTimeout=0 flexible=true 5. Restart GDM, and then wait for the graphical console to be detected by XenCenter: /etc/init.d/gdm restart Note You can check that the VNC server is running using a command like ps ax | grep vnc.
XenServer Virtual Machine Installation Guide Installing Linux VMs 24 the appropriate Red Hat Linux x86 Installation Guide for details regarding installing additional software on your VM. 2. Open the GDM configuration file with your preferred text editor and add the following lines to the file: [server-VNC] name=VNC Server command=/usr/bin/Xvnc -SecurityTypes None -geometry 1024x768 -depth 16 \ -BlacklistTimeout 0 flexible=true • With configuration files on Red Hat Linux 3 and 4, this should be added ab
XenServer Virtual Machine Installation Guide 2. Installing Linux VMs 25 Select “Customize” and add 5900 to the other ports list. Alternatively, you can disable the firewall until the next reboot by running the command service iptables stop, or permanently by running chkconfig iptables off. This can of course expose additional services to the outside world and reduce the overall security of your VM.
XenServer Virtual Machine Installation Guide 1. Installing Linux VMs 26 Open a text console on the VM and run the YaST utility: yast 2. Use the arrow keys to select Network Services in the left menu, then Tab to the right menu and use the arrow keys to select Remote Administration. Press Enter. 3. In the Remote Administration screen, Tab to the Remote Administration Settings section. Use the arrow keys to select Allow Remote Administration and press Enter to place an X in the checkbox. 4.
XenServer Virtual Machine Installation Guide Installing Linux VMs 27 number (usually just zero). So a VNC server setup for Display-0 will listen on TCP port 5900, Display-1 is TCP-5901, etc. Consult your firewall documentation to make sure these ports are open. You might want to further customize your firewall configuration if you want to use IP connection tracking or limit the initiation of connections to be from one side only. To open the VNC port on a SLES-based VMs firewall 1.
XenServer Virtual Machine Installation Guide Installing Linux VMs 28 Setting up Debian Etch VMs for VNC The built-in Debian Etch template comes pre-configured with VNC set up and ready use. However, the default VNC configuration in Debian does not permit the root administrator to log in by default. To log in through VNC, you can either: • Log in to the text console and create a new, unprivileged user by running the adduser command. This is the recommended course of action.
XenServer Virtual Machine Installation Guide Installing Linux VMs 29 wget -O - \ http://updates-int.uk.xensource.com/XenServer/5.5.0/GPG-KEY \ | sudo apt-key add - Debian Etch 4.0 XenServer includes a custom Xen kernel for Debian VMs installed via the built-in template to provide full performance optimizations. When a Debian VM is first booted, you are prompted for details such as hostname and root passwords.
XenServer Virtual Machine Installation Guide Installing Linux VMs 30 The following issues have been reported upstream to Red Hat and are already fixed in the Xen kernel (which can be installed by using the /mnt/Linux/install.sh script in the built-in xs-tools.iso CD image): • During the resume operation on a suspended VM, allocations can be made that can cause swap activity which cannot be performed because the swap disk is still being reattached. (Red Hat Bugzilla 429103).
XenServer Virtual Machine Installation Guide Installing Linux VMs 31 xe vm-param-remove uuid= other-config: \ param-key=suppress-spurious-page-faults Preparing a RHEL 4.x guest for cloning To prepare a RHEL4 guest for cloning (see the section called “MAC address”), edit /etc/sysconfig/network-scripts/ifcfg-eth0 before converting the VM into a template and remove the HWADDR line.
XenServer Virtual Machine Installation Guide Installing Linux VMs 32 • Random segmentation faults on loading ELF binaries (Red Hat Bugzilla 247261) • Disks sometimes do not attach correctly on boot (Red Hat Bugzilla 247265). This has been fixed in Red Hat Enterprise Linux 5.1. • Soft lockup messages after suspend/resume or live migration (Red Hat Bugzilla 250994). These messages are harmless, but there may be a period of inactivity in the guest during live migration as a result of the lockup.
XenServer Virtual Machine Installation Guide Installing Linux VMs 33 SUSE Enterprise Linux 9 XenServer uses a SUSE-provided kernel. (Earlier versions of XenServer included a Citrix-provided version of the SLES9 which had a more mature version of the hypervisor, but which was out of date with SUSE's version, particularly with regard to security updates.) As a result, suspending and resuming a VM, and XenMotion, are not 100% reliable, especially with multiple VCPUs.
Chapter 5. Updating VMs This chapter discusses updating VMs with new Linux kernel revisions, updating Windows operating systems, applying Windows Service Packs, and updates to XenServer PV drivers and VM utilities. Upgrades to VMs are typically required when moving to a new version of XenServer. The following are current issues involving upgrading VMs running on XenServer to this version: • XenMotion of Windows VMs is not supported until the PV drivers are upgraded.
XenServer Virtual Machine Installation Guide Updating VMs 35 can either wait for the auto-run facility, or manually click on the xensetup.exe program. Follow the onscreen prompts to install the new drivers, which will automatically deactivate and upgrade the old drivers. Updating Linux kernels and guest utilities The Linux guest utilities can be updated by re-running the Linux/install.sh script from the built-in xstools.iso CD image (see the section called “Installing the Linux guest agent”).
Appendix A. Creating ISO images XenServer can use ISO images of CD-ROM or DVD-ROM disks as installation media and data sources for Windows or Linux VMs. This section describes how to make ISO images from CD/ DVD media. Creating an ISO on a Linux computer 1. Put the CD- or DVD-ROM disk into the drive. The disk should not be mounted. To check, run the command: mount If the disk is mounted, unmount the disk. Refer to your operating system documentation for assistance if required. 2.
Appendix B. Setting Up a Red Hat Installation Server This chapter explains how to set up a server as an installation server for Red Hat Linux. For a server to act as a Red Hat Linux network installation server, you need space on your server to copy the entire contents of each CD onto your server. This is typically the number of CDs or ISO images multiplied by 650MB. Ensure that the space you intend to use is formatted with your chosen filesystem and is mounted.
XenServer Virtual Machine Installation Guide Setting Up a Red Hat Installation Server 38 To export your installation directory, edit the /etc/exports file and add an entry for /install to it: /install *(ro) Save the edited exports file and make the NFS daemon reread its configuration file: exportfs -r This configures the most basic read-only export to all hosts on our network.
Appendix C. Troubleshooting VM problems If you experience odd behavior, application crashes, or have other issues, this chapter is meant to help you solve the problem if possible and, failing that, describes where the application logs are located and other information that can help your XenServer Solution Provider and Citrix track and resolve the issue. Troubleshooting of installation issues is covered in the XenServer Installation Guide.
XenServer Virtual Machine Installation Guide 2. Troubleshooting VM problems 40 Change the actions-after-crash value using xe vm-param-set; for example: xe vm-param-set uuid= actions-after-crash=coredump_and_restart Controlling Windows VM Crashdump Behaviour For Windows VMs, the core dump behavior cannot be controlled by the actions-after-crash parameter. By default Windows crash dumps are put into %SystemRoot% \Minidump in the Windows VM itself.
R Index AMD-V (AMD hardware virtualization), Release notes Linux VMs, 28 Windows VMs, 12 Remote Administration, SUSE Linux, 25 C S A Cloning VMs, 5, 21 Configuring VNC firewall settings, RHEL, 24 firewall settings, SLES, 26 for Debian VMs, 28 for Red Hat VMs, 23 for SUSE VMs, 25 Converting a VM to a template, 2 Creating an ISO image, 36 Creating VMs converting VM to a template, 2 From pre-configured template, 2 Importing an exported VM, 2 installing OS from a CD or ISO, 2 installing OS from a network