[virt-tools-list] [virt-manager] [PATCH v2 3/4] Output the qemu guest agent lifecycle events in debug mode
Lin Ma
lma at suse.com
Wed Jul 4 08:10:37 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 8efcca77..8539be7e 100644
--- a/virtManager/connection.py
+++ b/virtManager/connection.py
@@ -763,6 +763,14 @@ class vmmConnection(vmmGObject):
else:
self.schedule_priority_tick(pollvm=True, force=True)
+ def _domain_agent_lifecycle_event(self, conn, domain, state, reason, userdata):
+ ignore = conn
+ ignore = 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
@@ -866,6 +874,8 @@ class vmmConnection(vmmGObject):
_add_domain_xml_event("VIR_DOMAIN_EVENT_ID_TRAY_CHANGE", 10)
_add_domain_xml_event("VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED", 15)
_add_domain_xml_event("VIR_DOMAIN_EVENT_ID_DEVICE_ADDED", 19)
+ _add_domain_xml_event("VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE", 18,
+ self._domain_agent_lifecycle_event)
try:
if FORCE_DISABLE_EVENTS:
--
2.15.1
More information about the virt-tools-list
mailing list