Search

Chapter 3. Configuring virt-who

download PDF

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 Infrastructure Virt-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.

    Note
    • 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.

Procedure

To create a virt-who configuration, enter the following command on Satellite Server:

# hammer virt-who-config create \
  --name rhevm.example.com \ 1
  --organization "Example Company" \ 2
  --interval interval \ 3
  --filtering-mode filtering-mode \ 4
  --hypervisor-id hypervisor-id \ 5
  --hypervisor-type hypervisor-type \ 6
  --hypervisor-server rhevm.example.com \ 7
  --hypervisor-username virt-who-user \ 8
  --hypervisor-password virt-who-password \ 9
  --satellite-url satellite.example.com 10
1
Name for this configuration.
2
Organization name.
3
Interval at which virt-who queries hypervisors for changes, measured in minutes. The value must be one of 60, 120, 240, 480, 720, 1440, 2880, or 4320.
Note

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.

4
Hypervisor filtering mode. Possible values: none, whitelist, blacklist. Default: none. For more information, see Section 2.1.5, “Filtering the Scope of virt-who Access”.
5
Specifies how the hypervisor will be identified. Possible values: hostname, uuid, hwuuid. Recommended: hostname.
6
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.
7
Fully qualified host name or IP address of the hypervisor.
8
User name by which virt-who is to connect to the hypervisor.
9
Password of the user name specified by hypervisor-username. The password will be encrypted by hammer.
10
Fully qualified domain name of Satellite Server.

If the creation is successful, the command returns the following message:

Virt Who configuration [rhevm.example.com] created

3.3. Removing an Existing virt-who Configuration

To remove an existing virt-who configuration, you must first remove the configuration entry in the Satellite web UI and then remove the configuration file from the file system of the host that virt-who is configured on.

Procedure

To remove an existing virt-who configuration, complete the following steps:

  1. In the Satellite web UI, navigate to Infrastructure > Virt-who configurations.
  2. From the drop-down list to the right of the configuration that you want to remove, select Delete.
  3. On the host that you want to remove the virt-who configuration from, remove the configuration file:

    # rm /etc/virt-who.d/Configuration_File.conf

3.4. 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 Infrastructure Virt-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 root@virtwho_host.example.com
    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.5. 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 Infrastructure Virt-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.4, “Deploying virt-who Configuration”.

3.6. 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
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.