Update your hosts

Updates can often be applied with minimal service interruption. Citrix recommends that customers use XenCenter to apply all updates. If you are updating a pool of XenServer hosts, you can avoid downtime of VMs by using XenCenter’s Install Update wizard to apply updates, updating one host at a time, automatically migrating VMs away from each host as the hotfix or update is applied.

You can configure XenCenter to periodically check for available XenServer and XenCenter updates and new versions. Any Alerts will be displayed in the Notifications pane.

Types of update

Citrix releases the following types of updates for XenServer:

  • Current Releases (CRs), which are full releases of XenServer from the CR stream. CRs can be applied as updates to the supported versions of XenServer from the CR stream.

  • Hotfixes, which generally supply bug fixes to one or more specific issues. Hotfixes are provided for XenServer releases in the Long Term Service Release (LTSR) and Current Release (CR) streams and for earlier supported releases that are not part of either stream.

  • Cumulative Updates (CUs), which contain previously released hotfixes and may contain support for new guests and hardware. Cumulative updates are applied to XenServer releases from the Long Term Service Release (LTSR) stream.

  • Supplemental packs provided by our partners can also be applied as updates to XenServer.

Note:

Both Hotfixes and Cumulative Updates can be applied by using the procedures in this article. For example, use the following procedures to apply a XenServer 7.1 Cumulative Update to XenServer 7.1.

Prepare a pool for an update

Updates to XenServer can be delivered as a Hotfix or a Cumulative Update or a Current Release. Pay careful attention to the release notes published with each update. Each update can have unique installation instructions, particularly regarding preparatory and post-update operations. The following sections offer general guidance and instructions for applying updates to your XenServer systems.

Important:

Before you apply an update to a XenServer pool, customers should pay careful attention to the following:

  • You must upgrade or update each host in a pool to the latest Cumulative Update of XenServer 7.1 before applying any hotfixes.

  • You must apply all Cumulative Updates in the order that they are released. You cannot apply the latest Cumulative Update of XenServer 7.1 before applying any previous Cumulative Updates.

  • Back up your data before applying an update. For backup procedures, see the XenServer Administrator’s Guide.

  • Update all servers in a pool within a short period: running a mixed-mode pool (a pool that includes updated and non-updated servers) is not a supported configuration. Scheduled your updates to minimize the amount of time that a pool runs in a mixed state.

  • Update all servers within a pool sequentially, always starting with the pool master. XenCenter’s Install Update wizard manages this process automatically.

  • After applying a Cumulative Update to all hosts in a pool, update any required driver disks before restarting XenServer hosts.

Before you begin updating

  • Log into a user account with full access permissions (for example, as a Pool Administrator or using a local root account).

  • Empty the CD/DVD drives of any VMs you plan to suspend. For details and instructions, see Before you upgrade a single XenServer host.

  • If applicable, disable high availability.

Apply updates to a pool

The update installation mechanism in XenCenter allows you to download and extract the selected update from the Citrix Support website. You can apply an update to multiple hosts and pools simultaneously using the Install Update wizard. During the process, the Install Update wizard completes the following steps for each server:

  • Migrates VMs off the server
  • Places the server in maintenance mode
  • Applies the update to the server
  • Reboots the host if necessary
  • Migrates the VMs back to the updated host.

Any actions taken at the precheck stage to enable the updates to be applied, such as turning off HA, are reverted.

The Install Update wizard carries out a series of checks known as Prechecks before starting the update process. These checks ensure that the pool is in a valid configuration state. It then manages the update path and VM migration automatically. If you prefer to control the update path and VM migration manually, you can update each host individually.

Apply updates automatically

XenCenter allows you to apply automated updates that are required to bring your servers up-to-date. You can apply these updates to one or more pools. When you apply automated updates, XenCenter applies the minimum set of updates that are required to bring the selected pool or the standalone server up-to-date. XenCenter minimizes the number of reboots required to bring the pool or the standalone server up-to-date. Where possible, XenCenter limits it to a single reboot at the end. For more information, see Apply Automated Updates.

Apply an update to a pool

To apply an update to a pool by using XenCenter:

  1. From the XenCenter navigation pane, select Tools and then Install Update.

  2. Read the information displayed on the Before You Start page and then click Next.

  3. The Install Update wizard lists available updates on the Select Update page. Select the required update from the list and then click Next.

  4. On the Select Servers page, select the pool and servers that you want to update.

    When applying a Cumulative Update or a Current Release, you can also select whether to apply the minimal set of hotfixes for the CU or CR.

    Click Next.

  5. The Install Update wizard performs several update prechecks, to ensure that the pool is in a valid configuration state. The wizard also checks whether the hosts must be rebooted after the update is applied and displays the result. The Install Update wizard also checks whether a live patch is available for the hotfix and if the live patch can be applied to the hosts. For information about Live Patching, see Live patching.

  6. Follow the on-screen recommendations to resolve any update prechecks that have failed. If you want XenCenter to resolve all failed prechecks automatically, click Resolve All. When the prechecks have been resolved, click Next.

  7. If you are installing a CU or a CR, XenCenter downloads the updates, uploads them to the default SR of the pool, and installs the updates. The Upload and Install page displays the progress.

    Notes:

    • If the default SR in a pool is not shared, or does not have enough space, XenCenter tries to upload the update to another shared SR. If none of the shared SRs have sufficient space, the update is uploaded to local storage of the pool master.
    • If the update process cannot complete for any reason, XenCenter halts the process. This allows you to fix the issue and resume the update process by clicking the Retry button.

    See Step 10. to complete the installation process.

  8. If you are installing a hotfix, choose an Update Mode. Review the information displayed on the screen and select an appropriate mode. If the hotfix contains a live patch that can be successfully applied to the hosts, it displays No action required on the Tasks to be performed screen.

    Note:

    If you click Cancel at this stage, the Install Update wizard reverts the changes and removes the update file from the server.

  9. Click Install update to proceed with the installation. The Install Update wizard shows the progress of the update, displaying the major operations that XenCenter performs while updating each server in the pool.

  10. When the update is applied, click Finish to close Install Update wizard.

  11. If you chose to perform post-update tasks manually, do so now.

    Ensure that you perform these post-update tasks before attempting to apply further updates.

Update a pool of XenServer hosts by using the xe CLI

To update a pool of XenServer hosts by using the xe CLI:

  1. Download the update file to a known location on the computer running the xe CLI. Note the path to the file.

  2. Upload the update file to the pool you wish to update by running the following:

    xe -s server -u username -pw password update-upload file-name=filename
    [sr-uuid=storage_repository_uuid]
    

    Here, -s refers to the name of the pool master. XenServer assigns the update file a UUID, which this command prints. Note the UUID.

    Tip:

    Once an update file has been uploaded to the XenServer host, you can use the update-list and update-param-list commands to view information about the file.

  3. If XenServer detects any errors or preparatory steps that have not been taken, it alerts you. Be sure to follow any guidance before continuing with the update.

    If necessary, you can shut down or suspend any VMs on the hosts that you want to update by using the vm-shutdown or vm-suspend commands.

    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 automatically, use the host-evacuate command. By using the host-evacuate command, you leave the distribution of migrated VMs to XenServer.

  4. Update the pool, specifying the UUID of the update file, by running the following:

    xe update-pool-apply uuid=UUID_of_file
    

    This applies the update or hotfix to all hosts in the pool.

    Alternatively, if you need to update and restart hosts in a rolling manner, you can apply the update file to an individual host by running the following:

    xe upload-apply host-uuid=UUID_of_host uuid=UUID_of_file
    
  5. Verify that the update was applied by using the update-list command. If the update has been successful, the hosts field contains the host UUID.

  6. Perform any post-update operations, as necessary such as, restarting the XAPI toolstack, or rebooting the hosts.

    Ensure that you perform these post-update tasks before attempting to apply further updates.

Update individual hosts by using the xe CLI

To update individual hosts by using the xe CLI:

  1. Download the update file to a known location on the computer running the xe CLI. Note the path to the file.

  2. Shut down or suspend any VMs on the host(s) that you wish to update by using the vm-shutdown or vm-suspend commands.

  3. Upload the update file to the host you wish to update by running the following:

    xe -s server -u username -pw password update-upload file-name=filename [sr-uuid=storage_repository_uuid]
    

    Here, -s refers to the hostname. XenServer assigns the update file a UUID, which this command prints. Note the UUID.

    Tip:

    When an update file has been uploaded to a XenServer host, you can use the update-list and update-param-list commands to view information about the update file.

  4. If XenServer detects any errors or preparatory steps that have not been taken (for example, VMs are running on the host), it alerts you. Be sure to follow any guidance before continuing with the update.

  5. Update the host, specifying the UUIDs of the host and the update file, by running the following:

    xe update-apply host-uuid=UUID_of_host uuid=UUID_of_file
    
  6. Verify that the update has been successfully applied by using the update-list command. If the update has been successful, the hosts field contains the host UUID.

  7. Perform any post-update operations, as necessary (such as, restarting the XAPI toolstack, or rebooting the host).

    Ensure that you perform these post-update tasks before attempting to apply further updates.

Live patching

XenServer customers who deploy XenServer hosts can often be required to reboot their hosts after applying hotfixes. This rebooting results in unwanted downtime for the hosts while customers have to wait until the system is restarted. This unwanted downtime can impact business. Live patching enables customers to install some Linux kernel and Xen hypervisor hotfixes without having to reboot the hosts. Such hotfixes include both a live patch, which is applied to the memory of the host, and a hotfix that updates the files on disk. Using live patching can reduce maintenance costs and downtime.

When applying an update by using XenCenter, the Install Update wizard checks whether the hosts must be rebooted after the update is applied. XenCenter displays the result on the Prechecks page. This check enables customers to know the post-update tasks well in advance and schedule the application of hotfixes accordingly.

Note:

XenServer Live Patching is available for XenServer Enterprise Edition customers, or those customers who have access to XenServer through their Citrix Virtual Apps and Desktops (formerly Citrix XenApp and XenDesktop) entitlement. To learn more about XenServer editions, and to find out how to upgrade, visit the Citrix website. For detailed information on Licensing, see XenServer 7.1 Licensing FAQ.

Live patching scenarios

Hotfixes can be live patched across pools, hosts, or on a standalone server. Some require a reboot, some require the XAPI toolstack to be restarted, and some hotfixes do not have any post-update tasks. The following scenarios describe the behavior when a Live Patch is and is not available for an update.

  • Updates with live patch — Some hotfixes that update Linux kernel and the Xen hypervisor usually do not require a reboot after applying the hotfix. However, in some rare cases, when the live patch cannot be applied, a reboot might be required.

  • Updates without live patch — No change in the behavior here. It works as usual.

    Note:

    If a host does not require a reboot, or if the hotfix contains live patches, XenCenter displays No action required on the Update Mode page.

Apply automated updates and live patching

Automated Updates mode in XenCenter enables you to download and apply the minimum set of hotfixes required to bring your pool or standalone host up-to-date.

You can benefit from the Live Patching feature when you apply hotfixes using the Automated Updates mode in XenCenter. You can avoid rebooting hosts if live patches are available and are successfully applied to the hosts that are updated using Automated Updates mode. For more information about the Automated Updates, see Apply Automated Updates.

Enable live patching

Live Patching feature is enabled by default. Customers can enable or disable Live Patching using XenCenter or xe CLI command.

Using XenCenter

  1. Select the pool or the standalone host on the Resource pane

  2. From the Pool menu (Server in case on standalone hosts) menu, select Properties and then click Live Patching.

  3. On the Live Patching page:

    • Select Use live Patching when possible to enable Live Patching.

    • Select Don’t use Live Patching to disable Live Patching.

Using the xe CLI

  • To enable Live Patching, run the following command:

     xe pool-param-set live-patching-disabled=false uuid="pool_uuid"
    
  • To disable Live Patching, run the following command:

     xe pool-param-set live-patching-disabled=true uuid="pool_uuid"
    

Apply Automated Updates

Automated Updates mode applies any hotfixes and Cumulative Updates that are available for a host. This mode minimizes the number of reboots required to bring the pool or the standalone server pool up-to-date. Where possible, Automated Updates mode limits it to a single reboot at the end.

As a prerequisite, XenCenter requires Internet access to fetch the required updates.

To view the list of required updates, perform the following steps:

  1. Select the host on the Resources pane in XenCenter.

  2. Navigate to the General tab.

  3. Expand the Updates section.

    You can see:

    • Applied – lists already-applied updates.

    • Required Updates – lists the set of updates required to bring the server up-to-date.

      Note:

      If there are no updates required, the Required Updates section is not displayed.

    • Installed supplemental packs – lists supplemental packs that are installed on the server (if any).

      Note:

      If you select a pool instead of a server, the Updates section lists updates that are already applied as Fully Applied.

If you want to choose and install a particular update, see Apply an update to a pool section.

Note:

The Automated Updates feature is available for XenServer Enterprise Edition customers, or those customers who have access to XenServer through their Citrix Virtual Apps and Desktops entitlement. To learn more about XenServer editions, and to find out how to upgrade, visit the Citrix website here. For more information on Licensing, refer to XenServer 7.1 Licensing FAQ.

Apply Automated Updates by using the Install Update wizard

The following section provides step-by-step instructions on how to apply the set of required updates automatically to bring your pool or standalone host up-to-date.

  1. From the XenCenter menu, select Tools and then select Install Update.

  2. Read the information displayed on the Before You Start page and then click Next.

  3. On the Select Update page, select the mechanism to use to install the updates. You can see the following options:

    • Automated Updates – (default) this option is visible only if XenCenter is connected to at least one licensed pool or a licensed standalone server. Select this option to download and install all the current updates from Citrix automatically to bring the pool or a standalone server up-to-date.

    • Download update from Citrix – the Install Update wizard lists available updates from the Citrix Support site. To apply the updates, see Apply an update to a pool.

    • Select update or Supplemental pack from disk – to install an update you have already downloaded, see Apply an update to a pool. To install supplemental pack updates, see the Installing Supplemental Packs section in XenCenter Help.

  4. To continue with the automatic application of hotfixes, select Automated Updates and then click Next.

  5. Select one or more pools or standalone servers that you want to update and click Next. Any server or pool that cannot be updated appears unavailable.

  6. The Install Update wizard performs several update prechecks, to ensure that the pool is in a valid configuration state.

    Follow the on-screen recommendations to resolve any update prechecks that have failed. If you want XenCenter to resolve all failed prechecks automatically, click Resolve All. When the prechecks have been resolved, click Next.

  7. The Install Update wizard automatically downloads and installs the recommended updates. The wizard also shows the overall progress of the update, displaying the major operations that XenCenter performs while updating each server in the pool.

    Notes:

    • The updates are uploaded to the default SR of the pool. If the default SR is not shared or does not have enough space, XenCenter tries to upload the update to another shared SR with sufficient space. If none of the shared SRs have sufficient space, the update is uploaded to local storage of the pool master.

    • The update process cannot complete for any reason, XenCenter halts the process. This allows you to fix the issue and resume the update process by clicking the Retry button.

  8. When all the updates have been applied, click Finish to close Install Update wizard.