How do I register a system to Customer Portal Subscription Management?
Environment
- Red Hat Enterprise Linux 5.7 or newer
- Red Hat Enterprise Linux 6.1 or newer
- Red Hat Enterprise Linux 7
Issue
- How do I register a system to Red Hat Subscription Management in Customer Portal using subscription-manager during a kickstart of a new RHEL Server?
Resolution
With the release of Red Hat Subscription Management (RHSM), Red Hat has moved to a certificate-based registration which is designed to streamline the process of registering RHEL systems and allow easy management of subscriptions and registered systems.
Many customers have transitioned their subscription handling over to RHSM with great success however with the addition of RHSM, the process to register systems via kickstart in RHEL has changed.
While different, this process can still be completely successfully using a short %post script in the kickstart file. Below is an example kickstart %post used to install a RHEL system and register it to Customer Portal Subscription Management:
%post
# This is done here in the post section, after the system
# has completed install and before a reboot
/usr/sbin/subscription-manager register --username customer_portal_username --password customer_portal_password --autosubscribe
Using the --autosubscribe option above this will allow the system to automatically apply the most relevant and applicable entitlement to this system based on what is available from the account tied to this login information.
If you desire the system in question to be registered only to entitlements tied to specific support levels, then you can opt to also include the --servicelevel option by appending that option as follows:
%post
# This is done here in the post section, after the system
# has completed install and before a reboot
/usr/sbin/subscription-manager register --servicelevel=LEVEL --username customer_portal_username --password customer_portal_password --autosubscribe
Here you can append STANDARD, NONE, PREMIUM. This will instruct RHSM to only subscribe with the appropriate level based on the support need for this system.
The subscription-manager command has an abundance of options that can be used the modify/manipulate the exact registration needed for any system. For more information and a full list of options see the manpage for subscription manager by doing man subscription-manager from any installed RHEL system that has the subscription-manager package installed.
For more information on using Red Hat Subscription Management and subscription manager, refer to This content is not included.this guide.
RHEL Systems Registration Guide
- This document is part of a collection covering RHEL System Registration.
- If this is not the right solution for your registration needs or;
- If you wish to make a different registration choice;
- then you can return to the RHEL Systems Registration Guide.
Red Hat Labs Registration Assistant
We also have an online tool to assist you in selecting the most appropriate registration technology for your system. If you would prefer to use this tool, please visit [https://access.redhat.com/labs/registrationassistant/](https://access.redhat.com/labs/registrationassistant/).
This solution has been reviewed for technical accuracy, optimized for search, and integrated with Product Documentation and/or Red Hat Access Labs. Much like when a software package is accepted upstream, this content has moved from the general KCS editing workflow into the responsibility of Customer Content Services as maintainers.