Setting up virt-who before migrating to RHSM

Updated

As hypervisors do not natively report guest mappings to Red Hat Satellite or the Red Hat CDN, the virt-who service has been created to ensure virtual guests consume the proper Red Hat subscriptions. The virt-who agent interrogates the hypervisor infrastructure and provides the host/guest mapping to the subscription service.

If you have a virt-limit=unlimited subscription (e.g., a Virtual Data Center entitlement), you need to set up virt-who before migrating to RHSM from RHN. If you don’t set up virt-who prior to the migration, repositories and/or subscriptions may fall off of any system that is using a virt-who required subscription.

virt-who Setup

Note: subscription-manager doesn’t yet know to which host the virtual machine belongs, a temporary subscription is granted valid for a maximum 24 hours. If you need longer than 24 hours for setup, contact your TAM for longer access to RHSM.

Configuration Tool

An automatic virt-who configuration tool is available on
Customer Portal for systems running RHEL 6 and RHEL 7.

Manual Setup

  1. Decide on a configuration that suits your environment.
  2. Review the virt-who daemon’s prerequisites and ensure that all have been met.
  3. Install an instance of Red Hat Enterprise Linux for the purpose of running virt-who.
  4. Install the virt-who daemon.
    # yum install virt-who
  5. Establish connections between the virt-who daemon and your hypervisors.

In some cases, you may have a different setup at your data center. In the event of these noteworthy situations, be sure to make the appropriate changes.

Multiple Hypervisors

Individual configuration files are recommended for each hypervisor or virtualization manager as it makes troubleshooting easier. For example, if you suspect a hypervisor is causing a problem, you can move that hypervisor’s configuration file to another directory, stopping virt-who from querying it and so eliminating it from the problem’s scope.

If you have multiple hypervisors, virt-who queries each in parallel. This reduces the chance of virt-who’s queries being stopped or delayed because of an unresponsive hypervisor.

Multiple Hypervisor Technologies

A single virt-who instance can connect to virtualization platforms of multiple supported technologies. Individual configuration files are recommended for each platform.

virt-who Setup with a KVM Hypervisor

How to configure virt-who for a KVM host?

virt-who Setup with VMWare Hypervisor

  1. Register the host which connects to the VMware vCenter server.
  2. subscription-manager register --username=admin@example.com --password=secret --auto-attach
  3. Install the virt-who packages on the RHEL system.
    yum install virt-who
  4. 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:
      VIRTWHO_ESX=1
      VIRTWHO_ESX_ENV=Library
    2. Specify the owner of the subscriptions. This must be the ID of an organization. For example:
      subscription-manager identity
    3. Set the hostname or IP address of the vCenter server:
      VIRTWHO_ESX_SERVER=vcenter.example.com
    4. Specify the username and password to use when connecting to the vCenter server:
      VIRTWHO_ESX_USERNAME=admin
      VIRTWHO_ESX_PASSWORD=secret
    5. Save the changes to the configuration file.
  5. Start the virt-who service to gather the host/guest data.
    service virt-who start
  6. The data are added to the /var/lib/virt-who/hypervisor-systemid-UUID file.
  7. Use chkconfig to configure the virt-who service so that it starts automatically when the system starts.
    1. If you're using RHEL 6:
      # chkconfig virt-who on
    2. If you're using RHEL 7:
      # systemctl enable virt-who
Category
Article Type