Bookmark this page

Perform a Pre-conversion Analysis and Convert a Server

Objectives

  • Analyze a server to identify and remediate any issues that might cause problems with conversion, and then convert it to Red Hat Enterprise Linux.

Converting a System with Convert2RHEL Registration

The Convert2RHEL tool supports different conversion methods depending on your system configuration. The method that is discussed in this lecture converts CentOS 7 systems that are not registered to Red Hat CDN or to a Red Hat Satellite Server. This method delegates the system registration process to Convert2RHEL and uses an activation key that is associated with CentOS Linux and RHEL repositories.

Perform a Pre-conversion Analysis

Before you attempt to convert a server from another Linux distribution to Red Hat Enterprise Linux, perform a pre-conversion analysis by running the convert2rhel analyze command. The convert2rhel analyze command runs tests to detect potential problems with the conversion process, and then the command outputs a report that suggests remediations for those problems. The results of the report can help you to determine whether to convert a particular server to Red Hat Enterprise Linux, and can help you prepare that server for conversion.

After you run the convert2rhel analyze command, the command notifies you that it sends some telemetry data about your server to Red Hat by default. The command prompts you to indicate whether it should continue to run and send that data, or whether it should immediately exit. You can opt out of this data collection by setting the CONVERT2RHEL_DISABLE_TELEMETRY environment variable to 1 in the shell that you use to run the convert2rhel analyze command.

The output from the convert2rhel analyze command is similar to the following example:

[2024-01-15T16:32:09+0000] TASK - [Prepare: Inform about telemetry] **********************************
The convert2rhel utility uploads the following data about the system conversion to Red Hat servers for the purpose of the utility usage analysis:
- The Convert2RHEL command as executed
- The Convert2RHEL RPM version and GPG signature
- Success or failure status of the conversion
- Conversion start and end timestamps
- Source OS vendor and version
- Target RHEL version
- Convert2RHEL related environment variables

To disable the data collection, use the 'CONVERT2RHEL_DISABLE_TELEMETRY=1' environment variable.

Continue with the system conversion? [y/n]:

If you agree to continue, then the convert2rhel analyze command runs a series of tests. This operation does not actually convert your server, but it does make some temporary changes to the server as the command analyzes the system.

Registering Your System for Conversion

To convert a system to Red Hat Enterprise Linux, you must provide access to RHEL repositories by registering the system. You can register the system to Red Hat Content Distribution Network (CDN) or to Red Hat Satellite. You can manually register the system before the conversion or you can delegate the registration task to Convert2RHEL.

Manually registering the system

There might be scenarios where your systems are already registered to Red Hat Satellite. You might also choose to manually register the system to perform a conversion on an environment that is disconnected from the internet. In these cases, you must provide the organization ID and the activation key that are associated with the RHEL repositories during the conversion.

Delegating the registration to Convert2RHEL

The Convert2RHEL tool can register your system to either Red Hat CDN or to Red Hat Satellite. To register the system to a local Satellite Server, place the Katello package in the /usr/share/convert2rhel/subscription-manager/ directory on the Satellite Server. If the Convert2RHEL cannot locate the Katello package, then the tool assumes that the system must be registered to Red Hat CDN.

This temporary registration enables the command to download RHEL packages and to test the RPM package transaction, which are required actions to convert your system. This registration occurs during the analysis process and this action is reverted if you do not continue with the conversion.

Regardless of the registration method that you use, you can provide the authentication information in the /etc/convert2rhel.ini file or on the command line. The /etc/convert2rhel.ini file is created during the convert2rhel package installation.

The following example shows the default contents of the /etc/convert2rhel.ini file.

[root@servera ~]# cat /etc/convert2rhel.ini
...output omitted...
[subscription_manager]
# username       = <insert_username>
# password       = <insert_password>
# activation_key = <insert_activation_key>
# org            = <insert_org>

You can provide the information for your Red Hat CDN account or your Satellite Server.

Note

For more information about providing registration information on the command line, use the --help option for the convert2rhel command.

Repository Configuration

When you register the system to Red Hat CDN, the Convert2RHEL tool automatically enables and disables the required repositories during the analysis and conversion process.

When you configure the Convert2RHEL tool to register the system to Red Hat Satellite, you can provide an activation key that is associated with a content view that includes the CentOS Linux and RHEL repositories. For example, for the conversion of a CentOS Linux 7 system, make sure to include the CentOS 7 Base, CentOS 7 Updates, and the Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server repositories.

Red Hat recommends that you create an activation key exclusively for the conversion process.

Pre-conversion Report

After completing the analysis, the convert2rhel analyze command undoes the changes that it made to your server and prepares a pre-conversion report so that you can review the status and details for each completed test. Tests that are not successful contain an explanation of the problem, a diagnosis of its most likely cause, and a recommended fix or remediation (if applicable).

There are several possible statuses for each test.

Success

The test was successful and there are no issues.

Error

The test found an issue that would cause the conversion to fail; the issue must be resolved or manually overridden before you convert the server.

Warning

The test found an issue that might cause system and application issues after the conversion, but the issue does not cause the conversion to fail.

Skip

The test was skipped because of an error involving a preceding test; this status could cause the conversion to fail.

Info

Purely informational messages that have no expected impact on the system and applications after conversion.

A successful report with Info messages looks similar to the following example:

[2024-01-15T16:41:06+0000] TASK - [Pre-conversion analysis report] ***********************************

========== Success (No changes needed) ==========
(SUCCESS) CHECK_FIREWALLD_AVAILABILITY::SUCCESS - N/A
(SUCCESS) IS_LOADED_KERNEL_LATEST::SUCCESS - N/A
(SUCCESS) CUSTOM_REPOSITORIES_ARE_VALID::SUCCESS - N/A
(SUCCESS) VALIDATE_PACKAGE_MANAGER_TRANSACTION::SUCCESS - N/A
(SUCCESS) REMOVE_EXCLUDED_PACKAGES::SUCCESS - N/A
(SUCCESS) READ_ONLY_MOUNTS_MNT::SUCCESS - N/A
(SUCCESS) SUBSCRIBE_SYSTEM::SUCCESS - N/A
(SUCCESS) PRE_SUBSCRIPTION::SUCCESS - N/A
(SUCCESS) EFI::SUCCESS - N/A
(SUCCESS) READ_ONLY_MOUNTS_SYS::SUCCESS - N/A
(SUCCESS) BACKUP_REPOSITORY::SUCCESS - N/A
(SUCCESS) BACKUP_REDHAT_RELEASE::SUCCESS - N/A
(SUCCESS) PACKAGE_UPDATES::SUCCESS - N/A
(SUCCESS) REMOVE_REPOSITORY_FILES_PACKAGES::SUCCESS - N/A
(SUCCESS) LIST_THIRD_PARTY_PACKAGES::SUCCESS - N/A
(SUCCESS) EUS_SYSTEM_CHECK::SUCCESS - N/A
(SUCCESS) REMOVE_IWLAX2XX_FIRMWARE::SUCCESS - N/A
(SUCCESS) BACKUP_PACKAGE_FILES::SUCCESS - N/A
(SUCCESS) RHEL_COMPATIBLE_KERNEL::SUCCESS - N/A
(SUCCESS) TAINTED_KMODS::SUCCESS - N/A
(SUCCESS) DBUS_IS_RUNNING::SUCCESS - N/A
(SUCCESS) ENSURE_KERNEL_MODULES_COMPATIBILITY::SUCCESS - N/A
(SUCCESS) INSTALL_RED_HAT_GPG_KEY::SUCCESS - N/A
(SUCCESS) INSTALL_RED_HAT_CERT_FOR_YUM::SUCCESS - N/A
(SUCCESS) CONVERT2RHEL_LATEST_VERSION::SUCCESS - N/A

========== Info (No changes needed) ==========
(INFO) REMOVE_REPOSITORY_FILES_PACKAGES::REPOSITORY_FILE_PACKAGES_REMOVED -
    Repository file packages to be removed
     Description: We have identified installed packages that match a pre-defined
list of packages that are to be removed during the conversion
     Diagnosis: The following packages will be removed during the conversion:
centos-release-7-9.2009.1.el7.centos.x86_64
     Remediation: N/A
(INFO) REMOVE_EXCLUDED_PACKAGES::EXCLUDED_PACKAGES_REMOVED - Excluded packages
    to be removed
     Description: We have identified installed packages that match a pre-defined
list of packages that are to be removed during the conversion
     Diagnosis: The following packages will be removed during the conversion:
centos-logos-70.0.6-3.el7.centos.noarch
     Remediation: N/A

A Warning message looks similar to the following example:

========== Warning (Review and fix if needed) ==========

(WARNING) PACKAGE_UPDATES::PACKAGE_NOT_UP_TO_DATE_MESSAGE - Outdated packages detected
     Description: Please refer to the diagnosis for further information
     Diagnosis: The system has 4 package(s) not updated based on the enabled system repositories.
    List of packages to update: openssh-server openssh openssh-clients.

    Not updating the packages may cause the conversion to fail.
    Consider updating the packages before proceeding with the conversion.
     Remediation: [No further information given]

Important

The pre-conversion analysis report might not identify every potential problem that your system could experience during the conversion process. You might still find issues with conversion even after following the recommendations of the pre-conversion analysis report. However, the report does identify many known issues, which helps to reduce the risk of an unsuccessful conversion.

Before continuing, resolve all error messages. Additionally, review any warnings and skipped tests to determine whether they could affect the conversion process. If you are unsure, then record the warning or skipped test so that you can investigate further in the event of a failed conversion.

Convert to Red Hat Enterprise Linux

After reviewing the results of your pre-conversion analysis and resolving any reported issues, you are ready to convert the operating system.

To start the conversion, run the convert2rhel command. If you have not set the CONVERT2RHEL_DISABLE_TELEMETRY environment variable, then you are asked whether you want to continue with the conversion.

Important

If you plan to use environment variables to modify the behavior of the Convert2RHEL tool, then define the environment variables to be persistent across reboots. The conversion process reboots the system and Convert2RHEL might fail the operation if the tool cannot find the variable. You can define persistent environment variables in the /root/.bashrc file or an equivalent file.

If you continue with the conversion, then the conversion process repeats a number of the pre-conversion tests to ensure that no new problems are reported. The convert2rhel command registers the system again, and the RHEL software repositories are enabled. Then the command downloads RHEL packages and verifies the RPM package transaction.

After validating the package transaction, the command displays a warning message on the terminal:

[2024-01-15T18:02:11+0000] TASK - [Pre-conversion analysis report] ***********************************
No problems detected during the analysis!

WARNING - ********************************************************
WARNING - The tool allows rollback of any action until this point.
WARNING - By continuing all further changes on the system will need to be reverted manually by the user, if necessary.
WARNING - ********************************************************

Continue with the system conversion? [y/n]:

Before this point, the conversion can be safely stopped and rolled back. However, after you agree to continue with the system conversion at this prompt, the convert2rhel command makes permanent changes to the system that it cannot automatically undo.

Warning

Changes made after this point in the conversion process might be difficult or impossible to undo. Be certain that you are ready to perform the conversion before continuing.

After you consent to continue the system conversion, RHEL packages replace the existing system packages. The conversion is likely to require some time to complete, depending on exactly which and how many software packages are installed on your server.

A number of known issues, limitations, and workarounds that you might require during the conversion process are documented in the Known Issues and Limitations section of the Converting from an RPM-based Linux Distribution to RHEL guide.

Reboot the Converted Server

After the conversion completes successfully, the output ends with this message:

Conversion successful!

WARNING - In order to boot the RHEL kernel, restart of the system is needed.

Now you must reboot your converted system to start running the RHEL kernel in place of the original one. Validating the conversion and dealing with post-conversion issues are covered in a later section of this course.

Revision: rh174-7.9-0acf85c