Chapter 2. Preparing a RHEL 7 system for the upgrade

This procedure describes the steps that are necessary before performing an in-place upgrade to RHEL 8 using the Leapp utility.

If you do not plan to use Red Hat Subscription Manager during the upgrade process, follow instructions in Upgrading to RHEL 8 without Red Hat Subscription Manager.

Prerequisites

Procedure

  1. Ensure your system has been successfully registered to the Red Hat Content Delivery Network (CDN) or Red Hat Satellite using the Red Hat Subscription Manager.

    Important

    If your system is registered to Satellite Server, ensure that Satellite meets the following conditions:

    1. Satellite is on a version in full or maintenance support. For more information, see Red Hat Satellite Product Life Cycle.
    2. Satellite has a subscription manifest with RHEL 8 repositories imported. For more information, see the Managing Subscriptions chapter in the Content Management Guide for the particular version of Red Hat Satellite, for example, for version 6.8.
    3. All required repositories are enabled and synchronized with the latest updates and published on Satellite. For example, for the Intel architecture without an Extended Update Support (EUS) subscription, enable at minimum the following repositories:

      • Red Hat Enterprise Linux 7 Server (RPMs)

        rhel-7-server-rpms

        x86_64 7Server or x86_64 7.9

      • Red Hat Enterprise Linux 7 Server - Extras (RPMs)

        rhel-7-server-extras-rpms

        x86_64

      • Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)

        rhel-8-for-x86_64-appstream-rpms

        x86_64 8.4

      • Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)

        rhel-8-for-x86_64-baseos-rpms

        x86_64 8.4

        For more information, see the Importing Red Hat Content chapter in the Content Management Guide for the particular version of Red Hat Satellite, for example, for version 6.8.

    4. The content host belongs to one of the following:

      • A Content View containing the above RHEL 7 and RHEL 8 repositories.
      • The Default Organization View Content View and the Library life cycle environment.

        For more information, see the Managing Content Views chapter in the Content Management Guide for the particular version of Red Hat Satellite, for example, for version 6.8.

  2. Verify that you have the Red Hat Enterprise Linux Server subscription attached:

    # subscription-manager list --installed
    +-------------------------------------------+
        	  Installed Product Status
    +-------------------------------------------+
    Product Name:  	Red Hat Enterprise Linux Server
    Product ID:     69
    Version:        7.9
    Arch:           x86_64
    Status:         Subscribed

    You should see Server in the product name and Subscribed as the status.

  3. Ensure you have appropriate repositories enabled. The following commands list repositories for the 64-bit Intel architecture; for other architectures, see RHEL 7 repositories.

    1. Enable the Base repository:

      # subscription-manager repos --enable rhel-7-server-rpms
    2. Enable the Extras repository where Leapp and its dependencies are available:

      # subscription-manager repos --enable rhel-7-server-extras-rpms
      Note

      You can also have the Optional or Supplementary repositories enabled; see their list in RHEL 7 repositories. In such a case, Leapp enables the RHEL 8 CodeReady Linux Builder or the RHEL 8 Supplementary repositories, respectively.

  4. Set the Red Hat Subscription Manager to consume the latest RHEL 7 content:

    # subscription-manager release --unset
  5. Optional: If you want to use custom repositories, configure them per instructions in Configuring custom repositories.
  6. If you use the yum-plugin-versionlock plug-in to lock packages to a specific version, clear the lock by running:

    # yum versionlock clear

    See How to restrict yum to install or upgrade a package to a fixed specific package version? for more information.

  7. Ensure you have the system locale set to en_US.UTF-8:

    $ cat /etc/locale.conf

    If the locale is different, follow instructions in How to change system locale on RHEL7?.

  8. If you are upgrading using Red Hat Update Infrastructure (RHUI) on a public cloud, enable required RHUI repositories and install required RHUI packages to ensure your system is ready for upgrade.

    1. For AWS:

      # yum-config-manager --enable rhui-client-config-server-7
      # yum-config-manager --enable rhel-7-server-rhui-extras-rpms
      # yum -y install rh-amazon-rhui-client leapp-rhui-aws
    2. For Microsoft Azure:

      # yum-config-manager --enable rhui-microsoft-azure-rhel7
      # yum-config-manager --enable rhui-rhel-7-server-rhui-extras-rpms
      # yum -y install rhui-azure-rhel7 leapp-rhui-azure
      Note

      If you locked the Azure virtual machine (VM) to a minor release, remove the version lock. For more information, see Switch a RHEL 7.x VM back to non-EUS.

  9. If you manage containers in Docker, recreate those containers with the appropriate container images using Podman and then attach any in-use volumes. For more information, see How do I migrate my Docker containers to Podman prior to moving from Red Hat Enterprise Linux 7 to Red Hat Enterprise Linux 8?
  10. Update all packages to the latest RHEL 7 version:

    # yum update
  11. Reboot the system:

    # reboot
  12. Install the Leapp utility:

    # yum install leapp leapp-repository

    Note that currently you need version 0.12.1 or later of the leapp package and version 0.14.0 or later of the leapp-repository package.

  13. Ensure you have access to the latest version of additional required data files (RPM package changes, RPM repository mapping, unsupported drivers, and unsupported PCIs).

    1. If you are using RHSM for the upgrade, the system has access to cloud.redhat.com, and you have not downloaded an earlier version of the required data files, no further action is required from you. The data files are automatically downloaded from cloud.redhat.com. This also applies to developer subscriptions.
    2. Download the data files attached to the Knowledgebase article Data required by the Leapp utility for an in-place upgrade from RHEL 7 to RHEL 8 and place them in the /etc/leapp/files/ directory. This is necessary for a successful upgrade. Note that currently you need data files from the leapp-data14.tar.gz archive or later. This is necessary for a successful upgrade in the following scenarios:

      1. You are upgrading on a public cloud using RHUI. If you do not have a Red Hat subscription or Red Hat Customer Portal account, create a no-cost RHEL developer subscription so that you can access the Knowledgebase article and download required data packages. For more information, see How do I get a no-cost Red Hat Enterprise Linux Developer Subscription or renew it?
      2. Your system does not have internet access.
      3. You are using RHSM for the upgrade and you previously downloaded an older version of the required data files but did not perform the upgrade, for example to create automated scripts. You can also delete your older version of the data files to initiate the automatic download of the latest file version.
  14. Temporarily disable antivirus software to prevent the upgrade from failing.
  15. Ensure you have any configuration management (such as Salt, Chef, Puppet, Ansible) disabled or adequately reconfigured to not attempt to restore the original RHEL 7 system.
  16. Ensure your system does not use more than one Network Interface Card (NIC) with a name based on the prefix used by the kernel (eth). For instructions on how to migrate to another naming scheme before an in-place upgrade to RHEL 8, see How to perform an in-place upgrade to RHEL 8 when using kernel NIC names on RHEL 7.
  17. Ensure you have a full system backup or a virtual machine snapshot. You should be able to get your system to the pre-upgrade state if you follow standard disaster recovery procedures within your environment. For example, you can use the Relax-and-Recover (ReaR) utility. For more information, see the ReaR documentation and What is Relax and Recover (ReaR) and how can I use it for disaster recovery?. Alternatively, you can use LVM snapshots, or RAID splitting. In case of upgrading a virtual machine, you can create a snapshot of the whole VM.
  18. If you are upgrading with Red Hat Subscription Manager and have disabled the subscription-manager plug-in in yum or yum4, re-enable the plug-in. For more information, see Enabling, configuring, and disabling yum plug-ins.

    To determine whether the subscription-manager plug-in is enabled in yum, run the following command:

    # yum 2>&1 | head

    Review the generated list of Loaded plugins and determine whether subscription-manager is included.