Run an in-place upgrade of Red Hat Enterprise Linux and be prepared to troubleshoot potential issues with the upgrade.
Before beginning an upgrade, make sure that your systems are prepared according to your upgrade plan. This preparation might include backing up user and application data, taking a full system backup, or taking a snapshot of the system. Preparing your systems should also include running a pre-upgrade analysis and fixing potential issues.
After preparing your systems to upgrade, you can use the leapp upgrade command to run the system upgrade.
[root@host ~]# leapp upgradeThe Leapp tool first runs a final pre-upgrade analysis to identify potential problems with the upgrade. If the Leapp tool finds no issues during the analysis, then the Leapp tool downloads software packages and tests the RPM transaction for the upgrade.
After preparing the packages and other configurations, the Leapp tool prints the pre-upgrade report. Red Hat recommends that if any issues are reported, then you should not continue the upgrade until you have addressed all reported issues. Unresolved issues might affect applications or degrade system performance.
If the final pre-upgrade analysis does not find any errors, then the tool begins the actual upgrade. The Leapp tool also prints a message requesting a system reboot to continue with the upgrade.
[root@host ~]#leapp upgrade...output omitted... ====> * add_upgrade_boot_entry Add new boot entry for Leapp provided initramfs.A reboot is required to continue. Please reboot your system.Debug output written to /var/log/leapp/leapp-upgrade.log ============================================================ REPORT OVERVIEW ============================================================ ...output omitted...
This reboot enables the system to boot with a new RAM disk image with the new kernel.
The system continues the upgrade process after rebooting. Output from the Leapp tool is displayed on the console of the machine.
The Leapp tool then performs RPM transactions on the system, and when that is complete, it performs an SELinux relabel. Then the Leapp tool reboots the system to complete the upgrade and to ensure that the updated kernel and updated daemon processes are running.
You can review the contents of the /var/log/leapp/leapp-upgrade.log file for more information about the upgrade process.
The following example shows an excerpt of an upgrade log file.
[root@host ~]# cat /var/log/leapp/leapp-upgrade.log
...output omitted...
2024-03-14 13:05:03.431 DEBUG PID: 1381 leapp.repository.system_upgrade_common: Adding libraries - libraries
2024-03-14 13:05:03.444 DEBUG PID: 1381 leapp.repository.system_upgrade_common: Adding tools - tools
2024-03-14 13:05:03.472 DEBUG PID: 1381 leapp.repository.system_upgrade_el7toel8: Scanning path /etc/leapp/repos.d/system_upgrade/el7toel8
2024-03-14 13:05:03.487 DEBUG PID: 1381 leapp.repository.system_upgrade_el7toel8: Adding model - models/authselect.py
2024-03-14 13:05:03.497 DEBUG PID: 1381 leapp.repository.system_upgrade_el7toel8: Adding model - models/bindfacts.py
...output omitted...You can also run the leapp upgrade command with options to adjust the command behavior for your environment.
The leapp upgrade command uses the default target version according to the supported upgrade path.
The default target version can change as new versions of RHEL and the Leapp tool are released.
With the leapp command version that is used in this course, for example, the command's default behavior is to upgrade a RHEL 7.9 to RHEL 8.9.
Use the leapp upgrade command with the --target option to specify the target version for the upgrade.
In the following example, you upgrade a system to RHEL 8.8.
[root@host ~]# leapp upgrade --target 8.8Depending on your organization's IT environment, your system might use custom software repositories to provide RHEL packages.
Use the leapp upgrade command with the --enablerepo option to use custom repositories that are defined in the /etc/yum.repos.d/ directory.
In the following example, you upgrade a system by using the org-rhel-8-main and org-rhel-8-additional repositories.
[root@host ~]# leapp upgrade --enablerepo org-rhel-8-main \
--enablerepo org-rhel-8-additionalIf the system uses an Extended Upgrade Support (EUS), Advanced Update Support (AUS), or Update Services for SAP Solutions (E4S) subscription, then you can specify the subscription type by using the leapp upgrade command with the --channel option.
In the following example, you upgrade a system that uses an Extended Upgrade Support (EUS) subscription.
[root@host ~]# leapp upgrade --channel eusTo upgrade systems that use RHEL with SAP HANA, you must perform the in-place upgrade by following the instructions in the Knowledgebase: "How to In-place Upgrade SAP Environments from RHEL 7 to RHEL 8" article.
If you experience problems during the upgrade, then use the --verbose and --debug options of the leapp upgrade command to display more detailed logs.
By default, the Leapp tool only prints error and critical log messages.
Review the following files for more information about the upgrade process:
/var/log/leapp/leapp-upgrade.log
Lists issues that are found during the creation of the RAM disk image process.
/var/log/leapp/dnf-debugdata/
Contains information regarding RPM transaction data.
This directory is created only if the leapp upgrade command is executed with the --debug option.
/var/log/leapp/leapp-report.txt
Lists issues that are found during the pre-upgrade phase.
/var/log/leapp/leapp-report.json
Lists issues that are found during the pre-upgrade phase in a JSON notation.
The following commands also provide additional information about the upgrade process:
journalctl
Displays system-wide logs. You can review this command if the system has issues when trying to boot the new RAM disk image.
sosreport
Creates a report that includes system and package information.
You can use the logs from the previous lists as attachments when opening a support case. Make sure to include information that is relevant to the system and your upgrade plan.
journalctl(1) and sosreport(1) man pages
For more information about upgrading a system to RHEL 8, refer to the Performing the Upgrade from RHEL 7 to RHEL 8 chapter in the Upgrading from RHEL 7 to RHEL 8 guide at https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/upgrading_from_rhel_7_to_rhel_8/index#performing-the-upgrade-from-rhel-7-to-rhel-8_upgrading-from-rhel-7-to-rhel-8
For more information about upgrading a system to RHEL 9, refer to the Performing the Upgrade chapter in the Upgrading from RHEL 8 to RHEL 9 guide at https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/upgrading_from_rhel_8_to_rhel_9/index#performing-the-upgrade_upgrading-from-rhel-8-to-rhel-9
For more information about troubleshooting an upgrade to RHEL 8, refer to the Troubleshooting chapter in the Upgrading from RHEL 7 to RHEL 8 guide at https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/upgrading_from_rhel_7_to_rhel_8/index#troubleshooting_upgrading-from-rhel-7-to-rhel-8
For more information about troubleshooting an upgrade to RHEL 9, refer to the Troubleshooting chapter in the Upgrading from RHEL 8 to RHEL 9 guide at https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/upgrading_from_rhel_8_to_rhel_9/index#troubleshooting_upgrading-from-rhel-8-to-rhel-9
For additional practice upgrading from RHEL 7 to RHEL 8, refer to the In Place Upgrade to RHEL 8 interactive lab at https://learn.spidernet.pl/en/interactive-labs/perform-in-place-upgrade-with-leapp
For additional practice upgrading to RHEL 9, refer to the Upgrade to Red Hat Enterprise Linux 9 in Place with Leapp interactive lab at https://learn.spidernet.pl/en/interactive-labs/upgrade-with-leapp