Upgrading a Xen Orchestra/XCP-ng platform

In short
  • After several weeks of trouble-free operation, updating the entire Vates stack.
  • Updating a Xen Orchestra installation from source (git pull, backup of configuration).
  • Performing a minor update followed by a major update of XCP-ng.
  • A word about the offerings and future of Vates.

Introduction

Some time ago, I published two articles on the use and installation of the virtualization solution from the French company Vates: namely XCP-ng and Xen Orchestra.

I invite you to read them. The first is an introduction to the company's offerings with an installation tutorial, while the second provides instructions for deploying VMs along with a performance comparison between VMware and XCP-ng. This is part of my desire to have an alternative to ESXi for my mini lab following the acquisition of VMware by Broadcom.

After several weeks of use without any issues, it's time to update the entire stack.

As a reminder, XCP-ng is a hypervisor based on Xen and embedded in an OS based on Red Hat.

Xen Orchestra (XO) is an administration tool capable of managing multiple XCP-ng servers as a pool.

Xen Orchestra (XO) can be deployed:

  • Either as an appliance, which is simple and quick to set up, but with limited features if you do not purchase a paid license.
  • Or directly from the GIT source code, as the product is completely open source. In this case, you cannot have support, but all features are available to you.

I chose the latter option for my personal use. I chose an Ubuntu base to host Xen Orchestra, and the details of the installation are available here.

Updating Xen Orchestra (XO)

As part of a Vates stack update, Xen Orchestra (XO) is the first component to be updated. What I will describe only applies to the installation from source (the appliance includes update management and automates the process).

The first step is to update the OS that you have chosen for XO. In my case, Ubuntu: a simple sudo apt update followed by sudo apt upgrade is sufficient.

Update the Ubuntu OS

Click the image to enlarge.

Depending on the type of update, a reboot may be necessary. Note that restarting Xen Orchestra does not affect the operation of your VMs (similar to vCenter for those familiar).

Once the OS layer is updated, you can proceed with Xen Orchestra.

You can check the initial version of XO via the 'About' menu in the graphical interface.

Check the XO version

Click the image to enlarge.

Next, you need to switch to SSH on the XO server and return to the installation context of the tool.

In my case, I created a specific user xouser to run the solution (see here). Therefore, I need to assume the identity of this user using the command sudo su – xouser.

Then, navigate to the location of the cloned sources, which in my case is /home/xouser/xen-orchestra (see here).

Place files in the user's home directory

Click the image to enlarge.

Place files in the source code directory

Click the image to enlarge.

Normally, you just need to run a git pull --ff-only command to retrieve the latest versions of the sources.

However, you may encounter, as I did, an error message regarding the file /xo-server/config.toml, which has been modified without being added to the original repository. This means there is a conflict between your version of the configuration file and the one that needs to be retrieved from the new sources.

Error retrieving source code

Click the image to enlarge.

To avoid any issues, you need to temporarily save your configuration file using a stash operation at the Git level. The git stash command in Git is used to temporarily set aside pending changes in your working directory without committing them. This allows you to "store" these changes so that you can revert to a clean state of your code.

This is exactly what we are going to do here to keep your configuration file intact while retrieving the new Xen Orchestra files.

To do this, run the following commands:

git config --global user.email "[email protected]"
git config --global user.name "Prenom Nom"
git add packages/xo-server/config.toml
git commit -m "Sauvegarde des modifications avant la fusion"
git stash push -m "Sauvegarde temporaire de config.toml"

Retrieve source code

Click the image to enlarge.

Normally, once these commands have been executed, you can run a git pull --ff-only command again, which should now work without any issues.

With the new sources retrieved, you can proceed to compile them using the following command:

Yarn

yarn command

Click the image to enlarge.

Then, run this command:

yarn build

yarn build command

Click the image to enlarge.

Finally, restore your original configuration file using the git stash pop instruction.

git stash pop command

Click the image to enlarge.

This command is used in Git to retrieve previously stashed changes and apply them to the current branch while removing those changes from the stash stack.

You can exit the user dedicated to Xen Orchestra to restart the service (this implies that you have created a service for XO beforehand; more details are available here).

sudo systemctl restart xo-server

Restart the XO service

Click the image to enlarge.

Check the status via: sudo systemctl status xo-server.

Check the XO service status

Click the image to enlarge.

If you go back to the "about" section of the GUI, you should now see an updated version.

Verify the XO version

Click the image to enlarge.

Xen Orchestra is "up to date"; it's time to move on to the hypervisor by updating XCP-ng.

Updating XCP-ng

Warning: unlike previous operations, these updates can impact the execution of your VMs. Therefore, it is recommended to put your node into maintenance mode before updating it.

If you have a configuration with multiple servers, it is possible to move your VMs to avoid having to stop them.

In my case, since I don't have anything critical running, I simply shut down my virtual machines. I experience a service interruption, but it doesn't cause me any problems.

There are two types of updates for XCP-ng.

  • A basic update: useful for patching and upgrading your server to a version close to its current version.
  • A major update: necessary to move to a new version resulting from a new branch of the project.

Minor XCP-ng update

We will start with a basic update. In any case, even if the goal is to perform a major update, it is always recommended to first upgrade your hypervisors via the package manager before considering switching to a completely new version.

In this case, since XCP-ng is based on a RedHat-like foundation, simply connect as root to your server and then run a standard yum update command.

Update packages on XCP-ng

Click the image to enlarge.

Depending on the number of pending updates and their impact, you may need to restart your servers. Personally, I recommend doing this anyway to ensure that you start with a completely up-to-date hypervisor.

Once this minor upgrade is complete, you can switch to a major upgrade. It is sometimes possible to also use an update via the package manager, but this is not recommended and often not supported.

Major XCP-ng update

This type of update is less common and corresponds to major releases of XCP-ng. Vates uses two types of releases: one called LTS (Long Term Support), valid for 5 years, and a standard version, generally twice per year.

This is fortunate because, as of the time I am writing this article, version 8.3 of XCP-ng was released a few weeks ago, specifically on October 7, 2024. Therefore, I will be using version 8.2, which remains the LTS release, to benefit from the new features in version 8.3.

This is an important release with many improvements under the hood. I encourage you to read the details of the release announcement on the Vates website to learn more about what it offers.

For this type of update, it is preferable to use the ISO image directly. As I explained in my article about installing XCP-NG, you simply need a USB drive and a tool like rufus to copy the ISO to the drive, make it bootable, and then follow the hypervisor installation wizard.

Unlike my initial installation, this time the XCP-ng installer detects the presence of a previous version already installed on the server's disk. I only need to validate the upgrade rather than performing a new installation, and then follow the subsequent confirmation screens.

Detect the previous version of XCP-ng

Click the image to enlarge.

Detect the previous version of XCP-ng

Click the image to enlarge.

After a few minutes, you can restart the server by removing the USB drive and allowing the new version of XCP-ng to boot.

Updated version of XCP-ng

Click the image to enlarge.

Once the hypervisor is online, it is recommended to immediately update the packages, as we have already been able to do using the yum update command. Very often, there are already updates available after the release of the ISO image.

Final check for package updates

Click the image to enlarge.

Once all the updates are complete, you can go to the Xen Orchestra interface and verify that the servers are running the new version of XCP-ng, which in my example is version 8.3.

Before concluding, I encourage you to test the new GUI, called XO Lite, which is now included by default in the XCP-ng hypervisor. Simply enter the IP address of your server to access this interface, which I find extremely useful. This further strengthens my belief in XCP-ng as a replacement for the free version of ESXi that disappeared after Broadcom's acquisition.

It is possible to switch from this interface to Xen Orchestra very easily, which allows you to offer two interesting views: the first via XO Lite with a summary of the status of your hypervisor, and the second, more complete but also more complex, via Xen Orchestra for managing your pool of XCP-ng servers.

XO Lite login interface

Click the image to enlarge.

Summary view of the hypervisor

Click the image to enlarge.

Access to a VM console from XO Lite

Click the image to enlarge.

Conclusion

Updating a Vates stack through the upgrade of Xen Orchestra and XCP-ng is very straightforward. Even though choosing to deploy Xen Orchestra using source code slightly complicates things, there's ultimately nothing insurmountable. I still believe that the Vates ecosystem has a bright future, even if it enjoys less recognition than Proxmox.

The products are complete, performant, and deserve attention. Work on version 9.0 has already begun. This future LTS release should be built somewhat differently, with a focus on providing the best possible solution for those who might be forced to leave VMware.

I wish the Vates teams all the best and hope that French companies can find their place in this virtualization market, which has been significantly disrupted lately... they certainly deserve it!