Chapter 4. Preparing for the upgrade To prevent issues after the upgrade and to ensure that your system is ready to be upgraded to the major version of RHEL, complete all necessary preparation steps before upgrading. You must perform the preparation steps described in Preparing a RHEL 7 system for the upgrade on all systems. In addition, on systems that are registered to Satellite Server, you must also perform the preparation steps described in Preparing a Satellite-registered system for the upgrade . 4.1. 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 by 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 The system meets conditions listed in Planning an upgrade . If you previously upgraded from RHEL 6 to RHEL 7, you have finished all required manual post-upgrade steps. This includes manual migrating to the GRUB boot loader on your RHEL 7 machine. For more information, see Upgrading from GRUB Legacy to GRUB . Procedure Optional: Review the best practices in The best practices and recommendations for performing RHEL Upgrade using Leapp Knowledgebase article. Ensure your system has been successfully registered to the Red Hat Content Delivery Network (CDN) or Red Hat Satellite by using the Red Hat Subscription Manager. If your system is registered to Satellite Server, complete the steps in Preparing a Satellite-registered system for the upgrade to ensure that your system meets the requirements for the upgrade. Important If your system is registered to Satellite Server, you must complete the steps in Preparing a Satellite-registered system for the upgrade for the upgrade before proceeding with the steps in this procedure to prevent issues from occurring. Optional: Unmount non-system OS file systems that are not required for the upgrade, such as file systems containing only data files unrelated to the system itself, and comment them out from the /etc/fstab file. This can reduce the amount of time needed for the upgrade process and prevent potential issues related to third-party applications that are not migrated properly during the upgrade by custom or third-party actors. Verify that the system is subscribed using subscription-manager: If your system is registered by using an account with Simple Content Access (SCA) enabled, verify that the Content Access Mode is set to Simple Content Access message appears: If your system is registered by using an account with SCA disabled, verify that the Red Hat Linux Server subscription is attached, the product name is Server , and the status is Subscribed : Ensure you have appropriate repositories enabled. The following commands list repositories for the 64-bit Intel architecture; for other architectures, see RHEL 7 repositories . Enable the Base repository: Enable the Extras repository where Leapp and its dependencies are available: Note Optionally, you can enable the Optional (also known as CodeReady Linux Builder) or Supplementary repositories. For more information about repository IDs, see the Optional and Supplementary repositories list in RHEL 7 repositories . For more information about the content of these repositories, see The CodeReady Linux Builder repository and The Supplementary repository . Set the Red Hat Subscription Manager to use the latest RHEL 7 content: Optional: To use custom repositories, see the Configuring custom repositories Knowledgebase article. If you use the yum-plugin-versionlock plug-in to lock packages to a specific version, clear the lock by running: For more information, see the Red Hat Knowledgebase solution How to restrict yum to install or upgrade a package to a fixed specific package version? . 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. For AWS: For Microsoft 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 . For Google Cloud Platform, follow the Leapp RHUI packages for Google Cloud Platform (GCP) Knowledgebase article. If you manage containers in Docker, recreate those containers with the appropriate container images by using Podman and then attach any in-use volumes. For more information, see the Red Hat Knowledgebase solution How do I migrate my Docker containers to Podman prior to moving from Red Hat Enterprise Linux 7 to Red Hat Enterprise Linux 8? Install the Leapp utility: Note that currently you need version 0.17.0 or later of the leapp package and version 0.20.0 or later of the leapp-repository package, which contains the leapp-upgrade-el7toel8 RPM package. Note If your system does not have internet access, download the following packages from the Red Hat Customer Portal : leapp leapp-deps python2-leapp leapp-upgrade-el7toel8 leapp-upgrade-el7toel8-deps For more information, see the Red Hat Knowledgebase solution How to install leapp packages on an offline system for RHEL 7.9 to RHEL 8.X upgrade? . Update all packages to the latest RHEL 7 version and reboot: The latest release of the leapp-upgrade-el7toel8 package contains all required data files. If you have replaced these data files with older versions, remove all JSON files in the /etc/leapp/files directory and reinstall the leapp-upgrade-el7toel8 package to ensure your data files are up-to-date. Optional: Review, remediate, and then remove the rpmnew and rpmsave files. For more information, see the Red Hat Knowledgebase solution What are rpmnew & rpmsave files? Temporarily disable antivirus software to prevent the upgrade from failing. Ensure that any configuration management system does not interfere with the in-place upgrade process: If you use a configuration management system with a client-server architecture, such as Puppet , Salt , or Chef , disable the system before running the leapp preupgrade command. Do not enable the configuration management system until after the upgrade is complete to prevent issues during the upgrade. If you use a configuration management system with agentless architecture, such as Ansible , do not execute the configuration and deployment file, such as an Ansible playbook, during the in-place upgrade as described in Performing the upgrade from RHEL 7 to RHEL 8 . Automation of the pre-upgrade and upgrade process using a configuration management system is not supported by Red Hat. For more information, see Using configuration management systems to automate parts of the Leapp pre-upgrade and upgrade process on Red Hat Enterprise Linux . 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 the Red Hat Knowledgebase solution How to perform an in-place upgrade to RHEL 8 when using kernel NIC names on RHEL 7 . If you are upgrading using an ISO image, verify that the ISO image contains the target OS version, for example RHEL 8.8, and is saved to a persistent local mount point to ensure that the Leapp utility can access the image throughout the upgrade process. Ensure that 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. You can use the following backup options: Create a full backup of your system by using the Relax-and-Recover (ReaR) utility. For more information, see the ReaR documentation and the Red Hat Knowledgebase solution What is Relax and Recover (ReaR) and how can I use it for disaster recovery? . Create a snapshot of your system by using LVM snapshots or RAID splitting . In case of upgrading a virtual machine, you can create a snapshot of the whole VM. You can also manage snapshot and rollback boot entries by using the Boom utility. For more information, see Red Hat Knowledgebase solutions What is BOOM and how to install it? and Managing system upgrades with snapshots . Note Because LVM snapshots do not create a full backup of your system, you might not be able to recover your system after certain upgrade failures. As a result, it is safer to create a full backup by using the ReaR utility. 4.2. Preparing a Satellite-registered system for the upgrade This procedure describes the steps that are necessary to prepare a system that is registered to Satellite for the upgrade to RHEL 8. Note If you plan to upgrade the Satellite system itself, follow the procedure described in Upgrading Satellite or Capsule to Red Hat Enterprise Linux 8 In-Place Using Leapp . Important Users on Satellite systems must complete the preparatory steps described both in this procedure and in Preparing a RHEL 7 system for the upgrade . Prerequisites You have administrative privileges for the Satellite Server. Procedure Verify that Satellite is on a version in full or maintenance support. For more information, see Red Hat Satellite Product Life Cycle . Import a subscription manifest with RHEL 8 repositories into Satellite Server. For more information, see the Managing Red Hat Subscriptions chapter in the Managing Content Guide for the particular version of Red Hat Satellite , for example, for version 6.12 . Enable and synchronize all required RHEL 7 and RHEL 8 repositories on the Satellite Server with the latest updates for RHEL 7.9 and the target OS version, for example RHEL 8.10. Required repositories must be available in the Content View and enabled in the associated activation key. Note For RHEL 8 repositories, enable the target OS version of each repository, for example, 8.10. If you enable only the RHEL 8 version of the repositories, the in-place upgrade is inhibited. 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 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 <target_os_version> Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) rhel-8-for-x86_64-baseos-rpms x86_64 <target_os_version> Replace target_os_version with the target OS version, for example 8.10. For other architectures, see RHEL 7 repositories and RHEL 8 repositories . For more information, see the Importing Content chapter in the Managing Content Guide for the particular version of Red Hat Satellite , for example, for version 6.12 . Attach the content host to a Content View containing the required RHEL 7 and RHEL 8 repositories. For more information, see the Managing Content Views chapter in the Managing Content Guide for the particular version of Red Hat Satellite , for example, for version 6.12 . Verification Verify that the correct RHEL 7 and RHEL 8 repositories have been added to the correct Content View on Satellite Server. In the Satellite web UI, navigate to Content > Lifecycle > Content Views and click the name of the Content View. Click the Repositories tab and verify that the repositories appear correctly. Note You can also verify that the repositories have been added to the Content View using the following commands: Replace <content_view_name> with the name of the Content View, <organization> with the organization, and <lifecycle_environement > with the name of the lifecycle environment.. Verify that the correct RHEL 8 repositories are enabled in the activation key associated with the Content View: In Satellite web UI navigate to Content > Lifecycle > Activation Keys and click the name of the activation key. Click the Repository Sets tab and verify that the statuses of the required repositories are Enabled . Verify that all expected RHEL 7 repositories are enabled in the host. For example:

Commands:
subscription-manager status +-------------------------------------------+ System Status Details +-------------------------------------------+ Overall Status: Disabled Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status. System Purpose Status: Disabled
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
subscription-manager repos --enable rhel-7-server-rpms
subscription-manager repos --enable rhel-7-server-extras-rpms
subscription-manager release --unset
yum versionlock clear
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
yum-config-manager --enable rhui-microsoft-azure-rhel7 yum -y install rhui-azure-rhel7 yum-config-manager --enable rhui-rhel-7-server-rhui-extras-rpms yum -y install leapp-rhui-azure
yum install leapp-upgrade
yum update reboot
hammer repository list --search 'content_label ~ rhel-7' --content-view <content_view_name> --organization <organization> --lifecycle-environment <lifecycle_environment> hammer repository list --search 'content_label ~ rhel-8' --content-view <content_view_name> --organization <organization> --lifecycle-environment <lifecycle_environment>
subscription-manager repos --list-enabled | grep "^Repo ID" Repo ID: rhel-7-server-extras-rpms Repo ID: rhel-7-server-rpm