VIRT-WHO(8) | System Manager's Manual | VIRT-WHO(8) |
NAME¶
virt-who - Agent for reporting virtual guest IDs to Subscription Asset Manager, Satellite 6, or Satellite 5.
SYNOPSIS¶
virt-who [-d] [-i INTERVAL] [-o] [--sam|--satellite5|--satellite6] [--libvirt|--vdsm|--esx|--rhevm|--hyperv]
OPTIONS¶
- -h, --help
- show this help message and exit
- -d, --debug
- Enable debugging output
- -o, --one-shot
- Send the list of guest IDs and exit immediately
- -i INTERVAL, --interval=INTERVAL
- Acquire and send guest information each N seconds; note that this option is recommendation only, requested interval might not been honoured and the actual interval might be longer or shorter depending on backend that is used.
- -p, --print
- Print the host/guests association in JSON format to standard output
- -c, --config
- Use configuration file directly, can be used multiple times. See virt-who-config(5) for details about configuration file format.
Virtualization backend¶
- Choose virtualization backend that should be used to gather host/guest associations
- --libvirt
- [Deprecated] Use libvirt to list virtual guests [default]
- --vdsm
- [Deprecated] Use vdsm to list virtual guests
- --esx
- [Deprecated] Register ESX machines using vCenter
- --rhevm
- [Deprecated] Register guests using RHEV-M
- --hyperv
- [Deprecated] Register guests using Hyper-V
- --xen
- [Deprecated] Register XEN machines using XenServer
Subscription manager¶
- Choose where the host/guest associations should be reported
- --sam
- [Deprecated] Report host/guest associations to the Subscription Asset Manager or Satellite 6 [default]
- --satellite5
- [Deprecated] Report host/guest associations to the Satellite 5 server
- --satellite6 [Deprecated] Report host/guest associations to the Satellite 6 server
Libvirt options¶
- Use these options with --libvirt These should be defined in the configuration file or in environment variables
- --libvirt-owner=OWNER
- [Deprecated] Organization who has purchased subscriptions of the products, same as current system registration by default
- --libvirt-env=ENV
- [Deprecated] Environment where the libvirt server belongs to, same as current system registration by default
- --libvirt-server=SERVER
- [Deprecated] URL of the remote libvirt server to connect to, local server by default
- --libvirt-username=USERNAME
- [Deprecated] Username for connecting to libvirt, username of current user by default
- --libvirt-password=PASSWORD
- [Deprecated] Password for connecting to libvirt. This option doesn't work with ssh transport (default), copy your public ssh key to the remote machine.
vCenter/ESX options¶
- Use these options with --esx These should be defined in the configuration file or in environment variables
- --esx-owner=OWNER
- [Deprecated] Organization who has purchased subscriptions of the products
- --esx-env=ENV
- [Deprecated] Environment where the vCenter server belongs to
- --esx-server=SERVER
- [Deprecated] URL of the vCenter server to connect to
- --esx-username=USERNAME
- [Deprecated] Username for connecting to vCenter
- --esx-password=PASSWORD
- [Deprecated] Password for connecting to vCenter
RHEV-M options¶
- Use these options with --rhevm These should be defined in the configuration file or in environment variables
- --rhevm-owner=OWNER
- [Deprecated] Organization who has purchased subscriptions of the products
- --rhevm-env=ENV
- [Deprecated] Environment where the RHEV-M belongs to
- --rhevm-server=SERVER
- [Deprecated] URL of the RHEV-M server to connect to
- --rhevm-username=USERNAME
- [Deprecated] Username for connecting to RHEV-M
- --rhevm-password=PASSWORD
- [Deprecated] Password for connecting to RHEV-M
Hyper-V options¶
- Use these options with --hyperv These should be defined in the configuration file or in environment variables
- --hyperv-owner=OWNER
- [Deprecated] Organization who has purchased subscriptions of the products
- --hyperv-env=ENV
- [Deprecated] Environment where the Hyper-V belongs to
- --hyperv-server=SERVER
- [Deprecated] URL of the Hyper-V server to connect to
- --hyperv-username=USERNAME
- [Deprecated] Username for connecting to Hyper-V
- --hyperv-password=PASSWORD
- [Deprecated] Password for connecting to Hyper-V
XenServer options¶
- Use these options with --xen These should be defined in the configuration file or in environment variables
- --xen-owner=OWNER
- [Deprecated] Organization who has purchased subscriptions of the products
- --xen-env=ENV
- [Deprecated] Environment where the XenServer belongs to
- --xen-server=SERVER
- [Deprecated] URL of the XenServer server to connect to
- --xen-username=USERNAME
- [Deprecated] Username for connecting to XenServer
- --xen-password=PASSWORD
- [Deprecated] Password for connecting to XenServer
Satellite 5 options:¶
- Use these options with --satellite5 These should be defined in the configuration file or in environment variables
- --satellite-server=SAT_SERVER
- [Deprecated] Satellite server URL
- --satellite-username=SAT_USERNAME
- [Deprecated] Username for connecting to Satellite server
- --satellite-password=SAT_PASSWORD
- [Deprecated] Password for connecting to Satellite server
ENVIRONMENT¶
virt-who also reads environmental variables. They have the same name as command line arguments but upper-cased, with underscore instead of dash and prefixed with VIRTWHO_ (e.g. VIRTWHO_ONE_SHOT). Empty variables are considered as disabled, non-empty as enabled
USAGE¶
MODE¶
virt-who has three modes how it can run:
- 1. one-shot mode
- # virt-who -o
In this mode virt-who just sends the host to guest association to the server once and then exits.
- 2. interval mode
- # virt-who
This is default mode. virt-who will listen to change events (if available) or do a polling with given interval, and will send the host to guest association when it changes. The default polling interval is 60 seconds and can be changed using "-i INTERVAL" (in seconds).
- 3. print mode
- # virt-who -p
This mode is similar to oneshot mode but the host to guest association is not send to server, but printed to standard output instead.
VIRTUALIZATION BACKEND¶
virt-who can use couple of virtualization backends.
- 1. libvirt
- # virt-who
# virt-who --libvirt
Use libvirt as virtualization backend. This is default.
-
NOTE: virt-who can monitor for events only in this mode.
- 2. vdsm
- # virt-who --vdsm
Use vdsm as virtualization backend.
- 3. ESX
-
# virt-who --esx --esx-owner=ESX_OWNER --esx-env=ESX_ENV --esx-server=ESX_SERVER --esx-username=ESX_USERNAME --esx-password=ESX_PASSWORD
Use ESX (vCenter) as virtualization backend and specify option required to connect to ESX server.
- 4. RHEV-M
-
# virt-who --rhevm --rhevm-owner=RHEVM_OWNER --rhevm-env=RHEVM_ENV --rhevm-server=RHEVM_SERVER --rhevm-username=RHEVM_USERNAME --rhevm-password=RHEVM_PASSWORD
Use RHEV-M as virtualization backend and specify option required to connect to RHEV-M server.
- 5. Hyper-V
-
# virt-who --hyperv --hyperv-owner=HYPERV_OWNER --hyperv-env=HYPERV_ENV --hyperv-server=HYPERV_SERVER --hyperv-username=HYPERV_USERNAME --hyperv-password=HYPERV_PASSWORD
Use Hyper-V as virtualization backend and specify option required to connect to Hyper-V server.
- 6. XenServer
-
# virt-who --xen --xen-owner=XEN_OWNER --xen-env=XEN_ENV --xen-server=XEN_SERVER --xen-username=XEN_USERNAME --xen-password=XEN_PASSWORD
Use Citrix XenServer as virtualization backend and specify option required to connect to XenServer server.
- 7. Fake
-
Fake virtualization backend fetches the host/guests association from file. This can be useful in environments where the hypervisor is not accessible by virt-who. It's only available through configuration file, see virt-who-config(5) for details about configuration of this backend.
SUBSCRIPTION MANAGER¶
virt-who can report host/guest associations to Subscription Asset Manager (SAM), to Satellite 5, or to Satellite 6.
- 1. Subscription Asset Manager or Satellite 6
- # virt-who
# virt-who --sam
System must be registered using subscription-manager prior to using virt-who. Configuration for connecting to SAM is shared between subscription-manager and virt-who. This is default.
- 2. Satellite 6
-
# virt-who --satellite6
System must be registered using subscription-manager prior to using virt-who. Configuration for connecting to Satellite 6 is shared between subscription-manager and virt-who.
- 2. Satellite 5
-
# virt-who --satellite5 --satellite-server=SAT_SERVER --satellite-username=SAT_USERNAME --satellite-password=SAT_PASSWORD
This option can't be used for monitoring local guests, use rhn-virtualization-host instead.
LOGGING¶
virt-who always writes error output to file /var/log/rhsm/rhsm.log. It also writes the same output to standard error output when started from command line.
virt-who can be started with option "-d" in all modes and with all backends. This option will enable verbose output with more information.
SECURITY¶
Virt-who may present security concerns in some scenarios because it needs access to every hypervisor in the environment. To minimize security risk, virt-who is a network client, not a server. It only does outbound connections to find and register new hypervisors and does not need access to any virtual machines. To further reduce risk, deploy virt-who in a small virtual machine with a minimal installation and lock it down from any unsolicited inbound network connections.
Here is a list of ports that need to be open for different hypervisors:
VMWare ESX/vCenter: 443/tcp
Hyper-V: 5985/tcp
RHEV-M: 443/tcp or 8443/tcp (depending on version)
XenServer: 443/tcp
libvirt: depending on transport type, default (for remote connections) is
qemu over ssh on port 22
local libvirt and vdsm use local connections and don't need open ports
virt-who also needs to have access to Subscription Asset Manager, Satellite 5, or Satellite 6. Default port is 443/tcp. All the ports might be changed by system administrators.
Using the same network for machine running virt-who as for hypervisor management software instead of production VM networks is suggested.
AUTHOR¶
Radek Novacek <rnovacek at redhat dot com>
April 2016 | virt-who |