Browse code

functions-libvirt: Enable 'qemu_monitor' logging filter for libvirt

A lot of libvirt interactions with QEMU are via the QEMU monitor
console, which allows you to either query or modify the state of a
virtual machine. Spefici examples include: querying the status of live
block operations, live snapshot operations, live migration, etc.

Enabling the 'qemu_monitor' log filter allows us to capture precisely
what commands libvirt is sending to QEMU.

Note that the log level was intentionally set to '1' (i.e. debug) for
this specific filter, because (a) it's not extremely verbose, (b) when
something breaks, it's helpful to have the exact sequence of
interactions between libvirt and QEMU.

Change-Id: Iba95b6bd7c9f197c8d48c7d978f538e50d4e31fa

Kashyap Chamarthy authored on 2015/04/01 03:49:15
Showing 1 changed files
... ...
@@ -99,9 +99,9 @@ EOF
99 99
             # source file paths, not relative paths. This screws with the matching
100 100
             # of '1:libvirt' making everything turn on. So use libvirt.c for now.
101 101
             # This will have to be re-visited when Ubuntu ships libvirt >= 1.2.3
102
-            local log_filters="1:libvirt.c 1:qemu 1:conf 1:security 3:object 3:event 3:json 3:file 1:util"
102
+            local log_filters="1:libvirt.c 1:qemu 1:conf 1:security 3:object 3:event 3:json 3:file 1:util 1:qemu_monitor"
103 103
         else
104
-            local log_filters="1:libvirt 1:qemu 1:conf 1:security 3:object 3:event 3:json 3:file 1:util"
104
+            local log_filters="1:libvirt 1:qemu 1:conf 1:security 3:object 3:event 3:json 3:file 1:util 1:qemu_monitor"
105 105
         fi
106 106
         local log_outputs="1:file:/var/log/libvirt/libvirtd.log"
107 107
         if ! grep -q "log_filters=\"$log_filters\"" /etc/libvirt/libvirtd.conf; then