3.6. Setting up Virtual Hosts for Registration

Red Hat Enterprise Linux has an optional service available`which can automatically detect guests on a virtual host system and register them as virtual systems. This allows subscriptions which are specific to virtual systems to be available to the guest and for subscriptions which are inherited from the host to be applied to the guest.

3.6.1. Supported Hypervisors

The virt-who process can detect and associate guests on several hypervisors:
  • Red Hat Enterprise Virtualization Manager (KVM)
  • HyperV
  • VMware ESX

3.6.2. About Host/Guest Associations

Subscription relationships have a lot of potential flexibility. Some subscriptions can be applied to a physical machine or to a certain number of virtual machines, while others can be applied to a physical host and then inherited by guests.
For subscriptions to be managed effectively — particularly with inheritable subscriptions or interactions between subscriptions — there has to be an internal awareness in the subscription service of the relationships between hosts and guests. This is a host/guest mapping, which is literally a list of all of the guest identifiers for a given hypervisor.
Hypervisors are registered as a special type of consumer in Subscription Asset Manager or Customer Portal Subscription Management. Hypervisors themselves are managed as regular physical systems, but the hypervisor type indicates that that particular system will have guests mapped to it, and that subscriptions may be inheritable or applied differently to those guests.
With a host/guest mapping to associate every guest with a specific host, a subscription service can properly attach a single subscription to a virtual host and then apply an included and inheritable subscription to its guest (for example), rather than consuming two separate subscriptions for each instance.
This association is done by extracting a universally unique identifier for each guest and associating it with its hypervisor. These UUIDs are part of the system facts for each virtual system.
The hypervisor is registered first, and then a related process on the system scans for any guests and submits the discovered UUIDs to the subscription service. This is done by the virt-who process on the hypervisor.
There are three factors that must be true for the subscription service to recognize the host/guest association and properly attach subscriptions:
  • 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.

3.6.3. Setting up a KVM Hypervisor

  1. Then register the hypervisor and attach any required subscriptions.
    [root@rhel-server ~]# subscription-manager register --type=hypervisor --username=admin --password=secret --org="ACME_Corp" --auto-attach
  2. Install the virt-who packages.
    [root@server ~]# yum install virt-who
  3. Start the virt-who service.
    [root@server ~]# service virt-who start
  4. Create and register virtual machines as normal.

3.6.4. Setting up a VMware Hypervisor


The virt-who packages that create the host/guest mapping are available for Red Hat Enterprise Linux. In a VMware environment, there must be a Red Hat Enterprise Linux system available to run the virt-who process which connects to the VMware hypervisor.
  1. Register the Red Hat Enterprise Linux host which connects to the VMware vCenter server.
    [root@server ~]# subscription-manager register --username=admin@example.com --password=secret --org=1234-56789 --auto-attach
    If the subscription service is a Subscription Asset Manager instance, the organization ID is available in the Subscription Asset Manager UI or in the Portal entry for the organization. If another system is already registered to that organization, then the ID is available using the subscription-manager orgs command.
    By default, the hypervisor name is esx hypervisor UUID. This name can be changed in the Subscription Asset Manager UI by editing the system entry.
  2. Install the virt-who packages on the Red Hat Enterprise Linux system.
    [root@server ~]# yum install virt-who
  3. Open the virt-who configuration file (/etc/sysconfig/virt-who) and set up the required information for the subscription services.
    1. Enable ESX mode, and set the environment to Library:
    2. Specify the owner of the subscriptions. This must be the ID of an organization. For example:
      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 the subscription-manager orgs command.
    3. Set the hostname or IP address of the vCenter server:
    4. Specify the username and password to use when connecting to the vCenter server:
    5. Save the changes to the configuration file.
  4. Start the virt-who service; 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-UUID file.
  5. Use chkconfig to configure the virt-who service so that it starts automatically when the system starts.
    [root@vmware-server ~]# chkconfig virt-who on

3.6.5. Registering Guest Instances

Register a virtual system the same as a physical system, using the same subscription service and organization as the host.
[root@virt-server ~]# subscription-manager register --username=admin --password=secret --org="ACME_Corp" --auto-attach


The 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.

3.6.6. Creating a Data Center

There is a specific subscription available for data centers which registers a physical system as a hypervisor and then allows an unlimited number of virtual guests to be installed and registered on that system. That physical system can be a Red Hat Enterprise Linux system running RHEV, or it can be a non-Linux system, running VMware or HyperV. The configuration does not matter; as with running any virtualized environment, there simply must be one Red Hat Enterprise Linux system to run the virt-who process to create the host/guest mapping.
For each physical host in the environment:
  1. Attach the data center subsription to the hypervisor entry. The name of the subscription is Red Hat Enterprise Linux for Virtual Datacenters ... System:Physical.
  2. Register all guests for that host/hypervisor, as described in Section 3.6.5, “Registering Guest Instances”.


If a virtual instance is migrated from one hypervisor to another, the Red Hat Enterprise Linux subscription is preserved, but any subscriptions for additional products, such as JBoss Enterprise Application Platform, must be released and then re-attached.