Upgrade from RHEL 8 to RHEL 9 Using Leapp

The recommended in-place upgrade method is to use the Leapp utility. This upgrades the operating system while preserving installed applications and configurations.

For official guidance, see Red Hat's in-place upgrade documentation.


1. Pre-Upgrade Checklist

Before starting:

  • Ensure the system is registered with Red Hat Subscription Management.
  • Verify you have a valid subscription for both RHEL 8 and RHEL 9 repositories.
  • Take a full VM snapshot or backup.
  • Confirm the system is running the latest RHEL 8 release.
  • Ensure at least 2-4 GB RAM is available  
  • Ensure at least 5–10 GB of free space in /var.
  • Reboot and verify the system is healthy.

2. Verify Current Version

# cat /etc/redhat-release

Expected output should show RHEL 8.x.


3. Update the System

# dnf clean all
# dnf update -y
# reboot

4. Install Leapp

# dnf install -y leapp-upgrade

For systems using Red Hat repositories, this package is included in standard repositories.


5. Disable Unsupported Repositories

List enabled repositories:

# subscription-manager repos --list-enabled

Disable third-party repositories such as:

  • EPEL
  • Oracle custom repositories
  • Internal repositories not certified for RHEL 9

Example:

# subscription-manager repos --disable=epel

6. Run Pre-Upgrade Assessment

# leapp preupgrade

Review the report:

# less /var/log/leapp/leapp-report.txt

Also review the detailed JSON report:

# less /var/log/leapp/leapp-report.json

7. Resolve Inhibitors

Common issues include:

Deprecated Authentication Modules

For example, removal of pam_pkcs11.

Custom Kernel Modules

Third-party drivers may need updates.

Deprecated Network Scripts

Migrate to NetworkManager.

Removed Packages

Some RHEL 8 packages are no longer available in RHEL 9.

Root SSH Login Settings

Leapp may flag certain SSH configurations.


8. Start the Upgrade

# leapp upgrade

This downloads required RHEL 9 packages and prepares the system.


9. Reboot to Begin Upgrade

# reboot

During boot, the system automatically enters the upgrade environment and performs the upgrade. This can take 15–60 minutes depending on system size and performance.


10. Verify the Upgrade

After the system reboots:

# cat /etc/redhat-release
# uname -r

Expected output:

Red Hat Enterprise Linux release 9.x

11. Validate Applications and Services

Check service status:

# systemctl --failed

Review logs:

# journalctl -p err -b

Confirm critical applications start correctly.


12. Remove Old Kernels and Cleanup

# dnf autoremove -y
# dnf clean all

No comments:

Post a Comment