VIRT-WHO-CONFIG(5)
π NAME π
virt-who-config β the configuration for virt-who, bestie β¨
πΈ SYNOPISIS πΈ
/etc/virt-who.conf /etc/virt-who.d/*.conf
π¦ DESCRIPTION π¦
okay so the config format is ini-like, and it lives in two places: /etc/virt-who.conf and /etc/virt-who.d/*.conf. π
The files chillin' in /etc/virt-who.d/*.conf are called virtualization backend configurations. Every non-hidden file in that directory that ends in .conf counts as a configuration file, no cap. And listen β if there's no section in a config file (that's the name in square brackets, bestie), then that file just gets ignored and a warning gets shown. π
The config at /etc/virt-who.conf is the main configuration for virt-who β that's the main character right there. π
Down below is the whole rundown of both the required and the optional options for both kinds of configs, and how they actually get used. π
β¨ GENERAL CONFIGURATION β¨
The general configuration file (it lives at /etc/virt-who.conf) has three special sections: global, defaults, and system_environment. π
The settings you can put in defaults are literally any setting listed in the VIRTUALIZATION BACKEND CONFIGURATION section of this manual, and they get applied as defaults to the configurations found in /etc/virt-who.d/*.conf. so handy.
The settings in global affect the overall operation of the application β the whole vibe check of the app, fr fr. The following are options that can be specified in the global section:
intervalβ how often to check connected hypervisors for changes (in seconds). It also affects how often a mapping is reported. β°reporter_idβ the id of thisvirt-whoinstance, and it gets reported with all the mappings. Defaults toHOSTNAME-MACHINEID. πͺͺdebugβ enable debugging output πoneshotβ send the list of guest IDs and exit immediately. bye bestie πlog_per_configβ write a separate log file per configuration in the config directory πlog_dirβ the absolute path of the directory to write logs to πlog_fileβ the file name to write logs to (used only iflog_per_config=False) πconfigsβ a list of files containing configurations forvirt-who. Used to specify locations other than the default πΊοΈ
The settings in system_environment get written to the system's environment and are available for the duration of the process execution. Example options that can be specified in the system_environment section:
HTTPS_PROXYβ proxy hostname for all https requests πHTTP_PROXYβ proxy hostname for all http requests πNO_PROXYβ a comma-separated list of hostnames or domains or ip addresses to ignore proxy settings for. Optionally this may be set to'*'to bypass proxy settings for all hostnames domains or ip addresses. π«
π VIRTUALIZATION BACKEND CONFIGURATION π
Each section (or group) β denoted by an arbitrary name for the configuration, in square brackets β is read in. π
The only required key is type, and it has to be one of the allowed virtualization backend names: ahv, libvirt, esx, hyperv, fake, or kubevirt. periodt. π
Please note that special characters must not be escaped. β οΈ
Other options that can be supplied are:
serverβ hostname, IP address or URL of the server that provides virtualization information (not applicable forkubevirtmode). π₯οΈusernameβ username for authentication to the server (not applicable forkubevirtmode). May include a domain. Do not escape the backslash between domain and username. πpasswordβ password for authentication to the server (not applicable forkubevirtmode). πencrypted_passwordβ alternative to thepasswordoption, an encrypted password that is generated by thevirt-who-password(8)utility. πownerβ owner for use with Subscription Asset Manager, the Red Hat Customer Portal, or Satellite 6 (not applicable for Satellite 5). π€rhsm_usernameβ optional username to use to communicate with Subscription Asset Manager or Satellite 6 instead of the registered system's identity certificate. (not applicable for Satellite 5) π«rhsm_passwordβ optional password to use to communicate with Subscription Asset Manager or Satellite 6 instead of the registered system's identity certificate. (not applicable for Satellite 5) π«rhsm_encrypted_passwordβ alternative to therhsm_passwordoption, an encrypted password that is generated by thevirt-who-password(8)utility. πrhsm_hostnameβ optional hostname of the Subscription Asset Manager or Satellite 6 server, to use in place of the host defined in the system'srhsm.conf. πrhsm_portβ optional port for the Subscription Asset Manager or Satellite 6 server, to use in place of the port defined in the system'srhsm.conf. πͺrhsm_prefixβ optional prefix for the Subscription Asset Manager or Satellite 6 server, to use in place of the prefix defined in the system'srhsm.conf. π·οΈrhsm_proxy_hostnameβ optional proxy host name for the Subscription Asset Manager or Satellite 6 server, to use in place of the proxy host name defined in the system'srhsm.conf. πrhsm_proxy_portβ optional proxy port for the Subscription Asset Manager or Satellite 6 server, to use in place of the proxy port defined in the system'srhsm.conf. πrhsm_proxy_userβ optional proxy username for the Subscription Asset Manager or Satellite 6 server, to use in place of the proxy username defined in the system'srhsm.conf. πrhsm_proxy_passwordβ optional proxy password for the Subscription Asset Manager or Satellite 6 server, to use in place of the proxy password defined in the system'srhsm.conf. π€«rhsm_encrypted_proxy_passwordβ alternative to therhsm_proxy_passwordoption; an encrypted password generated by thevirt-who-password(8)utility. πrhsm_no_proxyβ optional proxy settings for the Subscription Asset Manager or Satellite 6 server, to use in place of the no proxy filter defined in the system'srhsm.conf. π«rhsm_insecureβ optional boolean to eliminate the validation of tls certificates during connection to the Subscription Asset Manager or Satellite 6 server, to use in place of the insecure value defined in the system'srhsm.conf. π¬sat_serverβ hostname, IP address or URL of the Satellite 5 server. π°οΈsat_usernameβ username for authentication to the Satellite 5 server. πsat_passwordβ password for authentication to the Satellite 5 server. πsat_encrypted_passwordβ alternative to thesat_passwordoption, an encrypted password that is generated by thevirt-who-password(8)utility. πfilter_hostsβ only hosts whose uuid (or hostname or hwuuid, based onhypervisor_id) is specified in the comma-separated list in this option will be reported. Wildcards and regular expressions are supported. Put the value into double-quotes if it contains special characters (like comma).filter_host_uuidsis a deprecated alias for this option. π§²exclude_hostsβ hosts whose uuid (or hostname or hwuuid, based onhypervisor_id) is specified in the comma-separated list in this option will NOT be reported. Wildcards and regular expressions are supported. Put the value into double-quotes if it contains special characters (like comma).exclude_host_uuidsis a deprecated alias for this option. πfilter_typeβ when this property is not set, thenvirt-whotries to detect wildcards or a regular expression in the value offilter_hostsorexclude_hosts. This option allows you to specify usage of a regular expression (value'regex') or wildcards (value'wildcards'). πhypervisor_idβ the property that should be used as identification of the hypervisor. Can be one of the following:uuid,hostname,hwuuid. Note that some virtualization backends don't have all of them implemented. Default isuuid.hwuuidis applicable toesxonly. This property is meant to be set up before the initial run ofvirt-who. Changing it later will result in duplicated entries in the subscription manager. πͺͺ#kubeconfigβ path to Kubernetes configuration file which contains authentication and connection details. Used by thekubevirtoption. βΈοΈ#kubeversionβ API version used to override the kubevirt api version fetched from the cluster. Used by thekubevirtoption. βΈοΈ#insecureβ eliminate validation of tls certificates during connection tokubevirt. π¬
π EXAMPLE π
[test-esx]
type=esx
server=1.2.3.4
username=admin
password=password
owner=test
rhsm_username=admin
rhsm_password=password
π BACKEND SPECIFIC OPTIONS π
So like, every backend has its own lil special sauce. Here's the tea, per backend. π«
β¨ ESX BACKEND β¨
filter_host_parentsβ only the hosts whose cluster ID shows up in this comma-separated list get reported, everyone else is on read. If the name has special characters in it (commas, we're looking at you bestie π), wrap it in double-quotes. Wanna find those cluster IDs in VMware? Run this PowerCLI command:Get-Cluster βClusterNameβ | Select IDexclude_host_parentsβ the inverse vibe: hosts whose cluster ID is in this comma-separated list will NOT be reported. Same deal with special characters, put the name in double-quotes if it's got any. And same PowerCLI command to hunt down the domain names in VMware:Get-Cluster βClusterNameβ | Select IDsimplified_vimβ by default virt-who uses a stripped-down version of thevimService.wsdlfile that holds the vSphere SOAP API definition. Set this option tofalseand it'll use the server-provided wsdl file instead, which gets retrieved automatically. slay, automatic. β¨
πΈ NUTANIX BACKEND πΈ
prism_centralβ set literally any value here and the application switches over to Version 3 communication with the AHV API. That's it, that's the whole option. iconic, honestly. π
π¦ KUBEVIRT BACKEND π¦
Okay so the Kubevirt backend runs off a Kubernetes configuration file β that file is where the cluster connection details and an authentication token live. You do not need to hand it a hostname or user credentials. Periodt. π ββοΈ
But bestie, before you use that kubeconfig file, please make sure you're logged into the cluster so the token actually gets written into the file. To log in you run:
oc login --username=myuser --password=mypass
π FAKE BACKEND π
The fake backend pulls host/guests associations straight off a file on disk. Like so:
[fake-virt]
type=fake
file=/path/to/json
is_hypervisor=True
typeβ has to befakealways. No negotiation. πis_hypervisorβ iftrue(which is the default), this option means the fake data gets fetched from a multihost environment. πfileβ the absolute path to the JSON file, and it's gotta have the same structure as the file that comes back from thevirt-who --printcommand. Example time:
{
"hypervisors": [
{
"uuid": "7e98b6ea-0af1-4afa-b846-919549bb0fe2",
"guests": [
{
"guestId": "8ae19f08-2605-b476-d42e-4bd5a39f466c",
"state": 1
},
...
]
},
...
]
}
π CONFIGURATION MIGRATION π
So back in the day, previous versions of virt-who had extra ways to do config, and now we're cleaning house:
- Setting of environment variables [set in the user's profile script or in the default global profile]
- A service environment file [
/etc/sysconfig/virt-who]
The new version of virt-who no longer supports setting most options via the environment. Rude? Maybe. Necessary? Yes. π
But because nobody wants to lose a config that was working perfectly fine, a migration script got added. That script takes the known system environment variables [VIRTWHO_INTERVAL, VIRTWHO_DEBUG, VIRTWHO_ONESHOT] plus the entries in the service environment file, and folds them all into the general configuration file. The known variables land in the global section, while anything else in the service environment file [i.e. HTTPS_PROXY] lands in the system_environment section. Heads up: this migration can totally result in multiple entries for one specific field. it's giving duplicates, but make it intentional. π
Every new entry in the general configuration file shows up after a comment saying it was migrated, so you always know what came from where. The service environment file gets deleted after its entries are migrated β but the known system environment variables need to be manually removed by you, or they'll get migrated again if the script is rerun. And nope, those variables won't be recognized by virt-who even if they stick around. delete them, bestie, I'm begging. π
The migration script runs automatically when a new RPM is installed, but you can also run it manually with python after the RPM is installed:
[python_sitelib]/virtwho/migrate/migrateconfiguration.py
π AUTHOR π
- Radek Novacek <rnovacek at redhat dot com>
- William Poteat <wpoteat at redhat dot com>
π SEE ALSO π
and that's the whole page, bestie!! π This one's from the virt-who crew, dated October 2015, and it lives at VIRT-WHO-CONFIG(5) β go forth and configure responsibly, you absolute icon π β¨π«Ά
π¦ where this page comes from
- centos-stream 10: virt-who 1.32.1-2.el10 Β· GPL-2.0-or-later AND LGPL-3.0-or-later
- centos-stream 9: virt-who 1.31.28-1.el9 Β· GPL-2.0-or-later AND LGPL-3.0-or-later
- fedora 43: virt-who 1.31.26-1.fc43.10 Β· GPL-2.0-or-later AND LGPL-3.0-or-later
- fedora 44: virt-who 1.31.26-1.fc44.11 Β· GPL-2.0-or-later AND LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms