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

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:

1# cat /etc/virt-who.d/vcenter.conf
2[vcenter]
3type=esx
4server=vcenter.stankowic.loc
5username=svc-readonly@vsphere.local
6encrypted_password=xxxxxxxx
7owner=RHSM_ID
8env=Library

It is very important to enter the username in the name@sso.tld format and not like sso.tldname! 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:

1# subscription-manager identity
2system identity: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
3name: satellite.stankowic.loc
4org name: xxxxxxx
5org 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):

12017-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:

12017-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:

 1# subscription-manager status
 2+-------------------------------------------+
 3 System Status Details
 4+-------------------------------------------+
 5Overall Status: Insufficient
 6
 7Red Hat Enterprise Linux for SAP applications, Premium (1-2 sockets)(Up to 4
 8guests) with Smart Management:
 9- Guest has not been reported on any host and is using a temporary unmapped
10 guest subscription.

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

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

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

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

12017-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:

1# subscription-manager attach
2# subscription-manager status
3+-------------------------------------------+
4 System Status Details
5+-------------------------------------------+
6Overall Status: Current

Translations: