Report VMware vSphere RHEL guests to RHSM using Red Hat Satellite 6.2

Download PDF

If you’re utilizing Red Hat Satellite 6 for managing virtual Red Hat Enterprise Linux instances, you will need to leverage Red Hat Subscription Management (RHSM) for maintaining licenses. In comparison with the former Red Hat Network Classic licensing, signed manifest certificates are used. For bigger system landscapes it is easier to list required and needed licenses as RHSM can integrate seamlessly into hypervisors. Using a software that is executed on the Red Hat Satellite server, running RHEL instances and used hypervisors are detected and reported to RHSM  to ensure correct licensing. There is no need to install custom software on the hypervisor – it is only required to read information from the hypervisor API. It is advisable to create a read-only service account for reading information.

The conventional subscription management will cease to exist beginning on the 31th July 2017 – even for Red Hat Satellite 5. Users of the older management suite also need to migrate to RHSM.

Before going ahead you should ensure that your managed systems should be at least versions 5.7, 6.1 and 7.0 or higher. When using Red Hat Satellite 6, it is necessary to install the virt-who package on that system. It is advisable to create a configuration file per hypervisor or vCenter Server – e.g. for a vCenter instance:

# cat /etc/virt-who.d/vcenter.conf
[vcenter]
type=esx
server=vcenter.stankowic.loc
username=svc-readonly@vsphere.local
encrypted_password=xxxxxxxx
owner=RHSM_ID
env=Library

It is very important to enter the username in the name@sso.tld format and not like sso.tld\name! If you’re using the second format, username and password are not submitted correctly and incorrect logins are the result.

RHSM_ID needs to be replaced by the RHSM organization ID ersetzt werden. The easiest approach to retrieve this ID is to enter the following command on the Red Hat Satellite Server as this system is usually already registered to RHSM:

# subscription-manager identity
system identity: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
name: satellite.stankowic.loc
org name: xxxxxxx
org ID: xxxxxxx

I have to mention that the official documentation is slightly incomplete regarding this detail. My first approach was to enter the internal organization ID within Satellite and was very confused when receiving the following error message in the RHSM log (/var/log/rhsm/rhsm.log):

2017-05-11 09:13:55,657 [virtwho.main ERROR] MainProcess(6049):MainThread @executor.py:send:143 - Unable to send data: Communication with subscription manager failed with code 404: Organization with id 1 could not be found.

Of course, also using the name did not fix this:

2017-05-11 09:13:26,845 [virtwho.main ERROR] MainProcess(5809):MainThread @executor.py:send:143 - Unable to send data: Communication with subscription manager failed with code 404: Organization with id Stankowic could not be found.

As a result, some systems only had a temporary subscription:

# subscription-manager status
+-------------------------------------------+
 System Status Details
+-------------------------------------------+
Overall Status: Insufficient

Red Hat Enterprise Linux for SAP applications, Premium (1-2 sockets)(Up to 4
guests) with Smart Management:
- Guest has not been reported on any host and is using a temporary unmapped
 guest subscription.

Temporary subscribed means that the affected system only has access for up to 24 hours to the software repositories.

When configuration virt-who, it is advisable to enable debug mode:

# vi /etc/sysconfig/virt-who
VIRTWHO_BACKGROUND=1
VIRTWHO_DEBUG=1
VIRTWHO_SATELLITE6=1

If username and password are correct, you can check detecting and reporting the virtual RHEL instances in the RHSM log:

2017-05-11 10:14:40,523 [virtwho.main DEBUG] MainProcess(15626):MainThread @executor.py:send_report:101 - Report for config "vcenter" sent

On a temporarily subscribed RHEL system running the following two commands was sufficient to fix the subscription state:

# subscription-manager attach
# subscription-manager status
+-------------------------------------------+
 System Status Details
+-------------------------------------------+
Overall Status: Current
Download PDF