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.
All of the active subscriptions to which the system is currently subscribed are listed. (The products available through the subscription may or may not be installed.)
Subscribing a machine through the command line requires specifying the individual product or subscription to subscribe to, using the The options for the 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 Alternatively, the system can be subscribed to the best-fitting subscriptions, as identified by the subscription service, by using the 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 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 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.
To stack subscriptions from the command line, use the 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.
To download individual entitlement certificates, click the Download link on the row for the subscription.
This can be done from the command line using the This can also be performed through the Subscription Manager GUI:
The consumer is then entitled for all of the subscription that were uploaded.Subscribing and Unsubscribing through the CentOS Subscription Manager GUI
Subscribing to a Product
subscription-manager-gui
Unsubscribing through the GUI
subscription-manager-gui
Handling Subscriptions through the Command Line
Subscribing from the Command Line
--pool
option.
[root@server1 ~]# subscription-manager subscribe --pool=XYZ01234567
subscribe
command are listed in Table 14.4, "subscribe Options".
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
--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
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
unsubscribe
command to remove only that product subscription.
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
--serial
option to specify the certificate.
[root@server1 ~]# subscription-manager unsubscribe --serial=11287514358600162
Stacking Subscriptions
Figure 14.13. Stacking Quantities
--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
.zip
file. Save the file to some kind of portable media, like a flash drive.
certificates.zip
file. Unzip the directories until the PEM files for the subscription certificates are available.
import
command:
# subscription-manager import --certificate=/tmp/export/entitlement_certificates/596576341785244687.pem --certificate=/tmp/export/entitlement_certificates/3195996649750311162.pem
Successfully imported certificate 596576341785244687.pem
Successfully imported certificate 3195996649750311162.pem
subscription-manager-gui
.pem
file of the product certificate.