mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
qmp: Add reason to SHUTDOWN and RESET events
This makes it possible to determine what the exact reason was for a RESET or a SHUTDOWN. A management layer might need the specific reason of those events to determine which cleanups or other actions it needs to do. This patch also updates the iotests to the new expected output that includes the reason. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Message-Id: <20181205110131.23049-3-d.csapak@proxmox.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
d43013e24d
commit
ecd7a0d5bb
23 changed files with 95 additions and 79 deletions
|
@ -141,6 +141,8 @@
|
|||
# a guest-initiated ACPI shutdown request or other hardware-specific action)
|
||||
# rather than a host request (such as sending qemu a SIGINT). (since 2.10)
|
||||
#
|
||||
# @reason: The @ShutdownCause which resulted in the SHUTDOWN. (since 4.0)
|
||||
#
|
||||
# Note: If the command-line option "-no-shutdown" has been specified, qemu will
|
||||
# not exit, and a STOP event will eventually follow the SHUTDOWN event
|
||||
#
|
||||
|
@ -152,7 +154,7 @@
|
|||
# "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
|
||||
#
|
||||
##
|
||||
{ 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } }
|
||||
{ 'event': 'SHUTDOWN', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
|
||||
|
||||
##
|
||||
# @POWERDOWN:
|
||||
|
@ -180,6 +182,8 @@
|
|||
# rather than a host request (such as the QMP command system_reset).
|
||||
# (since 2.10)
|
||||
#
|
||||
# @reason: The @ShutdownCause of the RESET. (since 4.0)
|
||||
#
|
||||
# Since: 0.12.0
|
||||
#
|
||||
# Example:
|
||||
|
@ -188,7 +192,7 @@
|
|||
# "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
|
||||
#
|
||||
##
|
||||
{ 'event': 'RESET', 'data': { 'guest': 'bool' } }
|
||||
{ 'event': 'RESET', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
|
||||
|
||||
##
|
||||
# @STOP:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue