Search

Transforming CentOS Linux to RHEL in Alicloud

Share it

Transitioning CentOS Linux to RHEL in Alibaba Cloud

A large number of the global Linux operating system devices utilize CentOS Linux. However, CentOS Linux officially reached its end of life on June 30, 2024. Consequently, users are required to migrate to an alternative distribution to continue receiving updates. One possible solution for Alicloud users is to transform to Red Hat Enterprise Linux (RHEL) using either Alicloud tools or the Convert2RHEL tool.

Understanding the Conversion Process

The Red Hat convert2rhel utility facilitates a guided and supported conversion process that comprises three fundamental steps:

  1. Configuring access to authentic RHEL content within your instance
  2. Conducting safety checks and, if necessary, offering remediation guidance on the next steps
  3. Replacing each operating system package with its corresponding RHEL equivalent, resembling a minor release update where most or all packages are updated within a similar timeframe

This article delves into how the convert2rhel tool streamlines the conversion of CentOS Linux instances operating on Alibaba Cloud to a fully supported RHEL, while also exploring other cloud-based alternatives.

Differentiating Supported and Unsupported Conversions

A supported conversion implies that Red Hat offers assistance during the actual conversion process. Presently, the supported conversion path includes the following versions:

  • CentOS Linux 7.9 to RHEL 7.9
  • CentOS 8.5 to RHEL 8.5

Red Hat recently extended RHEL 7.9 ELS. Consequently, CentOS Linux 7 users have ample time to transition to a new release after successfully converting their system to RHEL.

Insight into Convert2RHEL in Alibaba Cloud

Due to the methodology of convert2rhel, users can attempt the conversion of a virtual machine (VM) from CentOS Linux to RHEL in almost any location. Alicloud employs customized integrations, akin to most cloud providers, with the cloud to enable a seamless, fully managed VM environment. These integrations typically necessitate some level of customization to complete the VM conversion, and Alicloud utilizes a Red Hat Update Infrastructure (RHUI) client for upgrades.

A specific set of rules pertains to every RHEL subscription in the cloud:

  • Users must agree to Red Hat’s terms and conditions
  • Access to Red Hat content cannot be activated until the terms and conditions are accepted
  • The provider is responsible for billing users from the point of enabling access to the bits
  • The provider must adhere to the requirements concerning the distribution of the bits

To convert a RHEL instance leveraging Red Hat Update Infrastructure (RHUI), users should initiate by downloading the script pertinent to their instance.

Diverse Paths for Transitioning to RHEL in Alicloud

The primary consideration when transitioning to RHEL is determining how to manage the RHEL subscription payment. Users have several payment options available:

  • Utilize Alibaba Cloud Pay As You Go
  • Bring Your Own Subscription

Leveraging Alibaba Cloud Pay As You Go

With the Pay As You Go (PAYG) model, users receive product subscription rights and service support directly from Alibaba Cloud. There are two PAYG options to consider:

  • Preferred: Employ Alibaba migration tools, a seamless and user-friendly process integrated with Ali Cloud, incorporating the Alibaba Cloud Server Migration Center (SMC) operating system migration and upgrade wizard. Simply submit a support ticket to Ali Cloud to grant access rights to your installation
  • Manual: Utilize convert2rhel. Alibaba Cloud provides a distinct Red Hat content distribution management system for PAYG. To acquire the requisite RHEL repo sources for conversion, users must submit a ticket to Alibaba Cloud

Utilizing Your Own RHEL Subscription (BYOS)

Users can procure a Red Hat subscription directly from Red Hat or a reseller, subsequently utilizing that subscription in the cloud. This approach offers the advantage of direct support from Red Hat.

To check existing subscriptions, log in to the Red Hat Hybrid Cloud Console. Within the interface, navigate to the Activation Keys section to generate an activation key for the convert2rhel script. The location of the Activation Keys may have evolved over time within the interface, but it invariably falls under the Subscriptions section.

Employ the Organization ID discovered on the Activation Keys page alongside the activation key created to enable the convert2rhel utility to register the system and execute the conversion.

  1. It is strongly advised by Red Hat to create backups of your volume to mitigate unforeseen issues. In Alicloud, this can be achieved by taking a snapshot of the associated Elastic Block Storage (EBS) volume
  2. Thoroughly review the documentation pertaining to transitioning from an RPM-based Linux distribution to RHEL to grasp the support matrix, preparatory steps, and other crucial details
  3. Access your instance using SSH or the Alicloud terminal to reach a shell prompt. Users must possess permissions to utilize the sudo command or become the root super user
  4. Update to the latest supported version of your current operating system and install errata updates. Subsequently, reboot the instance to ensure the application of the latest updates and kernel

    $ sudo yum -y update
  5. Reboot the system utilizing the updated kernel
  6. Transfer the certificates to validate the content 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
    

    Incorporate the necessary package repositories. For 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
  7. Install Convert2RHEL following the steps outlined in the Red Hat documentation. Access for BYOS must be directly from the Red Hat Content Delivery Network (CDN)
  8. Deinstall the Alibaba Cloud Security Center Agent to enable the conversion process

Implementing RHEL

Post-conversion, it is highly recommended to register with the Red Hat Insights client to activate additional management capabilities within the Red Hat Hybrid Cloud Console.

$ sudo insights-client --register

Following the residual guidance in the documentation, the system is primed for a restart as an entirely authentic RHEL system. If registration with Red Hat Insights was successful, the system will be visible in your Red Hat Console inventory

Reference: https://www.redhat.com/en/blog/converting-centos-linux-rhel-alicloud

🤞 Don’t miss these tips!

🤞 Don’t miss these tips!

Solverwp- WordPress Theme and Plugin