Using Red Hat Subscription Management
managing your Red Hat subscriptions, entitlements, and errata
Edition 1.0
Abstract
Chapter 1. Introduction to Red Hat Subscription Management
- Downloadable content and updates
- Access to the knowledge base
- Support for your product

Figure 1.1. Subscription Management Offerings
- Which products are available to your organization
- Which subscriptions and entitlements you have used
- Which products are installed on your systems
- All active subscriptions for an account and which systems are consuming them
- All systems profiled within the inventory and which subscriptions they are consuming
- Registering systems
- Attaching and renewing subscriptions
- Retrieving system facts, contract information, and UUID

Figure 1.2. The Subscription Process
Chapter 2. System Registration
2.1. Registering a System with the User Interface
Table 2.1. Frequently-Used subscription-manager Commands
| Command | Description |
|---|---|
| Operational Commands | |
| register | Registers or identifies a new system to the subscription service. |
| unregister | Unregisters a machine, which strips its subscriptions and removes the machine from the subscription service. |
| attach | Assigns a specific subscription to the machine. |
| remove | Removes a specific subscription or all subscriptions from the machine. |
| redeem | Autosubscribes a machine to a pre-specified subscription that was purchased from a vendor, based on its hardware and BIOS information. |
| import | Manually installs a subscription certificate, rather than contacting the subscription service with a request and then receiving the certificate. |
| list | Lists all of the subscriptions that are compatible with a machine, either subscriptions that are actually consumed by the machine or unused subscriptions that are available to the machine. |
| Configuration Commands | |
| config | Modifies a specified configuration parameter in the configuration file, /etc/rhsm/rhsm.conf. The parameters are passed in the form configuration_area.parameter="value". |
| service-level | Sets the service-level preference for the system to use when selecting subscriptions in autoattach operations. |
| release | Sets the operating system release version preference for the system to use when selecting subscriptions in autoattach operations. |
| refresh | Pulls the latest subscription data from the server. Normally, the system polls the subscription server at a set interval (4 hours by default) to check for any changes in the available subscriptions. The refresh command checks with the subscription server immediately, outside the normal interval. |
| clean | Removes all of the subscription and identity data from the local system, without affecting the consumer information in the subscription service. Any of the subscriptions consumed by the system are still consumed and are not available for other systems to use. The clean command is useful in cases where the local subscription information is corrupted or lost somehow, and the system will be reregistered using the register --consumerid=EXISTING_ID command. |
| Informative Commands | |
| version | Returns the version of the local client, the name of the subscription service the system is registered with, and the version of the subscription service. |
| identity | Handles the identity certificate and registration ID for a system. This command can be used to return the current UUID or generate a new identity certificate. |
| facts | Lists the system information, like the release version, number of CPUs, and other architecture information. |
| orgs, repos, environments | Lists all of the configured organizations, environments, and content repositories that are available to the given user account or system. These commands are used to view information in a multi-org infrastructure. They are not used to configure the local machine or multi-org infrastructure. |
2.2. Registering from the Command Line
register command with the user account information required to authenticate to Customer Portal Subscription Management. When the system is successfully authenticated, it echoes back the newly-assigned system inventory ID and the user account name which registered it.
register options are listed in Table 2.2, “register Options”.
Note
register command.
Example 2.1. Registering a System to the Customer Portal
[root@server1 ~]# subscription-manager register --username admin-example --password secret The system has been registered with id: 7d133d55-876f-4f47-83eb-0ee931cb0a97
Example 2.2. Automatically Attaching While Registering
register command has an option, --auto-attach, which allows the system to be registered to the subscription service and immediately attaches the subscription which best matches the system's architecture, in a single step.
[root@server1 ~]# subscription-manager register --username admin-example --password secret --auto-attachTable 2.2. register Options
| Options | Description | Required |
|---|---|---|
| --username=name | Gives the content server user account name. | Required |
| --password=password | Gives the password for the user account. | Required |
| --serverurl=hostname | Gives the hostname of the subscription service to use. If this option is not used, the system is registered with Customer Portal Subscription Management. | Required for Red Hat Subscription Asset Manager |
| --baseurl=URL | Gives the hostname of the content delivery server to use to receive updates. Both Customer Portal Subscription Management and SAM use Red Hat's hosted content delivery services, with the URL https://cdn.redhat.com. Since Red Hat Satellite hosts its own content, the URL must be used for systems registered with Red Hat Satellite. | Required for Red Hat Satellite |
| --org=name | Gives the organization to which to join the system. | Required, except for hosted environments |
| --environment=name | Registers the system to an environment within an organization. | OptionalGUI |
| --name=machine_name | Sets the name of the system to register. This defaults to be the same as the hostname. | Optional |
| --auto-attach | Automatically attaches the best-matched compatible subscription. This is good for automated setup operations, since the system can be configured in a single step. | GUI Optional |
| --activationkey=key | Attaches existing subscriptions as part of the registration process. The subscriptions are pre-assigned by a vendor or by a systems administrator using SAM. | Optional |
| --servicelevel=None|Standard|Premium | Sets the service level to use for subscriptions on that machine. This is only used with the --auto-attach option. | Optional |
| --release=NUMBER | Sets the operating system minor release to use for subscriptions for the system. Products and updates are limited to that specific minor release version. This is used only used with the --auto-attach option. | Optional |
| --force | Registers the system even if it is already registered. Normally, any register operations will fail if the machine is already registered. | Optional |
| --type=TYPE | Sets what type of consumer is being registered. The default is system, which is applicable to both physical systems and virtual guests. Other types include hypervisor for virtual hosts, person, domain, rhui, and candlepin for some subscription management applications. | Optional |
2.3. Registering with a Subscription Management Application
- SAM has an RPM which contains the required certificate and automatically updates the server configuration. Installing the RPM of the SAM configuration from the SAM server is the simplest way to create the proper configuration.For example:
[root@server ~]# rpm -ivh http://sam.example.com/pub/candlepin-cert-consumer-latest.noarch.rpm
2.4. Registering an Offline System
- Create a system profile: From the systems page in RHSM, click the New button. Provide the required information to finish creating the new system profile.
- Attach subscriptions: In your newly created system profile, click the Subscriptions tab, and attach any subscriptions you want to use with the system.
- Download and import the entitlement certificate(s): From the Subscriptions tab on your system profile, click Download Certificates to download the entitlement certificate(s) for attached subscriptions. The downloaded file will be in zip format. Extract the content and in /export/entitlement_certificates/ folder you will find the certificate xyz.pem. Move it to the client system's /tmp directory.
# subscription-manager import --certificate=/tmp/Name_Of_Downloaded_Entitlement_Cert.pem
Important
2.5. Unregistering a System
unregister command. This removes the system's entry from the subscription service, removes any subscriptions, and, locally, deletes its identity and subscription certificates.
unregister command.
Example 2.3. Unregistering a System
[root@server1 ~]# subscription-manager unregister
- Open the Subscription Manager UI.
[root@server ~]# subscription-manager-gui
- Open the System menu, and select the item.
- Confirm that the system should be unregistered.
2.6. Restoring a Registration
register command. This command passes the original UUID for a system to issue a request to the subscription service to receive a new certificate using the same UUID. This essentially renews its previous registration.
Example 2.4. Registering a System with an Existing Identity Certificate
register command uses the original ID to identify itself to the subscription service and restore its previous subscriptions.
[root@server1 ~]# subscription-manager register --username admin-example --password secret --consumerid=7d133d55-876f-4f47-83eb-0ee931cb0a97
Table 2.3. register Options to Reregister the System
| Options | Description |
|---|---|
| --consumerid | Gives the system UUID used by an existing system. The system's entry must exist in the Red Hat subscription service for the reregister operation to succeed. |
| --username=name | Gives the content server user account name. |
| --password=password | Gives the password for the user account. |
Chapter 3. Subscription Usage
3.1. Viewing Available and Used Subscriptions
Table 3.1. subscription-manager list Options
| Option | Description |
|---|---|
| --installed (or nothing) | Lists all of the installed products on the system. If no option is given with list, it is the same as using the --installed argument. |
| --consumed | Lists all of the subscriptions attached to the system. |
| --available [--all] | Using --available alone lists all of the compatible, active subscriptions for the system. Using --available --all lists all options, even ones not compatible with the system. |
| sect-Red_Hat_Subscription_Management-Using_Red_Hat_Subscription_Management-Registering_and_Attaching_Subscriptions_Section_ --ondate=YYYY-MM-DD | Shows subscriptions which are active and available on the specified date. This is only used with the --available option. If this is not used, then the command uses the current date. |
| --installed | Lists all of the products that are installed on the system (and whether they have a subscription) and it lists all of the product subscriptions which are attached to the system (and whether those products are installed). |
list command shows all of the subscriptions that are currently attached to the system by using the --consumed option.
[root@server1 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Product Subscriptions +-------------------------------------------+ ProductName: Red Hat Enterprise Linux Server ContractNumber: 1458961 SerialNumber: 171286550006020205 Active: True Begins: 2009-01-01 Expires: 2011-12-31
list command shows all of the subscriptions that are compatible with and available to the system using the --available option. To include every subscription the account has — both the ones that are compatible with the system and for other platforms — use the --all option with the --available. The --ondate option shows only subscriptions which are active on that date, based on their activation and expiry dates.
[root@server1 ~]# subscription-manager list --available --all +-------------------------------------------+ Available Subscriptions +-------------------------------------------+ ProductName: RHEL for Physical Servers ProductId: MKT-rhel-server PoolId: ff8080812bc382e3012bc3845ca000cb Quantity: 10 Expires: 2011-09-20 ProductName: RHEL Workstation ProductId: MKT-rhel-workstation-mkt PoolId: 5e09a31f95885cc4 Quantity: 10 Expires: 2011-09-20 [snip]
--installed option correlates the products that are actually installed on the system (and their subscription status) and the products which could be installed on the system based on the attached subscriptions (and whether those products are installed).
[root@server1 ~]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ ProductName: Red Hat Enterprise Linux Status: Not Subscribed Expires: Subscription: ContractNumber: AccountNumber: ProductName: Load Balancer Status: Subscribed Expires: 2012-02-20 Subscription: 54129829316535230 ContractNumber: 39 AccountNumber: 12331131231
3.2. Stopping Package List Data Collection
- On the local system
- Through the Customer Portal, registered as an offline system
- To an on-premise service such as Red Hat Satellite
- Unregister the system.
- Unregister the system and delete the entry from the Customer Portal.
- Since package lists for systems registered in the portal are also stored in the portal subscription database, the entire system entry must be deleted for the information to be removed.
- Unregister the system from the on-premise subscription service,.
Chapter 4. User Permissions
- View/Edit User’s Only: You can only view or edit systems that you have registered to the account.
- View All: You can view all systems associated with the account, but you cannot make any changes. This role is typical of someone such as a purchasing agent.
- View/Edit All: You can view and edit all systems and applications registered to the account.
4.1. Creating a new user in RHSM
- From the Customer Portal, click your name from the upper-right corner of the screen.
- Click User Management.
- Click Add New User.
- Enter their contact and login information. At the bottom of the screen, select the aforementioned Customer Portal access permissions, as well as the Organization Administrator account role if applicable.
- Click Save.
4.2. Changing user permissions in RHSM
- From the Customer Portal, click your name from the upper-right corner of the screen.
- Click User Management.
- Select the user, and click Edit.
- Click Access Permissions.
- Make the appropriate changes to the permissions and account role, and click Save.
Chapter 5. Activating Subscriptions
- From the Overview page, click Activate your subscription.
- Enter the 16-digit subscription number.
- Continue through the activation wizard.

Figure 5.1. RHSM Activation Key Wizard
Chapter 6. Managing Errata
- From the Overview page, click the account name.
- Click Account Settings.
- Click Errata Notifications.
- Select the types of errata you want to receive. Security errata relate to critical security issues. Bug fixes and enhancement notifications relate to incremental updates to the product.
- Select the notification frequency.
- Click Save.

Figure 6.1. Errata Notification Settings in RHSM
Chapter 7. Managing Systems
7.1. Checking System Facts
- From the Systems page, click the appropriate system.
- Click the System Facts tab.
- System facts including the UUID, architecture, and memory display.

Figure 7.1. System Facts in RHSM
7.2. Regenerating Identity Certificates
[root@server1 ~]# subscription-manager identity --regenerate --force Username: jsmith@example.com Password: Identity certificate has been regenerated.
- From the Systems page, click the appropriate system.
- Click the Subscriptions tab.
- Click Download Certificates.
7.3. Attaching a Subscription to a System
- From the Systems page, click the appropriate system.
- Click the Subscriptions tab.
- Click Attach Subscriptions.
- Select the appropriate subscriptions, and click Attach Subscriptions.
7.4. Removing a Subscription from a System
- From the Systems page, click the appropriate system.
- Click the Subscriptions tab.
- Click Remove next to the appropriate subscription.
- Confirm the removal by clicking Remove Subscription.

Figure 7.2. Remove Subscriptions in RHSM
7.5. Removing a System
- From the Systems page, click the appropriate system.
- Click Remove System.
- Click Remove. The system cannot be recovered after performing this action.
Chapter 8. Using Manifests
- Specific details about a manifest including identity certificate and subscriptions allocated to it
- Manage the subscriptions allocated to the manifest
8.1. Creating a New Manifest
- From the manifests page, click Create Manifest.
- Select the Name and subscription management application you use. Applications that are no longer supported are not available for new manifests.
- Click Create.
8.2. Adding Subscriptions to a Manifest
- From the manifests page, click Create Manifest.
- Select the subscriptions to move.
- Click Add Subscriptions. You are taken to a new, dedicated page for adding subscriptions to a manifest.
- If applicable, you can add subscriptions with future start dates (i.e., “future dating”).
- If applicable, you can filter the table.
- Select the number of subscriptions to move. Select the destination for the selected subscriptions.
- Click Submit.
Chapter 9. Managing Hypervisors and Virtual Hosts
9.1. Hypervisors in Red Hat enterprise Linux
Important
9.2. Supported Hypervisors
virt-who process can detect and associate guests on several different types of hypervisors:
- Red Hat Enterprise Virtualization Manager (KVM)
- Xen
- HyperV
- VMware ESX
9.3. About Host/Guest Associations
libvirt process when the virt-who command is run.
- The appropriate virtual detection process must be run periodically to detect new guest instances.
- The hypervisor and the guest systems must be registered to the same subscription service.
- The hypervisor must have a subscription attached to it that includes virtual subscriptions or inheritable subscriptions.
9.4. Setting up a KVM or Xen Hypervisor
- Install the
virt-whopackages.[root@server ~]# yum install virt-who
This creates a host list which establishes the guest/host mapping that RHSM and Red Hat Subscription Asset Manager can use for subscription management. - Then, create the entry in the Portal.
- Expand the Subscriptions tab, open the Subscription Management item, and select the Units item.
- Click the Register link at the top of the table.
- Fill in the name of the new hypervisor.
- Click the button.
9.5. Setting up a VMware Hypervisor
Note
virt-who packages that create the host/guest mapping are available for RHEL. In a VMware environment, there must be a RHEL system available to run the virt-who process which connects to the VMware hypervisor.
- Create the hypervisor entry in the Portal.
- Expand the Subscriptions tab, open the Subscription Management item, and select the Units item.
- Click the Register link at the top of the table.
- Fill in the name of the new hypervisor.
- Click the button.
- Install the
virt-whopackages on the RHEL system.[root@server ~]# yum install virt-who
- Open the
virt-whoconfiguration file (/etc/sysconfig/virt-who) and set up the required information for the subscription services. - Enable ESX mode, and set the environment to
Library:VIRTWHO_ESX=1 VIRTWHO_ESX_ENV=Library
- Specify the owner of the subscriptions. This must be the ID of an organization. For example:
VIRTWHO_ESX_OWNER=6340056
The organization ID should be available in the Portal entry for the organization if there are multiple organizations. If it was registered with the Portal (which has a single organization) or if another system is already registered to that organization, then the ID is available using thesubscription-manager orgscommand. - Set the hostname or IP address of the vCenter server:
VIRTWHO_ESX_SERVER=vcenter.example.com
- Specify the username and password to use when connecting to the vCenter server:
VIRTWHO_ESX_USERNAME=admin VIRTWHO_ESX_PASSWORD=secret
- Save the changes to the configuration file.
- Start the
virt-whoservice this begins gathering all of the host/guest data.[root@vmware-server ~]# service virt-who start
- The data are added to the
/var/lib/virt-who/hypervisor-systemid-UUIDfile. - Use
chkconfigto configure thevirt-whoservice so that it starts automatically when the system starts.[root@vmware-server ~]# chkconfig virt-who on
9.6. Registering Guest Instances
Note
virt-who process must be running on the virtual host or on a hypervisor in the environment (for VMware) to ensure that virt-who process maps the guest to a physical host, so the system is properly registered as a virtual system. Otherwise, the virtual instance will be treated as a physical instance.
9.7. Attaching Subscriptions to Virtual Hosts and Guests
9.8. Creating a Data Center
virt-who process to create the host/guest mapping.
- Set up the host or hypervisor.
- Attach the data center subsription to the hypervisor entry. The name of the subscription is RHEL for Virtual Datacenters ... System:Physical.
- Register all guests for that host/hypervisor.
Note
Appendix A. Revision History
| Revision History | |||
|---|---|---|---|
| Revision 1.0-3 | Mon July 3 2018 | ||
| |||
| Revision 1.0-2 | Wed Jan 1 2018 | ||
| Revision 1.0-1 | Wed Apr 19 2017 | ||
| |||
