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.
-
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:
-
Oracle Cloud Infrastructure instance: Create a console connection by following the instructions at https://docs.oracle.com/iaas/Content/Compute/References/serialconsole.htm#Instance_Console_Connections.
-
Oracle Linux server: Use Oracle Integrated Lights Out Manager (ILOM). See https://docs.oracle.com/en/servers/management/ilom/index.html.
-
Oracle Private Cloud Appliance: Use the Instance Console Connection. See https://docs.oracle.com/en/engineered-systems/private-cloud-appliance/index.html.
-
Oracle Linux Virtualization Manager or Oracle Linux Kernel based Virtual Machines (KVM): User
virt-viewer
,virt-manager
, or Cockpit Web Console. See Oracle Linux Virtualization Manager documentation.
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.
-
- 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:
- From Oracle Cloud Infrastructure, open the navigation menu and click Compute. Under Compute, click Instances.
- Select the instance you want to upgrade.
- 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:
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:
If[main] enabled=0
enabled=1
, edit the file and setenabled=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.
- Do one of the following:
- If the instance is Oracle Autonomous Linux, or managed by Oracle OS Management Service, or OS Management Hub ensure that Leapp Upgrade Utilities for Oracle Linux 7 Server software source is attached to the instance. For more information about managing data sources using OS Management Service, see https://docs.oracle.com/en-us/iaas/os-management/osms/osms-software-sources.htm. For more information about managing data sources using OS Management Hub, see https://docs.oracle.com/en-us/iaas/osmh/doc/software-sources.htm. For more information about managing data source using Oracle Autonomous Linux, see https://docs.oracle.com/en-us/iaas/autonomous-linux/doc/software-sources.htm.
- If the instance is not managed by Oracle OS Management Service , ensure that the Oracle OS
Management Service agent is disabled:
- Select the Oracle Cloud Agent tab.
- Disable the OS Management Service Agent process if it is
enabled.
This process takes awhile to complete.
- 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. -
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.
-
Shut down all production workloads that have been set up to run on the system, as the upgrade is intrusive and requires several reboots.
-
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. -
-
If the system has network mounted file systems, unmount them, and then insert related entries in the
/etc/fstab
file inside comment marks. -
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.
-
If you installed the
yum-plugin-versionlock
package, clear any packages with locked versions.sudo yum versionlock clear
-
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 anoracle-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. Theol7_leapp
ol8_leapp
repository description must be listed in your finaloracle-linux-ol7.repo
file for the upgrade to proceed. -
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.
- List the available virtual
machines.
sudo virsh list --all
- From the list, stop individual virtual machines that are
running.
sudo virsh shutdown vm-name
- List the available virtual
machines.
-
If the system is registered with ULN or a ULN mirror, unregister the system.
See the following documentation for this step.
-
Removing a System From ULN in Oracle Linux: Unbreakable Linux Network User's Guide for Oracle Linux 6 and Oracle Linux 7
-
Checking Yum Configuration in https://yum.oracle.com/getting-started.html#checking-yum-configuration.
-
-
Reboot the system.
sudo reboot
-
Ensure that the ol7_leapp and ol7_latest repositories are enabled.
-
Install the Leapp utility using the following command:
sudo yum install -y leapp-upgrade