VM User’s Guide

This article provides an overview of how to create Virtual Machines (VMs) using templates. It also explains other preparation methods, including cloning templates and importing previously exported VMs.

What is a Virtual Machine?

A Virtual Machine (VM) is a software computer that, like a physical computer, runs an operating system and applications. The VM is comprised of a set of specification and configuration files and is backed by the physical resources of a host. Every VM has virtual devices that provide the same functionality as physical hardware, and can have additional benefits in terms of portability, manageability, and security. In addition, you can tailor the boot behavior of each VM to your specific requirements - for more information refer to VM Boot Behavior.

XenServer supports guests with any combination of IPv4 or IPv6 configured addresses.

Types of Virtual Machines

In XenServer VMs can operate in one of two modes:

  • Paravirtualized (PV) - the virtual machine kernel uses specific code which is aware it is running on a hypervisor for managing devices and memory.

  • Fully virtualized (HVM) - specific processor features are used to ‘trap’ privileged instructions which the virtual machine carries out, such that an unmodified operating system can be used. For network and storage access, emulated devices are presented to the virtual machine, or alternatively PV drivers can be used for performance and reliability reasons.

The following Linux distributions operate in HVM mode in XenServer 7.1:

  • RHEL 7.x

  • CentOS 7.x

  • Oracle Linux 7.x

  • Scientific Linux 7.x

  • Ubuntu 14.04

  • Ubuntu 16.04

  • Ubuntu 18.04

  • Debian Jessie 8.0

  • Debian Jessie 9.0

  • SUSE Linux Enterprise Server 12 SP3

  • SUSE Linux Enterprise Desktop 12 SP3

  • CoreOS Stable

This is because these VMs can take advantage of the x86 virtual container technologies in newer processors for improved performance. Network and storage access from these guests will still operate in PV mode, using drivers built-in to the kernels.

Creating VMs

Using VM Templates

VMs are prepared from templates. A template is a “gold image” that contains all the various configuration settings to instantiate a specific VM. XenServer ships with a base set of templates, which are “raw” VMs, on which you can install an operating system. Different operating systems require different settings to run at their best. XenServer templates are tuned to maximize operating system performance.

There are two basic methods by which you can create VMs from templates:

  • Using a complete pre-configured template, for example the Demo Linux Virtual Appliance.

  • Installing an operating system from a CD, ISO image or network repository onto the appropriate provided template.

Creating Windows VMs describes how to install Windows operating systems onto VMs.

Creating Linux VMs describes how to install Linux operating systems onto VMs.

Other Methods of VM Creation

In addition to creating VMs from the provided templates, you can create VMs by using the following methods:

  1. Cloning an existing VM
  2. Importing an exported VM

Cloning an Existing VM

You can make a copy of an existing VM by cloning from a template. Templates are ordinary VMs which are intended to be used as master copies to instantiate VMs from. A VM can be customized and converted into a template; be sure to follow the appropriate preparation procedure for the VM (see Preparing for Cloning a Windows VM Using Sysprep for Windows and Preparing to Clone a Linux VM for Linux).


Templates cannot be used as normal VMs.

XenServer has two mechanisms for cloning VMs:

  1. A full copy

  2. Copy-on-Write (CoW)

    The faster Copy-on-Write (CoW) mode only writes modified blocks to disk. CoW is designed to save disk space and allow fast clones, but will slightly slow down normal disk performance. A template can be fast-cloned multiple times without slowdown.


    If a template is cloned into a VM and the clone converted back into a template, disk performance can linearly decrease depending on the number of times this has happened. In this event, the vm-copy CLI command can be used to perform a full copy of the disks and restore expected levels of disk performance.

Notes for Resource Pools

If you create a template on a server where all VM virtual disks are on shared Storage Repositories (SR), the template cloning operation will be forwarded to any server in the pool that can access the shared SRs. However, if you create the template from a VM virtual disk that only has a local SR, then the template clone operation can only execute on the server that can access that SR.

Importing an Exported VM

You can create a VM by importing an existing exported VM. Like cloning, exporting and importing a VM is fast way to create additional VMs of a certain configuration so that you can increase the speed of your deployment. You might, for example, have a special-purpose server configuration that you use many times. Once you have set up a VM the way you want it, you can export it, and import it later to create another copy of your specially-configured VM. You can also use export and import to move a VM to a XenServer host that is in another resource pool.

For details and procedures on importing and exporting VMs, see Importing and Exporting VMs.

XenServer PV Tools

XenServer PV Tools provide high performance I/O services without the overhead of traditional device emulation. XenServer PV Tools consist of I/O drivers (also known as Paravirtualized drivers or PV drivers) and the Management Agent. XenServer PV Tools must be installed on each Windows Virtual Machine in order for the VM to have a fully supported configuration, and to be able to use the XenServer management tools (the xe CLI or XenCenter). The version of XenServer PV Tools installed on the VM must be the same as the version installed on the XenServer host.

The I/O drivers contain storage and network drivers, and low-level management interfaces. These drivers replace the emulated devices and provide high-speed transport between Windows and the XenServer product family software. During the installation of a Windows operating system, XenServer uses traditional device emulation to present a standard IDE controller and a standard network card to the VM. This allows Windows to complete its installation using built-in drivers, but with reduced performance due to the overhead inherent in emulation of the controller drivers.

The Management Agent, also known as the Guest Agent, is responsible for high-level virtual machine management features and provides full functionality to XenCenter, including quiesced snapshots.

XenServer PV Tools must be installed on each Windows VM in order for the VM to have a fully-supported configuration. The version of XenServer PV Tools installed on the VM must be the same as the version installed on the XenServer host. A VM will function without the XenServer PV Tools, but performance will be significantly hampered when the I/O drivers (PV drivers) are not installed. You must install XenServer PV Tools on Windows VMs to be able to perform the following operations:

  • Cleanly shut down, reboot, or suspend a VM

  • View VM performance data in XenCenter

  • Migrate a running VM (using XenMotion or Storage XenMotion)

  • Create quiesced snapshots or snapshots with memory (checkpoints), or revert to snapshots

  • Adjust the number of vCPUs on a running Linux VM (Windows VMs require a reboot for this to take effect)

Finding out the virtualization state of a VM

XenCenter reports the virtualization state of a VM on the VM’s General tab. You can find out whether or not XenServer PV Tools (I/O drivers and the Management Agent) are installed, and whether the VM has the capability to install and receive updates from Windows Update. The following section lists the messages displayed in XenCenter:

I/O optimized (not optimized): displays whether or not the I/O drivers are installed on the VM. Click the Install I/O drivers and Management Agent link to install the I/O drivers from the XenServer PV Tools ISO.


I/O drivers will be automatically installed on a Windows VM that has the ability to receive updates from Windows Update. For more information, see Updating the XenServer PV Tools.

Management Agent installed (not installed): displays whether or not the Management Agent is currently installed on the VM. Click the Install I/O drivers and Management Agent link to install the Management Agent from the XenServer PV Tools ISO.

Able to (Not able to) receive updates from Windows Update: specifies whether the VM has the capability to receive I/O drivers from Windows Update.


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.

Install I/O drivers and Management Agent: this message is displayed when the VM does not have the I/O drivers or the Management Agent installed. Click the link to install XenServer PV Tools. For Linux VMs, clicking the status link switches to the VM’s console and loads the XenServer PV Tools ISO. You can then mount the ISO and manually run the installation, as described in Install XenServer PV Tools

Supported Guests and Allocating Resources

For information about supported guest operating systems, virtual memory and virtual disk size limits, see Guest operating system support.

XenServer Product Family Virtual Device Support

The current version of the XenServer product family has some general limitations on virtual devices for VMs. Specific guest operating systems may have lower limits for certain features. The individual guest installation section notes the limitations. For detailed information on configuration limits, refer to the XenServer 7.1 Configuration Limits document. Factors such as hardware and environment can affect the limitations. For information about supported hardware, refer to the XenServer Hardware Compatibility List.

VM Block Devices

In the para-virtualized (PV) Linux case, block devices are passed through as PV devices. XenServer does not attempt to emulate SCSI or IDE, but instead provides a more suitable interface in the virtual environment in the form of xvd* devices. It is also sometimes possible (depending on the OS) to get an sd* device using the same mechanism, where the PV driver inside the VM takes over the SCSI device namespace. This is not desirable so it is best to use xvd* where possible for PV guests (this is the default for Debian and RHEL).

For Windows or other fully virtualized guests, XenServer emulates an IDE bus in the form of an hd* device. When using Windows, installing the XenServer PV Tools installs a special I/O driver that works in a similar way to Linux, except in a fully virtualized environment.

VM User’s Guide