How to configure virt-who for Nutanix AHV to work with Red Hat Satellite Server

Updated

Issue

  • How do I configure virt-who for Nutanix AHV to work with Red Hat Satellite Server?

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Satellite 6
  • Nutanix AHV Hypervisor

Resolution

Prerequisites

  • A virtual machine running Red Hat Enterprise Linux 8.2, 8.4 or later to host the virt-who agent.

  • An updated virt-who agent that supports registration of Nutanix AHV:

Procedure

  1. On the Red Hat Enterprise Linux server, install Satellite Server’s CA certificate:
# rpm -ivh http://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
  1. Register the Red Hat Enterprise Linux 8 virtual machine to Satellite Server:
# subscription-manager register \
--org=organization_label \
--auto-attach
  1. Open a network port for communication between virt-who and Satellite Server:
# firewall-cmd --add-port="443/tcp"
# firewall-cmd --add-port="443/tcp" --permanent
  1. Open a network port for communication between virt-who and the Nutanix AHV management interface:
# firewall-cmd --add-port="9440/tcp"
# firewall-cmd --add-port="9440/tcp" --permanent
  1. Configure virt-who by editing the configuration file to enable AHV:
# vi /etc/virt-who.d/virt-who.conf

[ahv]
type=ahv
server=(Type the IP address of either the Prism Element or Prism Central web console)
username=(The user name of either the Prism Element or Prism Central web console)
password=(The password of either the Prism Element or Prism Central web console)
owner=(org ID from the Command # subscription-manager identity)
hypervisor_id=hostname
prism_central=(Set this value to true if you are connecting to Prism Central. Set this value to false if you are connecting to Prism Element)
rhsm_hostname=(Type the IP address or FQDN of the Red Hat Satellite server)
rhsm_username=(Type the user name of the Red Hat Satellite server)
rhsm_password=(Type the password of the Red Hat Satellite server)
rhsm_prefix=/rhsm
update_interval=60 (The frequency of VM-to-host mapping updates)
ahv_internal_debug=(When set to true, the output of the REST API calls is printed)

IMPORTANT:

The server field expects an ip address. Nutanix does not support FQDN for this field

The update_interval field controls the frequency of VM-to-host mapping updates for AHV. This field does not control how often the data is synchronized with the Satellite Server. Synchronization with the Satellite Server is configured using the interval field in the system wide configuration file /etc/virt-who.conf

The ahv_internal_debug field provides extra AHV debug information when used in tandem with the debug field in the system wide configuration file /etc/virt-who.conf.

Note: Change "password" to "encrypted_password" if you are using encrypted password for the Prism Element or Prism Central web console. See Generating Encrypted Password for more information about generating an encrypted password for the Nutanix cluster.

Note: Change "rhsm_password" to "rhsm_encrypted_password" if you are using encrypted password for the Red Hat Satellite Server. See Generating Encrypted Password for more information about generating an encrypted password for the Nutanix cluster.

Important: If your password contains a % character it must be escaped by pre-pending another % character before it. Please refer to the example in the KCS Subscription-manager command fails with error '%' must be followed by '%' or '(', found: '%password'.

Do not provide hypervisor details in the template.conf file present in the "/etc/virt-who.d" directory because when the virt-who package is updated, it will clear all the data present in it.

  • After completing the configuration start and enable the virt-who service.
$ systemctl enable virt-who --now
  • If testing, troubleshooting, or only 1 report is needed, stop the virt-who service if running and run the virt-who service in one shot mode with debug to get details of the virt-who run. This should be included in your case update to support should you open a case.
$ systemctl stop virt-who
$ virt-who -od

Generating Encrypted Password

There is an option to either use a password or an encrypted password in the configuration file for Prism Element/Prism Central web console and RHSM. Generate an encrypted password in the system where you have installed the virt-who agent for the Prism Element/Prism Central web console and RHSM and use it in the configuration file.

Perform the following procedure to generate the encrypted password hash and use it in the configuration file:

  1. Log on to the system on which you installed the Nutanix virt-who agent.

  2. Run this command to enter the Prism Element/Prism Central web console password.

#virt-who-password

The system encrypts and generates a hash value of the Prism Element/Prism Central web console password.

  1. Use the encrypted hash value as the encrypted_password in the configuration file.

  2. Similarly, run this command again to enter the RHSM password.

#virt-who-password

The system encrypts and generates a hash value of the RHSM password.

  1. Use the encrypted hash value as the rhsm_encrypted_password in the configuration file.

For more KB articles/solutions related to Virt-who and Virtual Datacenter (VDC) Subscriptions Issues, please refer to the Consolidated Troubleshooting Article for Virt-who and Virtual Datacenter (VDC) Subscriptions Issues

Product(s)
Category
Components
Article Type