Many of the world’s Linux devices run CentOS Linux, but CentOS Linux reached its end of life on June 30, 2024. That means users need to switch to a different distribution in order to receive updates. One option available to Alicloud customers is to convert to Red Hat Enterprise Linux (RHEL) using either Alicloud tools or the Convert2RHEL tool.
Understanding Convert2RHEL
Red Hat’s convert2rhel utility enables a guided and supported conversion in three basic steps:
- Configures access to authentic RHEL content in your instance
- Performs safety checks and, when necessary, provides remediation guidance on how to proceed
- Replaces every operating system package with its RHEL equivalent. This is somewhat equivalent to a minor release update, in which most or all packages are updated, and it takes around the same amount of time
This article explains how the convert2rhel tool simplifies converting CentOS Linux instances running on Alibaba cloud to a fully supported RHEL, but also includes other cloud-based options.
What is a supported conversion?
When a conversion is supported, it means that Red Hat provides support during the actual conversion process. Currently, the supported conversion path is:
- CentOS Linux 7.9 to RHEL 7.9
- CentOS 8.5 to RHEL 8.5
Red Hat recently announced an extension to RHEL 7.9 ELS. This means that if you're a CentOS Linux 7 user, you have plenty of time to get to a new release once you've converted your system to RHEL.
What is an unsupported conversion?
Convert2RHEL can replace packages on a RHEL server that are not on the list of supported options. If you choose to convert from an unsupported version, Red Hat does NOT provide support for the conversion itself, but does support the resulting RHEL installation (assuming the conversion works).
Not all supported RHEL versions are targets for conversion, but you can convert up to a major release (like 8 or 9), and then follow the standard upgrade path to the latest supported minor release.
Convert2RHEL in Alicloud
Because of the way convert2rhel works, you can attempt to convert a virtual machine (VM) from CentOS Linux to RHEL in pretty much any location. Alicloud uses custom integrations (as do most cloud providers) with the cloud to allow for a seamless, fully managed VM environment. These integrations usually require some customization to fully convert the VM, and Alicloud uses a Red Hat Update Infrastructure (RHUI) client to perform upgrades.
An important set of rules apply to every RHEL subscription in the cloud:
- The customer must sign Red Hat’s terms and conditions
- The customer cannot enable access to Red Hat content before agreeing to terms and conditions
- The provider is responsible for billing the customer from the moment access to the bits is enabled
- The provider is responsible for requirements around dissemination of the bits
To convert a RHEL instance with Red Hat Update Infrastructure (RHUI), first download the script that applies to your instance.
Options for converting to RHEL in Alicloud
The first thing to consider is how you intend to pay for your RHEL subscription. You have a few different options:
- Use Alibaba Cloud Pay As You Go
- Bring Your Own Subscription
Using Alibaba Cloud Pay As You Go
With Pay As You Go (PAYG), you receive product subscription rights and service support directly from Alibaba Cloud. You have two PAYG options:
- Preferred: Use Alibaba migration tools. This method is integrated with Ali Cloud, easy to operate, and user-friendly. It uses the operating system migration and upgrade wizard of Alibaba Cloud Server Migration Center (SMC), so all you have to do is submit a support ticket to Ali Cloud granting access rights to your install
- Manual: Use
convert2rhel. Alibaba Cloud provides a separate Red Hat content distribution management system for PAYG. To obtain the RHEL repo sources needed for conversion, you must submit a ticket to Alibaba Cloud
Bring your own RHEL subscription (BYOS)
You can obtain a Red Hat subscription directly from Red Hat or from a reseller, and then use that subscription in the cloud. The advantage of this method is that it entitles you to support directly from Red Hat.
To see whether you already own subscriptions, log in to the Red Hat Hybrid Cloud Console. In the Hybrid Cloud Console interface, navigate to Activations Keys to create an activation key for the convert2rhel script. The location of Activation Keys in the interface has changed over time, but it's always in the Subscriptions section.
Use the Organization ID found on the Activation Keys page along with the activation key you've created to enable the convert2rhel utility to register the system and perform the conversion.
- Red Hat strongly recommends creating backups of your volume in the event of unexpected problems. Within Alicloud, you can do this by taking a snapshot of the associated Elastic Block Storage (EBS) volume
- Review the documentation for converting from an RPM-based Linux distribution to RHEL so you understand the support matrix, preparations, and other important details
- Log in to your instance using SSH or the Alicloud terminal to access a shell prompt. You must have permissions to use the sudo command or to become the
rootsuper user Update to the latest supported version of your existing operating system, and install errata updates. Reboot the instance to ensure that the latest updates and kernel are applied
$ sudo yum -y update
- Reboot the system into the updated kernel
Copy the certificates to validate that the content is signed by Red Hat:
$ sudo curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release https://www.redhat.com/security/data/fd431d51.txt $ sudo curl --create-dirs -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem
Add the required package repos. On CentOS Linux 7:
$ sudo curl -o /etc/yum.repos.d/convert2rhel.repo https://ftp.redhat.com/redhat/convert2rhel/7/convert2rhel.repo
For CentOS Linux 8:
$ sudo curl -o /etc/yum.repos.d/convert2rhel.repo https://ftp.redhat.com/redhat/convert2rhel/8/convert2rhel.repo
- Install Convert2RHEL using the steps found in the Red Hat documentation. Content for BYOS must be accessed directly from the Red Hat Content Delivery Network (CDN)
- Uninstall the Alibaba Cloud Security Center Agent to allow the conversion to proceed
Running RHEL
After conversion, we highly recommend that you register with the Red Hat Insights client to enable additional management capabilities at the Red Hat Hybrid Cloud Console.
$ sudo insights-client --register
After following the remaining guidance in the documentation, the system is ready to be restarted as a 100% authentic RHEL system. If you registered with Red Hat Insights, then your system is listed in your Red Hat Console inventory
About the author
Bob Handlin has helped build and promote products in various parts of the tech industry for more than 20 years. He currently focuses on RHEL migrations and upgrades, but also assists with storage technologies and live patching.
More like this
More than meets the eye: Behind the scenes of Red Hat Enterprise Linux 10 (Part 5)
General Availability for managed identity and workload identity on Microsoft Azure Red Hat OpenShift
The Overlooked Operating System | Compiler: Stack/Unstuck
SREs on a plane | Technically Speaking
Keep exploring
- Accelerate your IT with managed cloud services
E-book - The Total Economic Impact™ of Red Hat OpenShift cloud servicesAnalyst material
- Modernize your IT with cloud servicesE-book
Browse by channel
Automation
The latest on IT automation that spans tech, teams, and environments
Artificial intelligence
Explore the platforms and partners building a faster path for AI
Cloud services
Get updates on our portfolio of managed cloud services
Security
Explore how we reduce risks across environments and technologies
Edge computing
Updates on the solutions that simplify infrastructure at the edge
Infrastructure
Stay up to date on the world’s leading enterprise Linux platform
Applications
The latest on our solutions to the toughest application challenges
Original shows
Entertaining stories from the makers and leaders in enterprise tech