XenServer

Windows VMs

Installing Windows VMs on the XenServer host requires hardware virtualization support (Intel VT or AMD-V).

Note:

Nested virtualization is not supported for Windows VMs hosted on XenServer.

Basic procedure for creating a Windows VM

The process of installing a Windows on to a VM consists of the following steps:

  1. Selecting the appropriate Windows template

  2. Choosing the appropriate boot mode

  3. Installing the Windows operating system

  4. Installing the XenServer VM Tools for Windows (I/O drivers and the Management Agent)

Warning:

Windows VMs are supported only when the VMs have the XenServer VM Tools for Windows installed.

Windows VM templates

Windows operating systems are installed onto VMs by cloning an appropriate template using either XenCenter or the xe CLI, and then installing the operating system. The templates for individual guests have predefined platform flags set which define the configuration of the virtual hardware. For example, all Windows VMs are installed with the ACPI Hardware Abstraction Layer (HAL) mode enabled. If you later change one of these VMs to have multiple virtual CPUs, Windows automatically switches the HAL to multi-processor mode.

The available Windows templates are listed in the following table:

Template Name Supported boot modes Description
Windows 10 (64-bit) BIOS, UEFI, UEFI Secure Boot Used to install Windows 10 (64-bit)
Windows 11 UEFI, UEFI Secure Boot Used to install Windows 11
Windows Server 2016 BIOS, UEFI, UEFI Secure Boot Used to install Windows Server 2016 or Windows Server Core 2016
Windows Server 2019 BIOS, UEFI, UEFI Secure Boot Used to install Windows Server 2019 or Windows Server Core 2019
Windows Server 2022 BIOS, UEFI, UEFI Secure Boot Used to install Windows Server 2022 or Windows Server Core 2022

XenServer supports all SKUs (editions) for the listed versions of Windows.

Attach an ISO image library

The Windows operating system can be installed either from an install CD in a physical CD-ROM drive on the XenServer host, or from an ISO image. See Create ISO images for information on how to make an ISO image from a Windows install CD and make it available for use.

Create a VM by using XenCenter

To create a Windows VM:

  1. On the XenCenter toolbar, click the New VM button to open the New VM wizard.

    The New VM wizard allows you to configure the new VM, adjusting various parameters for CPU, storage, and networking resources.

  2. Select a VM template.

    To begin, choose a suitable VM template. Templates contain the setup information to create a VM with a specific guest operating system, and with the optimum storage, CPU, memory, and virtual network configuration. Various different templates are supplied, and you can add custom templates of your own. For more information, see Template and BIOS options.

    When selecting a built-in Windows template, you have the option to manage I/O driver updates for XenServer VM Tools via Windows Update by enabling or disabling the Allow Windows Update to deliver I/O drivers checkbox.

    For custom templates or snapshots, the New VM wizard displays the current value of the has-vendor-device field. This field must be set to true to allow delivery of PV drivers through Windows Update.

    Note:

    If you intend to use your Windows VM as a Citrix Provisioning target or with the reset-on-boot flag enabled, you cannot use any of the automated update mechanisms. In such cases, ensure that the Allow Windows Update to deliver I/O drivers checkbox is disabled. For more information, see Settings for Citrix Provisioning targets or reset-on-boot machines.

  3. (Optional) Configure BIOS strings.

    If the OS that you are installing on your VM is compatible only with the original hardware, check the Copy host BIOS strings to VM checkbox. For example, you might use this option for an OS installation CD that was packaged with a specific computer. After you start a VM for the first time, the BIOS strings cannot be changed, so make sure they are correct before proceeding.

    To copy BIOS strings using the CLI, see Install VMs from Reseller Option Kit (BIOS-locked) Media. Advanced users can set user-defined BIOS strings. For more information, see User-defined BIOS strings.

  4. Enter a name and an optional description for the new VM.

  5. Choose the source of the OS media to install on the new VM.

    Installing from a CD/DVD is the simplest option for getting started.

    1. Choose the default installation source option (DVD drive)
    2. Insert the disk into the DVD drive of the XenServer host

    XenServer also allows you to pull OS installation media from a range of sources, including a pre-existing ISO library. An ISO image is a file that contains all the information that an optical disc (CD, DVD, and so on) would contain. In this case, an ISO image would contain the same OS data as a Windows installation CD.

    To attach a pre-existing ISO library, click New ISO library and indicate the location and type of the ISO library. You can then choose the specific operating system ISO media from the list.

  6. In the Installation Media tab, you can choose a boot mode for the VM. By default, XenCenter selects the most secure boot mode available for the VM operating system version.

    Notes:

    • The UEFI Boot and UEFI Secure Boot options appear grayed out if the VM template you have chosen does not support UEFI boot.
    • You cannot change the boot mode after you boot the VM for the first time.

    For more information, see Guest UEFI boot and Secure Boot.

  7. If required, change the option Create and attach a new vTPM.

    • For VM operating systems that require a vTPM, the option is selected and cannot be unselected.
    • For VM operating systems that do not support a vTPM, the option is grayed out and cannot be selected.
    • For VM operating systems that support vTPM, but do not require it, choose whether to attach a vTPM to the VM.

    For more information, see vTPM.

  8. Select a home server for the VM.

    A home server is the host which provides the resources for a VM in a pool. When you nominate a home server for a VM, XenServer attempts to start the VM on that host. If this action is not possible, an alternate host within the same pool is selected automatically. To choose a home server, click Place the VM on this server and select a host from the list.

    Notes:

    • In WLB-enabled pools, the nominated home server isn’t used for starting, restarting, resuming, or migrating the VM. Instead, Workload Balancing nominates the best host for the VM by analyzing XenServer resource pool metrics and by recommending optimizations.
    • If a VM has one or more virtual GPUs assigned to it, the home server nomination doesn’t take effect. Instead, the host nomination is based on the virtual GPU placement policy set by the user.
    • During rolling pool upgrade, the home server is not considered when migrating the VM. Instead, the VM is migrated back to the host it was on before the upgrade.

    If you do not want to nominate a home server, click Don’t assign this VM a home server. The VM is started on any host with the necessary resources.

    Click Next to continue.

  9. Allocate processor and memory resources for the VM. For a Windows 10 VM (64-bit), the defaults are 2 virtual CPUs and 4 GB of RAM. You can also choose to modify the defaults. Click Next to continue.

  10. Assign a virtual GPU. The New VM wizard prompts you to assign a dedicated GPU or one or more virtual GPUs to the VM. This option enables the VM to use the processing power of the GPU. With this feature, you have better support for high-end 3D professional graphics applications such as CAD/CAM, GIS, and Medical Imaging applications.

  11. Allocate and configure storage for the new VM.

    Click Next to select the default allocation (32 GB) and configuration, or you might want to do the following extra configuration:

    • Change the name, description, or size of your virtual disk by clicking Edit.
    • Add a new virtual disk by selecting Add.
  12. Configure networking on the new VM.

    Click Next to select the default NIC and configurations, including an automatically created unique MAC address for each NIC. Alternatively, you might want to do the following extra configuration:

    • Change the physical network, MAC address, or Quality of Service (QoS) priority of the virtual disk by clicking Edit.
    • Add a new virtual NIC by selecting Add.
  13. (Optional) If this VM is to be used as a template with Citrix Provisioning or with the reset-on-boot flag set, ensure Start the new VM automatically is not selected. This enables you to do some required configuration before installing Windows.

  14. Review settings, and then click Create Now to create the VM and return to the Search tab.

    An icon for your new VM appears under the host in the Resources pane.

  15. (Optional) If this VM is intended to be used as a template with Citrix Provisioning or has the reset-on-boot flag set, configure the VM before installing Windows.

    In the host console, type the following command:

    xe vm-param-set uuid=<uuid> has-vendor-device=false
    

    The flag has-vendor-device=false ensures that Windows Update does not attempt to install or update the I/O drivers included in the XenServer VM Tools. For more information, see Settings for Citrix Provisioning targets or reset-on-boot machines.

  16. On the Resources pane, select the VM, and then click the Console tab to see the VM console.

  17. (Optional) If you want to be able to clone the VM, we recommend that you do not run the Windows first-time setup, known as the Out-Of-Box-Experience (OOBE). Instead, when the OOBE starts on the page that asks for region information, press Ctrl + Shift + F3 to enter audit mode.

    You can then use Sysprep to generalize the VM. For more information see Prepare to clone a Windows VM by using Sysprep.

    If you do not intend to clone the VM, continue to the following steps in this procedure.

  18. Follow the OS installation screen and make your selections.

  19. After the OS installation completes and the VM reboots, Install XenServer VM Tools for Windows.

Create a Windows VM by using the CLI

To create a Windows VM from an ISO repository by using the xe CLI:

Note:

For Windows 10 and Windows 11 VMs, the requirement for a vTPM is specified by the template. You are not required to add anything to the xe CLI commands to set up the vTPM.

  1. Create a VM from a template:

    xe vm-install new-name-label=<vm_name> template=<template_name>
    <!--NeedCopy-->
    

    This command returns the UUID of the new VM.

  2. (Optional) Change the boot mode of the VM.

    xe vm-param-set uuid=<uuid> HVM-boot-params:firmware=<mode>
    xe vm-param-set uuid=<uuid> platform:secureboot=<option>
    <!--NeedCopy-->
    

    The value of mode can be either BIOS or uefi and defaults to uefi if that option is supported for your VM operating system. Otherwise, the mode defaults to BIOS. The value of option can be set to either true or false. If you do not specify the Secure Boot option, it defaults to auto.

    For more information, see Guest UEFI boot and Secure Boot.

  3. (Optional) If this VM is intended to be used as a template with Citrix Provisioning or has the reset-on-boot flag set, configure the VM before installing Windows.

    xe vm-param-set uuid=<uuid> has-vendor-device=false
    <!--NeedCopy-->
    

    The flag has-vendor-device=false ensures that Windows Update does not attempt to install or update the I/O drivers included in the XenServer VM Tools. For more information, see Settings for Citrix Provisioning targets or reset-on-boot machines.

  4. Create an ISO storage repository:

    xe-mount-iso-sr <path_to_iso_sr>
    <!--NeedCopy-->
    
  5. List all of the available ISOs:

    xe cd-list
    <!--NeedCopy-->
    
  6. Insert the specified ISO into the virtual CD drive of the specified VM:

    xe vm-cd-add vm=<vm_name> cd-name=<iso_name> device=3
    <!--NeedCopy-->
    
  7. Start the VM and install the operating system:

    xe vm-start vm=<vm_name>
    <!--NeedCopy-->
    

    At this point, the VM console is visible in XenCenter.

  8. On the XenCenter Resources pane, select the VM, and then click the Console tab to see the VM console.

  9. (Optional) If you want to be able to clone the VM, we recommend that you do not run the Windows first-time setup, known as the Out-Of-Box-Experience (OOBE). Instead, when the OOBE starts on the page that asks for region information, press Ctrl + Shift + F3 to enter audit mode.

    You can then use Sysprep to generalize the VM. For more information see Prepare to clone a Windows VM by using Sysprep.

    If you do not intend to clone the VM, continue to the following steps in this procedure.

  10. Follow the OS installation screen and make your selections.

  11. After the OS installation completes and the VM reboots, install the XenServer VM Tools for Windows.

For more information on using the CLI, see Command line interface.

Install XenServer VM Tools for Windows

XenServer VM Tools for Windows provide high performance I/O services without the overhead of traditional device emulation. For more information about the XenServer VM Tools for Windows and advanced usage, see XenServer VM Tools for Windows.

Note:

To install XenServer VM Tools for Windows on a Windows VM, the VM must be running the Microsoft .NET Framework Version 4.0 or later.

Before you install the XenServer VM Tools for Windows, ensure that your VM is configured to receive the I/O drivers from Windows Update. Windows Update is the recommended way to receive updates to the I/O drivers. However, if Windows Update is not an available option for your VM, you can also receive updates to the I/O drivers through other means. For more information, see Update the I/O drivers.

To install XenServer VM Tools for Windows:

  1. We recommend that you snapshot your VM before installing or updating the XenServer VM Tools.

  2. Download the XenServer VM Tools for Windows file from the XenServer Downloads page.

  3. Verify your download against the provided SHA256 value.

  4. Copy the file to your Windows VM or to a shared drive that the Windows VM can access.

  5. Run the managementagentxXX.msi file to begin XenServer VM Tools installation.

    Msiexec.exe /package managementagentxXX.msi
    
  6. Follow the prompts in the installer.

    1. Follow the instructions on the wizard to accept the license agreement and choose a destination folder.

    2. The wizard displays the recommended settings on the Installation and Updates Settings page. For information about customizing these settings, see XenServer VM Tools for Windows.

    3. Click Next and then Install to begin the XenServer VM Tools for Windows installation process.

  7. Restart the VM when prompted to complete the installation process.

vTPM

XenServer enables you to create a virtual Trusted Platform Module (vTPM) and attach it to your Windows 10 or Windows 11 VM. This virtual TPM does not use or pass through any physical TPMs on your hardware. A physical TPM is not required to be able to create a virtual TPM.

Windows 11 VMs require the presence of a linked vTPM. This vTPM is created automatically when the Windows 11 VM is created from the provided template. For Windows 10 VMs the vTPM is optional.

A VM has a one-to-one relationship with its linked vTPM. A VM can only have one vTPM and a vTPM can only be associated with a single VM. Users with the VM Admin and above roles can create and destroy vTPM instances.

Applications running on the VM can access the vTPM through the TPM 2.0 compliant API. TPM 1.2 is not supported. Users with the VM Operator and above roles can access the vTPM through the VM.

To check if your VM has a linked vTPM, in XenCenter go to the General tab and look in the Device Security section.

Constraints

The following constraints currently apply to VMs created with an attached vTPM:

  • While you can export your VMs to OVF/OVA format, any data in your vTPM is lost as part of this process. This lost data can cause the VM to show unexpected behaviors or can prevent it from starting. If you are using any vTPM features in the VM, do not export your VMs using this format.
  • BitLocker is not currently supported for VMs with a vTPM attached.
  • vTPM operations performed by the user or Windows in the background might fail if the the pool coordinator is offline.
  • If a VM is running a custom workload that uses the vTPM, and that workload writes a large amount of data or makes a large number of write requests to the vTPM, this might impact the performance of the XenServer toolstack.

Attach a vTPM to a Windows VM

For new Windows 11 VMs and Windows 10 VMs, the vTPM can be added during VM creation. For more information, see the documentation for your preferred VM creation method.

If you have an existing UEFI or UEFI Secure Boot Windows 10 VM that you want to add a vTPM to, you can do it by using XenCenter or by using the xe CLI. If you want to upgrade the operating system of the VM to one that requires a vTPM, you must attach the vTPM to the VM before you upgrade your VM operating system.

By using XenCenter

  1. Shut down the Windows 10 VM.
  2. Add a vTPM to the VM.
    1. Right-click on the VM and select Manage vTPMs. Or, on the main menu bar, go to VM > Manage vTPMs. The TPM Manager dialog opens.
    2. In the TPM Manager dialog, add a vTPM.
  3. To verify that the VM has a linked vTPM, select the VM and go to its General tab and look in the Device Security section.
  4. Start the Windows 10 VM.

By using the xe CLI

  1. Shut down the VM:

    xe vm-shutdown uuid=<vm_uuid>
    <!--NeedCopy-->
    
  2. Create a vTPM and attach it to the VM:

    xe vtpm-create vm-uuid=<vm_uuid>
    <!--NeedCopy-->
    
  3. Start the VM:

    xe vm-start uuid=<vm_uuid>
    <!--NeedCopy-->
    

Upgrade the Windows operating system in your VM

Upgrades to VMs are typically required when moving to a newer version of XenServer.

Before you upgrade your Windows VM

  1. If you are updating your operating system to a version of Windows that requires a vTPM (such as Windows 11), you must attach a vTPM to your VM before upgrading its operating system. For more information, see Attach a vTPM to a Windows VM.
  2. Upgrade XenServer VM Tools for Windows to the latest version on the VM. For more information, see XenServer VM Tools for Windows.

    We recommend that you do not remove the XenServer VM Tools from your Windows VM before automatically updating the version of Windows on the VM.

Upgrade the Windows operating system

You can upgrade your Windows VMs in one of the following ways:

  • Use Windows Update to upgrade the version of the Windows operating system on your Windows VMs. If you use Windows Update to update your XenServer VM Tools, we recommend you use this method.
  • Use the Windows installation ISO for the newer versions. Windows installation disks typically provide an upgrade option if you boot them on a server which has an earlier version of Windows already installed.

In your Windows VM console, follow the upgrade prompts provided by Windows.

Prepare to clone a Windows VM by using Sysprep

The only supported way to clone a Windows VM is by using the Windows utility sysprep to prepare the VM.

The sysprep utility changes the local computer SID to make it unique to each computer. The sysprep binaries are in the C:\Windows\System32\Sysprep folder.

For more information about using Sysprep, see Sysprep (Generalize) a Windows installation.

To run sysprep on a Windows VM:

Note:

On Windows 10 and 11, the Windows first-time setup or Out-Of-Box-Experience (OOBE), installs applications (such as AppX) that can interfere with the sysprep process. Because of this behavior, when creating a clonable VM, we recommend skipping the first-time setup and starting Windows in audit mode instead.

  1. Create a Windows VM.

  2. Install Windows.

  3. (Optional) When the Out-Of-Box-Experience (OOBE) starts on the page that asks for region information, press Ctrl + Shift + F3. Windows starts in audit mode. For more information, see Boot Windows to Audit mode or OOBE.

    While not required, we recommend that you exit OOBE to avoid creating an unneeded user account on the image and to avoid issues with third-party application compatibility. If you continue with OOBE, some applications or Windows Update that are installed during OOBE might prevent Sysprep from operating correctly.

  4. Install the latest version of XenServer VM Tools for Windows.

  5. Install any applications and perform any other configuration required.

  6. Run sysprep to generalize the VM. This utility shuts down the VM when it completes.

Note:

Do not restart the original, generalized VM (the “source” VM) again after the sysprep stage. Immediately convert it to a template afterwards to prevent restarts. If the source VM is restarted, sysprep must be run on it again before it can be safely used to make more clones.

To clone a generalized Windows VM:

  1. Using XenCenter convert the VM into a template.

  2. Clone the newly created template into new VMs as required.

  3. When the cloned VM starts, it completes the following actions before being available for use:

    • It gets a new SID and name
    • It runs a setup to prompt for configuration values as necessary
    • Finally, it restarts

Windows VM release notes

There are many versions and variations of Windows with different levels of support for the features provided by XenServer. This section lists notes and errata for the known differences.

General Windows issues

  • When installing Windows VMs, start off with no more than three virtual disks. After the VM and XenServer VM Tools for Windows have been installed, you can add extra virtual disks. Ensure that the boot device is always one of the initial disks so that the VM can successfully boot without the XenServer VM Tools for Windows.

  • When the boot mode for a Windows VM is BIOS boot, Windows formats the primary disk with a Master Boot Record (MBR). MBR limits the maximum addressable storage space of a disk to 2 TiB. To use a disk that is larger than 2 TiB with a Windows VM, do one of the following things:

    • If UEFI boot is supported for the version of Windows, ensure that you use UEFI as the boot mode for the Windows VM.
    • Create the large disk as the secondary disk for the VM and select GUID Partition Table (GPT) format.
  • Multiple vCPUs are exposed as CPU sockets to Windows guests, and are subject to the licensing limitations present in the VM. The number of CPUs present in the guest can be confirmed by checking the Device Manager. The number of CPUs actually being used by Windows can be seen in the Task Manager.

  • The disk enumeration order in a Windows guest might differ from the order in which they were initially added. This behavior is because of interaction between the I/O drivers and the Plug-and-Play subsystem in Windows. For example, the first disk might show up as Disk 1, the next disk hot plugged as Disk 0, a later disk as Disk 2, and then upwards in the expected fashion.

  • A bug in the VLC player DirectX back-end replaces yellow with blue during video playback when the Windows display properties are set to 24-bit color. VLC using OpenGL as a back-end works correctly, and any other DirectX-based or OpenGL-based video player works too. It is not a problem if the guest is set to use 16-bit color rather than 24.

  • The PV Ethernet Adapter reports a speed of 100 Gbps in Windows VMs. This speed is an artificial hardcoded value and is not relevant in a virtual environment because the virtual NIC is connected to a virtual switch. The Windows VM uses the full speed that is available, but the network might not be capable of the full 100 Gbps.

  • If you attempt to make an insecure RDP connection to a Windows VM, this action might fail with the following error message: “This could be due to CredSSP encryption oracle remediation.” This error occurs when the Credential Security Support Provider protocol (CredSSP) update is applied to only one of the client and server in the RDP connection. For more information, see https://support.microsoft.com/en-gb/help/4295591/credssp-encryption-oracle-remediation-error-when-to-rdp-to-azure-vm.