Converting CentOS to RHEL with convert2rhel fails oddly with subscription problem
I'm trying to convert a centos 7.9 x64 to rhel 7.9 using convert2rhel following this process:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/converting_from_an_rpm-based_linux_distribution_to_rhel/index?extIdCarryOver=true&sc_cid=7013a000002qCO9AAM
The conversion is failing when subscription-manager can't find a valid subscription. I checked redhat.com Subscriptions and it shows I have plenty of physical and virtual RHEL licenses available.
I previously used the same procedure on a different centos host and the conversion worked fine including the subscription auto-attach.
I'm running:
convert2rhel -y --org NNN --activationkey my-rhel-activation-key
Output from the subscription section:
Building subscription-manager command ...
... activation key detected: my-rhel-activation-key
... organization detected
Registering the system using subscription-manager ...
The system has been registered with ID: XXX-XXX-XXX-XX
The registered system name is: myhost.domain
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status: Not Subscribed
Unable to find available subscriptions for all your installed products.
System registration failed with return code = 1
Trying again - provide username and password.
Building subscription-manager command ...
... activation key detected: my-rhel-activation-key
... organization detected
Attempt 2 of 3: Registering the system using subscription-manager ...
Unregistering from: subscription.rhsm.redhat.com:443/subscription
The system with UUID XXX-XXX-XXX-XX has been unregistered
All local data removed
The system has been registered with ID: ZZZZ-ZZZ-ZZZ
The registered system name is: myhost.domain
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status: Not Subscribed
Unable to find available subscriptions for all your installed products.
System registration failed with return code = 1
Trying again - provide username and password.
Building subscription-manager command ...
... activation key detected: my-rhel-activation-key
... organization detected
Attempt 3 of 3: Registering the system using subscription-manager ...
Unregistering from: subscription.rhsm.redhat.com:443/subscription
The system with UUID XXX-XXX-XXX has been unregistered
All local data removed
The system has been registered with ID: ZZZ-ZZZ-ZZZZ
The registered system name is: myhost.domain
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status: Not Subscribed
Unable to find available subscriptions for all your installed products.
System registration failed with return code = 1
Trying again - provide username and password.
CRITICAL - Unable to register the system through subscription-manager
SOLVED
The solution to this issue was to run "convert2rhel --username $name --password $pw --pool $id". No idea why this worked but the activation key args did not.
Responses