第 3 章 Preparing for the upgrade
To prevent issues after the upgrade and to ensure that your system is ready to be upgraded to the next major version of RHEL, complete all necessary preparation steps before upgrading.
You must perform the preparation steps described in Preparing a RHEL 9 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.
3.1. Preparing a RHEL 9 system for the upgrade 复制链接链接已复制到粘贴板!
Before the in-place upgrade to RHEL 10, you must install upgrade-related files and prepare the system for the upgrade. Skipping these required steps could cause serious issues during the upgrade.
If you do not plan to use Red Hat Subscription Manager (RHSM) during the upgrade process, follow instructions in Performing an in-place upgrade without Red Hat Subscription Manager.
Prerequisites
- The system meets conditions listed in Planning an upgrade.
- If the system has been previously upgraded from RHEL 8 to RHEL 9, ensure that all required post-upgrade steps have been completed. For more information, see Performing post-upgrade tasks in the Upgrading from RHEL 8 to RHEL 9 guide.
- Optional: You have reviewed the best practices in The best practices and recommendations for performing RHEL Upgrade using Leapp Knowledgebase article.
- You have ensured that your system has been successfully registered to the Red Hat Content Delivery Network (CDN) or Red Hat Satellite by using RHSM.
- Satellite-registered systems only: You have completed the steps in Preparing a Satellite system for the upgrade to ensure that your system meets the requirements for the upgrade.
Procedure
-
Optional: Unmount non-system OS file systems that are not required for the upgrade and comment them out from the
/etc/fstabfile. For example, this includes file systems containing only data files unrelated to the system itself. 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. If you are upgrading by using RHSM, verify that the system is registered to an account with Simple Content Access (SCA) enabled:
# 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: DisabledEnsure you have appropriate repositories enabled. The following command enables the Base and AppStream repositories for the 64-bit Intel and AMD architectures; for other architectures, see RHEL 9 repositories.
# subscription-manager repos --enable rhel-9-for-x86_64-baseos-rpms --enable rhel-9-for-x86_64-appstream-rpms注意Optional: Enable the CodeReady Linux Builder (also known as Optional) or Supplementary repositories. For more information about the content of these repositories, see the Package manifest.
Set the system release version to the source OS version, for example:
# subscription-manager release --set <source_os_version>Replace <source_os_version> with the source OS version, for example
9.6.If you are upgrading by using Red Hat Update Infrastructure (RHUI) on a public cloud, set the expected system release version manually:
# rhui-set-release --set 9.7重要If the
rhui-set-releasecommand is not available on your system, you can set the expected system release version by updating the/etc/dnf/vars/releasefile:# echo "9.7" > /etc/dnf/vars/releasever
If you use the
dnf versionlockplugin to lock packages to a specific version, clear the lock by running:# dnf versionlock clearIf you are upgrading by 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:
# dnf config-manager --set-enabled rhui-client-config-server-9 # dnf -y install leapp-rhui-awsFor Microsoft Azure:
# dnf config-manager --set-enabled rhui-microsoft-azure-rhel9 # dnf -y install rhui-azure-rhel8 leapp-rhui-azure- For Google Cloud, follow the Leapp RHUI packages for Google Cloud Knowledgebase article.
Ensure that you have up-to-date
leappandleapp-repositorypackages:-
RHEL 9.6: version
0.19.0of theleapppackage and version0.22.0of theleapp-repositorypackage. RHEL 9.6: version
0.20.0of theleapppackage and version0.23.0of theleapp-repositorypackage.The
leapp-repositorypackage contains theleapp-upgrade-el9toel10RPM package.注意Disconnected systems only:download the following packages from the Red Hat Customer Portal:
-
leapp -
leapp-deps -
python3-leapp -
leapp-upgrade-el9toel10 -
leapp-upgrade-el9toel10-deps leapp-upgrade-el9toel10-fapolicyd-
Include only if you installed the
fapolicydRPM package on your system.
-
Include only if you installed the
-
-
RHEL 9.6: version
Install the
Leapputility:# dnf install leapp-upgradeUpdate all packages to the latest RHEL 9 version and reboot:
# dnf update # reboot-
Optional: Review, remediate, and then remove the
rpmnewandrpmsavefiles. If you use a configuration management system, ensure that it does not interfere with the in-place upgrade process:
-
If your configuration management system has a client-server architecture, such as Puppet, Salt, or Chef, disable the system before running the
leapp preupgradecommand. Do not enable the configuration management system until after the upgrade is complete to prevent issues during the upgrade. If your configuration management system has agentless architecture, do not execute the configuration and deployment file. For example, if your system has Ansible, do not execute an Ansible playbook during the upgrade.
警告Automation of the pre-upgrade and upgrade process by 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.
-
If your configuration management system has a client-server architecture, such as Puppet, Salt, or Chef, disable the system before running the
-
If you are upgrading by using an ISO image, verify that the ISO image contains the target OS version, for example, RHEL 10.0, and is saved to a persistent local mount point to ensure that the
Leapputility can access the image throughout the upgrade process.