[virt-tools-list] [virt-manager] [PATCH 2/4] Output the qemu guest agent lifecycle events in debug mode
Lin Ma
lma at suse.com
Mon Jun 25 03:46:58 UTC 2018
Signed-off-by: Lin Ma <lma at suse.com>
---
virtManager/connection.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/virtManager/connection.py b/virtManager/connection.py
index 76e78c49..0b83bccf 100644
--- a/virtManager/connection.py
+++ b/virtManager/connection.py
@@ -763,6 +763,12 @@ class vmmConnection(vmmGObject):
else:
self.schedule_priority_tick(pollvm=True, force=True)
+ def _domain_agent_lifecycle_event(self, conn, domain, state, reason, userdata):
+
+ name = domain.name()
+ logging.debug("domain agent lifecycle event: domain=%s %s", name,
+ LibvirtEnumMap.domain_agent_lifecycle_str(state, reason))
+
def _network_lifecycle_event(self, conn, network, state, reason, userdata):
ignore = conn
ignore = userdata
@@ -842,6 +848,10 @@ class vmmConnection(vmmGObject):
self.get_backend().domainEventRegisterAny(
None, libvirt.VIR_DOMAIN_EVENT_ID_LIFECYCLE,
self._domain_lifecycle_event, None))
+ self._domain_cb_ids.append(
+ self.get_backend().domainEventRegisterAny(
+ None, libvirt.VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE,
+ self._domain_agent_lifecycle_event, None))
self.using_domain_events = True
logging.debug("Using domain events")
except Exception as e:
--
2.15.1
More information about the virt-tools-list
mailing list