Updating VMs

This article discusses updating Windows VMs with updated operating systems, reinstalling XenServer PV Tools, and updating VMs with new Linux kernel revisions.

Upgrades to VMs are typically required when moving to a newer version of XenServer. Note the following limitations when upgrading your VMs to a newer version of XenServer:

  • Before migrating Windows VMs using XenMotion, you must upgrade the XenServer PV Tools on each VM.

  • Suspend/Resume operation is not supported on Windows VMs until the XenServer PV Tools are upgraded.

  • The use of certain anti-virus and firewall applications can crash Windows VMs, unless the XenServer PV Tools are upgraded.

Updating Windows Operating Systems

Warning

Before updating Windows operating systems you must uninstall the XenServer PV Tools. If they are present during the attempt to update, the update will fail.

Windows installation disks typically provide an upgrade option if you boot them on a server which has an earlier version of Windows already installed.

You can update the operating system of Windows VMs in a similar way.

To uninstall the XenServer Tools

  1. From the Start button, select Control Panel.

  2. Select Programs, and then select Programs and Features.

  3. Select all of the following items (the list depends on your operating system and the version of XenServer PV Tools installed on your VM):

    • Citrix XenServer Windows Management Agent
    • Citrix Tools for Virtual Machines
    • Citrix XenServer PV Tools Installer
    • Citrix XenServer Windows Guest Agent
    • Citrix XenServer Xen Windows x64 PV Drivers
    • Citrix XenServer Xen Windows x86 PV Drivers
    • Citrix XenServer VSS Provider
  4. Select Uninstall.

    This removes the XenServer PV Tools. When the operation completes a message is displayed. Click OK to close the message box.

Once the operating system update is complete, reinstall the XenServer PV Tools just as you would after installing a fresh Windows VM.

Reinstalling XenServer PV Tools

The XenServer PV Tools are available in XenCenter on the built-in guest-tools.iso. On the VM menu, select Install XenServer PV Tools; this attaches the CD image containing the XenServer PV Tools to the VM.

If AutoPlay is enabled for the VM’s CD/DVD drive, installation will start automatically after a few moments. The process installs the I/O drivers and the Management Agent. Restart the VM when prompted to get your VM to an optimized state.

If AutoPlay is not enabled, the XenServer PV Tools installer displays the installation options. Click Install XenServer PV Tools to continue with the installation. This mounts the XenServer PV Tools ISO (guest-tools.iso) on the VM’s CD/DVD drive. Click Run setup.exe to begin XenServer PV Tools installation and restart the VM when prompted to get your VM to an optimized state.

Updating XenServer PV Tools

XenServer has a simpler mechanism to automatically update I/O drivers (PV drivers) and the Management Agent for Windows VMs. This enables customers to install updates as they become available, without having to wait for a hotfix.

The Virtualization state section on a VM’s General tab in XenCenter specifies whether or not the VM is able to receive updates from Windows Update. The mechanism to receive I/O driver updates from Windows Update is turned on by default. If you do not want to receive I/O driver updates from Windows Update, you should disable Windows Update on your VM, or specify a group policy.

The following sections contain information about automatically updating the I/O drivers and the Management Agent.

Updating the I/O drivers

If you are running newly created Windows VMs on XenServer 7.0 or higher, you will be able to get I/O driver updates automatically from Microsoft Windows Update, provided:

  • You are running XenServer 7.1 with Enterprise Edition , or have access to XenServer through XenApp/XenDesktop entitlement

  • You have created a Windows VM using XenCenter issued with XenServer 7.1

    Important

    VMs imported from earlier versions of XenServer are not capable of receiving I/O drivers from Windows Update.

  • Windows Update is enabled within the VM

  • The VM has access to the Internet, or it can connect to a WSUS proxy server

Note

Windows Server Core 2016 does not support using Windows Update to install or update the I/O drivers. Instead use the installer located on the XenServer PV Tools ISO.

Customers can also receive I/O driver updates automatically through the automatic Management Agent update mechanism. You can configure this setting during XenServer PV Tools installation.

Finding the I/O driver Version:

To find out the version of the I/O drivers installed on the VM:

  1. Navigate to C:\Windows\System32\drivers.

  2. Locate the driver from the list.

  3. Right-click the driver and select Properties and then Details.

    The File version field displays the version of the driver installed on the VM.

Updating the Management Agent

XenServer enables you to automatically update the Management Agent on both new and existing Windows VMs. By default, XenServer allows the automatic updating of the Management Agent. However, it does not allow the Management Agent to update the I/O drivers automatically. You can customize the Management Agent update settings during XenServer PV Tools installation. See Install XenServer PV Tools for details. The automatic updating of the Management Agent occurs seamlessly, and does not reboot your VM. In scenarios where a VM reboot is required, a message will appear on the Console tab of the VM notifying users about the required action.

If you are running Windows VMs on XenServer 7.1, you can get the Management Agent updates automatically, provided:

  • You are running XenServer 7.1 with Enterprise edition or have access to XenServer through XenApp/XenDesktop entitlement

  • You have installed XenServer PV Tools issued with XenServer 7.0 or higher

  • The Windows VM has access to the Internet

Important

  • The ability to receive I/O drivers from Windows Update and the automatic updating of the Management Agent features are available for XenServer 7.1 Enterprise Edition, or those who have access to XenServer 7.1 through XenApp/XenDesktop entitlement.

  • Updates to XenServer PV Tools can also be issued through the standard XenServer update (hotfix) mechanism. Such hotfixes contain updates to both I/O drivers and the Management Agent. There is no licensing restriction to update XenServer PV Tools issued as a hotfix.

Finding the Management Agent Version:

To find out the version of the Management Agent installed on the VM:

  1. Navigate to C:\Program Files\Citrix\XenTools.

  2. Right-click XenGuestAgent from the list and click Properties and then Details.

    The File version field displays the version of the Management Agent installed on the VM.

Managing Automatic Updates

XenServer enables customers to redirect Management Agent updates to an internal web server before they are installed. This allows customers to review the updates before they are automatically installed on the VM.

Redirecting the Management Agent Updates:

To redirect the Management Agent updates:

  1. Download the updates.json file from https://pvupdates.vmd.citrix.com/updates.json.

  2. Download the Management Agent MSI files referenced in the updates.json file.

  3. Upload the MSI files to an internal web server which can be accessed by your VMs.

  4. Update the updates.json file to point to the MSI files on the internal web server.

  5. Upload the updates.json file to the web server.

Automatic updates can also be redirected on a per-VM or a per-pool basis. To redirect updates on a per-VM basis:

  1. On the VM, open a command prompt as an administrator.

  2. Run the command

    reg.exe ADD HKLM\SOFTWARE\Citrix\XenTools /t REG_SZ /v update_url /d \
    url of the JSON file on the web server
    

To redirect automatic updating of the Management Agent on a per-pool basis, run the following command:

xe pool-param-set uuid=pooluuid guest-agent-config:auto_update_url=url of the JSON file on the web server

Note:

This file is also available in TSV format for older versions of the Management Agent. https://pvupdates.vmd.citrix.com/updates.tsv

Disabling the Management Agent Updates:

To disable automatic updating of the Management Agent on a per-VM basis:

  1. On the VM, open a command prompt as an administrator.

  2. Run the following command:

    reg.exe ADD HKLM\SOFTWARE\Citrix\XenTools /t REG_DWORD /v DisableAutoUpdate /d 1
    

To disable automatic updating of the Management Agent on a per-pool basis, run the following command:

xe pool-param-set uuid=pooluuid guest-agent-config:auto_update_enabled=false

Modifying the Automatic I/O Driver Update Settings:

During XenServer PV Tools installation, you can specify whether you would like to allow the Management Agent to automatically update the I/O drivers. If you prefer to update this setting after completing the XenServer PV Tools installation process, perform the following steps:

  1. On the VM, open a command prompt as an administrator.

  2. Run the following command:

    reg.exe ADD HKLM\SOFTWARE\Citrix\XenTools\AutoUpdate /t REG_SZ /v \
    InstallDrivers /d YES/NO
    

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 guest-tools.iso CD image.

For yum-enabled distributions CentOS 4 and 5, RHEL 5.4 and higher), xe-guest-utilities installs a yum configuration file to enable subsequent updates to be done using yum in the standard manner.

For Debian, /etc/apt/sources.list is populated to enable updates using apt by default.

When upgrading, Citrix recommends that you always re-run Linux/install.sh. This script automatically determines if your VM needs any updates and installs if necessary.

Upgrading to Ubuntu 14.04, RHEL 7.x and CentOS 7.x Guests

Customers who wish to upgrade existing Linux guests to versions which now operate in HVM mode (that is, RHEL 7.x, CentOS 7.x, and Ubuntu 14.04) should perform an in-guest upgrade. At this point, the upgraded Guest will only run in PV mode - which is not supported and has known issues. Customers should run the following script to convert the newly upgraded guest to the supported HVM mode. To do this:

On the XenServer host, open a local shell, log on as root, and enter the following command:

/opt/xensource/bin/pv2hvm vm_name

or

/opt/xensource/bin/pv2hvm vm_uuid

Restart the VM to complete the process.