Upgrading SAP environments from RHEL 8 to RHEL 9

Red Hat Enterprise Linux for SAP Solutions 9

Red Hat Customer Content Services

Abstract

This document provides instructions on how to perform an in-place upgrade of SAP environments from Red Hat Enterprise Linux 8 to Red Hat Enterprise Linux 9 using the Leapp utility. During the in-place upgrade, the existing RHEL 8 operating system is replaced by a RHEL 9 version.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code and documentation. We are beginning with these four terms: master, slave, blacklist, and whitelist. Due to the enormity of this endeavor, these changes will be gradually implemented over upcoming releases. For more details on making our language more inclusive, see our CTO Chris Wright’s message.

Providing feedback on Red Hat documentation

We appreciate your feedback on our documentation. Let us know how we can improve it.

Submitting feedback through Jira (account required)

  1. Make sure you are logged in to the Jira website.
  2. Provide feedback by clicking on this link.
  3. Enter a descriptive title in the Summary field.
  4. Enter your suggestion for improvement in the Description field. Include links to the relevant parts of the documentation.
  5. If you want to be notified about future updates, please make sure you are assigned as Reporter.
  6. Click Create at the bottom of the dialogue.

Chapter 1. Supported upgrade paths

Currently, it is possible to perform an in-place upgrade from RHEL 8 to the following target RHEL 9 minor versions:

System configuration

Source OS version

Target OS version

SAP HANA

RHEL 8.8

RHEL 9.2

RHEL 8.10

RHEL 9.4

SAP NetWeaver and other SAP Applications

RHEL 8.8

RHEL 9.2

RHEL 8.10

RHEL 9.4

SAP HANA is validated by SAP for RHEL minor versions that receive package updates for more than 6 months. Currently, the supported in-place paths of an SAP HANA system are from RHEL 8.8 to RHEL 9.2 and from RHEL 8.10 to RHEL 9.4. The rest of this document describes restrictions and detailed steps for upgrading an SAP HANA system.

SAP NetWeaver is validated by SAP for each major RHEL version. The supported in-place upgrade paths for this scenario are the two latest EUS/E4S releases which are supported by Leapp for non-HANA systems as per the Upgrading from RHEL 8 to RHEL 9 document. Certain deviations from the default upgrade procedure are described in Section 4. Upgrading an SAP NetWeaver system. For systems on which both SAP HANA and SAP NetWeaver are installed, the SAP HANA restrictions apply.

Please refer to the topic Planning an upgrade to RHEL 9 for more details on limitations.

Note

For cloud providers (AWS, Azure, and GCP), PAYG VMs on RHUI, and for both options, RHEL for SAP HA and US and RHEL for SAP Applications, there is a known bug in upgrading from 8.10 to 9.4 due to a RHUI client rpm name difference in 8.10 compared to previous releases. The upgrade is not possible at the moment, and there is no workaround. The upgrade from 8.8 to 9.2 is not impacted.

Chapter 2. Planning an upgrade

An in-place upgrade is the recommended and supported way to upgrade your SAP HANA system to the next major version of RHEL.
You should consider the following before upgrading to RHEL 9:

  • Operating system:

    • SAP HANA is installed with a version which is supported on both the source and target RHEL minor versions.
    • SAP HANA is installed using the default installation path of /hana/shared.
  • Public clouds:

    • The in-place upgrade is supported for on-demand Pay-As-You-Go (PAYG) instances on Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform with Red Hat Update Infrastructure (RHUI). The in-place upgrade is also supported for Bring Your Own Subscription instances on all public clouds that use Red Hat Subscription Manager (RHSM) for a RHEL subscription.
  • Additional Information:

    • SAP HANA hosts must meet all of the following criteria:

      • Running with e4s repos enabled
      • Running on x86_64 or ppc64le architecture that is certified by the hardware partner or CCSP for SAP HANA on the source and target OS versions
      • Running on physical infrastructure or in a virtual environment
      • Not using Red Hat HA Solutions for SAP HANA
      • Using the Red Hat Enterprise Linux for SAP Solutions subscription
    • SAP NetWeaver hosts must meet the following criteria:

      • Using the Red Hat Enterprise Linux for SAP Solutions or Red Hat Enterprise Linux for SAP Applications subscription

Chapter 3. Upgrading an SAP HANA System

An in-place upgrade allows you to upgrade a RHEL system to the subsequent major release of RHEL. This can be done by replacing the existing operating system without removing applications.

The in-place upgrade of RHEL 8 with SAP HANA can currently be performed from RHEL 8.8 to RHEL 9.2 and from RHEL 8.10 to RHEL 9.4, on x86_64 and ppc64le, and taking into account all the other restrictions as mentioned in the Environment section at the top of this document. An SAP HANA system running on earlier OS versions must be updated to the source OS version first, for example RHEL 8.2 to RHEL 8.8 or RHEL 8.10, as described in the topic 3.1. Step 1: Preparing for the upgrade.

If the installed SAP HANA version is not on the minimum revision which is supported on both the source and target RHEL minor versions, your SAP HANA software must be upgraded to this level first. SAP HANA must have been installed using /hana/shared as the installation path.

You must not perform more than one update or upgrade (e.g. HANA to 2.0 SPS05 rev 59.06 and RHEL from 8.8 to 9.2), without testing and verifying after each step. This will simplify troubleshooting in case of any errors.

Prepare for the verification of your SAP HANA system so that you can quickly check and confirm if your SAP HANA system is fully operational again after the upgrade to RHEL 9. This should include both functional and performance testing of your most important business transactions.

As always on production systems, run all the steps below, including the preparation and pre-upgrade steps, on a test system first to verify that the upgrade can be performed successfully in your environment.

3.1. Step 1: Preparing for the upgrade

Important

At any time before you perform the actual in-place upgrade, create a full system backup or virtual machine snapshot and perform a restore test to ensure that you can get back to a working system quickly.

The instructions in this chapter correspond to the topic Preparing for the upgrade (Upgrading from RHEL 8 to RHEL 9 guide).

To prepare the system, complete the following steps.

Prerequisites

  • Ensure that your system has access to required repositories and complete system-specific setup.

Procedure

  1. Complete system-specific setup.

    1. Prepare non-cloud or BYOS cloud systems by executing the following steps:

      1. If you previously performed an in-place upgrade from RHEL 7 to RHEL 8, remove the /root/tmp_leapp_py3 directory if it is present on your system:

        # rm -rf /root/tmp_leapp_py3
      2. Register and subscribe the system to a Red Hat repository source. If you are using Red Hat Satellite, make sure that both RHEL 8 and RHEL 9 e4s repositories are available and synchronized with the latest updates. Enable the following repos for the activation key:

        rhel-8-for-x86_64-baseos-e4s-rpms
        rhel-8-for-x86_64-appstream-e4s-rpms
        rhel-8-for-x86_64-sap-netweaver-e4s-rpms
        rhel-8-for-x86_64-sap-solutions-e4s-rpms
        rhel-9-for-x86_64-baseos-e4s-rpms
        rhel-9-for-x86_64-appstream-e4s-rpms
        rhel-9-for-x86_64-sap-netweaver-e4s-rpms
        rhel-9-for-x86_64-sap-solutions-e4s-rpms
      3. Check and confirm that your RHEL 8 system has the e4s repositories enabled:

        # subscription-manager repos --disable='*' \
        --enable="rhel-8-for-x86_64-baseos-e4s-rpms" \
        --enable="rhel-8-for-x86_64-appstream-e4s-rpms" \
        --enable="rhel-8-for-x86_64-sap-solutions-e4s-rpms" \
        --enable="rhel-8-for-x86_64-sap-netweaver-e4s-rpms"
      4. Remove all files cached by yum/dnf:

        # rm -rf /var/cache/yum
      5. Make sure that the RHEL release lock is set to the desired source OS version, for example, 8.6:

        # subscription-manager release --set=8.6
        Release set to: 8.6
    2. Make sure that the RHEL release lock is set to the desired source OS version, for example 8.6, on PAYG cloud instances on AWS, Microsoft Azure or Google Cloud:

      # rhui-set-release --set 8.6

      If rhui-set-release is not available on your cloud provider, run:

      # echo 8.6 > /etc/yum/vars/releasever
    3. Prepare PAYG cloud instances on AWS by installing the leapp-rhui-aws-sap-e4s package, which provides RHEL 9 e4s repositories to your AWS cloud instance:

      # dnf install leapp-rhui-aws-sap-e4s
    4. Prepare PAYG cloud instances on Google Cloud by downloading and installing the leapp-rhui-google-v1-rhel8-sap package, which provides RHEL 9 e4s repositories to your Google cloud instance, as instructed in Leapp RHUI packages for Google Cloud Platform (GCP).
    5. Prepare PAYG cloud instances on Microsoft Azure by installing the leapp-rhui-azure-sap package, which provides RHEL 8 e4s repositories to your Microsoft Azure cloud instance:

      dnf install leapp-rhui-azure-sap
  2. After completing the above steps, perform the remaining steps on all systems, no matter if your system is a non-cloud, BYOS cloud, or PAYG cloud system on AWS, Google Cloud or Microsoft Azure.

    1. Stop the SAP HANA system(s) and stop all SAP processes.

      Important

      Do not unmount the SAP HANA file systems, as these are required for detecting if SAP HANA is installed and the version of the installed system.

    2. If your system is configured to start SAP processes automatically at boot time, disable the automatic start of SAP processes.
    3. Verify that the RHEL settings for SAP HANA are in place by checking the following:

      1. As per SAP note 2772999, the following parameter is required for SAP applications including SAP HANA and is typically set in file /etc/sysctl.d/sap.conf:

        vm.max_map_count = 2147483647

        The same setting is required for SAP applications including SAP HANA on RHEL 9.
        The file /etc/sysctl.d/sap.conf might also contain:

        kernel.pid_max = 4194304
      2. All other settings for SAP HANA (in file /etc/sysctl.conf and /etc/sysctl.d/sap_hana.conf) are identical for RHEL 8 and RHEL 9 and must be left in place. For more details refer to SAP Notes 2382421.
    4. Update your RHEL 8.* system to the desired source OS version package levels:

      # dnf update
    5. Reboot the system:

      # reboot
    6. After the system is up and running, check and confirm that no SAP HANA systems and no SAP processes are running on the system.
    7. Make sure the SAP HANA file systems are available.
    8. Install the leapp utility:

      # dnf install leapp-upgrade
    9. Temporarily disable any antivirus software.
    10. Ensure there is no configuration management system (such as Salt, Chef, Puppet, Ansible) enabled or configured to attempt to restore the original RHEL 8 system.
    11. Ensure your system does not use any Network Interface Card (NIC) with a name based on the prefix 'eth'. Refer to this KB article for more information.
    12. If your NSS (Network Security Services) database was created in RHEL 7 or earlier, verify that the database has been converted from the DBM database format to SQLite. For more information, see Updating NSS databases from DBM to SQLite.
    13. RHEL 9 does not support the legacy network-scripts package that was deprecated in RHEL 8. Before you upgrade, move your custom network scripts and write a NetworkManager dispatcher script that executes your existing custom scripts. For more information, see Migrating custom network scripts to NetworkManager dispatcher scripts.
    14. Make sure that you have a full backup or a virtual machine snapshot of your system.
    15. If not done already, perform a restore test of the backup to another system, to make sure that the backup can be used for a successful restore. A restore test is also useful for getting used to the required restore activities so that you can get a working system back as quickly as possible if necessary.

3.2. Step 2: Reviewing the pre-upgrade report

Start the pre-upgrade process by running leapp preupgrade to collect data, assess the system upgradability, and generate a pre-upgrade report for determining if the system can be upgraded. No changes are made to the system, and you can repeat this step as often as necessary until no more inhibitors are reported.

Note

The instructions in this chapter correspond to the topic chapter 4 - Reviewing the pre-upgrade report (Upgrading from RHEL 8 to RHEL 9 guide).

The pre-upgrade process (the leapp preupgrade command) assesses your system for any potential problems you might encounter with the RHEL 8 to RHEL 9 upgrade before any changes to your system are made. This will help you determine your chances of successfully upgrading to RHEL 9 before the actual upgrade process begins.

Note

You can (and should) run the leapp preupgrade command multiple times if necessary to address anything that could cause problems before running the actual upgrade. The leapp preupgrade command will not perform any change to your installed system. However, once you perform an in-place upgrade on your system, the only way to get the previous system back is from a backup or snapshot which has been performed before the upgrade.

Procedure

  1. Perform the pre-upgrade assessment:

    • On a non-cloud or BYOS cloud system, run:

      # leapp preupgrade --channel e4s
    • On a PAYG cloud instance on AWS, Google Cloud or Microsoft Azure, run:

      # leapp preupgrade --no-rhsm --channel e4s
  2. If any inhibitors are reported, the output file /var/log/leapp/leapp-report.txt contains all necessary information, including remediation steps, to avoid these inhibitors.
  3. Manually resolve all the reported problems before proceeding with the in-place upgrade. As mentioned before, you can repeat this step as often as necessary until no more inhibitors are reported.

3.3. Step 3: Performing the upgrade

Start the upgrade process by running leapp upgrade.

Note

The instructions in this chapter correspond to the topic chapter 5 - Performing the upgrade.

With the Preupgrade Assistant assessment completed and all issues addressed, the next step is to perform the actual system upgrade.
Perform the following steps:

Procedure

  1. Before performing the upgrade, back up all of your data to avoid potential data loss if you have not done so already.
  2. Perform a restore test to verify that the last backup was successful.
  3. Check and confirm again that no SAP HANA system and no SAP processes are running on the system.
  4. Check and confirm that the SAP HANA file systems are mounted, as a certain file located below this path is used by Leapp to detect the SAP HANA version when upgrading to RHEL 9.
  5. Check and confirm that your SAP HANA system will not be started automatically at boot time. For more information, please refer to SAP note 2315907 - Starting HANA automatically after Host has been started.
  6. Run the upgrade process:

    • On a non-cloud or BYOS cloud system, run:

      # leapp upgrade --channel e4s
    • On a PAYG cloud instance on AWS, Google Cloud or Microsoft Azure, run

      # leapp upgrade --no-rhsm --channel e4s
  7. After the completion of this command, a message appears which asks you to reboot the system. Reboot the system now so that it can finish the upgrade:

    # reboot
  8. The system boots into a RHEL 9-based initial RAM disk image (initramfs), upgrades all packages, and reboots again. This might take some time. Once all packages have been upgraded, the system automatically reboots into the RHEL 9 system.

3.4. Step 4: Verifying the post-upgrade state

Verify that the upgrade was successful.

Note

The instructions in this chapter correspond to the topic Chapter 6. Verifying the post-upgrade state (Upgrading from RHEL 8 to RHEL 9 guide).

Perform the following steps:

Procedure

  1. Verify that the current OS version is Red Hat Enterprise Linux 9. For example, for the upgrade from RHEL 8.8 to RHEL 9.2:

    # cat /etc/redhat-release
    Red Hat Enterprise Linux release 9.2 (Plow)
  2. Verify that the RHEL release lock is set to the desired target OS version. For example, for the upgrade from RHEL 8.8 to RHEL 9.2:

    • On a non-cloud or BYOS cloud system:

      Make sure that the RHEL release lock is set to 9.2 and that all lines in /etc/yum.repos.d/redhat.repo starting with baseurl contain the string rhel9/9.2(and not for example rhel9/8.8), in the URL field. Run:

      # subscription-manager release --set=9.2
      Release set to: 9.2
    • On a PAYG cloud instance on AWS, Google Cloud or Azure, run:

      # cat /etc/dnf/vars/releasever
      9.2
  3. Verify that the system has all necessary repos enabled:

    # dnf repolist
    • On a non-cloud or BYOS cloud system, the output should contain:

      rhel-9-for-x86_64-appstream-e4s-rpms
      rhel-9-for-x86_64-baseos-e4s-rpms
      rhel-9-for-x86_64-sap-netweaver-e4s-rpms
      rhel-9-for-x86_64-sap-solutions-e4s-rpms

      Disable all normal (=non-e4s) repos. Run the following command:

      # subscription-manager repos \
      --disable="*" \
      --enable="rhel-9-for-x86_64-baseos-e4s-rpms" \
      --enable="rhel-9-for-x86_64-appstream-e4s-rpms" \
      --enable="rhel-9-for-x86_64-sap-solutions-e4s-rpms" \
      --enable="rhel-9-for-x86_64-sap-netweaver-e4s-rpms"+*
    • On a PAYG cloud instance on AWS, the output should contain:

      rhel-9-for-x86_64-appstream-e4s-rhui-rpms
      rhel-9-for-x86_64-baseos-e4s-rhui-rpms
      rhel-9-for-x86_64-highavailability-e4s-rhui-rpms
      rhel-9-for-x86_64-sap-netweaver-e4s-rhui-rpms
      rhel-9-for-x86_64-sap-solutions-e4s-rhui-rpms
      rhui-client-config-server-9-sap-bundle
    • On a PAYG cloud instance on Google Cloud, the output should contain:

      google-cloud-sdk
      google-compute-engine
      rhui-rhel-9-for-x86_64-appstream-e4s-rhui-rpms
      rhui-rhel-9-for-x86_64-baseos-e4s-rhui-rpms
      rhui-rhel-9-for-x86_64-highavailability-e4s-rhui-rpms
      rhui-rhel-9-for-x86_64-sap-netweaver-e4s-rhui-rpms
      rhui-rhel-9-for-x86_64-sap-solutions-e4s-rhui-rpms
    • On a PAYG cloud instance on Microsoft Azure, the output should contain:

      rhel-9-for-x86_64-appstream-e4s-rhui-rpms
      rhel-9-for-x86_64-baseos-e4s-rhui-rpms
      rhel-9-for-x86_64-highavailability-e4s-rhui-rpms
      rhel-9-for-x86_64-sap-netweaver-e4s-rhui-rpms
      rhel-9-for-x86_64-sap-solutions-e4s-rhui-rpms
      rhui-microsoft-azure-rhel9-sap-ha
  4. Verify that network services are operational. For example, try to connect to the system using ssh.

3.5. Step 5: Performing post-upgrade tasks

Perform additional steps after you have verified the upgrade. Follow the instructions in Chapter 7. Performing post-upgrade tasks on the RHEL 9 system (Upgrading from RHEL 8 to RHEL 9 guide).

3.6. Step 6: Configuring the system for SAP HANA

Configure your upgraded system according to applicable SAP notes for SAP HANA on RHEL 9.

After you have verified that the upgrade was successful, you must configure the system for SAP HANA according to the applicable SAP notes for RHEL 9.

Procedure

  1. If you had configured your RHEL 8.6 system for SAP HANA using the RHEL System Roles for SAP (package rhel-system-roles-sap, roles sap_general_preconfigure and sap_hana_preconfigure) and if you have not done any additional modification to your system configuration afterwards, you can configure your system with the RHEL System Roles for SAP again.
  2. In case you want or need to configure your system manually, the following steps will be required:

    1. Confirm that the Server environment group is installed:

      # dnf group list installed server+*+
      [...]
      Installed Environment Groups:
         Server
    2. Verify that the packages chkconfig and compat-openssl11 are installed:

      # dnf list installed chkconfig compat-openssl11
      [...]
      Installed Packages
      chkconfig.x86_64          1.20-2.el9         @System
      compat-openssl11.x86_64   1:1.1.1k-4.el9_0   @rhel-9-for-x86_64-appstream-e4s-rpms

      Install any of the above packages if necessary.

      Note

      Package compat-openssl11 is only required for SAP HANA scale-out installations.

    3. Verify that the service abrt-ccpp is nonexistent or disabled:

      # systemctl status abrt-ccpp
      Unit abrt-ccpp.service could not be found.

      If it exists and is not disabled, disable it:

      # systemctl disable abrt-ccpp --now

      After modifying your system configuration as described, reboot your system.

      Note

      For verifying that your system is configured according to the applicable SAP notes, you can run RHEL system roles sap_general_preconfigure and sap_hana_preconfigure in assert mode.

  3. Verify that your system is running with the RHEL kernel version certified for the desired OS target version, as required in SAP note 3108302.

    # uname -r
    5.14.0-70.36.1.el9_0.x86_64

3.7. Step 7: Applying security policies

Apply any necessary security policies.

If your RHEL 8 system had certain security policies configured, you should apply these or similar security policies again after the upgrade. A RHEL 8 system with SELinux set to disabled will remain on this status after the upgrade to RHEL 9. A RHEL 8 system with SELinux set to enforcing will be set to permissive during the upgrade and you have to manually change it to enforcing after the upgrade.

For these topics, refer to the topic chapter 8 - Applying security policies (Upgrading from RHEL 8 to RHEL 9 guide).

3.8. Step 8: Verifying your SAP HANA system

Verify that your SAP HANA system is operational again.

After you have configured your RHEL 9.2 system for SAP HANA, you can start your SAP HANA software and run any necessary verification steps to ensure that your SAP HANA system is fully operational again. As mentioned before, this should include functional as well as performance testing of your most important business transactions.

Chapter 4. Upgrading an SAP NetWeaver system

4.1. Upgrading an SAP NetWeaver Non-Cloud or BYOS Cloud RHEL system

Follow the Upgrading from RHEL 8 to RHEL 9 guide to upgrade your SAP NetWeaver non-cloud or BYOS cloud RHEL 8.* system to RHEL 9.*.

At the end of chapter Chapter 6. Verifying the post-upgrade state, verify that only the normal, eus, or e4s repositories are enabled and the RHEL release lock is set to 9.X, where X is a desired minor release.

4.2. Upgrading an SAP NetWeaver Cloud PAYG RHEL system

The upgrade of SAP NetWeaver or other SAP application systems hosted on cloud provider PAYG instances is very similar to the upgrade of SAP HANA systems hosted on cloud provider PAYG instances. All non-HANA specific steps listed earlier in the SAP HANA systems upgrade on cloud provider PAYG instances procedure should be applied to complete the upgrade of SAP NetWeaver or other SAP application systems hosted on cloud provider PAYG instances.

The only difference is the repo channel for standalone SAP NetWeaver hosts on Microsoft Azure PAYG instances.

When upgrading standalone NetWeaver or other SAP applications hosts on Microsoft Azure PAYG instances which correspond to RHEL for SAP Applications SKU, use --channel eus instead of --channel e4s. In other cases, --channel e4s is always used. After the upgrade with --channel eus, the system will have the following Red Hat repositories:

# yum repolist
rhel-9-for-x86_64-appstream-eus-rhui-rpms
rhel-9-for-x86_64-baseos-eus-rhui-rpms
rhel-9-for-x86_64-sap-netweaver-eus-rhui-rpms

The repolist may contain other non-Red Hat repositories, namely custom repositories of cloud providers for RHUI configuration.

Note

The current supported upgrade path for SAP NetWeaver and other SAP application systems on all cloud providers are the two latest EUS/E4S releases which are supported by Leapp for non-HANA systems as per the Upgrading from RHEL 8 to RHEL 9 document.

As always, run all the upgrade steps, including the preparation and pre-upgrade steps, on a test system first until you have verified that the upgrade can be performed successfully in your production environment.

Legal Notice

Copyright © 2024 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.