2 Preparing for the Upgrade

Complete the steps as applicable to prepare for an upgrade from Oracle Linux 7 to Oracle Linux 8. Unless specified otherwise, all of the procedures for upgrading an Oracle Linux 7 system also apply upgrading an Oracle Linux 7 instance on Oracle Cloud Infrastructure.

  1. Set up a means to connect remotely through a console.

    This document assumes that you're performing a Leapp upgrade remotely. In this case, a console is necessary so you can monitor the progress of the upgrade process, especially as the upgrade performs automatic reboots.

    The following list shows console connection options you can use:

    Note:

    If you connect to the system by using SSH or by using VNC to a VNC service running on the system, you're disconnected during the upgrade process and are unable to log in until the upgrade is completed.

  2. If you are upgrading an Oracle Linux instance on Oracle Cloud Infrastructure, verify if Oracle OS Management Service is running on the instance. Do the following:
    1. From Oracle Cloud Infrastructure, open the navigation menu and click Compute. Under Compute, click Instances.
    2. Select the instance you want to upgrade from Oracle Linux 7 to Oracle Linux 8.
    3. From the Resources section, click OS Management.
      • If the Oracle OS Management Service description specifies "No OS management information is available for this resource," then the instance isn't managed by the OS Management Service.
      • If the description provides other information about the instance, then the instance is managed by the OS Management Service.
  3. Do one of the following:
    • If the instance is managed by Oracle OS Management Service:
      1. From the Resources section, click OS Management.
      2. From the Overview tab, click the horizontal ellipsis (...) and select View OS Management Details.
      3. From the Resources area, select Software Sources.
      4. Verify that the Oracle Linux 8 Application Stream x86_64 or Oracle Linux 8 Application Stream aarch64 Software Source appears.
      5. Click Add and select the checkbox next to Leapp Upgrade Utilities for Oracle Linux 7 Server.
      6. Click Add.
    • If the instance is not managed by Oracle OS Management Service, ensure that the Oracle OS Management Service agent is disabled:
      1. Select the Oracle Cloud Agent tab.
      2. Disable the OS Management Service Agent process if it is enabled.

        This process takes awhile to complete.

      3. After waiting sufficiently, check for osms-agent processes and ensure that none are running. Connect to the process with a terminal, and run the following command:
        ps -ef | grep osms-agent

        For more information, see https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/manage-plugins.htm#disable-one-plugin.

    Note:

    An Oracle Linux system might run the Oracle OS Management Service agent, but might not be managed by the Oracle OS Management Service. For more information about Oracle OS Management Service, see https://docs.oracle.com/iaas/os-management/osms/osms-getstarted.htm.
  4. Perform a backup.

    Always back up a system so that the system can be restored to its former state if the upgrade fails.

    Oracle highly recommends making a full backup of your database, if your instance of Oracle Linux includes a supported database version. For more information, see Upgrading Oracle Linux 7 Systems with Oracle Databases.

    Note:

    For an Oracle Linux 7 instance in Oracle Cloud Infrastructure, perform a boot volume backup. For instructions, see https://docs.oracle.com/iaas/Content/Block/Concepts/bootvolumebackups.htm.

  5. Shut down all production workloads that have been set up to run on the system, as the upgrade is intrusive and requires several reboots.

  6. Disable Secure Boot if it's running.

    To check the status of Secure Boot, choose from one of the following commands:

    • Using bootctl status, for example:

      sudo bootctl status
      ...
      Secure Boot: disabled
      ...
    • Using mokutil --sb-state, for example:

      sudo mokutil --sb-state
      SecureBoot disabled
    If Secure Boot is enabled, you would need to access the system's firmware at boot time to disable the option.

    Note:

    It is not possible to disable Secure Boot if it is already enabled on an Oracle Cloud Infrastructure instance.
  7. If the system has network mounted file systems, unmount them and then insert related entries in the /etc/fstab file inside comment marks.

    See File Systems and Storage Issues.

  8. If the system is behind a proxy, configure the proxy settings in /etc/yum.conf, for example:

    proxy=proxy-url:port

    See Yum Configuration in Oracle Linux 7: Managing Software.

  9. If you installed the yum-plugin-versionlock package, clear any packages with locked versions.

    sudo yum versionlock clear
  10. Obtain the latest Oracle Linux 7 packages.

    sudo yum update -y

    Note:

    After the update is completed, the following message might be displayed:
    warning: /etc/yum.repos.d/oracle-linux-ol7.repo 
    created as /etc/yum.repos.d/oracle-linux-ol7.repo.rpmnew
    This warning appears if an oracle-linux-ol7.repo file already exists before updating the Oracle Linux 7 packages. The update process creates the .rpmnew file to avoid overwriting any customizations that might be in the current file.

    In this case, use the .rpmnew file to guide you in making the necessary modifications to your existing .repo file. Incorporate any new information into your .repo file. The ol7_leappol8_leapp repository description must be listed in your final oracle-linux-ol7.repo file for the upgrade to proceed.

  11. If you're upgrading Oracle Linux 7 KVM hosts, stop all the virtual machines that might be running.

    The command lists the virtual machines. From the list, stop specific virtual machines that are running.

    1. List the available virtual machines.
      sudo virsh list --all
    2. From the list, stop individual virtual machines that are running.
      sudo virsh shutdown vm-name
  12. If the system is registered with ULN or a ULN mirror, unregister the system.

    See the following documentation for this step.

  13. Reboot the system.

    sudo reboot
  14. Ensure that the ol7_leapp and ol7_latest repositories are enabled.

  15. Install the Leapp utility using the following command:

    sudo yum install -y leapp-upgrade