Inscreva-se no feed

On June 30, 2024, CentOS Linux 7 reached End of Life (EOL). Explore Red Hat’s options to help ease your migration, including Red Hat Enterprise Linux 7 for Third Party Linux Migration. Find out more


Now that Convert2RHEL is an officially supported utility, customers with other Linux systems can more easily convert them to fully supported Red Hat Enterprise Linux (RHEL) - without having to manually redeploy your workloads. This can significantly reduce administrative burden by helping to identify compatibility issues and maintain customizations, configurations, and preferences as part of the migration process. You can leverage the utility as self-service or reach out to Red Hat Consulting to help accelerate your project and minimize any risks associated with migrating critical workloads. 

If selecting to go the self-service route, it is always best to start by referring to the documentation, and doing a proof of concept conversion on a test system in your environment prior to kicking off a migration project. This blog post will provide you an idea of the steps you would take when leveraging Red Hat Satellite for Convert2RHEL migrations. Satellite is available with Red Hat Smart Management subscriptions.

Determine if your scenario is supported

The Convert2RHEL utility allows for CentOS Linux, or Oracle Linux, version 7 or 8 servers on the x86_64 architecture to be converted:

Source OS

Target OS

CentOS Linux 7

RHEL 7

CentOS Linux 8

RHEL 8

Oracle Linux 7

RHEL 7

Oracle Linux 8

RHEL 8

The example used in this article will be converting a CentOS Linux 8 system to RHEL 8. The conversion process works by reinstalling each of the source operating system’s packages with RHEL versions of the package. 

Due to this, one of the requirements of Convert2RHEL is that it has access to a RHEL repository for the target version of RHEL being converted to. The documentation covers the available options to provide the RHEL content:  directly from the Red Hat Content Delivery Network through Subscription Manager, from Red Hat Satellite, or from custom repositories. If you are using Satellite in your environment, and would like the converted RHEL system to be managed by Satellite, using Satellite to provide the RHEL content for the conversion is recommended.  

Configure Satellite 

The first step to converting our CentOS Linux 8 system to RHEL 8 using Satellite is to ensure the proper resources are configured in the Satellite environment. In this example scenario we are completing a conversion to RHEL 8, however the process is similar for RHEL 7 conversions (refer to the documentation for more information).  

In many environments this Satellite configuration will already be in place, and it will simply need to be validated.

We first need to ensure that the following repositories are enabled and synchronized:

  • Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8

  • Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8

  • The appropropriate Satellite Tools repository for RHEL 8 (for example, Red Hat Satellite Tools 6.9 for RHEL 8 x86_64 RPMs)

For more information on how to enable and synchronize repositories in Satellite, see the documentation here

Next, verify that these repositories are part of a content view, and that the content view has been published and promoted as needed. In this example, I am using a content view with the name of RHEL 8. For more information on how to complete this, see the documentation here

Finally, ensure that an activation key has been created that is configured to use the previously covered content view. Also ensure that the appropriate RHEL subscriptions have been added to the activation key, as the system being converted will require a valid subscription. In this example, the activation key is named RHEL8. For more information, see the documentation here.

Convert the system to RHEL

Now that the Satellite configuration is in place, we can jump over to the CentOS Linux 8 system that we would like to convert. The first step is to create a full system backup of the host that is being converted in case there are unexpected issues during the conversion that require the system to be restored.  

Once that has been taken care of, we will check the contents of /etc/centos-release to show the specific version of CentOS that is in use:

# cat /etc/centos-release
CentOS Linux release 8.3.2011

Next, we’ll download the Red Hat RPM Signing GPG key:

# curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release https://www.redhat.com/security/data/fd431d51.txt

And then we’ll configure the Convert2RHEL YUM repository:

# curl -o /etc/yum.repos.d/convert2rhel.repo https://ftp.redhat.com/redhat/convert2rhel/8/convert2rhel.repo

Then, we can install convert2rhel with the following command:

# yum -y install convert2rhel

We will need to download the katello-ca-consumer-latest package from the Satellite server.  Note that the Satellite’s server’s hostname will need to be replaced with your Satellite servers hostname:

# curl --insecure --output /usr/share/convert2rhel/subscription-manager/katello-ca-consumer-latest.noarch.rpm https://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm

The CentOS Linux system being converted needs to be updated with the latest available packages, so we’ll run a yum update:

# yum update

If there are available updates, they should be installed followed by rebooting the system if necessary.  

At this point, everything should be ready to run the convert2rhel utility. We will use the --org parameter to specify the Satellite organization that should be used when the system is registered to Satellite (in this example, the test organization). The --activationkey parameter will specify the Satellite Activation Key that should be used to register the system (in this example, the RHEL8 activation key).

# convert2rhel --org test --activationkey RHEL8

The convert2rhel starts showing the end user license agreement, and then gathers system information, including the output of rpm -Va which takes several minutes to run.  

Next, the utility pauses at a prompt that lists the excluded packages that will be removed:

fig 1 convert2rhel lists the excluded packages

The next prompt shows a list of Subscription Manager related packages that will be replaced:

ig 2 convert2rhel list of Subscription Manager related packages that will be replaced

At this point the Red Hat subscription manager packages are installed and the system is registered to the Satellite server.  

The next prompt shows a list of packages that contain repository files that will be removed:

fig 3 convert2rhel packages that contain repository files

The final prompt informs that changes after this point can not be automatically rolled back by the tool, and would need to be manually reverted manually by the user, if necessary.  

fig 4 convert2rhel can not be automatically rolled back by the tool prompt

After this point, the rest of the conversion runs without further prompts. The run time of the conversion will depend on a number of factors, including the number of installed packages and the hardware specifications of the system being converted. During this time, several steps are completed, including the CentOS Linux packages being reinstalled with the corresponding RHEL versions of the packages:

fig 5 convert2rhel conversion runs without further prompts

Once completed, convert2rhel will advise you that the system needs to be rebooted.

fig 6 convert2rhel reboot prompt

This can be accomplished by running the reboot command:

# reboot

If there is an issue during the conversion, refer to the log file at /var/log/convert2rhel/convert2rhel.log to help determine the cause of the issue.

Post reboot tasks

Following the reboot, we will login and validate the /etc/redhat-release file reflects that the system is now running Red Hat Enterprise Linux version 8.

# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.3 (Ootpa)

It is also recommended to review a list of packages present on the system that are not from the RHEL repositories, which can be done with the following command:

# yum list extras --disablerepo="*" --enablerepo=rhel-8-for-x86_64-baseos-rpms,rhel-8-for-x86_64-appstream-rpms

On my system this identified three packages: centos-gpg-keys, convert2rhel, and the katello-ca-consumer package.   

fig 7 convert2rhel login and validate

The katello-ca-consumer is needed for Satellite communication, however I can remove the centos-gpg-keys and convert2rhel packages.  

# yum remove convert2rhel centos-gpg-keys

I can also remove the convert2rhel.repo file to remove the convert2rhel repository:

# rm /etc/yum.repos.d/convert2rhel.repo 

The next step is to enable the satellite-tools repository, and install the katello-host-tools package on the system by running the following commands (note that this command is for the Satellite 6.9 tools for RHEL 8, if you are using a different Satellite version or RHEL version, update the command accordingly).  

# subscription-manager repos --enable=satellite-tools-6.9-for-rhel-8-x86_64-rpms
# yum -y install katello-host-tools

Finally, the last optional step on the host is to install the Insights agent and register the system with Insights, by running the following commands:

# yum install -y insights-client
# insights-client --register

Then, we'll log in to the Satellite web interface and validate that the host is properly registered to Satellite. Once logged in, we'll go to Hosts, Content Hosts, and click on the system we’ve been working with. We will validate that the Content View was set properly, and that the Subscription Status is Fully entitled:

fig 8 convert2rhel Satellite web interface

We can then view the Red Hat Insights findings from Insights, or from within the Satellite web interface by going to the Insights menu, and selecting Inventory. Red Hat Insights for RHEL is a proactive operational efficiency and security risk management solution included in RHEL subscriptions. With advanced analytics, Insights helps identify and prioritize risks to your operations, security and business. Insights also enables users to monitor for adherence to policies and understand configuration changes over time. For more information on Insights, see the Red Hat Insights product detail page

 

fig 9 convert2rhel Insights Inventory

Final thoughts

There you have it. Those are the steps you can take to convert a CentOS Linux 8 server to a fully supported RHEL 8 system with the Convert2RHEL utility and Satellite. Standardizing your environment by reducing the number of operating systems present in the environment is easier than ever. Once the conversion and upgrade are complete, you have access to the latest Red Hat Enterprise Linux updates—as well as all the performance, support, management, and security capabilities that Red Hat Enterprise Linux includes.  

When taking on any conversion project of magnitude, be sure to leverage the exceptional management tools mentioned in this article above to help ensure success. Red Hat Satellite can help simplify system management, while Red Hat Insights can support proactive identification and remediation of a wide variety of potential issues. 

For additional information about the conversion process, visit the technical documentation and Red Hat Knowledgebase. For assistance with planning your migration, you can schedule a discovery session with the Red Hat consulting team.


Sobre o autor

Brian Smith is a Product Manager at Red Hat focused on RHEL automation and management.  He has been at Red Hat since 2018, previously working with Public Sector customers as a Technical Account Manager (TAM).  

Read full bio
UI_Icon-Red_Hat-Close-A-Black-RGB

Navegue por canal

automation icon

Automação

Últimas novidades em automação de TI para empresas de tecnologia, equipes e ambientes

AI icon

Inteligência artificial

Descubra as atualizações nas plataformas que proporcionam aos clientes executar suas cargas de trabalho de IA em qualquer ambiente

open hybrid cloud icon

Nuvem híbrida aberta

Veja como construímos um futuro mais flexível com a nuvem híbrida

security icon

Segurança

Veja as últimas novidades sobre como reduzimos riscos em ambientes e tecnologias

edge icon

Edge computing

Saiba quais são as atualizações nas plataformas que simplificam as operações na borda

Infrastructure icon

Infraestrutura

Saiba o que há de mais recente na plataforma Linux empresarial líder mundial

application development icon

Aplicações

Conheça nossas soluções desenvolvidas para ajudar você a superar os desafios mais complexos de aplicações

Original series icon

Programas originais

Veja as histórias divertidas de criadores e líderes em tecnologia empresarial