virt-who configuration
virt-who can accept configuration from several sources listed below in order of precedence.
Configuration sources of virt-who:
1. command line # Ignored
2. environment variables # Ignored
3. /etc/sysconfig/virt-who # VirtWhoSysconfig
4. /etc/virt-who.d/*.conf # VirtWhoConf
5. /etc/virt-who.conf # VirtWhoConf
- class insights.combiners.virt_who_conf.AllVirtWhoConf(svw, vwc)[source]
Bases:
object
Combiner for accessing part of valid
virt-who
configurationsSample content of
/etc/sysconfig/virt-who
:# Start virt-who on background, perform doublefork and monitor for virtual guest # events (if possible). It is NOT recommended to turn off this option for # starting virt-who as service. VIRTWHO_BACKGROUND=1 # Enable debugging output. VIRTWHO_DEBUG=1 # Send the list of guest IDs and exit immediately. VIRTWHO_ONE_SHOT=0 # Acquire and send list of virtual guest each N seconds, 0 means default # configuration. VIRTWHO_INTERVAL=3600 # Virt-who subscription manager backend. Enable only one option from the following: # Report to Subscription Asset Manager (SAM) or the Red Hat Customer Portal # Report to Sattellite version 6 VIRTWHO_SATELLITE6=1
Sample content of
/etc/virt-who.conf
:[global] debug=False oneshot=True [defaults] owner=test
Sample content of
/etc/virt-who.d/satellite_esx.conf
:[esx_satellite] type=esx server=10.0.0.1 owner=Satellite env=Satellite
Examples
>>> shared = {VirtWhoSysconfig: vw_sys, VirtWhoConf: [vw_conf, vwd_conf]} >>> all_vw_conf = AllVirtWhoConf(None, shared) >>> all_vw_conf.background True >>> all_vw_conf.oneshot False # `/etc/sysconfig/virt-who` has high priority >>> all_vw_conf.interval 3600 >>> all_vw_conf.sm_type 'sat6' >>> all_vw_conf.hypervisors [{'name': 'esx_satellite', 'server': '10.0.0.1', 'owner': 'Satellite', 'env': 'Satellite', type: 'esx'}] >>> all_vw_conf.hypervisor_types ['esx']
- background
is
virt-who
running as a service- Type:
boolean
- oneshot
is
virt-who
running inone-shot
mode or not- Type:
boolean
- interval
how often to check connected hypervisors for changes (seconds)
- Type:
int
- sm_type
what subscription manager will
virt-who
report to- Type:
str
- hypervisors
list of dict of each connected hypervisors
- Type:
list
- hypervisor_types
list of the connected hypervisors’ type
- Type:
list