Chapter 8. Virtualization Agent (virt-who)
8.1. Setting up the Virtualization Agent
- Red Hat Enterprise Linux 6 or above.
- Access to both the Red Hat Satellite and the hypervisor on port 443, TCP. In addition, you must create a user in your virtualization environment so that the Virtualization Agent can read information about hypervisors and guests. This can be a user with read-only permission.
- The system must be registered to either Red Hat Content Delivert Network directly or the Red Hat Satellite and subscribed to the RHN Tools channel.
- Login as root on the Red Hat Satellite.
- Install the virt-who package:
# yum install virt-who
- Edit the following entries in the
# Start virt-who on background, perform doublefork and monitor for virtual guest # events (if possible). It is NOT recommended to turn off this option for # starting virt-who as service. VIRTWHO_BACKGROUND=1 # Enable debugging output. # optional VIRTWHO_DEBUG=1 # virt-who subscription manager backend, enable ony one option from following 2: # Report to Subscription Asset Manager (SAM) VIRTWHO_SAM=0 # Report to Satellite VIRTWHO_SATELLITE=1Edit the virtualization options for your virtualization environment type. For example, for Red Hat Enterprise Virtualization:
# Register guests using RHEV-M VIRTWHO_RHEVM=1 # Options for RHEV-M mode VIRTWHO_RHEVM_ENV=not-used VIRTWHO_RHEVM_SERVER=server_hostname_or_IP VIRTWHO_RHEVM_USERNAME=server_login VIRTWHO_RHEVM_PASSWORD=server_passwordFor VMware ESX:
# Register ESX machines using vCenter VIRTWHO_ESX=1 # Option for ESX mode VIRTWHO_ESX_ENV=not-used VIRTWHO_ESX_OWNER=organization_id VIRTWHO_ESX_SERVER=server_hostname_or_IP VIRTWHO_ESX_USERNAME=server_login VIRTWHO_ESX_PASSWORD=server_password
NoteThe user for accessing the virtualization environment only requires read-only permissions. For security, create a new user in your virtualization environment with read-only permissions and nothing else.Finally, edit the Satellite options and enter your server details:
# Option for Satellite backend VIRTWHO_SATELLITE_SERVER=satellite_hostname VIRTWHO_SATELLITE_USERNAME=username VIRTWHO_SATELLITE_PASSWORD=password
- Start the virt-who service:
service virt-who startStarting the virt-who service will gather the host/guest UUID information and send the information to the Satellite. It will also scan the
/var/lib/virt-who/hypervisor-systemid-[UUID]file to check if the hypervisor has already been registered to the Red Hat Satellite. If it does, the existing hypervisor system information on the Red Hat Satellite is updated. If it does not exist on the Satellite, the new hypervisor wil be registered.
/var/lib/virt-who/hypervisor-systemid-UUID, and the hypervisor needs to be manually removed via the satellite web UI.
/etc/virt-who.d/instead of adding details for a single configuration in the
/etc/sysconfig/virt-whofile. For example:
[test-esx-1] type=esx server=10.1.1.1 username=admin password=password [test-esx-2] type=esx server=10.1.2.1 username=admin password=password
8.1.1. VMware Configuration Scenario
virtwho-readonly-useraccount in Active Directory and provide access to vCenter:
- Run the Active Directory Users and Computers program on your Windows machine with a user that has rights to add users into your domain. Create a user named
- Log in to vSphere Web Client using an account with administrator privileges.
- Navigate to→ → → .
Figure 8.1. Navigate to Single Sign-On Configuration
- Navigate to the plus icon, and select the Active Directory identity source. This adds Active Directory identity source, including thetab, press the
Figure 8.2. Add the Identity Source
- Navigate to→ and select the vCenter to grant access to
Figure 8.3. Navigate to vCenter
- Navigate to plus icon to open the Add Permission dialog.→ and press the
Figure 8.4. Click the plus icon
- Select the
- Select the Read-only role.
- Click OK to save the permissions.
- Log out and test the
virtwho-readonly-userin vCenter. Make sure the inventory shows the resources that
- Log in to the Satellite server and install virt-who:
# yum install virt-who
- Edit the
/etc/sysconfig/virt-whofile and use the following options:
# virt-who options VIRTWHO_BACKGROUND=1 VIRTWHO_DEBUG=1 # Enable virt-who with VMware VIRTWHO_ESX=1 # Options for ESX mode VIRTWHO_ESX_ENV=not-used VIRTWHO_ESX_OWNER=[organization_id] VIRTWHO_ESX_SERVER=vcenter.example.com VIRTWHO_ESX_USERNAME=DOMAIN\\virtwho-readonly-user VIRTWHO_ESX_PASSWORD=******* # Report to Satellite VIRTWHO_SAM=0 VIRTWHO_SATELLITE=1Make sure to replace [organization_id] with the ID of your target organization on your Satellite server.
- Start and enable the virt-who service:
# service virt-who start # chkconfig virt-who on