How to in-place upgrade an offline / disconnected RHEL 8 machine to RHEL 9 with Leapp?
Environment
- Red Hat Enterprise Linux 9.x
- Red Hat Enterprise Linux 8.x
leapp
Issue
- Need a way to in-place upgrade a
RHEL 8machine toRHEL 9, but:- the
RHEL 8machine has no direct connection to the Internet (cdn.redhat.com), or - the
RHEL 8machine's proxy fails to download theRHEL 9packages.
- the
Resolution
IMPORTANT: This process will NOT work with RHUI repositories (AWS, Azure, GCP)
For RHEL 7 to RHEL 8 refer How to in-place upgrade an offline / disconnected RHEL 7 machine to RHEL 8 with Leapp?
Installing Leapp
All clients will need the latest leapp packages for the smoothest upgrade. You will need a RHEL 8 online system to download the packages
[online-system]# yum --downloadonly --downloaddir=./ install leapp-upgrade
You can host this content for other systems to pull from via httpd or move the packages to the internal system and install them.
[offline-client] # yum install <all of the rpms previously downloaded>
Upgrading with an iso
Download the RHEL 9 Major release Binary DVD and target it locally.
# leapp preupgrade --no-rhsm --iso /path/to/RHEL9-Binary-DVD.iso
# leapp upgrade --no-rhsm --iso /path/to/RHEL9-Binary-DVD.iso
Note: Make sure ISO is available under persistent mount. Do not use /tmp mount point.
Upgrading with a repository (latest packages)
You will need an online version of the same target major release (You need RHEL 8 to download RHEL 8) to reposync the content.
Online/Repo Server
Please refer to this KCS the full local repo guide:
Install and host the content over httpd for clients to access. If you are using an alternative method to host the content, you may skip straight to the subscription-manager release.
# yum -y install httpd # systemctl enable --now httpd # firewall-cmd --add-service=http && firewall-cmd --add-service=http --permanent # subscription-manager release --set=9.<supported target release> # reposync -n -p /var/www/html --download-metadata --repoid=rhel-9-for-x86_64-{appstream,baseos}-rpms
Client systems
Configure the clients with a .repo file to point to this target.
# cat << EOF >/etc/leapp/files/leapp_upgrade_repositories.repo [BaseOS] name=rhel-9-for-x86_64-baseos-rpms baseurl=http://X.X.X.X/rhel-9-for-x86_64-baseos-rpms [AppStream] name=rhel-9-for-x86_64-appstream-rpms baseurl=http://X.X.X.X/rhel-9-for-x86_64-appstream-rpms EOF
First, try a preupgrade:
# leapp preupgrade --no-rhsm --enablerepo BaseOS --enablerepo AppStream
Read the leapp report and fix any issues encountered, then run the upgrade.
# leapp upgrade --no-rhsm --enablerepo BaseOS --enablerepo AppStream
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.