6.4. Setting up a Red Hat Enterprise Virtualization Manager Server or Libvirt (KVM) Hypervisor

  1. Configure Subscription Manager on the virtual system to use Satellite and the CA certificate:
    # rpm -ivh \
    http://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
  2. Register the Red Hat Enterprise Linux system (which communicates with Red Hat Enterprise Virtualization Manager) to Satellite:
    # subscription-manager register --username=admin --password=secret --org=organization_label --auto-attach
    The organization label is available in the Satellite web UI. If another system is already registered to that organization, then you can get the label by using the subscription-manager orgs command.
  3. Install the virt-who packages on the hypervisor.

    Note

    For both the Red Hat Enterprise Virtualization Manager server and the libvirt (KVM) hypervisor, Red Hat recommends that you install the virt-who package on a physical system.
    # yum install virt-who
  4. Edit the virt-who configuration file (/etc/sysconfig/virt-who) and set the parameters as follows:
    For a Red Hat Enterprise Virtualization Manager server:
    VIRTWHO_DEBUG=1
    VIRTWHO_SATELLITE6=1
    VIRTWHO_RHEVM=1
    VIRTWHO_RHEVM_OWNER=organization_label
    VIRTWHO_RHEVM_ENV=environment
    VIRTWHO_RHEVM_SERVER=RHEV-server_URL 
    VIRTWHO_RHEVM_USERNAME=desired_user_name
    VIRTWHO_RHEVM_PASSWORD=desired_password
    
    Note that to determine the organization label for the VIRTWHO_RHEVM_OWNER parameter execute the subscription-manager identity command. The user name for the VIRTWHO_RHEVM_USERNAME parameter has the form admin@internal. With the VIRTWHO_SATELLITE6 parameter enabled, virt-who sends reports to the Satellite server.
    For a libvirt (KVM) hypervisor:
    VIRTWHO_BACKGROUND=1
    VIRTWHO_DEBUG=1
    VIRTWHO_SATELLITE6=1
    VIRTWHO_LIBVIRT=1
    
    With the VIRTWHO_SATELLITE6 parameter enabled, virt-who sends reports to Red Hat Satellite.
  5. Start and enable the virt-who service:
    • On Red Hat Enterprise Linux 6:
      # service virt-who start
      # chkconfig virt-who on
      
    • On Red Hat Enterprise Linux 7:
      # systemctl start virt-who
      # systemctl enable virt-who
      
  6. After starting the virt-who service, monitor the /var/log/rhsm/rhsm.log/ file on the same system to confirm whether or not hosts and guests mappings are sent.
    2015-01-10 13:44:38,651 [DEBUG]  @subscriptionmanager.py:112 - Sending update in hosts-to-guests mapping: {44454c4c-3900-1057-804c-b2c04f375231: [42346e7b-f3df-6651-4d43-6de0c769c6c7, 564ddf1c-1eec-aba5-aec4-03d311ca298e, 4234ee7d-b239-ebb1-738f-55a83861d1a5, 42343eb8-838f-18f3-24f9-682455093072, 42345839-6316-6733-f5a1-bd4213d693b3, 42344725-cf73-f8d9-6bff-c88d4df5c67c]}
    
  7. On the Satellite server, go to HostContent Hosts and confirm that host (hypervisor) system profiles display. By default, the hypervisor name is as follows:
    For a Red Hat Enterprise Virtualization Manager server:
    hypervisor UUID
    For a libvirt (KVM) hypervisor:
    hypervisor UUID
    If desired, change this name in the Red Hat Satellite UI by editing the system entry.
  8. To make virtual subscriptions available for virtual machines, the host system needs a subscription. To know on which host the virtual machine is running, open the virtual machine profile from the Content Hosts page. In the Details tab, the virtual machine displays as Virtual Host UUID. Click the UUID link that opens the host system profile. Then, in the Subscriptions tab, assign the subscription to the host system. If you have multiple hypervisors running Red Hat Enterprise Linux guests, attach a subscription to all the hypervisors.
  9. To consume the subscription assigned to the hypervisor profile on the machine running virt-who,unsubscribe and then auto subscribe:
    # subscription-manager remove --all
    # subscription-manager attach --auto
    
  10. Confirm whether the subscription attached to the hypervisor is consumed by the guest running virt-who:
    # subscription-manager list --consumed
    
  11. When you install new virtual machines on the hypervisor, you must register the new virtual machines and use the subscription attached to the hypervisor:
    # rpm -ivh \
    http://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
  12. Register the new virtual machines and use the subscription attached to the hypervisor:
    # subscription-manager register --org=organization_label
    # subscription-manager attach --auto
    # subscription-manager list --consumed