How to Upgrade from RHEL 7 to RHEL 8

Red Hat has announced the release of Red Hat Enterprise Linux 8.0, which comes with GNOME 3.28 as the default desktop environment and runs on Wayland.

This article describes instructions on how to upgrade from Red Hat Enterprise Linux 7 to Red Hat Enterprise Linux 8 using the Leapp utility.

If you’re looking for a fresh RHEL 8 installation, head over to our article: Installation of RHEL 8 with Screenshots

Requirements

An in-place upgrade to RHEL 8 is presently supported only on systems meeting the following requirements:

  • RHEL 7.6 installed
  • The Server variant
  • The Intel 64 architecture
  • At least 100MB of free space available on the boot partition (mounted at /boot).

Preparing an RHEL 7 For The Upgrade

1. Make sure you are using RHEL 7.6 version, if you’re using RHEL version older than RHEL 7.6, you need to update your RHEL system to RHEL 7.6 version using following yum command.

# yum update
Update RHEL 7 System
Update RHEL 7 System

Note: Make sure your RHEL 7 system has been successfully registered using the Red Hat Subscription Manager to enable system repositories and perform a full system update.

2. Make sure your RHEL 7 system has the Red Hat Enterprise Linux Server subscription attached. If not, run the following commands to automatically assign the subscription to the system and verify the subscription.

# subscription-manager attach --auto
# subscription-manager list --installed
Check RHEL Server Subscription
Check RHEL Server Subscription

3. Now set the RHEL 7.6 version as a beginning point for the upgrade using the following command.

# subscription-manager release --set 7.6
Set RHEL Release Upgrade
Set RHEL Release Upgrade

4. If you have used yum-plugin-versionlock plug-in to lock packages to a specific version, make sure to remove the lock by running the following command.

# yum versionlock clear

5. Update all software packages to the latest version and reboot the system.

# yum update
# reboot

6. Once system booted, make sure to enable the Extras repository for software package dependencies.

# subscription-manager repos --enable rhel-7-server-extras-rpms
Enable Extras Repository on RHEL
Enable Extras Repository on RHEL

7. Install the Leapp utility.

# yum install leapp
Install Leapp Tool in RHEL
Install Leapp Tool in RHEL

8. Now download additional required data files, which is required by the Leapp utility for a successful upgrade from RHEL 7 to RHEL 8 and place them in the /etc/leapp/files/ directory.

# cd /etc/leapp/files/ 
# wget https://access.redhat.com/sites/default/files/attachments/leapp-data3.tar.gz
# tar -xf leapp-data3.tar.gz 
# rm leapp-data3.tar.gz
Download Files for Leapp
Download Files for Leapp

9. Make sure to take a full RHEL 7.6 system backup, before performing the upgrade using this article: backup and restore RHEL system with the dump/restore commands.

If the upgrade fails, you should able to get your system to the pre-upgrade state if you follow the standard backup instructions provides in the above article.

Upgrading from RHEL 7 TO RHEL 8

10. Now start the RHEL 7 system upgrade process using the following command.

# leapp upgrade
Leapp RHEL Upgrade
Leapp RHEL Upgrade

Once you run the upgrade process, the Leapp utility gathers data about your system, tests the upgradability, and creates a pre-upgrade report in the /var/log/leapp/leapp-report.txt file.

If the system is upgradable, Leapp downloads required data and create an RPM transaction for the upgrade.

If the system is not upgradeable, Leapp closes the upgrade operation and creates a record explaining the issue and a solution in the /var/log/leapp/leapp-report.txt file.

11. Once upgrades finish, manually reboot the system.

# reboot

At this stage, the system boots into an RHEL 8-based initial RAM disk image, initramfs. Leapp upgrades all software packages and automatically reboots to the RHEL 8 system.

RHEL Upgrade Process
RHEL Upgrade Process

12. Now Log in to the RHEL 8 system and change the SELinux mode to enforcing.

# setenforce 1
Set SELinux to Enforcing in RHEL 8
Set SELinux to Enforcing in RHEL 8

13. Enable the firewall.

# systemctl start firewalld
# systemctl enable firewalld

For more information, see how to configure firewall using firewalld.

Verifying RHEL 8 Upgrade

14. After the upgrade completes, verify that the current OS version is Red Hat Enterprise Linux 8.

# cat /etc/redhat-release

Red Hat Enterprise Linux release 8.0 (Ootpa)
Check RHEL 8 Release
Check RHEL 8 Release

15. Check the OS kernel version of Red Hat Enterprise Linux 8.

# uname -r

4.18.0-80.el8.x86_64
Check RHEL 8 Kernel Version
Check RHEL 8 Kernel Version

16. Verify that the correct Red Hat Enterprise Linux 8 is installed.

# subscription-manager list --installed
Check RHEL Installed Subscription
Check RHEL Installed Subscription

17. Optionally, set the hostname in Red Hat Enterprise Linux 8 using hostnamectl command.

# hostnamectl set-hostname tecmint-rhel8
# hostnamectl
Set Hostname in RHEL 8
Set Hostname in RHEL 8

18. Finally, verify that network services are functional by connecting to a Red Hat Enterprise Linux 8 server using SSH.

# ssh [email protected]
# hostnamectl
SSH to RHEL 8
SSH to RHEL 8
Ravi Saive
I am an experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

20 thoughts on “How to Upgrade from RHEL 7 to RHEL 8”

  1. A lot of big companies feel the Leapp tool has too many shortcomings to be practical for the migration to 8. We created Project78, a tool to address those issues and enable swift and practical in-place upgrades.

    Aside from automatically addressing hundreds of ‘inhibitors’, and filesystems, and working around leapp bugs, third-party application migrations are performed.

    We just launched for this the Project78 website: https://www.project78.com

    Which also includes a Cloud version, to preview our technology without needing to install the upgrade server.

    Reply
  2. Hello,

    Great article and it give me an idea of how to proceed.

    Also, can you make the same article but for Oracle Linux?

    Thank you.

    Reply
  3. Hi Ravi,

    We have a couple of red hat VMs with 7.6 version and due to some vulnerabilities, Security Team suggested them to upgrade to 7.8. How can I perform this upgrade from 7.6 to 7.8??

    Thanks in advance,
    Suresh Bichhali

    Reply
  4. Hello Ravi,

    I am facing below error while upgrading:

    REF:
    [root@linuxtempplate ~]# uname -r
    3.10.0-1062.12.1.el7.x86_64
    [root@linuxtempplate ~]# cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 7.8 (Maipo)
    [root@linuxtempplate ~]# leapp upgrade
    Loaded plugins: product-id, subscription-manager

    ============================================================
    ERRORS
    ============================================================

    2020-03-11 04:36:34.193717 [ERROR] Actor: verify_check_results Message: Unsupported OS version

    ============================================================
    END OF ERRORS
    ============================================================
    [root@linuxtempplate ~]#

    Regards,
    Kazim.

    Reply
  5. You should do the “subscription-manager release –set 7.6” as the first command, otherwise, yum update will update the system to RHEL 7.7.

    Reply
  6. Hi,

    I am getting below error after running the following command.

    # yum install leapp
    

    Error:

    Error downloading packages:
      sos-3.7-6.el7_7.noarch: [Errno 256] No more mirrors to try.
      python-jinja2-2.7.2-4.el7.noarch: [Errno 256] No more mirrors to try.
      libsolv-0.6.34-4.el7.x86_64: [Errno 256] No more mirrors to try.
      libreport-filesystem-2.1.11-43.el7.x86_64: [Errno 256] No more mirrors to try.
    
    Reply
  7. Hi,

    While upgrading rhel from 7 to 8, I am getting below error. kindly help on this.

    Process Process-128:
    Traceback (most recent call last):
    File “/usr/lib64/python2.7/multiprocessing/process.py”, line 258, in _bootstrap
    self.run()
    File “/usr/lib64/python2.7/multiprocessing/process.py”, line 114, in run
    self._target(*self._args, **self._kwargs)
    File “/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py”, line 59, in _do_run
    target_actor(logger=logger, messaging=messaging).run(*args, **kwargs)
    File “/usr/lib/python2.7/site-packages/leapp/actors/__init__.py”, line 299, in run
    self.process(*args)
    File “/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/addupgradebootentry/actor.py”, line 24, in process
    add_boot_entry()
    File “/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/addupgradebootentry/libraries/library.py”, line 20, in add_boot_entry
    ‘–args=”{DEBUG} enforcing=0 rd.plymouth=0 plymouth.enable=0″‘.format(DEBUG=debug)
    File “/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/__init__.py”, line 147, in run
    result=result
    CalledProcessError: A Leapp Command Error occurred.

    =======================================================================================================
    Actor add_upgrade_boot_entry unexpectedly terminated with exit code: 1 – Please check the above details
    =======================================================================================================

    Reply
    • @HJWaggoner,

      I am 100% sure that the upgrade won’t fail, as me personally upgraded my two RHEL 7.x server to RHEL 8 and upgrades went smoothly without any issues..

      Reply

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.