Chapter 1. Introduction

You can use host-based subscriptions for Red Hat Enterprise Linux virtual machines in the following virtualization platforms:

  • Red Hat Virtualization
  • Red Hat Enterprise Linux Virtualization (KVM)
  • Red Hat OpenStack Platform
  • VMware vSphere
  • Microsoft Hyper-V
  • OpenShift Virtualization

1.1. Host-based subscriptions

Virtual machines can use host-based subscriptions instead of consuming entitlements from physical subscriptions. A host-based subscription is attached to a hypervisor and entitles it to provide subscriptions to its virtual machines. Many host-based subscriptions provide entitlements for unlimited virtual machines.

To allow virtual machines to inherit subscriptions from their hypervisors, you must install and configure virt-who. Virt-who queries the virtualization platform and reports hypervisor and virtual machine information to Red Hat Subscription Management.

When a virtual machine is registered with auto-attach enabled, and sufficient host-based subscriptions are available, one of the following behaviors occurs:

  • If the virtual machine has been reported by virt-who and a host-based subscription is attached to the hypervisor, the virtual machine inherits a subscription from the hypervisor.
  • If the virtual machine has been reported by virt-who, and the hypervisor is registered to Subscription Management but does not have a host-based subscription attached, a host-based subscription is attached to the hypervisor and inherited by the virtual machine.
  • If the virtual machine, or its hypervisor, has not been reported by virt-who, Subscription Management grants the virtual machine a temporary subscription, valid for up to seven days. After virt-who reports updated information, Subscription Management can determine which hypervisor the virtual machine is running on and attach a permanent subscription to the virtual machine.

If auto-attach is enabled, but virt-who is not running or there are no host-based subscriptions available, Subscription Management attaches physical subscriptions to the virtual machines instead, which might consume more entitlements than intended.

If auto-attach is not enabled, virtual machines cannot use host-based subscriptions.

Note

System Purpose add-ons have no effect on the auto-attach feature in Red Hat Enterprise Linux 8.0, 8.1, and 8.2.

To see if a subscription requires virt-who, log in to to the Customer Portal at https://access.redhat.com, navigate to Subscriptions > Subscription Utilization, and select a subscription. If "Virt-Who: Required" appears in the SKU Details, you must configure virt-who in order to use that subscription.

Virtual machine subscription process

This diagram shows the subscription workflow when a virtual machine has not yet been reported by virt-who:

Virtual Machine Subscription Process

1 A virtual machine requests a subscription from Subscription Management.

2 Subscription Management grants the virtual machine a temporary subscription, valid for a maximum of seven days, while it determines which hypervisor the virtual machine belongs to.

3 Virt-who connects to the hypervisor or virtualization manager and requests information about its virtual machines.

4 The hypervisor or virtualization manager returns a list of its virtual machines to virt-who, including each UUID.

5 Virt-who reports the list of virtual machines and their hypervisors to Subscription Management.

6 Subscription Management attaches a permanent subscription to the virtual machine, if sufficient entitlements are available.

Additional resources

For more information about the Red Hat subscription model, see Introduction to Red Hat Subscription Management Workflows.

1.2. Configuration overview

To allow virtual machines to inherit subscriptions from their hypervisors, complete the following steps:

Prerequisites

  • Ensure you have sufficient entitlements for the host-based subscription to cover all of the hypervisors you plan to use.
  • For Microsoft Hyper-V, create a read-only virt-who user with a non-expiring password on each hypervisor that runs Red Hat Enterprise Linux virtual machines.
  • For VMware vSphere, create a read-only virt-who user with a non-expiring password on the vCenter Server. The virt-who user requires at least read-only access to all objects in the vCenter Data Center.
  • For OpenShift Virtualization, create a Service Account and grant it with an admin role in the OpenShift cluster master, virt-who need the Service Account Token to connect the OpenShift cluster.

Procedure overview

  1. Section 1.3, “Virt-who configuration for each virtualization platform”. Use the table in this section to plan how to install and configure virt-who for your virtualization platform.
  2. Chapter 2, Attaching a host-based subscription to hypervisors. Attach a host-based subscription to all of the hypervisors you plan to use.
  3. Chapter 3, Preparing a virt-who host. If you are using VMware vSphere or Microsoft Hyper-V, configure a dedicated Red Hat Enterprise Linux server to run the virt-who service. If you are only using Red Hat hypervisors, skip this step.
  4. Chapter 4, Configuring virt-who. Create individual configuration files to connect virt-who to your hypervisors.
  5. Chapter 5, Registering virtual machines to use a host-based subscription. Register the virtual machines and enable auto-attach.

1.3. Virt-who configuration for each virtualization platform

Virt-who is configured using files that specify details such as the virtualization type and the hypervisor or virtualization manager to query. The supported configuration is different for each virtualization platform.

  • A global configuration file, /etc/sysconfig/virt-who, is created automatically when you install virt-who. You can use the default values, or edit this file if required.
  • Individual configuration files are stored in the /etc/virt-who.d/ directory. You must create an individual configuration file for each hypervisor or virtualization manager.

Example virt-who configuration file

This example shows an individual virt-who configuration file for a Microsoft Hyper-V hypervisor:

[hypervisor1]
type=hyperv
server=hypervisor1.example.com
username=virt_who_user
encrypted_password=bd257f93d@482B76e6390cc54aec1a4d
hypervisor_id=hostname
owner=1234567

The type and server values depend on the virtualization platform. The following table provides more detail.

The username refers to a read-only user on Microsoft Hyper-V or VMware vCenter, which you must create before configuring virt-who. Virt-who uses this account to retrieve the list of virtual machines. You do not need a dedicated virt-who user for Red Hat hypervisors.

Required configuration for each virtualization platform

Use this table to plan your virt-who configuration:

Supported virtualization platformType specified in the configuration fileServer specified in the configuration fileServer where virt-who is installed

Red Hat Virtualization

RHEL Virtualization (KVM)

Red Hat OpenStack Platform

libvirt

Not required

Each hypervisor

VMware vSphere

esx

vCenter Server

A dedicated RHEL server

Microsoft Hyper-V

hyperv

Hypervisor

A dedicated RHEL server

OpenShift Virtualization

kubevirt

OpenShift Cluster Master

A dedicated RHEL server

Important

The rhevm and xen hypervisor types are not supported.