此内容没有您所选择的语言版本。

Chapter 8. Virtualization Agent (virt-who)


virt-who is an agent for reporting virtual guest IDs to Satellite. virt-who has the ability to scan for third-party hypervisors, register the hypervisors on the Satellite, and upload a list of guest UUIDs associated with the hypervisors.

8.1. Setting up the Virtualization Agent

The Virtualization Agent can be installed on the Satellite server or on a seperate host. If using a seperate host, use the following requirements guidelines for your virt-who installation:
  • 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.
To set up virt-who on the Red Hat Satellite:
  1. Login as root on the Red Hat Satellite.
  2. Install the virt-who package:
    # yum install virt-who
    
    Copy to Clipboard Toggle word wrap
  3. Edit the following entries in the /etc/sysconfig/virt-who file:
    # 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=1
    
    Copy to Clipboard Toggle word wrap
    Edit 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_password
    
    Copy to Clipboard Toggle word wrap
    For 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
    
    Copy to Clipboard Toggle word wrap

    Note

    The 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
    
    Copy to Clipboard Toggle word wrap
  4. Start the virt-who service:
    service virt-who start
    
    Copy to Clipboard Toggle word wrap
    Starting 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.

Note

If a hypervisor is deleted, its corresponding file needs to be removed from /var/lib/virt-who/hypervisor-systemid-UUID, and the hypervisor needs to be manually removed via the satellite web UI.
If your environment contains more than one of the same virtualization environment type, add multiple configuration files to the /etc/virt-who.d/ instead of adding details for a single configuration in the /etc/sysconfig/virt-who file. 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
Copy to Clipboard Toggle word wrap

8.1.1. VMware Configuration Scenario

The following scenario configures virt-who for use in a VMware environment. This includes creating the user in Active Directory with read-only permissions for virt-who to use.
Satellite requires open access to vCenter on ports 80 and 443. Before following these steps, create a firewall exception to allow connections on port 80 and 443 from the Red Hat Satellite server to the vCenter.
First, create the virtwho-readonly-user account in Active Directory and provide access to vCenter:
  1. 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 virtwho-readonly-user.
  2. Log in to vSphere Web Client using an account with administrator privileges.
  3. Navigate to Home Administration Single Sign-On Configuration.

    Figure 8.1. Navigate to Single Sign-On Configuration

  4. Navigate to the Identity Sources tab, press the plus icon, and select the Active Directory identity source. This adds Active Directory identity source, including the virtwho-readonly-user user.

    Figure 8.2. Add the Identity Source

  5. Navigate to Home vCenter and select the vCenter to grant access to virtwho-readonly-user.

    Figure 8.3. Navigate to vCenter

  6. Navigate to Manage Permissions and press the plus icon to open the Add Permission dialog.

    Figure 8.4. Click the plus icon

  7. Select the virtwho-readonly-user.
  8. Select the Read-only role.
  9. Click OK to save the permissions.
  10. Log out and test the virtwho-readonly-user in vCenter. Make sure the inventory shows the resources that virtwho-readonly-user can access.
Next, install and configure virt-who to communicate with vCenter:
  1. Log in to the Satellite server and install virt-who:
    # yum install virt-who
    
    Copy to Clipboard Toggle word wrap
  2. Edit the /etc/sysconfig/virt-who file 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=1
    
    Copy to Clipboard Toggle word wrap
    Make sure to replace [organization_id] with the ID of your target organization on your Satellite server.
  3. Start and enable the virt-who service:
    # service virt-who start
    # chkconfig virt-who on
    
    Copy to Clipboard Toggle word wrap
virt-who now gathers host and guest UUIDs from vCenter for Satellite to use.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat