How to filter which hosts are sent by virt-who on Satellite 6.x?
Environment
- Red Hat Satellite 6.X
- Red hat Enterprise Linux
- virt-who-0.14-9.el7
Issue
- How to filter on which host to sent by
virt-who? - How to make sure that only the required hosts/hypervisors to report on satellite 6 using virt-who?
- How to exclude some host's from geting reported to Satellite 6 when using virt-who?
Resolution
-
Make sure that the following errata applied on the satellite client where
virt-whowill be configured : RHBA-2015-2370 -
Edit the
virt-whoconfiguration file/etc/sysconfig/virt-whoand enable the following parameters.VIRTWHO_BACKGROUND=1 VIRTWHO_DEBUG=1 VIRTWHO_SATELLITE6=1 -
For example, for VMware virtualization backend, create a new configuration file for
virt-whoinside/etc/virt-who.d/.[root@localhost ~]# vi /etc/virt-who.d/config.conf [config] type=<hypervisor_type> server=<vcenter/esx host> username=<vcenter/esx_username> password=<password> owner=<owner> env=Library rhsm_hostname=<satellite hostname> rhsm_username=admin rhsm_encrypted_password=<encypted-password> rhsm_prefix=/rhsm hypervisor_id=hostname filter_hosts=host1.example.com,host2.example.com OR exclude_hosts=host1.example.com,host2.example.comNOTE: The owner column in the
/etc/virt-who.d/configuration file is provided by executing the below
command on the Satellite[root@localhost ~]# hammer organization list owner = org labelNOTE: Use anyone from
filter_host_uuidsorexclude_host_uuidsfilter_host_uuids - If provided, only
hosts with uuid in this list will be reported, exclude_host_uuids - If provided, do not report hosts with uuid
in this list.
host_uuids are the uuid's of the physical host (can be found in VMware systeminfo or rhev host info).
See KBase 1381903 for more info.Hypervisor Type:
- The hypervisor type can be libvirt, vdsm, esx, rhevm and hyperv.
Restart virt-who Service:
- Restart the virt-who service after the configuration change.
[root@localhost ~]# service virt-who restartFor 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
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.