Handling Subscriptions

Assigning a subscription to a system gives the system the ability to install and update any CentOS product in that subscription. A subscription is a list of all of the products, in all variations, that were purchased at one time, and it defines both the products and the number of times that subscription can be used (the quantity of that product). The quantity is roughly the number of user licenses available. When one of those licenses is allocated to a system, that system is subscribed to the subscription.

A subscription is available to a system based on the system's architecture and other installed products. Subscriptions that are available for a platform (based on its hardware and operating system) are compatible. When the subscription is actually assigned to the machine, the subscription is consumed.

A system can be subscribed to multiple subscriptions, a single subscription, or a single product. Subscribing a system requires the ID number of the subscription or the subscription key for the product.

Unsubscribing a machine removes the entitlement to any of the products in the subscription, but the machine remains registered with the subscription service. Unsubscribing one system frees the subscription so that it can be allocated to another system.

Subscribing and Unsubscribing through the CentOS Subscription Manager GUI

Subscribing to a Product

  1. Launch the CentOS Subscription Manager GUI. For example:
subscription-manager-gui

Unsubscribing through the GUI

  1. Launch the CentOS Subscription Manager GUI. For example:
subscription-manager-gui

Handling Subscriptions through the Command Line

Subscribing from the Command Line

Subscribing a machine through the command line requires specifying the individual product or subscription to subscribe to, using the --pool option.

[root@server1 ~]# subscription-manager subscribe --pool=XYZ01234567

The options for the subscribe command are listed in .

The ID of the subscription pool for the purchased product must be specified, and this pool ID is listed with the product subscription information, from running the list command:

[root@server1 ~]# subscription-manager list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
ProductName:            RHEL for Physical Servers
ProductId:              MKT-rhel-server
PoolId:                 ff8080812bc382e3012bc3845ca000cb
Quantity:               10
Expires:                2011-09-20

Alternatively, the system can be subscribed to the best-fitting subscriptions, as identified by the subscription service, by using the --auto option (which is analogous to the --autosubscribe option with the register command).

[root@server1 ~]# subscription-manager subscribe --auto

Table 14.4. subscribe Options

Options Description Required
--pool=pool-id Gives the ID for the subscription to subscribe the machine to. Required, unless --auto is used
--auto Automatically subscribes the system to the best-match subscription or subscriptions. Optional
--quantity Subscribes multiple counts of an entitlement to the system. This is used to cover subscriptions that define a count limit, like using two 2-socket server subscriptions to cover a 4-socket machine. Optional

Unsubscribing from the Command Line

A system can be subscribed to multiple subscriptions and products. The system can be unsubscribed from a single subscription or product or from every subscribed product.

Running the unsubscribe command with the --all unsubscribes the system from every product and subscription pool it is currently subscribed to.

[root@server1 ~]# subscription-manager unsubscribe --all

It is also possible to unsubscribe from a single product. Each product has an identifying X.509 certificate installed with it, and the product to unsubscribe from can be identified with the unsubscribe command to remove only that product subscription.

  1. Get the serial number for the product certificate, if you are unsubscribing from a single product. The serial number can be obtained from the cert.pem file or by using the list command. For example:
[root@server1 ~]# subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+
ProductName:         High availability (cluster suite)
ContractNumber:      0
SerialNumber:        11287514358600162
Active:              True
Begins:              2010-09-18
Expires:             2011-11-18

Stacking Subscriptions

Some subscriptions define a count which works as a restriction on the subscription. For example, counts can be set on the number of sockets or CPUs on a machine, the number of virtual guests on a host, or the number of clients in a domain.

The entire count must be covered for the system to be fully entitled. If there are four sockets on a machine, then the server subscriptions must cover four sockets, or if there are eight guests, then there must be enough to cover all eight guests.

Many subscriptions can be combined together to cover the count on the system. Two subscriptions for RHEL Server for 2-Sockets can be combined together to cover a four-socket machine. These subscriptions can be stacked.

There are some rules on what subscriptions can be stacked:

To stack subscriptions in the Subscription Manager UI, simply set the Quantity field to the required quantity to cover the count.

Stacking Quantities

Figure 14.13. Stacking Quantities


To stack subscriptions from the command line, use the --quantity option. The quantity taken applies to the product in the --pool option:

[root@server1 ~]# subscription-manager subscribe --pool=XYZ01234567 --quantity=2

Manually Adding a New Subscription

In certain situations, new product subscriptions can be added by uploading the X.509 entitlements certificate directly rather than polling the subscription service. For example, consumers which are offline must have subscriptions manually added because they cannot connect to the subscription service directly.

  1. Retrieve the certificate information for the consumer from the Customer Portal.
  1. Open the Subscriptions tab in the Customer Portal, and select the Overview item under the Certificate-Based Management area.