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 Hub, Oracle Autonomous Linux, or 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.
    3. From the Resources section, click OS Management.
      • If the Oracle OS Management description specifies "No OS management information is available for this resource," then the instance isn't managed by the OS Management Service, Oracle Autonomous Linux, or by the OS Management Hub.
      • If the description provides information about the instance, then the instance is managed by OS Management Service, Oracle Autonomous Linux, or OS Management Hub.

      Note:

      An instance might be registered with OS Management Hub but with a stopped osmh-agent. In this scenario, do one of the following:
      • If you want the instance to be upgraded with OS Management Hub, enable the appropriate agent.

        Note:

        If you are upgrading with Oracle Autonomous Linux, you must enable OS Management Hub. If Oracle Autonomous Linux is managed by OS Management Service, you must migrate the system to OS Management Hub before proceding with the upgrade. For more information about migrating to OS Management Hub from OS Management Service, see https://docs.oracle.com/iaas/os-management/osms/osms-migration-osmh.htm.
      • If you don't want to upgrade the instance with OS Management Hub, then unregister the instance. For more information, see https://docs.oracle.com/en-us/iaas/osmh/doc/home.htm.

        Ensure the /etc/yum/pluginconf.d/osmh_msg.conf plugin is disabled on the instance after you unregister it. For example, the following shows the plugin is disabled:
        [main]
         enabled=0
        If enabled=1, edit the file and set enabled=0. If you choose to unregister the instance or previously unregistered the instance, an inhibitor is generated when you run the preupgrade procedure that requires you to confirm this choice.
  3. Do one of the following:

    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