Upgrade Howto

xiscoj edited this page Oct 17, 2018 · 26 revisions

This page details how to upgrade to the latest version of XCP-ng from a previous release. Eg. 7.4 to 7.5.

For updates that don't change the version numbers (bugfixes, security fixes), see Updates Howto

Warnings:

  • Always upgrade and reboot the pool master FIRST
  • If HA (High Availability) is enabled, disable it before upgrading

Using the installation ISO (recommended)

This is the standard XCP-NG way.

This 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 you will have to make them again.

If you can't boot from the ISO, there's an alternate method documented at the bottom of https://xcp-ng.org/blog/2018/06/11/migrate-from-xenserver-to-xcp-ng/.

Once installed, keep the system regularly updated (see Updates Howto). Do it once right after the installation because updates may already be available and fix bugs or security issues.

From command line (experimental)

This method is still experimental, because there are more things that can go wrong when you upgrade 500 packages one by one than when you reinstall from scratch (which is what the installation ISO does, without losing your data of course).

This upgrade method does not create a backup of your system, unlike an upgrade via the installation ISO.

Prerequisites:

  • Your dom0 system must either have access to updates.xcp-ng.org, or to a local mirror. In the latter 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.
  • 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'.
  • Note: 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;
    • check the dependencies pulled by such packages: they must not overwrite existing packages in XCP-ng;
    • know you're 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 if anything can be installed on your systems).

Once installed, keep your system regularly updated (see Updates Howto).

From XCP-ng 7.4.1

As root:

wget https://updates.xcp-ng.org/7/xcp-ng-7.5.repo -O /etc/yum.repos.d/xcp-ng.repo
yum clean metadata
yum install xcp-ng-deps
yum update
# then reboot the host. ALWAYS REBOOT THE POOL MASTER FIRST.

From XCP-ng 7.4.0

Same procedure as for 7.4.1, with one additional step before reboot:

# workaround a bug in old xcp-featured
yum reinstall xcp-featured

From command line (experimental) to XCP-ng 7.6

For testing purposes only, it's a work in progress.

Same warnings and prerequisites as above.

Open a terminal to your XCP-ng server, as root.

1. Import the public key if needed (only if current installed version < 7.6)

Since XCP-ng 7.6, your system needs to know our public key to be able to verify the authenticity of repository metadata and RPMs. If your system's version is currently lower than 7.6, you need to import the key first:

Done? Good. You won't have to do it again.

2. Download and verify the yum .repo file

We will download the repository file that will tell yum where to download the packages from, and we will verify its authenticity and its integrity.

  • Define the target version, replacing X and Y as appropriate:

    export VER=X.Y
    

    Example:

    export VER=7.6
    

In the commands below your shell will automatically replace $VER with the value that you defined.

  • Download the files
    wget https://updates.xcp-ng.org/7/xcp-ng-$VER.repo -O xcp-ng-$VER.repo
    wget https://updates.xcp-ng.org/7/SHA256SUMS -O SHA256SUMS
    wget https://updates.xcp-ng.org/7/SHA256SUMS.asc -O SHA256SUMS.asc
    
  • Follow the steps at How-to-check-the-authenticity-of-files-downloaded-from-XCP-mirrors#check-a-repository-repo-file
  • Install the verified repository file so that yum uses it.
    cp xcp-ng-$VER.repo /etc/yum.repos.d/xcp-ng.repo
    # help yum taking the change into account immediately
    yum clean metadata 
    

3. Install xcp-ng-deps if needed (only if current installed version < 7.5)

Skip this step if your current installed version is 7.5 or higher.

If your current installed version is lower than 7.5, you need to manually install a meta-package that will automatically pull the needed extra dependencies now and during future updates.

yum install xcp-ng-deps

4. Upgrade the system's packages

yum update

Note: if your current installed version is 7.5 or lower, you will have to accept the use of the GPG key we installed in step 1, several times. Say yes. Alternatively yum update -y will automatically answer 'yes' to all questions, but you'll miss a chance to check the list of upgraded packages before they are actually installed.

5. Workaround an upgrade bug in XCP-ng 7.4.0 (only if current installed version = 7.4.0)

Skip this step if your current installed version is 7.4.1 or higher.

# workaround a bug in old xcp-featured
yum reinstall xcp-featured

6. Reboot the host

ALWAYS REBOOT THE POOL MASTER FIRST.

Upgrade from XenServer

See https://xcp-ng.org/2018/06/11/migrate-from-xenserver-to-xcp-ng/

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.