How to in-place upgrade an offline / disconnected RHEL 7 machine to RHEL 8 with Leapp?
Environment
- Red Hat Enterprise Linux 8.x
- Red Hat Enterprise Linux 7.x
leapp
Issue
- Need a way to in-place upgrade a RHEL 7 machine to RHEL 8, but:
- the RHEL 7 machine has no direct connection to the Internet (cdn.redhat.com), or
- the RHEL 7 machine's proxy fails to download the RHEL 8 packages.
Resolution
IMPORTANT: This process will NOT work with RHUI repositories (AWS, Azure, GCP)
For RHEL 8 to RHEL 9 refer How to in-place upgrade an offline / disconnected RHEL 8 machine to RHEL 9 with Leapp?
Installing Leapp
All clients will need the latest leapp packages for the smoothest upgrade. You will need an online system of the same Source Major Release to download the packages
[online-system]# yum --downloadonly --downloaddir=./ install leapp-upgrade
If your system is offline, refer to How to install leapp packages on an offline system for RHEL 7.9 to RHEL 8.X upgrade ? to download some packages.
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 target Major release Binary DVD and target it locally.
# leapp preupgrade --no-rhsm --iso /path/to/RHEL8-Binary-DVD.iso
# leapp upgrade --no-rhsm --iso /path/to/RHEL8-Binary-DVD.iso
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=8.<supported target release> # reposync -n -p /var/www/html --download-metadata --repoid=rhel-8-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-8-for-x86_64-baseos-rpms baseurl=http://X.X.X.X/rhel-8-for-x86_64-baseos-rpms [AppStream] name=rhel-8-for-x86_64-appstream-rpms baseurl=http://X.X.X.X/rhel-8-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.