File 27e1779f-libxl-debug.patch of Package libvirt
xxxxxxxxxx
1
commit 27e1779f0895c3a7e523fa61a5764806275b7e5b
2
Author: Jim Fehlig <jfehlig@suse.com>
3
Date: Tue Apr 13 17:29:19 2021 -0600
4
5
libxl: Add debug statements
6
7
Over several years of debugging reports related to VM shutdown, destruction,
8
and cleanup, I've found that logging of all events received from libxl and
9
logging the entry of libxlDomainCleanup has proven useful. Add the these
10
debug messages upstream to aid in future debugging.
11
12
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
13
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
14
15
Index: libvirt-7.1.0/src/libxl/libxl_domain.c
16
===================================================================
17
--- libvirt-7.1.0.orig/src/libxl/libxl_domain.c
18
+++ libvirt-7.1.0/src/libxl/libxl_domain.c
19
20
virDomainObjPtr vm = NULL;
21
g_autoptr(libxlDriverConfig) cfg = NULL;
22
23
+ VIR_DEBUG("Received libxl event '%d' for domid '%d'", event->type, event->domid);
24
+
25
if (event->type != LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN &&
26
event->type != LIBXL_EVENT_TYPE_DOMAIN_DEATH) {
27
VIR_INFO("Unhandled event type %d", event->type);
28
29
unsigned int hostdev_flags = VIR_HOSTDEV_SP_PCI;
30
g_autoptr(virConnect) conn = NULL;
31
32
+ VIR_DEBUG("Cleaning up domain with id '%d' and name '%s'",
33
+ vm->def->id, vm->def->name);
34
+
35
#ifdef LIBXL_HAVE_PVUSB
36
hostdev_flags |= VIR_HOSTDEV_SP_USB;
37
#endif
38