This page describes the XO 5 interface. This area is not available in XO 6 yet: use the XO 5 link in the top-right corner of XO 6. See what lives where.
Virtual machine templates in Xen Orchestra make it easy to deploy new VMs by providing a ready-to-use configuration with predefined hardware specs and settings. Instead of manually setting up each VM from scratch, you can use templates to speed up deployment and keep things consistent.
Set up a new VM (without installing an OS), adjust its hardware settings, and turn it into a template. This is useful if you just want a predefined hardware setup without an OS baked in.
To learn more about VM creation, read the VM creation section.
Viridian is a codename for Hyper-V, a native hypervisor developed by Microsoft that allows the creation of virtual machines on x86-64 systems running Windows.
Viridian extensions (referred to as "Viridian enlightenments" by Microsoft) are used by any "recent" Windows OS to work properly. Consequently, the Viridian setting in Xen Orchestra is typically enabled by default for all Windows templates from Windows 2012 onwards.
We strongly advise creating Windows templates by starting from a built-in Windows template, as the Viridian setting in Xen Orchestra is only relevant for those.
To find and enable the Viridian setting for your template:
Navigate to the Home → VMs menu.
A list of VMs appears.
Choose your VM from the list and click its name.
The VM details screen appears.
Click the Advanced tab to show more settings for your VM.
In the Xen settings section, scroll to the end and activate the Viridian toggle switch:
zoomed detailThe Viridian toggle, in the Xen settings of the VM Advanced tab
Viridian extensions are now enabled for your VM. You can now safely use this VM to create your Windows template.
Enabling Viridian for other non-Windows VM templates
To enable Viridian enlightenments for other non-Windows VM templates, follow the instructions detailed in the Virtual Machines (VMs) section of the XCP-ng technical documentation.
Cloud-init is a program that handles the early initialization of a cloud instance of Linux.
In other words, on a "Cloud-init-ready" VM template, you can pass a lot of data at first boot, such as:
Set the host name
Add SSH keys
Automatically grow the file system
Create users
And a lot more!
This tool is pretty standard and used everywhere. A lot of existing cloud templates use it.
This means that you can easily customize your VM when you create it from a compatible template. It brings you closer to the "instance" principle like in Amazon Cloud or OpenStack.
As of release 5.101, Xen Orchestra also supports Cloudbase-init. This tool provides equivalent functionality to Cloud-init but is specifically designed for Windows virtual machines.
In XOA 5.31, we changed the Cloud-init config drive type from OpenStack to the NoCloud type. This will allow us to pass network configuration to VMs in the future. For 99% of users, including default cloud-init installs, this change will have no effect. However if you have previously modified your cloud-init installation in a VM template to only look for openstack drive types (for instance with the datasource_list setting in /etc/cloud/cloud.cfg) you need to modify it to also look for nocloud.
Example: How to create a Cloudbase-init template with Windows Server?
Example: How to create a Cloud-init template with Ubuntu 22.04 LTS?
Create a VM with e.g. 2 vCPUs, 8 GiB of RAM and 10 GiB of disk space, and install Ubuntu 22.04 LTS on it. Once it reboots, bring it up to date and install the Guest Tools:
update the future template
# sudo apt update# sudo apt upgrade
Install cloud-initramfs-growroot so the VM can grow its file system when a Cloud Config asks for it:
allow the root file system to grow
# sudo apt install cloud-initramfs-growroot
Finally, reset the Cloud-init state and clear the machine-id, so both are regenerated on every VM created from the template: