Registering virtual data centers with Red Hat
Prerequisites for registering a VDC
To successfully provision virtual machines, and ensure they inherit host subscriptions, you need to set up and run the virt-who service:
- Install and configure the virt-who service:
subscription-manager register --auto-attach
yum -y install virt-who
- Verify the identity.
subscription-manager register ## if not already registered in the previous step
subscription-manager identity | grep "org ID"
-
Configure virt-who.
-
Start and enable virt-who:
systemctl start virt-who.service
systemctl enable virt-who.servic
- Monitor /var/log/rhsm/rhsm.log file on same system to confirm whether its sending hosts and guests mappings
Adding the data center subscription to the hosts
-
Log into the This content is not included.Red Hat Customer Portal with the user account that you used with the virt-who service in the previous step.
-
View available hypervisors.
-
Select the name of the hypervisor you want to subscribe. Select Attach a subscription. From the list of available subscriptions, select the VDC subscription, and click Attach subscriptions.
If you have multiple hypervisors in the datacenter, subscribe each hypervisor in the same way.
When you are done subscribing your hypervisors, any RHEL virtual guest installed on any of those hypervisors should have subscriptions available named "Red Hat Enterprise Linux for Virtual Datacenters" System: Virtual Derived SKU that provide the repositories needed to get the software you need.
Register and subscribe RHEL guests
Register a RHEL virtual guest: Log into each RHEL virtual guest system and register that system (if it is not already registered).
subscription-manager register
After you subscribe a datacenter host, new Datacenter subscriptions are unlocked and made available to registered RHEL virtual guest running on that host. From the RHEL virtual guest, you can view the available subscriptions, then either auto attach (--auto-attach) or specifically subscribe to the entitlement the provides the Virtual Datacenters subscription.
Important: If you attach a specific SKU (based on its Pool ID), be sure to use the Virtual system type of subscription. When you list available subscriptions, Physical subscription types don't provide any software repositories, while the Virtual types provide multiple repositories. Do not use a physical subscription on a virtual guest.
# find the Pool ID for the Virtual Datacenters subscription
subscription-manager list --available | less
# Use the Pool ID that Provides the RHEL software repos.
subscription-manager attach --pool=31b3d88642361285014238c18fe968ba
Temporary VDC subscriptions
When a virtual machine is first registered, Satellite does not know with which virtualization manager or hypervisor the virtual machine is associated and so cannot assign a subscription. In this case a temporary subscription is granted, valid for a maximum period of 24 hours.
When the virt-who daemon next runs and identifies the virtual machine’s host, a permanent subscription is applied, provided the host has available subscriptions of the right type. If a permanent subscription is granted, the virtual machine’s subscription status is changed to Subscribed.
A virtual machine that has been granted a temporary subscription might, after the 24-hour period, automatically select a subscription intended for a physical host and so restrict the number of subscriptions available. When the 24-hour period expires, the host’s status is changed to Not subscribed if it has been unable to request a suitable subscription.
When a virtual machine is granted a temporary subscription, you have several options available:
-
Install virt-who and wait
-
If virt-who has not already been installed and configured, do so, then wait for virt-who to identify the virtualization manager or hypervisor hosting the virtual machine, in which case the subscription will be automatically selected from those available.
-
Manually assign a subscription
-
If you do not want to wait for up to 24 hours to pass, or you want to assign a specific subscription, install and configure virt-who, then manually assign the desired subscription.
-
Do nothing
This situation should be avoided as it results in more subscriptions being consumed than would otherwise be consumed. A virtual machine assigned a temporary subscription might be assigned subscriptions intended for physical hosts. For example, a virtual machine with 2 CPUs might be granted two subscriptions instead of a single VDC subscription.
Migrating a virtual machine
-
When a virtual machine is migrated either automatically or manually to another hypervisor that is registered to Red Hat Satellite, one of the following virtual machine subscription behaviors can occur:
-
If the virtual machine has been reported via virt-who, and the hypervisor has a valid VDC subscription, the virtual machine will consume the virtual guest pool that already exists for the hypervisor. Ideally, all hypervisors that could be hosting the virtual machine should have a valid VDC subscription.
-
If the virtual machine has been reported via virt-who, and there are sufficient subscriptions in Red Hat Satellite, but the hypervisor does not yet have a valid VDC subscription attached, a VDC subscription will get automatically attached to the hypervisor and be inherited by the virtual machine.
-
If there are sufficient subscriptions in Red Hat Satellite, but the virtual machine has not been reported via virt-who, the virtual machine will consume a physical subscription.
-
If the hypervisor does not have a valid VDC subscription attached, and there are insufficient subscriptions in Red Hat Satellite, the virtual machine will not have a valid subscription and lose access to content.
For more KB articles/solutions related to Virt-who and Virtual Datacenter (VDC) Subscriptions Issues, please refer to the Consolidated Troubleshooting Article for Virt-who and Virtual Datacenter (VDC) Subscriptions Issues