Chapter 10. Troubleshooting virt-who
You can troubleshoot virt-who by checking the service status, logs, and by identifying configuration issues.
For more information, see Virt-who troubleshooting methods and Virt-who troubleshooting scenarios in Getting Started with RHEL System Registration in the Subscription Central documentation.
10.1. Checking virt-who status Copy linkLink copied to clipboard!
You can check the status of virt-who by using the Satellite web UI or the Hammer CLI tool.
Procedure
- In the Satellite web UI, navigate to Infrastructure > Virt-who Configurations.
Check the Status column of each virt-who instance.
The
OKstatus indicates that virt-who is successfully connecting to Satellite Server and reporting the virtual machines managed by each hypervisor.
CLI procedure
List the status of all virt-who instances by entering the following command on Satellite Server:
$ hammer virt-who-config listThe output includes the date and time when each virt-who instance reported to Satellite Server.
10.2. Enabling debug logging Copy linkLink copied to clipboard!
You can enable debug logging for the /var/log/rhsm/rhsm.log file by using the Satellite web UI or the Hammer CLI tool.
After you resolve the problem, you must disable debug logging and redeploy the virt-who configuration. To use the CLI instead of the Satellite web UI, see the CLI procedure.
Procedure
- In the Satellite web UI, navigate to Infrastructure > Virt-who Configurations.
- Select Edit in the Actions column of a virt-who configuration.
- Select Enable debugging output.
- Click Submit.
- Redeploy the virt-who configuration on the target host.
CLI procedure
On Satellite Server, run the
hammer virt-who-config updatecommand with the debug option:$ hammer virt-who-config update \ --debug true- Redeploy the virt-who configuration on the target host.
10.3. virt-who does not report to Satellite Server Copy linkLink copied to clipboard!
virt-who might not report to Satellite Server if Satellite Server is configured to use a proxy server in rhsm.conf while virt-who is configured not to use a proxy server in /etc/sysconfig/virt-who.
The virt-who setting is ignored by the Subscription Manager. As a result, virt-who attempts to connect to Satellite Server through a proxy server and fails.
To work around this problem, add the following parameter to the /etc/rhsm/rhsm.conf file:
no_proxy = server.example.com
10.4. Virt-who troubleshooting methods Copy linkLink copied to clipboard!
Identifying issues when using multiple virt-who configuration files
If you have multiple virt-who configuration files on one server, move one file at a time to a different directory while testing after each file move. If the issue no longer occurs, the cause is associated with the most recently moved file. After you have resolved the issue, return the virt-who configuration files to their original location.
Alternatively, you can test an individual file after moving it by using the --config option to specify its location. For example:
$ virt-who --debug --one-shot --config /tmp/conf_name.conf
Identifying duplicate hypervisors
Duplicate hypervisors can cause subscription and entitlement errors. Enter the following commands to check for duplicate hypervisors:
# systemctl stop virt-who
# virt-who -op >/tmp/virt-who.json
# systemctl start virt-who
# cat /tmp/virt-who.json | json_reformat | grep name | sort | uniq -c | sort -nr | head -n10
3 "name": "localhost"
1 "name": "rhel1.example.com"
1 "name": "rhel2.example.com"
1 "name": "rhel3.example.com"
1 "name": "rhel4.example.com"
1 "name": "rhvh1.example.com"
1 "name": "rhvh2.example.com"
1 "name": "rhvh3.example.com"
1 "name": "rhvh4.example.com"
1 "name": "rhvh5.example.com"
In this example, three hypervisors have the same FQDN (localhost), and must be corrected to use unique FQDNs.
Identifying duplicate virtual machines
Enter the following commands to check for duplicate virtual machines:
# systemctl stop virt-who
# virt-who -op >/tmp/virt-who.json
# systemctl start virt-who
# cat /tmp/virt-who.json | json_reformat | grep "guestId" | sort | uniq -c | sort -nr | head -n10
Checking the number of hypervisors
Enter the following commands to check the number of hypervisors virt-who currently reports:
# systemctl stop virt-who
# virt-who -op >/tmp/virt-who.json
# systemctl start virt-who
# cat /tmp/virt-who.json | json_reformat | grep name | sort | uniq -c | wc -l
Checking the number of virtual machines
Enter the following commands to check the number of virtual machines that virt-who currently reports:
# systemctl stop virt-who
# virt-who -op >/tmp/virt-who.json
# systemctl start virt-who
# cat /tmp/virt-who.json | json_reformat | grep "guestId" | sort | uniq -c | wc -l