From 0b328383942f1a349ec11f88ce756c4807f236c2 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Mon, 29 Jun 2015 15:22:49 -0400 Subject: [PATCH] qemu: Add missing on_crash lifecycle type https://bugzilla.redhat.com/show_bug.cgi?id=1201760 When the domain "coredump-destroy" is set, the domain wasn't being destroyed, rather it was being rebooted. Add VIR_DOMAIN_LIFECYCLE_CRASH_COREDUMP_DESTROY to the list of on_crash types that cause "-no-reboot" to be added to the qemu command line. --- src/qemu/qemu_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 443a7d7739..c8f8fe8374 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9381,7 +9381,8 @@ qemuBuildCommandLine(virConnectPtr conn, /* Only add -no-reboot option if each event destroys domain */ if (def->onReboot == VIR_DOMAIN_LIFECYCLE_DESTROY && def->onPoweroff == VIR_DOMAIN_LIFECYCLE_DESTROY && - def->onCrash == VIR_DOMAIN_LIFECYCLE_CRASH_DESTROY) { + (def->onCrash == VIR_DOMAIN_LIFECYCLE_CRASH_DESTROY || + def->onCrash == VIR_DOMAIN_LIFECYCLE_CRASH_COREDUMP_DESTROY)) { allowReboot = false; virCommandAddArg(cmd, "-no-reboot"); } -- 2.39.5