How to perform an unsupported conversion from a RHEL-derived Linux distribution to RHEL

Updated -

This document provides instructions on how to perform an unsupported conversion of your operating system from a different Linux distribution to Red Hat Enterprise Linux (RHEL).

The conversion is performed by the Convert2RHEL utility, which is available on GitHub, and is unsupported by Red Hat for these scenarios.

The conversion from CentOS Linux and Oracle Linux to RHEL 7 and 8 is supported by Red Hat. For more information, see Converting from an RPM-based Linux distribution to RHEL. See also Convert2RHEL Support Policy.

IMPORTANT:
Red Hat recommends that you seek the support of Red Hat Consulting services to ensure that the conversion process is smooth.

The Red Hat packages installed as part of a successfully converted system are automatically eligible for Red Hat support. Red Hat support may not be provided for the third-party packages that are left unchanged during the conversion process. See the Red Hat policy on supporting third-party software.

If you encounter any issues with the Convert2RHEL utility, file an issue in GitHub.

How OS conversion works

The automated conversion process is performed on a running system. The Convert2RHEL utility replaces all RPM packages from the original Linux distribution by their RHEL version. At the end of the process, it is necessary to restart the system to boot into the RHEL kernel.

NOTE:
Packages that are available only in the original distribution and do not have corresponding counterparts in RHEL repositories, or third-party packages, which originate neither from the original Linux distribution nor from RHEL, are not affected by the conversion.

Differences between supported and unsupported conversions

Red Hat allows conversions from several different RHEL-derived operating systems to RHEL. However, unsupported conversions are not tested by Red Hat and should therefore be performed at your own risk. Supported conversions are thoroughly tested by Red Hat prior to release.

Different conversion paths are available as supported or unsupported conversions. For example, the conversion from CentOS Linux 6 to RHEL 6 is unsupported, while the conversion from CentOS Linux 7 to RHEL 7 is supported. For a full list of unsupported conversion paths, see the table below. For a full list of supported conversion paths, see Supported conversion paths in the Converting from an RPM-based Linux distribution to RHEL guide.

If you are performing an unsupported conversion, use this Knowledgebase article for instructions about how to prepare your system and perform the conversion. If you are performing a supported conversion, you must use the Converting from an RPM-based distribution to RHEL guide. If you attempt to perform an unsupported conversion using instructions for supported conversions, or the reverse, you might run into issues during the conversion process.

Available unsupported conversion paths

Currently, it is possible to perform an unsupported conversion of your systems from the following Linux distributions, architectures, and versions to the latest minor version of the corresponding major versions of RHEL listed in the table below.

Source OS Target OS Architecture
CentOS Linux 6 RHEL 6 64-bit architecture
Oracle Linux 6 RHEL 6 64-bit architecture
Scientific Linux 7 RHEL 7 64-bit architecture
Alma Linux 8 RHEL 8 64-bit architecture
Rocky Linux 8 RHEL 8 64-bit architecture

In addition to the above unsupported conversion paths, it is also possible to perform a supported conversion from CentOS Linux and Oracle Linux 7 and 8 to RHEL 7 and 8. For information on supported conversions, see Converting from an RPM-based Linux distribution to RHEL.

RHEL 6 is in the Maintenance Support 2 Phase of its life cycle. If you are unable to upgrade to RHEL 7 or upgrade to RHEL 8 after the conversion, and require continued maintenance for RHEL 6 after this date, we recommend that you purchase the Extended Life Cycle Support Add-on (ELS).

It is not possible to directly convert from Scientific Linux to RHEL 8. Instead, you can convert from Scientific Linux to RHEL 7 and then perform an in-place upgrade to RHEL 8. For information on the in-place upgrade, see Upgrading from RHEL 7 to RHEL 8.

IMPORTANT
Certain system setups are not currently supported for conversion. For more information, see Known Issues.

Prerequisites

  • Back up your system and verify that you are able to restore it.
  • Ensure that the standard kernel is the booted kernel:
    • Oracle Linux: the Red Hat Compatible Kernel (RHCK)
    • CentOS Linux: the standard CentOS Linux kernel
    • Scientific Linux: the standard Scientific Linux kernel
      If the kernel your system is booted into is not the standard kernel, for example Oracle Linux Unbreakable Enterprise Kernel (UEK) or CentOS realtime kernel, change the default kernel to the standard kernel and reboot your system. For more information, see Making Persistent Changes to a GRUB 2 Menu Using the grubby Tool.
  • Install the Convert2RHEL utility:

    • Download the Red Hat GPG key:

      # curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release https://www.redhat.com/security/data/fd431d51.txt
      
    • Download the SSL certificate of the https://cdn.redhat.com server, which contains the Convert2RHEL repositories:

      # curl --create-dirs -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem
      
    • Install the Convert2RHEL repository file:

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

      Replace version_number with the appropriate major version of the OS, for example 6.

    NOTE:
    You must perform the conversion with the latest version of the Convert2RHEL repository file. If you had previously installed an earlier version of the repository file, remove the earlier version and install the current version.

    • Install the Convert2RHEL utility:

      # yum -y install convert2rhel
      

    NOTE:
    All Convert2RHEL dependencies are available in the standard repositories of the source OS except CentOS Linux 6, which has reached end of life. CentOS Linux 6 repositories are archived in the Vault. Reconfigure your CentOS Linux 6 repositories to the Vault to make Convert2RHEL dependencies available.

  • Ensure that you have an access to RHEL packages through one of the following methods:

    • Red Hat Content Delivery Network (CDN) through Red Hat Subscription Manager (RHSM). You must have a Red Hat account and an appropriate RHEL subscription to access RHSM. Note that the OS will be converted to the latest minor version of RHEL for the appropriate major version.
    • Red Hat Satellite in a version that has Full or Maintenance support. For more information, see Red Hat Satellite Product Life Cycle.
      NOTE
      Ensure that the Satellite server meets the following conditions:

      • Satellite has a subscription manifest with RHEL repositories imported. For more information, see the Managing Subscriptions chapter in the Content Management Guide for the particular version of Red Hat Satellite, for example, for version 6.8.
      • All required repositories are enabled and synchronized with the latest updates and published on Satellite. Enable at minimum the following repositories for the appropriate major version of the OS:
        • Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server repository.
        • Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server
        • Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8.7
        • Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8.7
      • You have created an activation key in Satellite and assigned the above repositories to the key. For more information, see Managing Activation Keys.
    • Custom repositories configured in the /etc/yum.repos.d/ directory and pointing, for example, to RHEL ISO, FTP, or HTTP. Use custom repositories for systems that have access to only local networks or portable media and therefore cannot access Red Hat CDN through RHSM. Note that the OS will be converted to the version of RHEL provided by these repositories. Make sure that the RHEL minor version is the same or later than the original OS minor version to prevent downgrading and potential conversion failures. For more information, see Creating a Local Repository and Sharing With Disconnected/Offline/Air-gapped Systems.
  • If you are accessing RHEL packages through a Red Hat Satellite server, download the consumer RPM to the /usr/share/convert2rhel/subscription-manager/ directory:

    # 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
    

    Replace satellite.example.com with the host name of your Satellite server.

  • Temporarily disable antivirus software to prevent the conversion from failing.

  • Update packages from the original OS to the latest version that is available in the repositories accessible from the system, and reboot the system:

    # yum update -y
    # reboot
    

    Without performing this step, the rollback feature will not work correctly, and exiting the conversion in any phase may result in a dysfunctional system.

Converting the system

If you are accessing RHEL packages using Red Hat CDN or Satellite through RHSM, there are two methods of registering and subscribing your system during the conversion:

  • Provide the organization ID and activation key. This method is preferred when converting many systems or when automating the conversion process using scripts. You must be the organization administrator to create an activation key. You must use this method if you are accessing RHEL packages using Satellite through RHSM. For more information, see Managing activation keys in Satellite documentation and Understanding activation keys in RHSM documentation.

  • Provide the username, password, and pool ID. Any user who is accessing RHEL packages using Red Hat CDN through RHSM can use this method.

  1. Start the Convert2RHEL utility.
    You can use Convert2RHEL with either RHSM or custom repositories. To display all available options, use the --help (-h) option:

    # convert2rhel -h
    
    • To convert using RHSM with the organization ID and activation key, complete the following steps. You must use this method if you are accessing RHEL packages using Satellite:

      • Create a configuration file containing the activation key and save the file in the .ini file format:

        [subscription_manager]
        activation_key = <activation_key>
        

        Replace activation_key with the activation key from the Red Hat Customer Portal if you are using Red Hat CDN or the Satellite web UI if you are using Red Hat Satellite.

      • Start the Convert2RHEL utility:

        # convert2rhel --org <organization_ID> --config-file <config_file_name>
        

        Replace organization_ID with the Organization ID from the Red Hat Customer Portal if you are using Red Hat CDN or from the Satellite web UI if you are using Red Hat Satellite. Replace config_file_name with the name of the configuration file you created, for example convert2rhel.ini.

      NOTE:
      If you are accessing RHEL packages using Satellite and your system does not have internet access, add the --keep-rhsm option. Note that you must have the subscription-manager and the katello-ca-consumer packages already installed and must provide your organization ID and activation key when running the convert2rhel command.

    • To convert using RHSM with the username, password, and pool ID, complete the following steps:

      • Create a configuration file containing the password and save the file in the .ini file format:

        [subscription_manager]
        password = <password>
        

        Replace password with your Red Hat Account password credentials.

      • Start the Convert2RHEL utility:

        # convert2rhel --username <username> --config-file <config_file_name> --pool <pool_id>
        

        Replace username with your Red Hat Account username credentials. Replace config_file_name with the name of the configuration file you created, for example convert2rhel.ini. Replace pool_id with the pool ID of the subscription that you want to attach to the system. If you do not know the pool ID, omit the --pool option to generate a list of all subscriptions available for the account.

    • To convert using custom repositories, start the Convert2RHEL utility:

      # convert2rhel --no-rhsm --enablerepo <RHEL_RepoID1> --enablerepo <RHEL_RepoID2> 
      

      Replace RHEL_RepoID with your custom repository configured in the /etc/yum.repos.d/ directory, for example, rhel-7-server-rpms or rhel-8-baseos and rhel-8-appstream.

  2. Before Convert2RHEL starts replacing packages from the original distribution with RHEL packages, the following warning message is displayed:

    The tool allows rollback of any action until this point. 
    By continuing all further changes on the system will need to be reverted manually by the user, if necessary.
    

    Changes made by Convert2RHEL up to this point can be automatically reverted. Confirm that you wish to proceed with the conversion process.

  3. Wait until Convert2RHEL installs the RHEL packages.

  4. Recommended: If you used custom repositories for the conversion, subscribe and update your RHEL system:

    • Install the subscription-manager command line utility:
    # yum install subscription-manager -y
    
    # yum update -y
    
  5. At this point, the system still runs with the original distribution kernel loaded in RAM. Reboot the system to boot into the newly installed RHEL kernel.

    # reboot
    
  6. Remove third-party packages from the original OS that remained unchanged (typically packages that do not have a RHEL counterpart). To get a list of such packages, use:

    # yum list extras --disablerepo="*" --enablerepo=<RHEL_RepoID>
    

    Replace RHEL_RepoID with the repository ID.

  7. If necessary, reconfigure system services after the conversion.

Troubleshooting

Logs

The Convert2RHEL utility stores the convert2rhel.log file in the /var/log/convert2rhel/ directory. Its content is identical to what is printed to the standard output.

The output of the rpm -Va command, which is run automatically unless the --no-rpm-va option is used, is stored in the /var/log/convert2rhel/rpm_va.log file for debugging purposes.

Rollback

The Convert2RHEL utility provides a limited rollback functionality. If the conversion is canceled by the user or if it fails, the utility performs a rollback of changes made during the conversion process under the following conditions:

  • Only changes performed until Convert2RHEL starts replacing packages from the original distribution with RHEL packages can be reverted. This moment is indicated by the warning message:

    The tool allows rollback of any action until this point. 
    By continuing all further changes on the system will need to be reverted manually by the user, if necessary.
    

    followed by a question whether you wish to continue with the process.

  • Access to repositories providing packages from the original distribution is required, especially to the base repository, otherwise Convert2RHEL will be unable to restore the system to the original state even if the tool execution is stopped in the early stages of the conversion. That is because Convert2RHEL removes certain packages during the conversion process and needs to preemptively download them from the original repository for the case of a rollback.

  • A rollback is feasible only on a system where all packages from the original OS are updated to the latest version that is available in the repositories accessible from the system. Therefore use the yum update command before starting the conversion process.

NOTE: If the -y option is used, the question indicating the moment after which the automated rollback is no longer possible is skipped.

WARNING: If the conversion process is canceled or fails after Convert2RHEL has started the package replacement phase, the system can become dysfunctional. In such a case, manual fixes are needed. Please contact Red Hat Consulting services for help.

Known issues

  • UEFI-based systems cannot be converted to RHEL 6. (BZ#1899314)
  • The conversion stops if any files are mounted directly to the /mnt/ directory or if the /sys/ directory is mounted as read-only.
  • Systems using high availability cluster software by Red Hat or third parties are not currently supported for conversion to RHEL. Red Hat recommends migrating to newly installed RHEL systems to ensure the integrity of these environments.
  • Systems using kernel modules that do not exist in RHEL kernel modules are not currently supported for conversion. Unsupported kernel modules include:
    • Kernel modules for specialized applications, GPUs, network drivers, or storage drivers
    • Custom compiled kernel modules built by DKMS
      Red Hat recommends disabling or uninstalling foreign kernel modules before the conversion and then enabling or reinstalling those kernel modules afterwards.
  • Systems that connect to the Internet using an HTTP proxy server cannot convert using Red Hat CDN or Satellite through RHSM. To work around this problem, enable HTTP proxy for yum and then configure the HTTP proxy for RHSM:

    1. Configure yum to use an HTTP proxy as described in How to enable Proxy settings for Yum Command on RHEL?
    2. For Oracle Linux conversions, define and enable repositories pointing to https://vault.centos.org/6.10/contrib/$basearch/.
    3. Install the subscription-manager package.
    4. Configure HTTP proxy for RHSM as described in How to configure HTTP Proxy for Red Hat Subscription Management.
    5. Prevent the configuration file from being deleted during the conversion:

      chattr +i /etc/rhsm/rhsm.conf
      
    6. Perform the conversion to RHEL.
      (BZ#1965487)

  • The conversion fails while checking the latest kernel version if any of the repositories enabled on the system is not accessible. (Jira:RHELC-689)
  • The conversion fails when the subscription-manager-rhsm-certificates package is installed. To work around this problem, after installing the convert2rhel package, disable the convert2rhel repository by setting enabled=0 in the /etc/yum.repos.d/convert2rhel.repo file. For more details, see the Knowledgebase solution Convert2RHEL fails when "subscription-manager-rhsm-certificates" package is installed. (BZ#2127448)

Obtaining support

IMPORTANT:
Conversions from CentOS Linux 6 and Oracle Linux 6 to RHEL 6, Scientific Linux 7 to RHEL 7, and Alma Linux 8 and Rocky Linux 8 to RHEL 8 are not currently supported by Red Hat. Conversions from CentOS Linux 7 and 8 and Oracle Linux 7 and 8 to RHEL 7 and 8 are supported by Red Hat. For more information on supported CentOS Linux and Oracle Linux conversions, see Converting from an RPM-based Linux distribution to RHEL.

To report a bug in Convert2RHEL, file an issue in GitHub.

Additional resources

Converting from an RPM-based Linux distribution to RHEL
Red Hat Enterprise Linux technology capabilities and limits
Red Hat Enterprise Linux documentation
Migration planning guide - migration to RHEL 6
Migration planning guide - migration to RHEL 7
Upgrading from RHEL 6 to RHEL 7
Considerations in adopting RHEL 8
Upgrading from RHEL 7 to RHEL 8
How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server?
Blog post: Converting from CentOS to RHEL with Convert2RHEL and Satellite

15 Comments

I am trying to convert CentOS 8.4 but its getting failed at step

<br />WARNING - The following packages will be removed...
Package                                     Vendor/Packager  Repository
-------                                     ---------------  ----------
centos-linux-repos-8-3.el8.noarch           CentOS           @centos-8-base-channel
centos-linux-release-8.4-1.2105.el8.noarch  CentOS           @centos-8-base-channel

Continue with the system conversion? [y/n]: y

repo: using cache for: convert2rhel-for-rhel-8-rpms
convert2rhel-for-rhel-8-rpms: using metadata from Tue Jan  4 15:27:01 2022.
Last metadata expiration check: 0:14:55 ago on Fri Feb 18 22:23:42 2022.
Completion plugin: Generating completion cache...
No package centos-linux-release-8.4-1.2105.el8.noarch available.
Exiting due to strict setting.
Error: No package centos-linux-release-8.4-1.2105.el8.noarch available.

CRITICAL - Couldn't download the centos-linux-release-8.4-1.2105.el8.noarch package. This means we will not be able to do a complete rollback and may put the system in a broken state.
Check to make sure that the CentOS Linux repositories are enabled and the package is updated to its latest version.
If you would rather ignore this check set the environment variable 'CONVERT2RHEL_UNSUPPORTED_INCOMPLETE_ROLLBACK'.
WARNING - Abnormal exit! Performing rollback ...

this got fixed, after performing yum update .i..e centos 8.4 to 8.5 prior migrating to rhel

Updating to the latest minor version, in your case CentOS Linux 8.5, is required.

Please follow the guide for supported conversion from CentOS Linux 8 to RHEL 8: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/converting_from_an_rpm-based_linux_distribution_to_rhel/index

This article covers unsupported conversion paths like CentOS Linux 6 to RHEL 6.

Actually ... i have the same issue with CentOS 7.9 trying to migrate to RHEL 7. Same picture. Any idea how to fix that?

Situation: CentOS 7.9 already registered to Satellite, convert2rhel ist installed and ready.

Using following command: convert2rhel --org="xxx" --activationkey="xxx" --keep-rhsm (xxx of course has other values, everything works well there and satellite responses good)

Thomas, can you elaborate on what same issue are you facing? Do you have case raised with Red Hat?

Follow the guide for supported conversion from CentOS Linux 7 to RHEL 7: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/converting_from_an_rpm-based_linux_distribution_to_rhel/index

This article covers unsupported conversion paths.

Hello Pradeep, Sadly I can't put in the logfile here, I'll try to keep it short. Yes, i am using exactly this documentation for convert2rhel. Unfortunatelly it wasn't successful. So far I didn't start a case with redHat since I wanted to take a look into community first ... but would be next step if not successful here ;-)

Situation: VM with CentOS 7.9 connected to Satellite and no internet, VM is registered to satellite and gets CentOS Updates this way. installed convert2rhel Version is 0.25 Command:

convert2rhel --org="xxx" --activationkey="xxx" --keep-rhsm

Logs (shortened):

Successfully downloaded the centos-indexhtml-7-9.el7.centos.noarch package.
[03/14/2022 13:55:25] DEBUG - Path of the downloaded package: /var/lib/convert2rhel/backup/centos-indexhtml-7-9.el7.centos.noarch.rpm
Backing up centos-logos-70.0.6-3.el7.centos.noarch
[03/14/2022 13:55:25] DEBUG - Downloading the centos-logos-70.0.6-3.el7.centos.noarch package.
[03/14/2022 13:55:25] DEBUG - Calling command 'yumdownloader -v --destdir="/var/lib/convert2rhel/backup" centos-logos-70.0.6-3.el7.centos.noarch'
[03/14/2022 13:55:25] DEBUG - Pseudo-PTY columns set to: (0, 120)
Successfully downloaded the centos-logos-70.0.6-3.el7.centos.noarch package.
[03/14/2022 13:55:27] DEBUG - Path of the downloaded package: /var/lib/convert2rhel/backup/centos-logos-70.0.6-3.el7.centos.noarch.rpm
Backing up geoipupdate-2.5.0-1.el7.x86_64
[03/14/2022 13:55:27] DEBUG - Downloading the geoipupdate-2.5.0-1.el7.x86_64 package.
[03/14/2022 13:55:27] DEBUG - Calling command 'yumdownloader -v --destdir="/var/lib/convert2rhel/backup" geoipupdate-2.5.0-1.el7.x86_64'
[03/14/2022 13:55:27] DEBUG - Pseudo-PTY columns set to: (0, 120)
Successfully downloaded the geoipupdate-2.5.0-1.el7.x86_64 package.
[03/14/2022 13:55:28] DEBUG - Path of the downloaded package: /var/lib/convert2rhel/backup/geoipupdate-2.5.0-1.el7.x86_64.rpm
Backing up kmod-kvdo-6.1.3.23-5.el7.x86_64
[03/14/2022 13:55:28] DEBUG - Downloading the kmod-kvdo-6.1.3.23-5.el7.x86_64 package.
[03/14/2022 13:55:28] DEBUG - Calling command 'yumdownloader -v --destdir="/var/lib/convert2rhel/backup" kmod-kvdo-6.1.3.23-5.el7.x86_64'
[03/14/2022 13:55:28] DEBUG - Pseudo-PTY columns set to: (0, 120)
Successfully downloaded the kmod-kvdo-6.1.3.23-5.el7.x86_64 package.
[03/14/2022 13:55:30] DEBUG - Path of the downloaded package: /var/lib/convert2rhel/backup/kmod-kvdo-6.1.3.23-5.el7.x86_64.rpm
Backing up libreport-centos-2.1.11-53.el7.centos.x86_64
[03/14/2022 13:55:30] DEBUG - Downloading the libreport-centos-2.1.11-53.el7.centos.x86_64 package.
[03/14/2022 13:55:30] DEBUG - Calling command 'yumdownloader -v --destdir="/var/lib/convert2rhel/backup" libreport-centos-2.1.11-53.el7.centos.x86_64'
[03/14/2022 13:55:30] DEBUG - Pseudo-PTY columns set to: (0, 120)
Successfully downloaded the libreport-centos-2.1.11-53.el7.centos.x86_64 package.
[03/14/2022 13:55:32] DEBUG - Path of the downloaded package: /var/lib/convert2rhel/backup/libreport-centos-2.1.11-53.el7.centos.x86_64.rpm
Backing up libreport-plugin-mantisbt-2.1.11-53.el7.centos.x86_64
[03/14/2022 13:55:32] DEBUG - Downloading the libreport-plugin-mantisbt-2.1.11-53.el7.centos.x86_64 package.
[03/14/2022 13:55:32] DEBUG - Calling command 'yumdownloader -v --destdir="/var/lib/convert2rhel/backup" libreport-plugin-mantisbt-2.1.11-53.el7.centos.x86_64'
[03/14/2022 13:55:32] DEBUG - Pseudo-PTY columns set to: (0, 120)
Successfully downloaded the libreport-plugin-mantisbt-2.1.11-53.el7.centos.x86_64 package.
[03/14/2022 13:55:33] DEBUG - Path of the downloaded package: /var/lib/convert2rhel/backup/libreport-plugin-mantisbt-2.1.11-53.el7.centos.x86_64.rpm
Removing package: centos-indexhtml-7-9.el7.centos.noarch
[03/14/2022 13:55:33] DEBUG - Calling command 'rpm -e --nodeps centos-indexhtml-7-9.el7.centos.noarch'
Removing package: centos-logos-70.0.6-3.el7.centos.noarch
[03/14/2022 13:55:33] DEBUG - Calling command 'rpm -e --nodeps centos-logos-70.0.6-3.el7.centos.noarch'
Removing package: geoipupdate-2.5.0-1.el7.x86_64
[03/14/2022 13:55:34] DEBUG - Calling command 'rpm -e --nodeps geoipupdate-2.5.0-1.el7.x86_64'
Removing package: kmod-kvdo-6.1.3.23-5.el7.x86_64
[03/14/2022 13:55:34] DEBUG - Calling command 'rpm -e --nodeps kmod-kvdo-6.1.3.23-5.el7.x86_64'
Removing package: libreport-centos-2.1.11-53.el7.centos.x86_64
[03/14/2022 13:58:35] DEBUG - Calling command 'rpm -e --nodeps libreport-centos-2.1.11-53.el7.centos.x86_64'
Removing package: libreport-plugin-mantisbt-2.1.11-53.el7.centos.x86_64
[03/14/2022 13:58:36] DEBUG - Calling command 'rpm -e --nodeps libreport-plugin-mantisbt-2.1.11-53.el7.centos.x86_64'
[03/14/2022 13:58:36] DEBUG - Successfully removed 6 packages
[03/14/2022 13:58:36] TASK - [Convert: Resolve possible edge cases] *****************************
Checking if java-1.7.0-openjdk is installed.
Package java-1.7.0-openjdk found. Applying workaround inaccordance with https://access.redhat.com/solutions/3573891.
openjdk workaround applied successfully.
Removing shim-x64 package yum protection.
Relevant to Oracle Linux 7 only. Skipping.
[03/14/2022 13:58:36] TASK - [Convert: Subscription Manager - Download packages] ****************
Skipping due to the use of --keep-rhsm.
[03/14/2022 13:58:36] TASK - [Convert: Subscription Manager - Replace] **************************
Skipping due to the use of --keep-rhsm.
[03/14/2022 13:58:36] TASK - [Convert: Subscription Manager - Verify installation] **************
subscription-manager installed correctly.
[03/14/2022 13:58:36] TASK - [Convert: Install RHEL certificates for RHSM] **********************
Installing RHEL certificate to the system.
[03/14/2022 13:58:36] DEBUG - Certificate copied to /etc/pki/product-default/.
[03/14/2022 13:58:36] TASK - [Convert: Subscription Manager - Subscribe system] *****************
Building subscription-manager command ... 
    ... activation key detected: Activation Key RHEL 7 Prod
    ... organization detected
Registering the system using subscription-manager ...
[03/14/2022 13:58:36] DEBUG - Calling command 'subscription-manager register --force --activationkey="Activation Key RHEL 7 Prod" --org=xxx'
Unregistering from: xxx:8443/rhsm
The system with UUID f26ad1a9-ab79-48a2-a4a2-726be925a396 has been unregistered
All local data removed
The system has been registered with ID: 671ba98d-5a16-4e5b-bbba-bd7062b414ea
The registered system name is: xxx
Using the activation key provided through the command line...
[03/14/2022 13:59:53] TASK - [Convert: Get RHEL repository IDs] *********************************
RHEL repository IDs to enable: rhel-7-server-rpms
[03/14/2022 13:59:53] TASK - [Convert: Subscription Manager - Check required repositories] ******
Verifying needed RHEL repositories are available ... 
[03/14/2022 13:59:53] DEBUG - Calling command 'subscription-manager repos'
Repositories available through RHSM:
rhel-7-server-satellite-tools-6.9-rpms
rhel-7-server-rh-common-rpms
rhel-7-server-optional-rpms
rhel-server-rhscl-7-rpms
SiZo_EPEL_EPEL_7
rhel-7-server-rpms
rhel-7-server-supplementary-rpms
rhel-7-server-extras-rpms
Needed RHEL repos are available.
[03/14/2022 13:59:55] TASK - [Convert: Subscription Manager - Disable all repositories] *********
[03/14/2022 13:59:55] DEBUG - Calling command 'subscription-manager repos --disable=*'
Repositories disabled.
[03/14/2022 14:00:07] TASK - [Convert: Remove packages containing repofiles] ********************
Searching for packages containing repofiles or affecting variables in the repofiles:
centos-release .................................. 1
WARNING - The following packages will be removed...
Package                                      Vendor/Packager  Repository
-------                                      ---------------  ----------
centos-release-7-9.2009.1.el7.centos.x86_64  CentOS           updates
Backing up centos-release-7-9.2009.1.el7.centos.x86_64
[03/14/2022 14:00:31] DEBUG - Downloading the centos-release-7-9.2009.1.el7.centos.x86_64 package.
[03/14/2022 14:00:31] DEBUG - Calling command 'yumdownloader -v --destdir="/var/lib/convert2rhel/backup" centos-release-7-9.2009.1.el7.centos.x86_64'
[03/14/2022 14:00:31] DEBUG - Pseudo-PTY columns set to: (0, 120)
WARNING - Output from the yumdownloader call:
Loading "fastestmirror" plugin
Loading "langpacks" plugin
Loading "product-id" plugin
Loading "subscription-manager" plugin
Adding de_DE.UTF-8 to language list
Updating Subscription Management repositories.
Config time: 0.672
Adding de_DE to language list
Loading mirror speeds from cached hostfile
repo time: 0.002
Setting up Package Sacks
Setting up Package Sacks
Setting up Package Sacks
No Match for argument centos-release-7-9.2009.1.el7.centos.x86_64
Nothing to download
CRITICAL - Couldn't download the centos-release-7-9.2009.1.el7.centos.x86_64 package. This means we will not be able to do a complete rollback and may put the system in a broken state.
Check to make sure that the CentOS Linux repositories are enabled and the package is updated to its latest version.
If you would rather ignore this check set the environment variable 'CONVERT2RHEL_UNSUPPORTED_INCOMPLETE_ROLLBACK'.
[03/14/2022 14:00:32] DEBUG - Traceback (most recent call last):
...

The names were edited to "xxx" for security :-)

By the way ... since it was mentioned already, I tried to set the environment variable with:

export CONVERT2RHEL_UNSUPPORTED_INCOMPLETE_ROLLBACK

This didn't do anything ... I rather skip/ignore the backup since I have a clone of the VM in case of failure.

Please run the following instead:

export CONVERT2RHEL_UNSUPPORTED_INCOMPLETE_ROLLBACK=1

The reason for not being able to download the centos-release-7-9.2009.1.el7.centos.x86_64 package is that your system likely does not have the "updates" repo enabled (defined in the /etc/yum.repos.d/CentOS-Base.repo file).

This way it worked :-)

And indeed, there is no file like /etc/yum.repos.d/CentOS-Base.repo since the VM is already connected to Satellite. There is only a redhat.repo - but the centos updates is inside this repo and it's also enabled. My guess at this point is, it's just looking at the wrong point. With the option "--keep-rhsm" it should have worked I think ... anyways, it's okay now :-)

Thanks for your help :-)

Hi again, I wanted to add some information afterwards, since they might be interesting. I don't know if this is the right place, but at least the other stuff is here too.

The reason for not being able to download the centos-release-7-9.2009.1.el7.centos.x86_64 package is that your system likely does not have the "updates" repo enabled (defined in the /etc/yum.repos.d/CentOS-Base.repo file).

I think this might be the actual issue. But there is a story behind:

My VM got registered to the satellite in past, getting the CentOS Repos from satellite instead from internet (no internet for the VM). Whith the registering to the satellite, there was a new repo created called "redhat.repo". It wasn't done by me, it was done by the subscription manager. The original repo files like "CentOS-Base.repo" became inactive and were out of use, so I deleted them. The only active repofile became the "redhat.repo" with all necessary sources/links inside, all of them directing to the satellite.

So, now there is the point. Convert2rhel hat the option to keep the rhsm, but it doesn't expect to have any other repos than the original ones. It seem not to take a look at the redhat.repo. After conversion the redhat.repo still exists, but of course now containing the new sources/links for redhat instead centos. All repos from centos are fully synchronized at the satellite, but convert2rhel seem to not taking a look there because it's looking for the wrong *.repo. My guess is, if it was looking at the already existing redhat.repo, it might have been able to download the package.

Do my thoughts make any sense?

Thanks a lot for the detailed analysis, Thomas. Your use case is totally valid yet we haven't considered it during the development and testing.

Convert2rhel called the following command to backup the centos-release package (as visible in the log you posted):

yumdownloader -v --destdir="/var/lib/convert2rhel/backup" centos-release-7-9.2009.1.el7.centos.x86_64

This yumdownloader command uses whatever repository enabled on the system at that moment. The problem is in the following command we call before the yumdownloader:

subscription-manager repos --disable=*

It disables all repositories previously enabled through subscription-manager, including the CentOS Linux repos from your Satellite server.

I'm going to describe this bug to the convert2rhel team and we'll fix it.

Tracked under https://issues.redhat.com/browse/RHELC-16. Unfortunately so far no progress.

Why is the title still refering to an unsupported conversion?

Please: Either add the link to the supported conversion or remove this article and add the valued contributions to the supported conversion article

This article is a bit confusing to those that like to do a supported conversion.

This article really covers just the unsupported conversion paths - these are all except the supported (CentOS Linux 7/8, Oracle Linux 7/8). We mention that in this article by this sentence:

"The conversion from CentOS Linux and Oracle Linux to RHEL 7 and 8 is supported by Red Hat. For more information, see Converting from an RPM-based Linux distribution to RHEL. See also Convert2RHEL Support Policy."

It points to the supported conversion guide at https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/converting_from_an_rpm-based_linux_distribution_to_rhel/index.

Sorry Michal,

I missed that, thanks for the notification.

Regards,

Jan Gerrit

Pages