Upgrade to a newer release
Discover how to upgrade from an older release.
We assume your goal is to get to a newer version of XCP-ng from a previous release, e.g. 8.0 to 8.2.1 or 8.2.1 to 8.3.
For updates that don't change the version numbers (bugfixes, security fixes), see the updates section.
There are 3 upgrade methods, detailed below:
- Using the installation ISO (recommended).
- Using the installation ISO when you can't boot from it: remote upgrade.
- From command line a.k.a. yum-style upgrade. ⚠️ Only for some point version upgrades.
For upgrading XCP-ng machines with an XOSTOR SR, please refer to this additional information before taking any action.
Release Notes & Known Issues
Read the Release Notes and Known Issues for every release that is higher than your current release. They may provide additional instructions for specific situations. Also please read the following warnings:
- Always upgrade and reboot the pool master FIRST
- DON'T use a
Maintenance Modefeature that moves the pool master to another host: this has to be avoided in the upgrade procedure. - If HA (High Availability) is enabled, disable it before upgrading.
- Eject CDs from your VMs before upgrading to avoid issues:
xe vm-cd-eject --multiple. - Read Handling alternate drivers or kernel if your host depends on them.
- Update your pool with the latest updates before upgrading, and reboot or restart the toolstack, depending on the nature of the installed updates.
- Install the latest updates after upgrading.
- When upgrading from XCP-ng 7.5 or lower or from XenServer or Citrix Hypervisor, it is very important to make sure clustering is not enabled on your pool. It's a functionality that relies on proprietary software and that is not available in XCP-ng, and having it enabled before the upgrade will lead to XAPI being unable to start due to unexpected data in the database. If it is enabled or you already upgraded, see this comment.
Upgrade via installation ISO (recommended)
This is the standard XCP-ng way. With this method, note that you can often skip intermediate releases (e.g. from 7.5 to 8.2 directly) without needing intermediate upgrade, but there are exceptions, so check the release notes! For example, we strongly advise to upgrade to XCP-ng 8.2.1 first before jumping to XCP-ng 8.3.
It will backup your system to the backup partition and reinstall the system from scratch on the system partition. Your XCP-ng configuration (VMs, storage repositories and so on) is retained.
Any additional changes made by you to the system will be lost, so remember to make them again after the upgrade. Including: kernel or Xen boot parameters, changes to /etc, additional users created and their homes, local ISO SRs, additional packages... Some boot parameters and configuration files are saved, but it's a short list.
Steps:
- Download an installation ISO from the download page. Choose either the standard installer or the network installer.
- Check the authenticity and the integrity of the downloaded ISO.
Then, for every host of the pool, starting with the pool master:
- Move all VMs off the host if your setup allows it, or turn them off.
- Follow the installation procedure on the installation page.
You must boot the ISO in the firmware mode that was used for initial installation: UEFI or BIOS. Otherwise, the installer won't detect the existing installation and offer to upgrade.
- When offered the choice, choose to upgrade your existing XCP-ng installation.
- After the upgrade completed, reboot your host.
- Install the updates that have been released after the installation ISO was created. They can fix bugs and/or security issues.
- Reboot.
Once upgraded, keep the system regularly updated (see the updates section).
If you can't boot from the ISO, see the next section.
Troubleshooting ISO upgrades
Using the installation ISO when you can't boot from it: remote upgrade
This is an alternate method if you can't boot from the installation ISO.
If you do not have access to your server or remote KVM in order to upgrade using the interactive ISO installer, you can initiate an automatic reboot and upgrade process using the following procedure, which replaces steps 4 to 6 in the above upgrade procedure.
- Unpack/extract the XCP-ng ISO to a folder on an HTTP server. Make sure not to miss the hidden .treeinfo file (common mistake if you
cpthe files with*). - Get the UUID of your host by running the below command:
xe host-list
- Using that host UUID, as well as the URL to the folder hosting the unpacked XCP-ng ISO, run the following command to test access:
The returned output must be true to continue.xe host-call-plugin plugin=prepare_host_upgrade.py host-uuid=750d9176-6468-4a08-8647-77a64c09093e fn=testUrl args:url=http://<ip-address>/xcp-ng/unpackedexample/
- Now tell the host to automatically boot to the ISO and upgrade itself on next reboot (using the UUID and URL from before):
The output should also be true. It has created a temporary entry in the grub bootloader which will automatically load the upgrade ISO on the next boot. It then automatically runs the XCP-ng upgrade with no user intervention required. It will also back up your existing XCP-ng dom0 installation to the secondary backup partition, just like the normal upgrade.xe host-call-plugin plugin=prepare_host_upgrade.py host-uuid=750d9176-6468-4a08-8647-77a64c09093e fn=main args:url=http://<ip-address>/xcp-ng/unpackedexample/
- To start the process, just tell the host to reboot. It is best to watch the progress by using KVM if it's available, but if not, it should proceed fine and boot into the upgraded XCP-ng in 10 to 20 minutes.
Note: it has been brought to our attention that a DHCP server may be necessary during the upgrade.
Once upgraded, keep the system regularly updated (see Updates Howto).
From command line
A.k.a. yum-style upgrade.
⚠️ Supported across some minor releases (e.g. from 8.0 to 8.2), but not all of them (always check the release notes), and not supported across major releases (e.g. from 7.6 to 8.0). ⚠️
This upgrade procedure is not supported to upgrade to XCP-ng 8.3.
This information about EOL releases is retained solely to assist with the transition to a supported release, for example an upgrade to 8.2.1 (now EOL) as an intermediary step towards release 8.3.
Though it's been successfully tested by numerous people, this method is still considered riskier than using the installation ISO:
- this upgrade method does not create a backup of your system, unlike an upgrade via the installation ISO, so there's no possible return to the previous version (unless reinstalling it from scratch and reconfiguring it).
- there are more things that can go wrong when you upgrade lots of packages one by one than when you reinstall from scratch (which is what the installation ISO does, without losing your data of course).
- additional packages installed by the user on the system from CentOS, EPEL or third party repositories can sometimes make the upgrade fail.
On the plus side, it's a lot faster provided you have a decent internet connection or a local mirror, and changes you have made to the host are retained.
Once upgraded, keep your system regularly updated (see Updates Howto) until the next upgrade.
Prerequisites
Access to the repository (obviously)
Your dom0 system must either have access to updates.xcp-ng.org, or to a local mirror. In the second case, make sure to update the baseurl values in /etc/yum.repos.d/xcp-ng.repo to make them point at the local mirror, and keep the mirror up to date, of course.
Be cautious with third party repositories and packages
If you have enabled third party repositories (CentOS, EPEL...) in the past, make sure to disable them before updating. Otherwise, core packages from your dom0 system can be overwritten with versions of packages that have not been tested in the context of XCP-ng, or lack specific patches.
Set enabled=0 in the relevant files in /etc/yum.repos.d/. Warning: when added, the EPEL repository is automatically enabled. Make sure to disable it right away and use this syntax instead to install anything from it: yum install packagename --enablerepo='epel'.
In any case, installing extra packages from outside the XCP-ng repositories can lead to various issues, including update or system upgrade problems, so make sure to:
- install only packages that are known not to have any adverse effect on XCP-ng (when in doubt, ask on the forum or check with your pro support);
- check the dependencies pulled by such packages: they must not overwrite existing packages in XCP-ng;
- know that you are doing it at your own risk and be prepared to fix any issues that would arise, especially unforeseen upgrade issues (we can't test upgrade scenarios where unknown packages are installed on the system).
More at Additional packages.
Precautions
The precautions that apply to regular updates also apply to the upgrade process.
Check them carefully.
Upgrade instructions
⚠️ Proceed one host at a time. Do not yum update all hosts at once to "save time". ⚠️
⚠️ ALWAYS START WITH THE POOL MASTER. ⚠️
Let's start: open a terminal to your XCP-ng server, as root.