aboutsummaryrefslogtreecommitdiff
path: root/qapi/run-state.json
diff options
context:
space:
mode:
Diffstat (limited to 'qapi/run-state.json')
-rw-r--r--qapi/run-state.json58
1 files changed, 58 insertions, 0 deletions
diff --git a/qapi/run-state.json b/qapi/run-state.json
index a47c500f83..25e82d1be1 100644
--- a/qapi/run-state.json
+++ b/qapi/run-state.json
@@ -326,6 +326,34 @@
'inject-nmi' ] }
##
+# @RebootAction:
+#
+# Possible QEMU actions upon guest reboot
+#
+# @none: Reset the VM
+#
+# @shutdown: Shutdown the VM and exit
+#
+# Since: 6.0
+##
+{ 'enum': 'RebootAction',
+ 'data': [ 'none', 'shutdown' ] }
+
+##
+# @ShutdownAction:
+#
+# Possible QEMU actions upon guest shutdown
+#
+# @poweroff: Shutdown the VM and exit
+#
+# @pause: pause the VM#
+#
+# Since: 6.0
+##
+{ 'enum': 'ShutdownAction',
+ 'data': [ 'poweroff', 'pause' ] }
+
+##
# @watchdog-set-action:
#
# Set watchdog action
@@ -335,6 +363,36 @@
{ 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
##
+# @set-action:
+#
+# Set the actions that will be taken by the emulator in response to guest
+# events.
+#
+# @reboot: @RebootAction action taken on guest reboot.
+#
+# @shutdown: @ShutdownAction action taken on guest shutdown.
+#
+# @watchdog: @WatchdogAction action taken when watchdog timer expires .
+#
+# Returns: Nothing on success.
+#
+# Since: 6.0
+#
+# Example:
+#
+# -> { "execute": "set-action",
+# "arguments": { "reboot": "shutdown",
+# "shutdown" : "pause",
+# "watchdog": "inject-nmi" } }
+# <- { "return": {} }
+##
+{ 'command': 'set-action',
+ 'data': { '*reboot': 'RebootAction',
+ '*shutdown': 'ShutdownAction',
+ '*watchdog': 'WatchdogAction' },
+ 'allow-preconfig': true }
+
+##
# @GUEST_PANICKED:
#
# Emitted when guest OS panic is detected