VIRT-WHO-CONFIG(5) | File Formats Manual | VIRT-WHO-CONFIG(5) |
NAME¶
virt-who-config - configuration for virt-who
SYNOPISIS¶
/etc/sysconfig/virt-who /etc/virt-who.conf /etc/virt-who.d/*.conf
DESCRIPTION¶
Configuration format is ini-like for files /etc/virt-who.conf and /etc/virt-who.d/*.conf. The contents of /etc/sysconfig/virt-who are environment variables to be used when virt-who is run as a service. The configuration files located at /etc/virt-who.d/*.conf are called virtualization backend configurations. All non-hidden files in this directory (ending in '.conf') are considered configuration files. If no section (name in square brackets) is present in the configuration file, it will be ignored and warning will be shown. The configuration located at /etc/virt-who.conf is the main configuration for virt-who. Below are descriptions of both the required and optional options for both kinds of configs and how they are used.
GENERAL CONFIGURATION¶
The general configuration file (located at /etc/virt-who.conf), has three special sections global, defaults, and system_environment. The settings that can be specified in defaults are any setting listed in the VIRTUALIZATION BACKEND CONFIGURATION section of this manual. These settings are applied as defaults to the configurations found in /etc/virt-who.d/*.conf.
The settings in the global affect the overall operation of the application. The following are options that can be specified in the global section:
- interval
- how often to check connected hypervisors for changes (seconds). Also affects how often a mapping is reported.
- reporter_id
- The id of this virt-who instance, reported with all mappings. Defaults to HOSTNAME-MACHINEID
- debug
- Enable debugging output
- oneshot
- Send the list of guest IDs and exit immediately
- log_per_config
- Write a seperate 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 if log_per_config=False)
- configs
- A list of files containing configurations for virt-who Used to specify locations other than default
- The settings in the system_environment are 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
Only required key is type that has to have one of the allowed virtualization backend names: ahv, libvirt, esx, rhevm, hyperv, fake, xen, or kubevirt.
Please note that special characters must not be escaped (opposed to /etc/sysconfig/virt-who).
Other options that can be supplied are:
- server
- Hostname, IP address or URL of the server that provides virtualization information (not applicable for kubevirt mode).
- username
- Username for authentication to the server (not applicable for kubevirt mode). May include domain. Do not escape the backslash between domain and username.
- password
- Password for authentication to the server (not applicable for kubevirt mode).
- encrypted_password
- Alternative to the password option, encrypted password that is generated by virt-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 the rhsm_password option, encrypted password that is generated by virt-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's rhsm.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's rhsm.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's rhsm.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's rhsm.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's rhsm.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's rhsm.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's rhsm.conf.
- rhsm_encrypted_proxy_password
- Alternative to the rhsm_proxy_password option; encrypted password generated by the virt-who-password(8) utility.
- rhsm_no_proxy
- As per the NO_PROXY parameter in SYSCONFIG.
- 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 sat_password option, encrypted password that is generated by virt-who-password(8) utility.
- filter_hosts
- Only hosts which uuid (or hostname or hwuuid, based on hypervisor_id) is specified in comma-separated list in this option will be reported. Wildcards and regular expressions are supported. Put the value into the double-quotes if it contains special characters (like comma). filter_host_uuids is deprecated alias for this option.
- exclude_hosts
- Hosts which uuid (or hostname or hwuuid, based on hypervisor_id) is specified in comma-separated list in this option will NOT be reported. Wildcards and regular expressions are supported. Put the value into the double-quotes if it contains special characters (like comma). exclude_host_uuids is deprecated alias for this option.
- filter_type
- When this propery is not set, then virt-who tries to detect wildcards or regular expression in value of filter_hosts or exclude_hosts. This option allows to specify usage of regular expression (value 'regex') or wildcards (value 'wildcards').
- hypervisor_id
- Property that should be used as identification of the hypervisor. Can be one of following: uuid, hostname, hwuuid. Note that some virtualization backends don't have all of them implemented. Default is uuid. hwuuid is applicable to esx and rhevm only. This property is meant to be set up before initial run of virt-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 kubevirt option
- #kubeversion
- API version used to override kubevirt api version fetched from the cluster. Used by kubevirt option
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¶
ESX BACKEND¶
- filter_host_parents
- Only hosts which cluster ID is specified in comma-separated list in this option will be reported. Put the name into the double-quotes if it contains special characters (like comma). PowerCLI command to find the domain names in VMware `Get-Cluster “ClusterName” | Select ID`
- exclude_host_parents
- Exclude hosts which cluster ID is specified in comma-separated list in this option will NOT be reported. Put the name into the double-quotes if it contains special characters (like comma). PowerCLI command to find the domain names in VMware `Get-Cluster “ClusterName” | Select ID`
- simplified_vim
- virt-who by default uses stripped-down version of vimService.wsdl file that contains vSphere SOAP API definition. Set this option to false to use server provided wsdl file that will be retrieved automatically.
NUTANIX BACKEND¶
- prism_central
- Any value set for this parameter will cause the application to use Version 3 communication with the AHV API
RHEV-M BACKEND¶
- server
- The default port number is 8443 (that was used the default in RHEV-M <=
3.0). Newer RHEV-M installations uses port 443 by default. Use correct
value for your server in format:
server=<HOSTNAME_OR_IP_ADDRESS>:<PORT_NUMBER>
KUBEVIRT BACKEND¶
Kubevirt backend uses a Kubernetes configuration file where there are cluster connection details and an authentication token. There is no need to provide a hostname nor user credentials. Before using the kubeconfig file please make sure to login to the cluster so the token is written to the file. To login you need to run:
oc login --username=myuser --password=mypass
FAKE BACKEND¶
Fake backend reads host/guests associations from the file on disk, for example:
[fake-virt]
type=fake
file=/path/to/json
is_hypervisor=True
- type
- Must be always fake.
- is_hypervisor
- If true (default), the option determines that the fake data are fetched from multihost environment.
- file
- Absolute path to the JSON file that has the same structure as file
returned from virt-who --print command, for example:
{
"hypervisors": [
{
"uuid": "7e98b6ea-0af1-4afa-b846-919549bb0fe2",
"guests": [
{
"guestId": "8ae19f08-2605-b476-d42e-4bd5a39f466c",
"state": 1
},
...
]
},
...
]
}
AUTHOR¶
Radek Novacek <rnovacek at redhat dot com>
SEE ALSO¶
October 2015 | virt-who |