filter virt-who output to include only RHEL guests in an ESX environment

Latest response

Hello!
We have 800+ and growing VMs in a VMWare ESX environment across multiple hosts and mix RHEL, Windows, appliance, and other non-RHEL vms. We want virt-who to only collect and report RHEL vms and send only RHEL vms to the Satellite services. How can we go about this?

Thanks!

Responses

You currently cannot limit virt-who to only collecting the RHEL virtual machines, as it does not know which systems are and are not RHEL.

Virt-who merely collects the hypervisor info and virtual guest ID from vSphere's API. We cannot determine the guests OS merely from the API. See the below output from virt-who -o -d -p

    "hypervisors": [
        {
            "facts": {
                "cpu.cpu_socket(s)": "2", 
                "hypervisor.type": "VMware ESXi", 
                "hypervisor.version": "6.0.0"
            }, 
            "guests": [
                {
                    "attributes": {
                        "active": 1, 
                        "virtWhoType": "esx"
                    }, 
                    "guestId": "42108a9a-9071-b26f-2c13-173641d1db30", 
                    "state": 1
                }, 
                {
                    "attributes": {
                        "active": 1, 
                        "virtWhoType": "esx"
                    }, 
                    "guestId": "4210143d-7c77-a63e-4019-f4449fafb26e", 
                    "state": 1
                }
            ], 
            "name": "esxi01.example.com", 
            "uuid": "esxi01.example.com"
        }, 

Satellite (and the Red Hat Customer Portal) compare that list provided by virt-who with the system facts submitted by the guest itself. Guests read their UUID on startup and report this via subscription-manager facts | grep virt.uuid. Any guest that exists in both Satellite's inventory and the virt-who report is determined to be a RHEL guest that we care about. The rest are ignored.

If you truly wanted to limit the virt-who reporting to only include RHEL guests, you have to limit your hypervisors to only support RHEL guests, and only report those using the filter_hosts directive in your virt-who configuration.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.