Upgrade from an existing version

This article documents how to upgrade your XenServer deployment from an existing version. It guides you through upgrading your XenServer hosts - both pooled and standalone - automatically and manually.

XenServer hosts must be running at least version 6.2 to upgrade directly to version 7.1 or its latest Cumulative Update. Customers wishing to upgrade from earlier versions of XenServer must upgrade to version 6.2, before upgrading to version 7.1 or its latest Cumulative Update.

Note:

We recommend that you upgrade directly to the latest Cumulative Update of XenServer 7.1. A Cumulative Update contains fixes that are not included in the initial XenServer 7.1 release.

The following table lists the upgrade path from previous versions of XenServer:

Version Direct upgrade to the latest XenServer 7.1 Cumulative Update?
XenServer 7.1 with all previous Cumulative Updates applied No. Use the update mechanism instead. For more information, see Update your hosts.
Other XenServer 7.1 No. Use the update mechanism instead. You must apply all Cumulative Updates in order before applying the latest Cumulative Update. For more information, see Update your hosts.
XenServer 7.0 Yes
XenServer 6.5.0 Yes
XenServer 6.2.0 Yes

Note:

System administrators may prefer to perform a clean installation of the most recent version of XenServer rather than performing one or more upgrades. VMs can be exported from all versions of XenServer from 6.0 and directly imported into 7.1. For more information, see the Importing and Exporting VMs section in the Virtual Machine User’s Guide.

Important:

Upgrading a XenServer host - and particularly a pool of XenServer hosts - requires careful planning and attention. Be sure to map your upgrade path carefully. You can also use the XenCenter Rolling Pool Upgrade wizard. Ensure that you choose the option to upgrade when you step through the installer to avoid losing any existing data.

Important:

Boot from SAN setting is not inherited during the manual upgrade process. When upgrading using the ISO or PXE process, customers should follow the same instructions as used in the installation process below to ensure that multipathd is correctly configured. For more information see Boot from SAN.

Rolling pool upgrades

XenServer enables you to perform a rolling pool upgrade. A rolling pool upgrade keeps all the services and resources offered by the pool available while upgrading all of the hosts in a pool. This upgrade method takes only one XenServer host offline at a time. Critical VMs are kept running during the upgrade process by live migrating the VMs to other hosts in the pool.

Important:

The pool must have shared storage to keep your VMs running during a rolling pool upgrade. If your pool does not have shared storage, you must stop your VMs before upgrading because the VMs cannot be live migrated.

Storage XenMotion is not supported with rolling pool upgrades.

You can perform a rolling pool upgrade by using XenCenter or the xe CLI. If you are using XenCenter, Citrix recommends using the Rolling Pool Upgrade wizard. This wizard organizes the upgrade path automatically and guides you through the upgrade procedure. If you are using the xe CLI, you need to perform the rolling upgrade manually by first planning your upgrade path and then live migrating running VMs between XenServer hosts accordingly.

The Rolling Pool Upgrade wizard is available for XenServer Enterprise Edition customers or those customers who have access to XenServer through their Citrix Virtual Apps and Desktops entitlement. For more information about XenServer licensing, see Licensing. To upgrade, or to buy a XenServer license, visit the Citrix website.

Important:

Do not use Rolling Pool Upgrade with Boot from SAN environments. For more information on upgrading boot from SAN environments, see Boot from SAN.

Upgrade XenServer hosts by using the XenCenter Rolling Pool Upgrade wizard

The Rolling Pool Upgrade wizard enables you to upgrade XenServer hosts, hosts in a pool or standalone hosts, to the current version of XenServer.

The Rolling Pool Upgrade wizard guides you through the upgrade procedure and organizes the upgrade path automatically. For pools, each of the hosts in the pool is upgraded in turn, starting with the pool master. Before starting an upgrade, the wizard conducts a series of prechecks. These prechecks ensure certain pool-wide features, such as high availability are temporarily disabled and that each host in the pool is prepared for upgrade. Only one host is offline at a time. Any running VMs are automatically migrated off each host before the upgrade is installed on that host.

The Rolling Pool Upgrade wizard also allows you to automatically apply the available hotfixes when upgrading to a newer version of XenServer. This enables you to bring your standalone hosts or pools up-to-date with a minimum number of reboots at the end. You must be connected to the Internet during the upgrade process for this feature to work.

You can benefit from the automatic application of hotfixes feature when you use XenCenter issued with XenServer 7.1 Cumulative Update 2 to upgrade from any supported version of XenServer to XenServer 7.0 and later.

Note:

Rolling Pool Upgrade using XenCenter is only available for XenServer Enterprise Edition customers or those customers who have access to XenServer through their Citrix Virtual Apps and Desktops entitlement.

The wizard can operate in Manual or Automatic mode:

  • In Manual Mode, you must manually run the XenServer installer on each host in turn and follow the on-screen instructions on the serial console of the host. When the upgrade begins, XenCenter prompts you to insert the XenCenter installation media or specify a network boot server for each host that you upgrade.

  • In Automatic Mode, the wizard uses network installation files on an HTTP, NFS, or FTP server to upgrade each host in turn. This mode doesn’t require you to insert installation media, manually reboot, or step through the installer on each host. If you perform a rolling pool upgrade in this manner, you must unpack the installation media onto your HTTP, NFS, or FTP server before starting the upgrade.

Before You Upgrade

Before you begin your upgrade, be sure to make the following preparations:

  • Download and install XenCenter issued with XenServer 7.1 Cumulative Update 2 from the XenServer Product Download page. Using XenCenter to upgrade to a newer version of XenServer is not supported.

  • Citrix strongly recommends that you take a backup of the state of your existing pool using the pool-dump-database xe CLI command. For more information, see the XenServer Administrator’s Guide. Taking a backup state ensures that you can revert a partially complete rolling upgrade to its original state without losing VM data.

  • Ensure that your hosts are not over-provisioned: check that hosts have sufficient memory to carry out the upgrade. As a general guideline, if N equals the total number of hosts in a pool, there must be sufficient memory across N-1 hosts to run all of the live VMs in the pool. It is best to suspend any non-critical VMs during the upgrade process.

Rolling Pool Upgrade wizard checks that the following actions have been taken. Perform these actions before you begin the upgrade process:

  • Empty the CD/DVD drives of the VMs in the pools.

  • Disable high availability.

To upgrade XenServer hosts by using the XenCenter Rolling Pool Upgrade wizard:

  1. Open the Rolling Pool Upgrade wizard: on the Tools menu, select Rolling Pool Upgrade.

  2. Read the Before You Start information, and then click Next to continue.

  3. Select the pools and any individual hosts that you want to upgrade, and then click Next.

  4. Choose one of the following modes:
    • Automatic Mode for an automated upgrade from network installation files on an HTTP, NFS, or FTP server
    • Manual Mode for a manual upgrade from either a CD/DVD or using network boot (using existing infrastructure)

    Note:

    If you choose Manual Mode, you must run the XenServer installer on each host in turn. Follow the on-screen instructions on the serial console of the host. When the upgrade begins, XenCenter prompts you to insert the XenServer installation media or specify a network boot server for each host that you upgrade.

  5. Choose whether you want XenCenter to automatically download and install the minimal set of updates (hotfixes) after upgrading the servers to a newer version. The apply updates option is selected by default. However, you must have internet connection to download and install the updates.

  6. After you have selected your Upgrade Mode, click Run Prechecks.

  7. Follow the recommendations to resolve any upgrade prechecks that have failed. If you would like XenCenter to automatically resolve all failed prechecks, click Resolve All.

    When all prechecks have been resolved, click Next to continue.

  8. Prepare the XenServer installation media.

    If you choose Automatic Mode, enter the installation media details. Choose HTTP, NFS or FTP and then specify the path, username and password, as appropriate.

    Notes:

    • If you choose FTP, ensure that you escape any leading slashes that are in the file path section of the URL.

    • Enter the user name and password associated with your HTTP or FTP server, if you have configured security credentials. Do not enter the user name and password associated with your XenServer pool.

    • XenServer supports FTP in passive mode only.

    If you chose Manual Mode, note the upgrade plan and instructions.

    Click Start Upgrade.

  9. When the upgrade begins, the Rolling Pool Upgrade wizard guides you through any actions you must take to upgrade each host. Follow the instructions until you have upgraded and updated all hosts in the pools.

    Note:

    If the upgrade or the update process fails for any reason, the Rolling Pool Upgrade wizard halts the process. This allows you to fix the issue and resume the upgrade or update process by clicking the Retry button.

  10. The Rolling Pool Upgrade wizard prints a summary when the upgrade is complete. Click Finish to close the wizard.

Upgrade XenServer hosts by using the xe CLI

Important:

Performing a rolling pool upgrade using the xe CLI requires careful planning. Be sure to read the following section with care before you begin.

Plan an upgrade path

As you plan your upgrade, it is important to be aware of the following:

  • You can only migrate VMs from XenServer hosts running an older version of XenServer to one running the same version or higher. For example, from version 7.0 to version 7.1. You cannot migrate VMs from an upgraded host to one running an older version of XenServer. For example, from version 7.1 to version 7.0. Be sure to allow for space on your XenServer hosts accordingly.

  • Citrix strongly advises against running a mixed-mode pool (one with multiple versions of XenServer co-existing) for longer than necessary, as the pool operates in a degraded state during upgrade.

  • Key control operations are not available during upgrade. Do not attempt to perform any control operations. Though VMs continue to function as normal, VM actions other than migrate are not available (for example, shut down, copy and export). In particular, it is not safe to perform storage-related operations such as adding, removing, or resizing virtual disks.

  • Always upgrade the master host first. Do not place the host into maintenance mode using XenCenter before performing the upgrade. If you put the master in maintenance mode, a new master is designated.

  • Citrix strongly recommends that you take a backup of the state of your existing pool using the pool-dump-database xe CLI command. For more information, see the XenServer Administrator’s Guide. This allows you to revert a partially complete rolling upgrade back to its original state without losing any VM data. If you have to revert the rolling upgrade for any reason, you might have to shut down VMs.

Before you begin your rolling pool upgrade

  • If you are using XenCenter, upgrade XenCenter to the latest version. The newer version of XenCenter correctly controls older versions of XenServer hosts.

  • Empty the CD/DVD drives of the VMs in the pool. For details and instructions, see Before you upgrade a single XenServer host.

  • Disable high availability.

Perform rolling pool upgrades by using the xe CLI

  1. Start with the pool master. Disable the master by using the host-disable command. This prevents any new VMs from starting on the specified host.

  2. Ensure that no VMs are running on the master. Shut down, suspend or migrate VMs to other hosts in the pool.

    To migrate specified VMs to specified hosts, use the vm-migrate command. By using the vm-migrate command, you have full control over the distribution of migrated VMs to other hosts in the pool.

    To live migrate all VMs to other hosts in the pool, use the host-evacuate command. By using the host-evacuate command, you leave the distribution of migrated VMs to XenServer.

  3. Shut down the pool master.

    Important:

    You are unable to contact the pool master until the upgrade of the master is complete. Shutting down the pool master causes the other hosts in the pool to enter emergency mode. Hosts can enter emergency mode when they in a pool whose master has disappeared from the network and cannot be contacted after several attempts. VMs continue to run on hosts in emergency mode, but control operations are not available.

  4. Boot the pool master using the XenServer installation media and method of your choice (such as, installation CD or network). Follow the XenServer installation procedure until the installer offers you the option to upgrade. For more information, see Install XenServer and XenCenter.

    Warnings:

    • Ensure you select the upgrade option to avoid losing any existing data.

    • If anything interrupts the upgrade of the pool master or if the upgrade fails for any reason, do not attempt to proceed with the upgrade. Reboot the pool master and restore to a working version of the master.

    When your pool master restarts, the other hosts in the pool leave emergency mode and normal service is restored after a few minutes.

  5. On the pool master, start or resume any shutdown or suspended VMs. Migrate any VMs that you want back to the pool master.

  6. Select the next XenServer host in your upgrade path. Disable the host.

  7. Ensure that no VMs are running on the host. Shut down, suspend or migrate VMs to other hosts in the pool.

  8. Shut down the host.

  9. Follow the upgrade procedure for the host, as described for the master in Step 4.

    Note:

    If the upgrade of a host that is not the master fails or is interrupted, you do not have to revert. Use the host-forget command to forget the host. Reinstall XenServer on the host, and then join it, as a new host, to the pool using the pool-join command.

  10. On the host, start or resume any shutdown or suspended VMs. Migrate any VMs that you want back to the host.

  11. Repeat Steps 6–10 for the rest of the hosts in the pool.

  12. After each host in the pool has been upgraded, it is important to upgrade the XenServer Tools on all VMs. For more information, see the XenServer Virtual Machine User’s Guide.

Note:

Running older versions of the XenServer Tools on newer XenServer installations is not supported, except during the upgrade process.

Upgrade a single XenServer host by using the xe CLI

Before you upgrade a single XenServer host

Before upgrading a standalone XenServer host, shut down or suspend any VMs running on that host. It is important to eject and empty CD/DVD drives of any VMs you plan to suspend. If you do not empty the CD/DVD drives, you may not be able to resume the suspended VMs after upgrade.

An empty VM CD/DVD drive means the VM is not attached to an ISO image or a physical CD/DVD mounted through the XenServer host. In addition, you must ensure that the VM is not attached to any physical CD/DVD drive on the XenServer host at all.

To empty the CD/DVD drive of a VM using the xe CLI:

  1. Identify which VMs do not have empty CD/DVD drives by entering the following:

    xe vbd-list type=CD empty=false

    This returns a list of all the VM CD/DVD drives that are not empty, for example:

    uuid ( RO) : abae3997-39af-2764-04a1-ffc501d132d9
    vm-uuid ( RO): 340a8b49-866e-b27c-99d1-fb41457344d9
    vm-name-label ( RO): VM02_DemoLinux
    vdi-uuid ( RO): a14b0345-b20a-4027-a233-7cbd1e005ede
    empty ( RO): false
    device ( RO): xvdd
    
    uuid ( RO) : ec174a21-452f-7fd8-c02b-86370fa0f654
    vm-uuid ( RO): db80f319-016d-0e5f-d8db-3a6565256c71
    vm-name-label ( RO): VM01_DemoLinux
    vdi-uuid ( RO): a14b0345-b20a-4027-a233-7cbd1e005ede
    empty ( RO): false
    device ( RO): xvdd
    

    Note the uuid, which is the first item in the list.

  2. To empty the CD/DVD drives of the VMs listed, type the following:

    xe vbd-eject uuid=uuid

Upgrade a single XenServer host by using the xe CLI

To upgrade a single XenServer host by using the xe CLI:

  1. Disable the XenServer host that you want to upgrade by typing the following:

    xe host-disable host-selector=host_selector_value
    

    When the XenServer host is disabled, VMs cannot be created or started on that host. VMs also cannot be migrated to a disabled host.

  2. Shut down or suspend any VMs running on the host that you want to upgrade by using the xe vm-shutdown or xe vm-suspend commands.

  3. Shut down the host by using the xe host-shutdown command.

  4. Follow the XenServer installation procedure until the installer offers you the option to upgrade. For more information, see Install XenServer and XenCenter.

    Warning:

    Be sure to select the upgrade option to avoid losing any existing data.

    You don’t have to configure any settings again during the setup procedure. The upgrade process follows the first-time installation process but several setup steps are bypassed. The existing settings for networking configuration, system time, and so on, are retained.

    When your host restarts, normal service is restored after a few minutes.

  5. Restart any shutdown VMs, and resume any suspended VMs.