Chapter 5. Configuring virt-who for Microsoft Hyper-V
You create a virt-who configuration for Microsoft Hyper-V by using the Satellite web UI or the CLI on Satellite Server.
Then, you deploy the generated script or Hammer command on the Satellite Server, Capsule Server, or on a dedicated Red Hat Enterprise Linux server.
5.1. Creating a virt-who configuration Copy linkLink copied to clipboard!
You can create a virt-who configuration for Microsoft Hyper-V by using the Satellite web UI.
To create a virt-who configuration by using the CLI, see CLI procedure.
The virt-who configuration creates a virt_who_reporter_1 user with the Virt-who Reporter role, which provides minimal permissions for virt-who reporting to Satellite Server. This user cannot be manually configured or used to log in to Satellite Server.
Local configuration values are stored in the /etc/virt-who.d/conf_name.conf file. These values apply only to the hypervisor.
Global configuration values are stored in the /etc/sysconfig/virt-who file These values, which include Interval, Enable debugging output, HTTP Proxy, and Ignore Proxy, apply to all virt-who configurations on the same server. Redeploying a virt-who configuration on the same server overwrites these values.
Prerequisites
- You have imported a subscription manifest that includes a host-based subscription into Satellite Server. For more information, see Section 1.2, “Checking for subscriptions that require virt-who”.
- You have created a virt-who user with read-only access and a non-expiring password on the hypervisor.
Procedure
- In the Satellite web UI, navigate to Infrastructure > Virt-who Configurations.
- Click Create Config.
Complete the following fields:
- Name: Configuration name.
- Hypervisor Type: Select Microsoft Hyper-V (hyperv).
- Interval: Virtual machine information reporting interval.
- Satellite Server FQDN.
- Hypervisor ID: Select Hostname or UUID.
Optional: Filtering. Select one of the following options for querying hypervisors:
- Unlimited (default): All hypervisors are queried.
- Whitelist: Specific hypervisors are included.
Blacklist: Specific hypervisors are excluded.
- Filter hosts: Comma-separated list of included hypervisors.
Exclude hosts: Comma-separated list of excluded hypervisors.
Specify the host name or UUID according to the hypervisor ID you selected.
Host names
- You can use wildcards, regular expressions, and special characters in the host name.
- If you use regular expressions, you must escape the backslashes.
- If you use special characters, you must enclose the host name in quotation marks.
You can configure the following logging and proxy options:
- Enable debugging output: Enables debug logging for virt-who.
HTTP Proxy. Example:
http://proxy.example.com:3128.To use no proxy, leave this field blank; this has the same result as entering
*in the Ignore Proxy field.- Ignore Proxy: Comma-separated list of host names, IP addresses, or domains to bypass existing proxy settings.
- Click Submit.
CLI procedure
On Satellite Server, enter the
hammer virt-who-config createcommand:$ hammer virt-who-config create \ --name My_virt-who_Configuration \ --organizations "My_Organization" \ --interval 720 \1 --filtering-mode none \2 --hypervisor-id hostname \3 --hypervisor-type hyperv \ --hypervisor-server hypervisor.example.com \4 --hypervisor-username virt_who_user \5 --hypervisor-password <password> --proxy 'http://proxy.example.com:3128' \6 --satellite-url satellite.example.com
- 1
- Optional: Specify the virtual machine information reporting interval, in minutes.
- 2
- Specify
nonefor no filtering of hypervisors for virt-who queries. Specifywhitelistorblacklistto include or exclude hypervisors for virt-who queries. - 3
- Specify
hostname,uuid, orhwuuidfor the hypervisor ID format.-
You can use
uuidto avoid duplication if you rename a hypervisor. You can use
hwuuidfor configurations that apply to a virtualization manager instead of an individual hypervisor.NoteYou cannot change
hwuuidto another option after virt-who starts running because this might cause duplicate entries in Subscription Manager.
-
You can use
- 4
- Specify the FQDN or IP address of the hypervisor.
- 5
- Specify the name of the virt-who user you created on the hypervisor.
- 6
- Optional.
Microsoft Hyper-V virt-who configuration example
type=hyperv
hypervisor_id=hostname
owner=Default_Organization
env=Library
server=hypervisor.example.com
username=virt_who_user
encrypted_password=$cr_password
rhsm_hostname=satellite.example.com
rhsm_username=virt_who_reporter_1
rhsm_encrypted_password=$user_password
rhsm_prefix=/rhsm
5.2. Deploying a virt-who configuration on Satellite Server Copy linkLink copied to clipboard!
You can deploy a virt-who configuration for Microsoft Hyper-V on Satellite Server.
Global configuration values apply to all virt-who configurations on this server and are overwritten if you deploy a new virt-who configuration.
Procedure
- In the Satellite web UI, navigate to Infrastructure > Virt-who Configurations.
- Click a virt-who configuration.
- Click the Deploy tab.
- Under Hammer command, click Copy to clipboard.
- Log in to Satellite Server, paste the Hammer command into your terminal, and then run the command.
5.3. Deploying a virt-who configuration on Capsule Server Copy linkLink copied to clipboard!
You can deploy a virt-who configuration for Microsoft Hyper-V on Capsule Server.
Global configuration values apply to all virt-who configurations on this server and are overwritten if you deploy a new virt-who configuration.
Procedure
- In the Satellite web UI, navigate to Infrastructure > Virt-who Configurations.
- Click a virt-who configuration.
- Click the Deploy tab.
- Under Configuration script, click Download the script.
Copy the script from Satellite Server to Capsule Server:
$ scp deploy_virt_who_config_1.sh root@capsule.example.com:Log in to Capsule Server and make the script executable:
$ chmod +x deploy_virt_who_config_1.shRun the script:
$ sh deploy_virt_who_config_1.shAfter the deployment is complete, delete the script:
$ rm deploy_virt_who_config_1
5.4. Deploying a virt-who configuration on a dedicated Red Hat Enterprise Linux server Copy linkLink copied to clipboard!
You can deploy a virt-who configuration for Microsoft Hyper-V on a dedicated Red Hat Enterprise Linux server. The server can be physical or virtual.
Global configuration values apply to all virt-who configurations on this server and are overwritten if you deploy a new virt-who configuration.
Prerequisites
- You have registered the Red Hat Enterprise Linux server to Satellite Server. For more information, see Registering hosts by using global registration in Managing hosts.
Procedure
- Log in to the Red Hat Enterprise Linux server.
Add a TCP port for communication between virt-who and Satellite Server to the runtime configuration:
$ firewall-cmd --add-port="5985/tcp"Add a TCP port for communication between virt-who and Satellite Server to the permanent configuration:
$ firewall-cmd --add-port="5985/tcp" --permanent- In the Satellite web UI, navigate to Infrastructure > Virt-who Configurations.
- Click a virt-who configuration.
- Click the Deploy tab.
- Under Configuration script, click Download the script.
Copy the script from Satellite Server to the Red Hat Enterprise Linux server:
$ scp deploy_virt_who_config_1.sh root@server.example.com:Log in to the Red Hat Enterprise Linux server and make the script executable:
$ chmod +x deploy_virt_who_config_1.shRun the script:
$ sh deploy_virt_who_config_1.shAfter the deployment is complete, delete the script:
$ rm deploy_virt_who_config_1