Upgrade from an existing version

Citrix provides upgrade and update capabilities that you can use to move from some earlier versions of XenServer to XenServer 7.6. Using the upgrade or update capability enables you to apply XenServer 7.6 without having to complete a full installation process. When you upgrade or update, XenServer 7.6 retains your VMs, SRs, and configuration.

  • You can upgrade from XenServer 7.1 Cumulative Update 1 (LTSR) or 7.0 to XenServer 7.6 by using the Base Installation ISO. This section describes how to upgrade to XenServer 7.6.

    Note:

    Upgrading from XenServer 7.1 to XenServer 7.6 is not supported. Ensure that the latest Cumulative Update is applied to XenServer 7.1 before attempting to upgrade.

  • This Current Release (CR) of XenServer can be applied to previous supported XenServer Current Releases (7.5 and 7.4) as an update by using the Update ISO. A CR that is available as an update can be applied in the same way that hotfixes are applied. For more information, see Update your hosts.

  • For all other versions of XenServer, you cannot upgrade to XenServer 7.6 directly. You can either first upgrade to a later version of XenServer and then upgrade or update that version to 7.6, or you can perform a clean installation using the Base Installation ISO. For more information, see Install.

Note:

To retain VMs from your previous installation of XenServer, export the VMs and import them into your clean installation of XenServer 7.6. VMs exported from any supported version of XenServer can be imported into XenServer 7.6. For more information, see Import and export VMs.

This section describes how to upgrade XenServer by using XenCenter or the xe CLI. It guides you through upgrading your XenServer hosts - both pooled and standalone - automatically (using the XenCenter Rolling Pool Upgrade wizard) and manually.

Important:

  • Upgrading XenServer hosts, and particularly a pool of XenServer hosts, requires careful planning and attention. To avoid losing any existing data, either:
    • Map your upgrade path carefully.
    • Use the XenCenter Rolling Pool Upgrade wizard, and ensure that you select the option to upgrade when you are stepping through the installer.
  • If you are using XenCenter to upgrade your hosts, download and install the latest version of XenCenter. For example, when upgrading to XenServer 7.6, use XenCenter issued with XenServer 7.6. Using earlier versions of XenCenter to upgrade to a newer version of XenServer is not supported.
  • Boot-from-SAN settings are not inherited during the manual upgrade process. When upgrading using the ISO or PXE process, 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.

  • If you are upgrading to the latest version from XenServer 6.5 Service Pack 1 or earlier, the ordering and naming of the NICs is different. To work around this change, you can change the order of the NICs during installation. For more information, see CTX135809 - How to Change Order of NICs in XenServer.

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.

Note:

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 using XenCenter or the xe CLI. When 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, first plan your upgrade path and then live migrate running VMs between XenServer hosts as you perform the rolling pool upgrade manually.

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.6 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.6 from the XenServer Product Download page. Using earlier versions of 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 Command line interface. 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 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 want XenCenter to resolve all failed prechecks automatically, click Resolve All.

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

  8. Prepare the XenServer installation media.

    If you chose Automatic Mode, enter the installation media details. Choose HTTP, NFS, or FTP and then specify the URL, user name, 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 or from version 7.1 to version 7.6. You cannot migrate VMs from an upgraded host to one running an older version of XenServer. For example, from version 7.6 to version 7.1. 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 Command Line interface. 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. This action is required because it is not possible to migrate a VM from an upgraded XenServer host to a host running an older version of XenServer.

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 Upgrading 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 (see Install) until the installer offers you the option to upgrade. Choose to upgrade.

    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 Manage VMs.

Note:

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

If you are upgrading through multiple versions of XenServer, ensure that all upgrades have been applied before updating the XenServer Tools on your VMs. Do not update the XenServer Tools to interim versions.

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 by using the xe CLI:

  1. Identify which VMs do not have empty CD/DVD drives by typing 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. Choose to upgrade. For more information, see Install.

    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.