diff options
author | Germano Veit Michel <germano@redhat.com> | 2016-02-10 10:36:52 +1000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2016-02-18 15:21:35 +0000 |
commit | 8deae0a91a10c0101bb2242d7247a7933a95a9ea (patch) | |
tree | 82bdbfdff47600987f6fa85f26a99c596730693a | |
parent | ca4922b468b583d905aadc0c24ae6638cf182f9c (diff) | |
download | sos-8deae0a91a10c0101bb2242d7247a7933a95a9ea.tar.gz |
[virsh] use read-only option to list all domains
If authentication is required to use virsh, sos will timeout on
'virsh list --all'. Use '-r' option to avoid this.
2016-02-10 00:24:02,761 WARNING: [plugin:virsh] command 'virsh list
--all' timed out after 300s
$ virsh list --all
Please enter your authentication name:
Please enter your password:
error: failed to connect to the hypervisor
error: no valid connection
error: authentication failed: Failed to step SASL negotiation: -1
(SASL(-1): generic failure: All-whitespace username.)
$ virsh -r list --all
Id Name State
----------------------------------------------------
Fixes: #761.
Signed-off-by: Germano Veit Michel <germano@redhat.com>
-rw-r--r-- | sos/plugins/virsh.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/plugins/virsh.py b/sos/plugins/virsh.py index 0381b398..7d4ab4ea 100644 --- a/sos/plugins/virsh.py +++ b/sos/plugins/virsh.py @@ -34,7 +34,7 @@ class LibvirtClient(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): self.add_copy_spec("/root/.virt-manager/*") # get lit of VMs/domains - domains_file = self.get_cmd_output_now('virsh list --all') + domains_file = self.get_cmd_output_now('virsh -r list --all') # cycle through the VMs/domains list, ignore 2 header lines and latest # empty line, and dumpxml domain name in 2nd column |