If your applications are deployed on an Elastic Compute Service (ECS) instance that runs Red Hat Enterprise Linux (RHEL) 7, you can upgrade the instance to RHEL 8 to use new and better features. This topic describes how to upgrade an ECS instance from RHEL 7 to RHEL 8.
For more information, see Upgrading from RHEL 7 to RHEL 8.
Prerequisites
The ECS instance that you want to upgrade meets the requirements for running RHEL 8. For more information, see Red Hat Enterprise Linux Technology Capabilities and Limits.
Procedure
The upgrade operation can create risks. Before you perform the upgrade, we recommend that you create snapshots for disks on the instance to back up important data and familiarize yourself with the upgrade process and issues that may occur during the process. Exercise cause when you perform the upgrade. For information about how to create snapshots for the disks, see Create a snapshot for a disk.
Connect to the ECS instance that runs a RHEL 7 operating system as the root user.
For more information, see Connect to a Linux instance by using a password or key.
Prepare the RHEL 7 operating system for the upgrade.
Run the following commands to update the RHEL 7 operating system to the latest minor version and restart the instance for the update to take effect:
yum -y update reboot
Run the following command to install the Leapp utility on the RHEL 7 operating system:
yum -y install leapp leapp-rhui-alibaba --enablerepo="*"
Perform a pre-upgrade check.
Run the following command to perform a pre-upgrade check:
leapp preupgrade --no-rhsm --target 8.8
In the preceding command,
--target 8.8
indicates that the target version is RHEL 8.8. You can replace 8.8 with the actual target version number. If you do not specify a target version, the command upgrades the RHEL 7 operating system to the latest RHEL version.NoteYou can run the
leapp preupgrade -h
command to view the supported target versions.View the pre-upgrade check results.
RHEL 7 significantly differs from RHEL 8. During the pre-upgrade check, the Leapp utility scans the RHEL 7 operating system for the configurations that must be modified to support the upgrade. Leapp pre-upgrade check logs are stored in the following log files:
/var/log/leapp/leapp-preupgrade.log: stores the logs of the Leapp utility.
/var/log/leapp/leapp-report.txt: stores the pre-upgrade check report in the text format.
/var/log/leapp/leapp-report.json: stores the pre-upgrade check report in the JSON format.
If the pre-upgrade check fails, specific failed items (inhibitors) are displayed as shown in the following figure.
Resolve the issues that are reported in the pre-upgrade report.
Analyze the pre-upgrade check report in the
/var/log/leapp/leapp-report.txt
file. Resolve all reported issues by following the remediation suggestions that are provided by the Leapp utility. The following section describes several common issues that are reported in pre-upgrade check reports and how to resolve the issues:
Run the following command to upgrade from RHEL 7 to RHEL 8:
leapp upgrade --no-rhsm --target 8.8
The following command output indicates that the upgrade is complete.
Run the following command to restart the instance:
reboot
Check the post-upgrade status of the RHEL 8 operating system.
Check the upgrade logs or report.
In the RHEL 8 operating system, you can view the upgrade logs in the
/var/log/leapp/leapp-upgrade.txt
file or the upgrade report in the/var/log/leapp/leapp-report.txt
file for the details of the upgrade process.The following log information indicates that specific software packages may fail to be installed or upgraded. You can manually install the software packages after the upgrade.
Risk Factor: high Title: Packages from unknown repositories may not be installed Summary: 3 packages may not be installed or upgraded due to repositories unknown to leapp: - python3-pyxattr (repoid: rhel8-CRB) - rpcgen (repoid: rhel8-CRB) - ustr (repoid: rhel8-CRB) Remediation: [hint] In case the listed repositories are mirrors of official repositories for RHEL (provided by Red Hat on CDN) and their repositories IDs has been customized, you can change the configuration to use the official IDs instead of fixing the problem. You can also review the projected DNF upgrade transaction result in the logs to see what is going to happen, as this does not necessarily mean that the listed packages will not be upgraded. You can also install any missing packages after the in-place upgrade manually.
The following log information indicates that specific RHEL 7 packages are not upgraded. You can remove the packages to retain the operating system in the supported status.
Risk Factor: high Title: Some RHEL 7 packages have not been upgraded Summary: Following RHEL 7 packages have not been upgraded: leapp-upgrade-el7toel8-0.18.0-1.el7_9 kernel-3.10.0-1160.92.1.el7 leapp-rhui-alibaba-1.0.0-1.el7_9 Please remove these packages to keep your system in supported state.
Run the
yum remove leapp-upgrade-el7toel8-0.18.0-1.el7_9 kernel-3.10.0-1160.92.1.el7 leapp-rhui-alibaba-1.0.0-1.el7_9
command to remove the packages.
Check whether your business runs as expected on RHEL 8.