diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 31e54088c8..bdc87c7c2e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3350,6 +3350,7 @@ qemuBuildWatchdogCommandLine(virCommandPtr cmd, virDomainWatchdogDefPtr watchdog = def->watchdog; char *optstr; const char *action; + int actualAction; if (!def->watchdog) return 0; @@ -3376,10 +3377,14 @@ qemuBuildWatchdogCommandLine(virCommandPtr cmd, virCommandAddArg(cmd, optstr); VIR_FREE(optstr); + /* qemu doesn't have a 'dump' action; we tell qemu to 'pause', then + libvirt listens for the watchdog event, and we perform the dump + ourselves. so convert 'dump' to 'pause' for the qemu cli */ + actualAction = watchdog->action; if (watchdog->action == VIR_DOMAIN_WATCHDOG_ACTION_DUMP) - watchdog->action = VIR_DOMAIN_WATCHDOG_ACTION_PAUSE; + actualAction = VIR_DOMAIN_WATCHDOG_ACTION_PAUSE; - action = virDomainWatchdogActionTypeToString(watchdog->action); + action = virDomainWatchdogActionTypeToString(actualAction); if (!action) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("invalid watchdog action"));