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:
-
Navigate to
- Click Create Config.
Complete the General Information, Schedule, and Connection fields and click . 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.
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 rhevm.example.com \ 1 --organization "Example Company" \ 2 --interval 120 \ 3 --filtering-mode none \ 4 --hypervisor-id hostname \ 5 --hypervisor-type rhevm \ 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. Recommended: Fully qualified domain name of the hypervisor.
- 2
- Organization name.
- 3
- Interval at which virt-who queries hypervisors for changes, measured in seconds.
- 4
- Hypervisor filtering mode. Possible values:
none
,whitelist
,blacklist
. Default: none. For details, see Section 2.1.5, “Filtering 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 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 [rhevm.example.com] 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:
- Log in to the Satellite web UI.
-
Navigate to
. - Click the name of the virt-who configuration.
If virt-who instance is being installed on the Satellite Server:
- Click Hammer command:. in
Open a terminal emulator and connect via SSH to the virt-who host as user
root
.# ssh root@virtwho_host.example.com
- Paste the Hammer command into the terminal emulator.
If virt-who is not being installed on the Satellite Server:
- Click Configuration script:. in
- Open a terminal emulator.
- Navigate to the directory to which the deploy script was downloaded.
Copy the deploy script to the virt-who host.
# scp deploy_script root@_virt_who_host:
Make the the deploy script executable and run it.
# chmod +x deploy_script # deploy_script
... == Finished == Finished successfully
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
-
Navigate to
- Find the virt-who configuration you want to modify, and click Edit on the matching row.
- Edit the fields to be modified.
- Click Submit
- 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