[libvirt PATCH] qemu: use stop reason as 'extra' field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds the reason the domain stopped to the 'extra' field, which
will be sent to the 'qemu' hook script (if defined).

Signed-off-by: Mike Pontillo <mpontillo@xxxxxxxxxxxxxxxx>

---

Our hook processor often needs to know the reason why a guest stopped. I
am propsing this change in case other hook processing implementations
could also benefit from this information.
---
 src/qemu/qemu_process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index be418ad8e6..425b73c37e 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8432,7 +8432,7 @@ void qemuProcessStop(virQEMUDriver *driver,
         /* we can't stop the operation even if the script raised an error */
         ignore_value(virHookCall(VIR_HOOK_DRIVER_QEMU, vm->def->name,
                                  VIR_HOOK_QEMU_OP_STOPPED, VIR_HOOK_SUBOP_END,
-                                 NULL, xml, NULL));
+                                 virDomainShutoffReasonTypeToString(reason), xml, NULL));
     }
 
     /* Reset Security Labels unless caller don't want us to */
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux