Bookmark this page

Analyze and Convert a Server in a Disconnected Environment

Objectives

  • Review the repository configuration of a pre-registered server, analyze it to identify and remediate any issues that might cause problems with conversion, and then convert it to Red Hat Enterprise Linux.

Converting Systems in a Disconnected Environment

The Convert2RHEL tool registers the system to access software repositories and to prepare RPM package transactions during the analysis phase. In internet-connected environments, Convert2RHEL registers the system to either Red Hat Customer Portal or to a Satellite Server, depending on the information that is provided. After the analysis completes, the Convert2RHEL tool reverts all changes that are made to the system, including the system registration.

However, in some scenarios, the system might not have access to the internet to perform system registration tasks, which could cause the conversion to fail. To avoid this issue, you can register the system to a local Satellite Server before the conversion.

Depending on your organization's policies and practices, you might have already registered the CentOS Linux systems before planning the conversion. This scenario might occur when your Satellite Server maintains the lifecycle management of your environment, or when Satellite provides the package repositories.

The method discussed in this section converts CentOS Linux 7 systems that are pre-registered to Red Hat Satellite Server. Because the systems are already registered and Convert2RHEL does not need to reach Red Hat Content Distribution Network (CDN), this method is useful for converting systems that are disconnected from external networks.

Reviewing Repository Configuration

In a disconnected environment, the Convert2RHEL tool requires that you meet two conditions:

  • You must manually register the CentOS Linux system with a system activation key before the conversion. The system activation key is an activation key that is associated with CentOS Linux repositories. For example, in Centos Linux 7, the system activation key must be associated with the CentOS Base and CentOS Updates repositories in Satellite.

  • You must provide a conversion activation key when running the convert2rhel command. The conversion activation key is an activation key that is associated with RHEL repositories. For example, in RHEL 7, the conversion activation key must be associated with the Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server repository in Satellite.

Important

The Convert2RHEL tool uses the conversion activation key only during the analysis or the conversion process. Do not manually register the system with the conversion activation key.

Before registering the system, make sure to review the repository configuration and activation keys in Satellite Server. This verification could help you to avoid mistakes when registering or converting the system. Red Hat recommends creating a conversion activation key that is used exclusively for conversions.

In the following example scenario, you verify the repository configuration of the system activation key and the conversion activation key. The system activation key is associated with the following CentOS Linux 7 repositories: CentOS Base, CentOS Updates, and Convert2RHEL 7. The conversion activation key is associated with the RHEL 7 repository, Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server.

In the following screenshot, you confirm that the CentOS-7-key activation key is associated with the CentOS-7 content view.

Figure 1.1: CentOS system activation key

Next, confirm that the CentOS-7 content view includes the CentOS 7 Base, CentOS 7 Updates, and Convert2RHEL 7 repositories.

Figure 1.2: CentOS content view

Then, you review the activation key that is associated with the RHEL repositories, and which is used for the analysis and conversion. In the following screenshot, you confirm that the RHEL-7-conversion-key activation key is associated with the RHEL-7 content view.

Figure 1.3: RHEL conversion activation key

Then, confirm that the RHEL-7 content view includes the Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server repository.

Figure 1.4: RHEL content view

Important

The activation key that is associated with the RHEL 7 repositories is used only with the convert2rhel command.

Registering a CentOS System to Satellite Server

After you review the repository configuration, you can register the system to a local Satellite Server. Continuing with the example scenario, you use the CentOS-7-key activation key to register the system.

Similar to registering a Red Hat Enterprise Linux system, you can register a CentOS Linux system to Satellite Server by using the subscription-manager package. CentOS Linux installations do not include the subscription-manager package, but the package is available in the official CentOS Linux repositories.

To register a CentOS Linux system, install the subscription-manager package.

[root@host ~]# yum install subscription-manager
...output omitted...
Is this ok [y/d/N]: y
...output omitted...
Complete!

After you install the subscription-manager package, you can register the system to Satellite Server. Because the registration is not performed by the Convert2RHEL tool, you must manually register your system. Review the supported registration methods with the Satellite administrators of your organization.

Note

For more information on host registration methods, refer to the Registering Hosts and Setting Up Host Integration chapter in the Managing Hosts guide.

In this example, you download the Katello package from your Satellite Server. The your_satellite_server string must be replaced by the fully qualified domain name of your Satellite Server.

[root@host ~]# curl --insecure --output katello-ca-consumer-latest.noarch.rpm \
\https://your_satellite_server/pub/katello-ca-consumer-latest.noarch.rpm
...output omitted...

After downloading the Katello package, install it on the system.

[root@host ~]# yum install katello-ca-consumer-latest.noarch.rpm
...output omitted...
Is this ok [y/d/N]: y
...output omitted...
Complete!

Then, you register the system to the Operations organization with the CentOS Linux 7 activation key.

[root@host ~]# subscription-manager register \
--org Operations --activationkey CentOS-7-key
The system has been registered with ID: 17e9dbe4-2929-4630-8806-c3be77691b3d
The registered system name is: host

After reviewing the conversion activation key and registering the system to the local Satellite Server, you can continue with the conversion process.

Convert a Pre-registered System

The commands that you use to analyze and convert a pre-registered system are the same as the commands that you use to convert a system that Convert2RHEL registers. Make sure to provide the activation key that is associated with only the required RHEL repositories.

You can provide the organization and activation key information when running the convert2rhel command by using the --activationkey and --org options, respectively. Alternatively, you can provide this information in the /etc/convert2rhel.ini file.

In the following example, you analyze the system by using the command line.

[root@host ~]# convert2rhel analyze \
--org Operations --activationkey RHEL-7-conversion-key
...output omitted...
Continue with the system conversion? [y/n]: y
...output omitted...

========== 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
...output omitted...

========== 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

========== Warning (Review and fix if needed) ==========
(WARNING) LIST_THIRD_PARTY_PACKAGES::THIRD_PARTY_PACKAGE_DETECTED
- Third party package detected
     Description: Third party packages will not be replaced during the conversion.
     Diagnosis: Only packages signed by CentOS Linux are to be replaced.
     Red Hat support won't be provided for the following third party packages:
     katello-ca-consumer-satellite.lab.example.com-1.0-2.noarch
     Remediation: N/A
(WARNING) CONVERT2RHEL_LATEST_VERSION::CONVERT2RHEL_LATEST_CHECK_SKIP_NO_INTERNET
- Skipping convert2rhel latest version check
     Description: Skipping the check because no internet connection has been detected.
     Diagnosis: N/A
     Remediation: N/A

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.

In the previous example, the pre-conversion report shows a warning message that indicates that the tool could not detect connection to the internet. The lack of internet connection is not an issue because the system is already registered to your Satellite Server and does not require access to Red Hat CDN.

After resolving the issues that are reported during the analysis, you can continue with the system conversion.

[root@host ~]# convert2rhel \
--org Operations --activationkey RHEL-7-conversion-key
...output omitted...
Continue with the system conversion? [y/n]: y
...output omitted...
WARNING - There was a problem while trying to connect to 'https://static.redhat.com/test/rhel-networkmanager.txt' to check internet connectivity. This could be due to the host being offline, or the network blocking access to the endpoint... Some checks and actions will be skipped.
...output omitted...
Continue with the system conversion? [y/n]: y
...output omitted...

Conversion successful!

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

After the conversion completes successfully, the output ends with the following 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.

References

For more information on host registration methods, refer to the Registering Hosts and Setting Up Host Integration chapter in the Managing Hosts guide at https://access.redhat.com/documentation/en-us/red_hat_satellite/6.14/html-single/managing_hosts/index#registering_hosts_to_server_managing-hosts

Revision: rh174-7.9-0acf85c