7.4. Setting up a VMware Hypervisor

Note

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. Configure the Subscription Manager application on the virtual system to use the Subscription Asset Manager service and CA certificate.
    [root@rhel-server ~]# rpm -ivh http://sam.example.com/pub/candlepin-cert-consumer-latest.noarch.rpm
    
  2. Then register the Red Hat Enterprise Linux system (which communicates with the VMware server) as a hypervisor.
    [root@rhel-server ~]# subscription-manager register --type=hypervisor --username=admin --password=secret --org=1234-56789 --auto-attach
    The organization ID should be 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.
  3. Install the virt-who packages.
    [root@server ~]# yum install virt-who
  4. Open the virt-who configuration file (/etc/sysconfig/virt-who) and set it to use the Subscription Asset Manager instance and the appropriate vCenter server.
    1. Set that the VMware server will interact with a Subscription Asset Manager instance.
      VIRTWHO_BACKGROUND=1
      VIRTWHO_SAM=1
    2. Enable ESX mode, and set the environment to Library:
      VIRTWHO_ESX=1
      VIRTWHO_ESX_ENV=Library
    3. Specify the owner of the subscriptions. This must be the ID or name of an organization that is created within the Subscription Asset Manager instance. For example:
      VIRTWHO_ESX_OWNER=6340056
      The organization ID should be 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.
    4. Set the hostname or IP address of the vCenter server:
      VIRTWHO_ESX_SERVER=vcenter.example.com
    5. Specify the username and password to use when connecting to the vCenter server:
      VIRTWHO_ESX_USERNAME=admin
      VIRTWHO_ESX_PASSWORD=secret
    6. Save the changes to the configuration file.
  5. Start the virt-who service; this begins gathering all of the host/guest data.
    [root@rhel-server ~]# service virt-who start
    The data are added to the /var/lib/virt-who/hypervisor-systemid-UUID file.
  6. Use chkconfig to configure the virt-who service so that it starts automatically when the system starts.
    [root@rhel-server ~]# chkconfig virt-who on