Over several years of debugging reports related to VM shutdown, destruction,
and cleanup, I've found that logging of all events received from libxl and
logging the entry of libxlDomainCleanup has proven useful. Add the these
debug messages upstream to aid in future debugging.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_domain.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index a25d65629a..917f6f1d81 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -648,6 +648,8 @@ libxlDomainEventHandler(void *data, VIR_LIBXL_EVENT_CONST libxl_event
*event)
virDomainObj *vm = NULL;
g_autoptr(libxlDriverConfig) cfg = NULL;
+ VIR_DEBUG("Received libxl event '%d' for domid '%d'",
event->type, event->domid);
+
if (event->type != LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN &&
event->type != LIBXL_EVENT_TYPE_DOMAIN_DEATH) {
VIR_INFO("Unhandled event type %d", event->type);
@@ -844,6 +846,9 @@ libxlDomainCleanup(libxlDriverPrivate *driver,
unsigned int hostdev_flags = VIR_HOSTDEV_SP_PCI;
g_autoptr(virConnect) conn = NULL;
+ VIR_DEBUG("Cleaning up domain with id '%d' and name '%s'",
+ vm->def->id, vm->def->name);
+
#ifdef LIBXL_HAVE_PVUSB
hostdev_flags |= VIR_HOSTDEV_SP_USB;
#endif
--
2.30.2