Red Hat Training

A Red Hat training course is available for Red Hat Satellite

Chapter 3. Configuring virt-who

You can use the Satellite web UI or the Hammer CLI tool to configure a virt-who instance. Both methods provide input validation.

For more details on configuring a virt-who instance, see one of the following:

3.1. Creating virt-who Configuration using the Web UI

Complete this procedure to create a virt-who configuration, using the Satellite web UI.

Create virt-who Configuration using the web UI

To create a virt-who configuration using the Satellite web UI:

  1. Navigate to InfrastructureVirt-who configurations
  2. Click Create Config.
  3. Complete the General Information, Schedule, and Connection fields and click Submit. Fields marked with an asterisk are mandatory.

    • Click on the information icon beside the name of each field to view a brief description.
    • Enter the hypervisor password in plain text and it will be encrypted.

3.2. Creating virt-who Configuration using Hammer

Complete this procedure to create a virt-who configuration using the Hammer CLI tool.

For more details about using the Hammer CLI tool, see the Hammer CLI Guide.

Create a virt-who configuration using Hammer

Run the hammer subcommand virt-who-config create.

# hammer virt-who-config create \
  --name \ 1
  --organization "Example Company" \ 2
  --interval 120 \ 3
  --filtering-mode none \ 4
  --hypervisor-id hostname \ 5
  --hypervisor-type rhevm \ 6
  --hypervisor-server \ 7
  --hypervisor-username virt-who-user \ 8
  --hypervisor-password virt-who-password \ 9
  --satellite-url 10
Name for this configuration. Recommended: Fully qualified domain name of the hypervisor.
Organization name.
Interval at which virt-who queries hypervisors for changes, measured in seconds.
Hypervisor filtering mode. Possible values: none, whitelist, blacklist. Default: none. For details, see Section 2.1.5, “Filtering Scope of virt-who Access”.
Specifies how the hypervisor will be identified. Possible values: hostname, uuid, hwuuid. Recommended: hostname.
Hypervisor type. Possible value(s): VMware vSphere or VMware vCenter: esx, Red Hat Virtualization Hypervisor: rhevm, Microsoft Hyper-V: hyperv, Red Hat OpenStack Platform: libvirt.
Fully qualified host name or IP address of the hypervisor.
User name by which virt-who is to connect to the hypervisor.
Password of the user name specified by hypervisor-username. The password will be encrypted by hammer.
Fully qualified domain name of the Satellite Server.

The interval parameter is a global parameter for each instance of virt-who, stored in file /etc/sysconfig/virt-who. The value is overwritten each time a virt-who configuration is deployed.

If the creation is successful, a message like the following is output.

Virt Who configuration [] created

3.3. Deploying virt-who Configuration

Complete this procedure to deploy a virt-who configuration. The virt-who service is started when a virt-who configuration is deployed.

Deploy virt-who Configuration

To deploy a virt-who configuration:

  1. Log in to the Satellite web UI.
  2. Navigate to InfrastructureVirt-who configurations.
  3. Click the name of the virt-who configuration.
  4. If virt-who instance is being installed on the Satellite Server:

    1. Click Copy to clipboard in Hammer command:.
    2. Open a terminal emulator and connect via SSH to the virt-who host as user root.

      # ssh
    3. Paste the Hammer command into the terminal emulator.
  5. If virt-who is not being installed on the Satellite Server:

    1. Click Download the script in Configuration script:.
    2. Open a terminal emulator.
    3. Navigate to the directory to which the deploy script was downloaded.
    4. Copy the deploy script to the virt-who host.

      # scp deploy_script root@_virt_who_host:
    5. Make the the deploy script executable and run it.

      # chmod +x deploy_script
      # deploy_script
      == Finished ==
      Finished successfully
    6. Delete the script.

      # rm deploy_script

3.4. Modifying a virt-who Configuration

It is sometimes necessary to modify a deployed virt-who configuration. For example, when the password of the user with which virt-who connects to a hypervisor is changed, the virt-who configuration must be updated and deployed again.

An existing virt-who configuration can be modified using either the Satellite web UI or with hammer.

Modify a virt-who Configuration

  1. Navigate to InfrastructureVirt-who configurations
  2. Find the virt-who configuration you want to modify, and click Edit on the matching row.
  3. Edit the fields to be modified.
  4. Click Submit
  5. Deploy the modified virt-who configuration. For more information see Section 3.3, “Deploying virt-who Configuration”.

3.4.1. Restarting the virt-who Service

If one or more of the virt-who configuration files is changed, or the environment in the Satellite configuration changes, the virt-who service must be restarted so the changes can take effect. For example, virt-who must be restarted after changing the virt-who account’s password or moving a hypervisor to a new organization.

On Red Hat Enterprise Linux 7:

# systemctl restart virt-who.service

On Red Hat Enterprise Linux 6:

# service virt-who restart