diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2022-06-28 22:06:43 +0100 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2022-07-27 17:53:14 -0400 |
commit | 92ba8e5d358525621306561e679cc5eab99666ab (patch) | |
tree | ffa61eb4b759b2a18a1eeeaf5b5e66a800c14fc5 /virtinst | |
parent | 01ff867f56d6a3f0b4b5cadcca3d29aa445a5aaf (diff) | |
download | virt-manager-92ba8e5d358525621306561e679cc5eab99666ab.tar.gz |
virtinst: log libvirt version numbers after connecting
The various version numbers reported by libvirt are all relevant pieces
of information when debugging problem reports.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'virtinst')
-rw-r--r-- | virtinst/cli.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/virtinst/cli.py b/virtinst/cli.py index 3c0252b1..58fda280 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -214,10 +214,21 @@ def getConnection(uri, conn=None): # preopened connection passed in via test suite return conn + def format_version(num): + log.debug(num) + maj = int(num / 1000000) + min = int(num / 1000) % 1000 + mic = num % 1000 + return "%s.%s.%s" % (maj, min, mic) + log.debug("Requesting libvirt URI %s", (uri or "default")) conn = VirtinstConnection(uri) conn.open(_openauth_cb, None) - log.debug("Received libvirt URI %s", conn.uri) + log.debug("Received libvirt URI %s versions library=%s driver=%s hypervisor=%s", + conn.uri, + format_version(libvirt.getVersion()), + format_version(conn.getLibVersion()), + format_version(conn.getVersion())) return conn |