Menu Close
Settings Close

Language and Page Formatting Options

Chapter 11. Converting a Host to Red Hat Enterprise Linux with Convert2RHEL

Convert2RHEL enables the conversion of Red Hat Enterprise Linux derivative distributions into a supportable Red Hat Enterprise Linux state while retaining existing applications and configurations.

The conversion process is similar to a minor release upgrade of Red Hat Enterprise Linux in which every RPM package on the system is replaced. Third-party packages and non-Red Hat packages not available in Red Hat Enterprise Linux are not replaced.

You can convert:

  • CentOS 7 to Red Hat Enterprise Linux 7
  • Oracle 7 to Red Hat Enterprise Linux 7
  • CentOS 8 to Red Hat Enterprise Linux 8
  • Oracle 8 to Red Hat Enterprise Linux 8

You cannot convert a version 7 package into Red Hat Enterprise Linux 8, or a version 8 package into Red Hat Enterprise Linux 7.

Convert2RHEL removes unnecessary packages such as logos, or packages known to cause issues during the conversion, and replaces the CentOS-release or Oracle-release package with the rhel-release package. It subscribes the system to Red Hat Satellite and replaces all packages signed by CentOS or Oracle. For Satellite, it also subscribes the system to Red Hat Subscription Management.

The amount of time taken to do this can vary depending on how many packages need to be replaced, network speed, storage speed, and similar variables.

Use the global registration template to register and subscribe your system before the conversion. For more information, see Registering a Host to Red Hat Satellite Using the Global Registration Template in the Managing Hosts guide.

Parts of the process can be achieved using the redhat.satellite.convert2rhel role assigned to the host or host groups. The Ansible role prepares data, that is, repositories, certificates, activation keys and host groups required for the host conversion. The role enables the rhel-7-server-rpms repository with the 7Server release and x86_64 architecture, as well as rhel-8-for-x86_64-baseos-rpms and rhel-8-for-x86_64-appstream-rpms.

Using the Ansible role to automate the Convert2RHEL process generates activation keys.

To convert hosts to Red Hat Enterprise Linux with convert2RHEL, you must complete the following procedures:

Prerequisites

  • You must have completed the steps listed in Preparing for a RHEL conversion.
  • If you are providing the organization ID and activation key to register and subscribe your system, you must have created an activation key in Red Hat Satellite. For Satellite you can also create an activation key in Subscription Manager. For more information, see Managing Activation Keys in this guide, and Understanding activation keys in Subscription Manager documentation.
  • Ensure you have a subscription manifest uploaded to your Satellite and that there are sufficient Red Hat Enterprise Linux subscriptions for the conversion.
  • If you are providing the organization ID and activation key to register and subscribe your system, you must have created an activation key in Red Hat Satellite or Subscription Manager. For more information, see Managing Activation Keys in this guide, and Understanding activation keys in Subscription Manager documentation.
  • Ensure you have a subscription manifest uploaded to your Satellite and that there are sufficient Red Hat Enterprise Linux subscriptions for the conversion.

    The manifest provides access to all enabled content for the role to work properly. You can download the manifest and put it in the correct folder. The subscription manifest is retrieved from the specified path on the Ansible target host. Optionally, it can be fetched first from the RHSM portal using the provided login credentials and manifest UUID. It will be uploaded to the specified organization.

  • If you are accessing Red Hat Enterprise Linux packages using Satellite Server, you must use the organization ID and activation key to run the convert2rhel command.

11.1. Importing the Convert2RHEL Ansible Role and Variables

You must have imported Ansible roles to use. If you have not, the following procedure imports Ansible Roles for you to assign.

Procedure

  1. In the Satellite web UI, navigate to Configure > Roles.
  2. If you have not imported Ansible roles, click the Import from button.
  3. The Roles page displays the Ansible roles.
  4. Check the Select All checkbox.
  5. Click Submit to import the roles.

11.2. Assigning the Convert2RHEL Role to Satellite Server

Use this procedure to assign the Ansible Role to Satellite Server.

Procedure

  1. In the Satellite web UI, navigate to Hosts > All Hosts.
  2. Select your Satellite Server and click the Edit button.
  3. Click the Ansible Roles tab and from the Available Ansible Roles list, search for the redhat.satellite.convert2rhel role.
  4. Click the + icon to add it to the Assigned Ansible Roles for Satellite Server.
  5. Click Submit.

Continue by creating the required variables. For more information, see Section 11.3, “Creating Variables for the Convert2RHEL Role”.

11.3. Creating Variables for the Convert2RHEL Role

Assigning the Ansible role to a host also installs variables. You must create the following additional variables:

NameTypeDefault value and descriptionExample

satellite_rhel_wait_for_syncs

boolean

false

false

satellite_manifest_path

string

path to manifest

/root/manifest_Sat_20220623T124844Z.zip

satellite_organization

string

name of organization

Default Organization

satellite_password

string

your admin password

My_Admin_Password

satellite_server_url

string

Satellite Server URL

satellite.example.com

satellite_username

string

admin

admin

satellite_validate_certs

boolean

Set to false if you wish to disable certificate checks in Ansible

true

satellite_content_rhel_enable_rhel7

boolean

Set to true if converting to Red Hat Enterprise Linux 7

false

satellite_content_rhel_enable_rhel8

boolean

Set to true if converting to Red Hat Enterprise Linux 8

true

If you want to use Convert2RHEL on Oracle Linux 7 or 8, create an additional variable depending on the conversion you intend:

OS typeNameTypeDefault value to set

Oracle Linux 7

satellite_convert2rel_enable_oracle7

boolean

true

Oracle Linux 8

satellite_convert2rel_enable_oracle8

boolean

true

Use the following procedure to create variables.

Procedure

  1. In the Satellite web UI, navigate to Configure > Variables.
  2. Click on the New Ansible Variable button.
  3. In the Key field of the Create Ansible Variable page, enter the name of the variable.
  4. Optional: In the Description field, enter a description of the variable.
  5. In the Ansible Role field, set the role the variable is assigned to. In this case, redhat.satellite.convert2rhel.
  6. Optional: Under Default Behavior, select the Override checkbox.
  7. Set Parameter type to the value type for validation. For example, a string or boolean variable.

    If you want to create data for Oracle 7 you must change the Parameter type for satellite-convert2rhel_enable_oracle7 to boolean, and set the value to true.

    If you want to create data for Oracle 8 you must change the Parameter type for satellite-convert2rhel_enable_oracle8 to boolean, and set the value to true.

  8. Optional: In the Default Value field, enter the default value that you want to use if there is no match for the variable.
  9. Optional: Check the Hidden Values checkbox if you do not want to display the Ansible variable in plain text.
  10. Optional: Under Prioritize Attribute Order, in the Order window, list the order of the attributes.
  11. Optional: Check Merge Overrides if you want to add all further matched parameters after finding the first match. Check Merge Default if you want to also include the default value even if there are more specific values defined. Check Avoid Duplicates if you want to create a list of unique values for the selected variable.
  12. Optional: The Specify Matcher field requires an attribute type from the order list.
  13. Optional: Use the Add Matcher button to add more matchers.
  14. Click Submit.

11.4. Registering Hosts for Conversion

Use this procedure to register CentOS hosts to Satellite.

Activation keys produced by the Ansible role are as follows:

  • convert2rhel_centos7 - used for registering centos7 hosts.
  • convert2rhel_centos8 - used for registering centos8 hosts.
  • convert2rhel_oracle7 - used for registering oracle7 hosts.
  • convert2rhel_oracle8 - used for registering oracle8 hosts.
  • convert2rhel_rhel7 - used for re-registering a host converted to RHEL 7.
  • convert2rhel_rhel8 - used for re-registering a host converted to RHEL 8.

Procedure

  1. In the Satellite web UI, navigate to Hosts > All Hosts and click Register Host.
  2. In the Host Group field, select the Host Group you want to use as a template for the conversion. You can also select one of the following predefined Host groups:

    • CentOS7 converting
    • CentOS8 converting
    • Oracle Linux 7 converting
    • Oracle Linux 8 converting

The activation keys for these Host groups are automatically applied.

  1. Optional, In the Operating System field, select the Operating System you are converting from.
  2. Optional: In the Capsule field, select the required Capsule.
  3. Optional: Check the Insecure box if the hosts might not trust the Satellite CA.
  4. Optional: In the Remote Execution Interface field, if the host has multiple interfaces and remote execution must use a single one, select the appropriate network interface.
  5. In the Activation Key(s) field, enter the name of the content activation key.
  6. Click Generate Command.

When you run the command on the hosts you want to convert, it is registered in Hosts > All Hosts. If the host subscription status warns of Unknown subscription status, it can be ignored.

11.5. Running the Convert2RHEL Ansible Playbook

Use this procedure to install Convert2RHEL and perform the conversion.

Procedure

  1. In the Satellite web UI, navigate to Hosts > All Hosts and select the target hosts on which you want to execute the remote job. You can use the search field to filter the host list.
  2. From the Select Action list, select Schedule Remote Job.
  3. On the Job invocation page, define the main job settings:
  4. Select the Job category and the Job template to use. Use Convert2RHEL for both.
  5. Optional: Select a stored search string in the Bookmark list to specify the target hosts.
  6. Optional: Limit the targeted hosts by entering a Search query. The Resolves to line displays the number of hosts affected by your query. Use the refresh button to recalculate the number after changing the query. The preview icon lists the targeted hosts.
  7. In the Activation Key field, select the activation key associated with the conversion you are doing. you must choose either convert2rhel_rhel7 or convert2rhel_rhel8.
  8. Check Restart if you want to restart the machine after the conversion is complete. The remaining settings might not display when you select the Convert2RHEL template.
  9. Optional: To configure advanced settings for the job, click Display advanced fields. Some of the advanced settings depend on the job template, the following settings are general:

    • Effective user defines the user for executing the job, by default it is the SSH user.
    • Concurrency level defines the maximum number of jobs executed at once, which can prevent overload of systems' resources in a case of executing the job on a large number of hosts.
    • Timeout to kill defines time interval in seconds after which the job should be killed, if it is not finished already. A task which could not be started during the defined interval, for example, if the previous task took too long to finish, is canceled.

      Concurrency level and Timeout to kill settings enable you to tailor job execution to fit your infrastructure hardware and needs.

    • Type of query defines when the search query is evaluated. This helps to keep the query up to date for scheduled tasks.
    • Execution ordering determines the order in which the job is executed on hosts: alphabetical or randomized.
  10. Optional: From the Type of query field, check Static query or Dynamic query.
  11. To run the job immediately, ensure that Schedule is set to Execute now. You can also define a one-time future job, or set up a recurring job. For recurring tasks, you can define start and end dates, number and frequency of runs.
  12. Click Submit. This displays the Job Overview page, and when the job completes, also displays the status of the job.
  13. Note that:

    • The conversion can take some time.
    • During the conversion, the host reboots.
    • After the reboot, new OS facts are sent to Satellite.
    • When complete, the OS for the host changes to Red Hat Enterprise Linux and the subscription status turns green.