diff options
Diffstat (limited to 'QMP')
-rw-r--r-- | QMP/qmp-events.txt | 32 | ||||
-rwxr-xr-x | QMP/qmp-shell | 9 |
2 files changed, 40 insertions, 1 deletions
diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt index b2698e4..92fe5fb 100644 --- a/QMP/qmp-events.txt +++ b/QMP/qmp-events.txt @@ -136,6 +136,24 @@ Example: Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR event. +DEVICE_DELETED +----------------- + +Emitted whenever the device removal completion is acknowledged +by the guest. +At this point, it's safe to reuse the specified device ID. +Device removal can be initiated by the guest or by HMP/QMP commands. + +Data: + +- "device": device name (json-string, optional) +- "path": device path (json-string) + +{ "event": "DEVICE_DELETED", + "data": { "device": "virtio-net-pci-0", + "path": "/machine/peripheral/virtio-net-pci-0" }, + "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } + DEVICE_TRAY_MOVED ----------------- @@ -428,3 +446,17 @@ Example: Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is followed respectively by the RESET, SHUTDOWN, or STOP events. + +GUEST_PANICKED +-------------- + +Emitted when guest OS panic is detected. + +Data: + +- "action": Action that has been taken (json-string, currently always "pause"). + +Example: + +{ "event": "GUEST_PANICKED", + "data": { "action": "pause" } } diff --git a/QMP/qmp-shell b/QMP/qmp-shell index 24b665c..73cb3b6 100755 --- a/QMP/qmp-shell +++ b/QMP/qmp-shell @@ -99,9 +99,16 @@ class QMPShell(qmp.QEMUMonitorProtocol): for arg in cmdargs[1:]: opt = arg.split('=') try: + if(len(opt) > 2): + opt[1] = '='.join(opt[1:]) value = int(opt[1]) except ValueError: - value = opt[1] + if opt[1] == 'true': + value = True + elif opt[1] == 'false': + value = False + else: + value = opt[1] qmpcmd['arguments'][opt[0]] = value return qmpcmd |