XCP-ng: Installing the servers and Xen Orchestra
- Context: The acquisition of VMware by Broadcom is driving the search for an alternative to ESXi for the lab.
- Introducing XCP-ng, Vates' open-source hypervisor based on Xen.
- Installing XCP-ng on the servers, followed by Xen Orchestra, the centralized management tool.
- The creation of the pool and advanced configuration are covered in the following article.
Introduction
I have decided to expand my home lab by integrating another virtualization technology.
Indeed, for those who may not know, the acquisition of VMware by Broadcom has caused a major upheaval in the IT industry.
Do not hesitate to read my article on the subject to learn more.
I am not convinced that VMware will disappear from enterprises, and I believe that the hypervisor that has been a star for the past 20 years, ESXi, and the entire vSphere ecosystem associated with it, will continue to be part of the IT landscape for some time yet.
Major players are not standing idly by, and it is possible that Broadcom may be forced to reconsider some of its decisions.
Nevertheless, we cannot deny that trust has been broken, and some will begin to seriously consider other solutions.
Personally, I am taking this change as an opportunity to look at what else is out there and to add new skills to my profile. Not to mention that Broadcom has ended the free version of ESXi.
I have therefore decided to remove two of my ESXi servers and switch them over to XCP-ng.
XCP-ng is one of those virtualization solutions that has been around for a long time, but it has recently gained more attention due to the VMware crisis.
Despite this, it has been less widely adopted than Proxmox VE, which is already well-used by enthusiasts of home labs.
I have already had the opportunity to test this product, and it is excellent, but its approach slightly confuses me. There is no unified console like vCenter. Update 3/3/2026: Proxmox now has a central console called Proxmox Datacenter Manager, which is somewhat outdated, and requires quite a bit of customization in some cases...
Briefly, without questioning the quality of Proxmox VE, and although it is the most well-known alternative to VMware, I wanted to explore another open-source solution on the market: XCP-ng.
Click the image to enlarge.
Information about XCP-ng
History
Unlike many other virtualization products, XCP-ng does not rely on KVM (Kernel-based Virtual Machine) (like Proxmox VE), but rather on Xen. It is a type 1 hypervisor developed since 2003 as a research project at the University of Cambridge.
Very innovative for its time and considered very performant due to its principle of paravirtualization, it nevertheless required the use of modified guest operating systems that were aware of being virtualized.
The introduction of virtualization instructions in CPUs (Intel VT-x and AMD-V) made it possible to overcome these limitations, allowing Xen to evolve and now support many x86 guest operating systems.
Click the image to enlarge.
Given the success of the solution, the initiators of the project at Cambridge quickly founded the company XenSource, responsible for promoting and developing the commercial aspects of Xen.
Then, in October 2007, the giant Citrix acquired XenSource. Very quickly, the American company offered XenServer, a complete solution based on Xen.
The Xen project was placed under the responsibility of the Linux Foundation in 2013, under a new brand called Xen Project, to differentiate it from Citrix's commercial implementation.
Click the image to enlarge.
It is important to distinguish the Xen hypervisor, which is open source and managed by the Linux Foundation, from the commercial implementation made by Citrix.
In 2018, this commercial implementation, XenServer, became Citrix Hypervisor and ended the free version of the Citrix product that was previously available with some limitations.
Outside of the 2010s, this free version was competing with an open-source fork of XenServer called XCP (Xen Cloud Platform).
It is this fork that served as the basis for XCP-ng in 2018 to offer an alternative to the end of the free version of XenServer (which became Citrix Hypervisor).
Since then, Xen has continued to be supported by the Linux Foundation and is backed by major players such as AMD or AWS. The level 1 hypervisor that results from this is implemented as a paid product by Citrix and in an open-source version by the company Vates via XCP-ng.
Vates and the XCP-ng ecosystem
Vates is a French company founded in 2012 in Grenoble. Today, the company has more than forty employees.
Click the image to enlarge.
Vates initiated the community project XCP-ng and actively participates in its development. It also offers paid support for businesses.
It also develops Xen Orchestra (xo), the management solution associated with XCP-ng (and compatible with Xen) which can be installed directly from the product's source code or via the appliance offered by Vates.
Click the image to enlarge.
Vates has a significant customer base, especially in the US market.
I would like to take a moment to point out that it is quite remarkable that a French company has existed for over 10 years and offers a virtualization solution based on a solid foundation, yet it is not more widely deployed in Europe, at least not in France.
I myself regret not having become interested in the offerings of this French company sooner. It is unfortunate to have to wait until you are facing a problem before starting to look at what solutions are available nearby.
We know that geopolitical conflicts are now fought in the digital realm, and it is becoming important to have technological leaders available to assert ourselves in the world.
I truly hope that the IT dependence of the European market on American solutions, particularly highlighted by the VMware crisis, will allow companies like Vates to grow and have more resources to offer fair competition with US tech giants.
Objective of the lab
Let's get back to basics.
The goal of this lab is to migrate two ESXi instances to XCP-ng in order to obtain a pool of servers, equivalent to a cluster in VMware.
This pool will need to be managed by Xen Orchestra, because, by default, an XCP-ng server can only be controlled via the CLI using the XAPI (Xen Project Management API). Note that Vates is working on Xen Orchestra Lite, a lightweight version of Xen Orchestra, to simplify the management of an XCP-ng server without having to deploy other solutions. This is a great way to offer an alternative to the now discontinued free version of ESXi.Update 3/3/2026: Broadcom has finally decided to make a free version of ESXi available again.
Click the image to enlarge.
As for Xen Orchestra, I am not going to use the appliance. I have tested it, and it is very easy to deploy from the https://vates.tech/deploy site.
However, the disadvantage of the appliance is that it requires you to purchase a license to unlock all features, starting with backups.
Feel free to consult this link to learn about the different plans offered by Vates and the differences related to the chosen license.
Wanting to access all of the available options, I ultimately decided to install it from the source code.
In this case, it is up to you to deploy the underlying operating system and then install Xen Orchestra on it. You will not have support in this case, but you will have access to all functions.
Installing XCP-ng
Installing XCP-ng is straightforward. The ISO image can be downloaded from the website, and you simply need to copy it to a USB drive using a tool like Rufus.
Then, boot from the USB drive to follow the installation wizard. Be careful at this point; you may need to modify your server's boot settings, including disabling secure boot. Also, pay attention to the SATA mode configuration; avoid RAID mode and use AHCI instead.
These parameters may vary depending on your hardware configuration and its support for XCP-ng. Thanks to scls19fr from the XCP-ng forum for pointing this out to me
You will be asked for an IP address, a password for the root account, and whether you want to install the solution.
In this regard, and as indicated in the official documentation, you should not use a USB drive as the target. This was the solution I initially chose, as I was used to doing with ESXi.
If I was able to complete the operation, the installation took over 2 hours... and subsequently, even minor update operations on the server were extremely slow.
XCP-ng can nevertheless be installed on the same disk as the one that will host VMs, while occupying very little space. You can choose between formatting using LVM (Logical Volume Manager), which is more performant but requires reserving the entire volume.
If you want to maximize disk space by using a Thin (Granular capacity allocation) strategy, you will need to choose a standard format, which is considered less performant.
Personally, I stayed with LVM.
After a few minutes, the server is ready. A web page is accessible, offering links to the various ways to manage the server, either through Xen Orchestra or the CLI.
Click the image to enlarge.
It's important to know that Xen deploys something equivalent to a console service in VMware, but it is called dom0 here (Xen uses the concept of a domain). This privileged space contains a derivative of CentOS that integrates the Xen Management Toolstack.
Each XCP-ng server therefore has its own dom0. You can connect to it via SSH and you will be able to update this part using commands like yum update.
Installing Xen Orchestra
Deploying the VM
As I mentioned earlier, I chose to install Xen Orchestra from the source code.
I first deployed an Ubuntu Server VM in version 24.04 on my VMware cluster. In fact, I found it interesting to move Xen Orchestra outside of the XCP-ng servers. By default, when you deploy the appliance, it runs on the XCP-ng server designated as the target, but in my case, I am free to run the VM wherever I want.
If a problem were to occur on the XCP-ng servers, I could still maintain control of Xen Orchestraa.
It should also be noted that the unavailability of Xen Orchestra does not result in the unavailability of the server pool or the VMs running on it.
Why not, in the future, run a vCenter on XCP-ng and thus have a combination of management solutions.
As I explained here, I deploy my VMs using OpenTofu (terraform). Therefore, I have drawn inspiration from my previous work to describe my Xen Orchestra server, which I decided to name prdxcpxoc501.
I will not detail the deployment procedure here, but the source code IAC (Infrastructure As Code) is available on my GitHub for those who wish to use it.
Feel free to read this article for more details about OpenTofu/Terraform.
After a few minutes, my Ubuntu VM is ready. I just need to connect to it with my usual account and start the installation of Xen Orchestra.
Click the image to enlarge.
Installation and prerequisites
First, we ensure that the OS is up to date using the following commands:
sudo apt update
sudo apt upgrade
Click the image to enlarge.
Then, we install the dependencies.
Xen Orchestra runs on NodeJS, so we need to install the environment with the following command:
sudo apt install nodejs
Click the image to enlarge.
We check that NodeJS is working correctly with the following command:
node -v
Click the image to enlarge.
Next, we will install everything needed for compilation, including the key/value database Redis, which is also required by the solution.
Simply run the command.
sudo apt install build-essential redis-server libpng-dev git python3-minimal libvhdi-utils lvm2 cifs-utils nfs-common ntfs-3g
Click the image to enlarge.
We start Redis using the following commands:
systemctl restart redis.service
systemctl status redis.service
Click the image to enlarge.
Then, we check that Redis is responding correctly with the following command:
redis-cli ping
Click the image to enlarge.
Now, we need to install the JavaScript package manager Yarn, but first, let's use its alter ego npm with the following command:
sudo apt install npm
Click the image to enlarge.
Then, using npm, we can retrieve Yarn.
sudo npm install -g yarn
Click the image to enlarge.
We check the version of Yarn.
yarn --version
Click the image to enlarge.
Now, we have all the necessary software prerequisites for Xen Orchestra.
Next, we will focus on the context requirements by starting with declaring a dedicated user for running Xen Orchestra, named xouser.
This will prevent the application from running as root.
To do this, we use the following sequence of commands:
sudo useradd xouser
mkdir -p /home/xouser
chown -R xouser:xouser /home/xouser
Since the user does not have root privileges, it cannot use ports 80 and 443, which are reserved ports on recent Linux operating systems.
Several solutions are possible to lift these restrictions, but the one that seems simplest to me is to use NAT rules via iptables.
Thus, the application will use port 8080 instead of 80, and 8443 instead of 443, but the redirection of these ports will be done automatically thanks to the following iptable rules:
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443
Click the image to enlarge.
The xouser user will also need to mount directories, so we need to allow them to use the mount command and other binaries.
To do this, we will create a sudoer file named xouser in the /etc/sudoers.d/ directory (sudo vim /etc/sudoers.d/xouser).
The content of the xouser file is as follows:
xouser ALL=(root)NOPASSWD: /bin/mount, /bin/umount, /bin/findmnt
Click the image to enlarge.
You must also create a folder named /run/xo-server and then grant the user xouser the necessary permissions.
sudo mkdir /run/xo-server
sudo chown -R xouser:xouser /run/xo-server
Similarly, I have arbitrarily chosen to store the data in /opt/xo-server.
So, we create the folder and give it the correct permissions.
sudo mkdir /opt/xo-server
sudo chown -R xouser:xouser /opt/xo-server
Compilation and deployment
We can now proceed with compiling Xen Orchestra.
To do this, connect as the user xouser using the following command:
sudo su - xouser
Make sure you are in the home directory
pwd
Click the image to enlarge.
Clone the project's source code.
git clone -b master https://github.com/vatesfr/xen-orchestra
Click the image to enlarge.
Enter the retrieved folder.
cd xen-orchestra
Proceed with the compilation using these commands:
yarn
yarn install
Click the image to enlarge.
Navigate into the resulting directory structure.
cd packages/xo-server
Create the configuration location.
mkdir -p ~/.config/xo-server
Then, copy a default template version of the configuration to it.
cp sample.config.toml ~/.config/xo-server/config.toml
Click the image to enlarge.
Which you can then quickly edit.
vim ~/.config/xo-server/config.toml
We will replace the default data location:
datadir = '/opt/xo-server/data'
Enable HTTPS redirection.
redirectToHttps = true'
Specify the URL where Xen Orchestra will be published.
'publicUrl = 'https://prdxcpxoc501.coolcorp.priv''
Click the image to enlarge.
Then, enable listening on ports 8080 and 8443.
# Basic HTTP.
[[http.listen]]
# Address on which the server is listening on.
#
# Sets it to 'localhost' for IP to listen only on the local host.
#
# Default: all IPv6 addresses if available, otherwise all IPv4 addresses.
# hostname = 'localhost'
# Port on which the server is listening on.
#
# Default: undefined
port = 8080
# Instead of `host` and `port` a path to a UNIX socket may be specified
# (overrides `host` and `port`).
#
# Default: undefined
# socket = './http.sock'
# # Basic HTTPS.
# #
# # You can find the list of possible options there
# # https://nodejs.org/docs/latest/api/tls.html#tls.createServer
# #
# # The only difference is the presence of the certificate and the key.
[[http.listen]]
# #hostname = '127.0.0.1'
port = 8443
Uncomment the references to the certificate and private key used for HTTPS.
We will arbitrarily decide to host them in /opt/xo-server/.
cert = '/opt/xo-server/certificate.pem'
key = '/opt/xo-server/key.pem'
Click the image to enlarge.
Finally, enable sudo access.
useSudo = true
Click the image to enlarge.
The entire configuration is now ready.
However, before starting the product, you need to take care of the certificate.
In the configuration, we only use /opt/xo-server/key.pem as the private key, and the associated certificate should be in /opt/xo-server/certificate.pem.
The first step is to go to /opt/xo-server/ and generate the key along with its associated CSR (Certificate Signing Request).
I will not go into detail about how certificates work; I will simply repeat what I have already explained in this article (the section on the certificate associated with the Traefik dashboard).
I am preparing a configuration file named openssl-san.cnf for OpenSSL, which is responsible for providing the DNS names that must be associated with the certificate. In this case, prdxcpxoc501.coolcorp.priv.
[req]
distinguished_name = req_distinguished_name
req_extensions = req_ext
[req_distinguished_name]
[req_ext]
subjectAltName = DNS:prdxcpxoc501.coolcorp.priv
Then, I generate the private key and CSR using the following command:
openssl req -new -nodes -sha256 \
-keyout key.pem \
-out xo.csr \
-newkey rsa:4096 \
-subj "/C=FR/ST=Ile-de-France/L=Paris/O=COOLCORP/OU=Infrastructure/CN=prdxcpxoc501.coolcorp.priv" \
-reqexts req_ext \
-config openssl-san.cnf
Click the image to enlarge.
I retrieve the content of the CSR to submit it to my PKI (on my side, I use a Windows PKI).
Based on a certificate template provided by my PKI, I obtain my certificate.
Click the image to enlarge.
I copy the contents of this certificate into the file certificate.pem in /opt/xo-server/.
I now have the key/certificate combination to ensure HTTPS.
We are seeing the light at the end of the tunnel.
I can now switch back to my standard user and create the service file xo-server.service associated with Xen Orchestra.
This will be created in /etc/systemd/system/.
sudo vim /etc/systemd/system/xo-server.service
Here is its content:
[Unit]
Description=XO Server
After=network-online.target
[Service]
User=xouser
Group=xouser
Environment="DEBUG=xo:main"
Restart=always
SyslogIdentifier=xo-server
# Be sure to edit the path below to where your Node and your xo-server install is located!
ExecStart=/usr/bin/node /home/xouser/xen-orchestra/packages/xo-server/dist/cli.mjs
[Install]
WantedBy=multi-user.target
I can reload systemd with the following command:
sudo systemctl daemon-reload
Then, I can activate the xo-server service and finally start it.
sudo systemctl enable --now xo-server
sudo systemctl start xo-server
Click the image to enlarge.
I will make sure everything is working correctly with the command:
sudo systemctl status xo-server
Click the image to enlarge.
All that remains is to point the DNS record prdxcpxoc501.coolcorp.priv to the IP address of my VM and test access to Xen Orchestra from the URL https://prdxcpxoc501.coolcorp.priv/.
Click the image to enlarge.
Access is OK, the certificate is present. I can authenticate with the default account [email protected] and the default password admin: here I am on the Xen Orchestra interface.
Click the image to enlarge.
Click the image to enlarge.
Conclusion
This concludes this article. It has allowed me to describe the virtualization ecosystem offered by the French company Vates.
It is important to note that I am starting with this solution, and it is possible that I may misunderstand some principles because I do not have a deep understanding of the subject.
However, coming from VMware, I find it easier to understand the approach taken with XCP-ng and the operation of Xen.
Even though KVM is becoming the default solution for virtualization under Linux, and companies like AWS have themselves started a transition to KVM instead of Xen, the latter still seems very well suited for professional use.
The project continues to be actively developed, providing the company Vates (a French company, I should mention! Hurray) with a solid foundation for continuing their development of XCP-ng and its associated management solution Xen Orchestra.
Now it is time to continue setting up my home lab within this ecosystem. The creation of the server pool and further configuration are described in the following article.
(update 02/15/2026: I encourage you to continue with the next steps and explore XCP-ng thoroughly, but be aware that an evolution of the lab to a V2.0 is also available).