qapi event: convert RESET
[qemu/ar7.git] / docs / qmp / qmp-events.txt
blobc50b18f6fae148e933ed50942d953c14f1cd4ea2
1                    QEMU Machine Protocol Events
2                    ============================
4 ACPI_DEVICE_OST
5 ---------------
7 Emitted when guest executes ACPI _OST method.
9  - data: ACPIOSTInfo type as described in qapi-schema.json
11 { "event": "ACPI_DEVICE_OST",
12      "data": { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0 } }
14 BALLOON_CHANGE
15 --------------
17 Emitted when the guest changes the actual BALLOON level. This
18 value is equivalent to the 'actual' field return by the
19 'query-balloon' command
21 Data:
23 - "actual": actual level of the guest memory balloon in bytes (json-number)
25 Example:
27 { "event": "BALLOON_CHANGE",
28     "data": { "actual": 944766976 },
29     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
31 BLOCK_IMAGE_CORRUPTED
32 ---------------------
34 Emitted when a disk image is being marked corrupt.
36 Data:
38 - "device": Device name (json-string)
39 - "msg":    Informative message (e.g., reason for the corruption) (json-string)
40 - "offset": If the corruption resulted from an image access, this is the access
41             offset into the image (json-int)
42 - "size":   If the corruption resulted from an image access, this is the access
43             size (json-int)
45 Example:
47 { "event": "BLOCK_IMAGE_CORRUPTED",
48     "data": { "device": "ide0-hd0",
49         "msg": "Prevented active L1 table overwrite", "offset": 196608,
50         "size": 65536 },
51     "timestamp": { "seconds": 1378126126, "microseconds": 966463 } }
53 BLOCK_IO_ERROR
54 --------------
56 Emitted when a disk I/O error occurs.
58 Data:
60 - "device": device name (json-string)
61 - "operation": I/O operation (json-string, "read" or "write")
62 - "action": action that has been taken, it's one of the following (json-string):
63     "ignore": error has been ignored
64     "report": error has been reported to the device
65     "stop": the VM is going to stop because of the error
67 Example:
69 { "event": "BLOCK_IO_ERROR",
70     "data": { "device": "ide0-hd1",
71               "operation": "write",
72               "action": "stop" },
73     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
75 Note: If action is "stop", a STOP event will eventually follow the
76 BLOCK_IO_ERROR event.
78 BLOCK_JOB_CANCELLED
79 -------------------
81 Emitted when a block job has been cancelled.
83 Data:
85 - "type":     Job type (json-string; "stream" for image streaming
86                                      "commit" for block commit)
87 - "device":   Device name (json-string)
88 - "len":      Maximum progress value (json-int)
89 - "offset":   Current progress value (json-int)
90               On success this is equal to len.
91               On failure this is less than len.
92 - "speed":    Rate limit, bytes per second (json-int)
94 Example:
96 { "event": "BLOCK_JOB_CANCELLED",
97      "data": { "type": "stream", "device": "virtio-disk0",
98                "len": 10737418240, "offset": 134217728,
99                "speed": 0 },
100      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
102 BLOCK_JOB_COMPLETED
103 -------------------
105 Emitted when a block job has completed.
107 Data:
109 - "type":     Job type (json-string; "stream" for image streaming
110                                      "commit" for block commit)
111 - "device":   Device name (json-string)
112 - "len":      Maximum progress value (json-int)
113 - "offset":   Current progress value (json-int)
114               On success this is equal to len.
115               On failure this is less than len.
116 - "speed":    Rate limit, bytes per second (json-int)
117 - "error":    Error message (json-string, optional)
118               Only present on failure.  This field contains a human-readable
119               error message.  There are no semantics other than that streaming
120               has failed and clients should not try to interpret the error
121               string.
123 Example:
125 { "event": "BLOCK_JOB_COMPLETED",
126      "data": { "type": "stream", "device": "virtio-disk0",
127                "len": 10737418240, "offset": 10737418240,
128                "speed": 0 },
129      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
131 BLOCK_JOB_ERROR
132 ---------------
134 Emitted when a block job encounters an error.
136 Data:
138 - "device": device name (json-string)
139 - "operation": I/O operation (json-string, "read" or "write")
140 - "action": action that has been taken, it's one of the following (json-string):
141     "ignore": error has been ignored, the job may fail later
142     "report": error will be reported and the job canceled
143     "stop": error caused job to be paused
145 Example:
147 { "event": "BLOCK_JOB_ERROR",
148     "data": { "device": "ide0-hd1",
149               "operation": "write",
150               "action": "stop" },
151     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
153 BLOCK_JOB_READY
154 ---------------
156 Emitted when a block job is ready to complete.
158 Data:
160 - "device": device name (json-string)
162 Example:
164 { "event": "BLOCK_JOB_READY",
165     "data": { "device": "ide0-hd1" },
166     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
168 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
169 event.
171 DEVICE_DELETED
172 --------------
174 Emitted whenever the device removal completion is acknowledged
175 by the guest.
176 At this point, it's safe to reuse the specified device ID.
177 Device removal can be initiated by the guest or by HMP/QMP commands.
179 Data:
181 - "device": device name (json-string, optional)
182 - "path": device path (json-string)
184 { "event": "DEVICE_DELETED",
185   "data": { "device": "virtio-net-pci-0",
186             "path": "/machine/peripheral/virtio-net-pci-0" },
187   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
189 DEVICE_TRAY_MOVED
190 -----------------
192 It's emitted whenever the tray of a removable device is moved by the guest
193 or by HMP/QMP commands.
195 Data:
197 - "device": device name (json-string)
198 - "tray-open": true if the tray has been opened or false if it has been closed
199                (json-bool)
201 { "event": "DEVICE_TRAY_MOVED",
202   "data": { "device": "ide1-cd0",
203             "tray-open": true
204   },
205   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
207 GUEST_PANICKED
208 --------------
210 Emitted when guest OS panic is detected.
212 Data:
214 - "action": Action that has been taken (json-string, currently always "pause").
216 Example:
218 { "event": "GUEST_PANICKED",
219      "data": { "action": "pause" } }
221 NIC_RX_FILTER_CHANGED
222 ---------------------
224 The event is emitted once until the query command is executed,
225 the first event will always be emitted.
227 Data:
229 - "name": net client name (json-string)
230 - "path": device path (json-string)
232 { "event": "NIC_RX_FILTER_CHANGED",
233   "data": { "name": "vnet0",
234             "path": "/machine/peripheral/vnet0/virtio-backend" },
235   "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
238 QUORUM_FAILURE
239 --------------
241 Emitted by the Quorum block driver if it fails to establish a quorum.
243 Data:
245 - "reference":    device name if defined else node name.
246 - "sector-num":   Number of the first sector of the failed read operation.
247 - "sector-count": Failed read operation sector count.
249 Example:
251 { "event": "QUORUM_FAILURE",
252      "data": { "reference": "usr1", "sector-num": 345435, "sector-count": 5 },
253      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
255 QUORUM_REPORT_BAD
256 -----------------
258 Emitted to report a corruption of a Quorum file.
260 Data:
262 - "error":        Error message (json-string, optional)
263                   Only present on failure.  This field contains a human-readable
264                   error message.  There are no semantics other than that the
265                   block layer reported an error and clients should not try to
266                   interpret the error string.
267 - "node-name":    The graph node name of the block driver state.
268 - "sector-num":   Number of the first sector of the failed read operation.
269 - "sector-count": Failed read operation sector count.
271 Example:
273 { "event": "QUORUM_REPORT_BAD",
274      "data": { "node-name": "1.raw", "sector-num": 345435, "sector-count": 5 },
275      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
277 RESUME
278 ------
280 Emitted when the Virtual Machine resumes execution.
282 Data: None.
284 Example:
286 { "event": "RESUME",
287     "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
289 RTC_CHANGE
290 ----------
292 Emitted when the guest changes the RTC time.
294 Data:
296 - "offset": Offset between base RTC clock (as specified by -rtc base), and
297 new RTC clock value (json-number)
299 Example:
301 { "event": "RTC_CHANGE",
302     "data": { "offset": 78 },
303     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
305 SPICE_CONNECTED, SPICE_DISCONNECTED
306 -----------------------------------
308 Emitted when a SPICE client connects or disconnects.
310 Data:
312 - "server": Server information (json-object)
313   - "host": IP address (json-string)
314   - "port": port number (json-string)
315   - "family": address family (json-string, "ipv4" or "ipv6")
316 - "client": Client information (json-object)
317   - "host": IP address (json-string)
318   - "port": port number (json-string)
319   - "family": address family (json-string, "ipv4" or "ipv6")
321 Example:
323 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
324   "event": "SPICE_CONNECTED",
325   "data": {
326     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
327     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
330 SPICE_INITIALIZED
331 -----------------
333 Emitted after initial handshake and authentication takes place (if any)
334 and the SPICE channel is up'n'running
336 Data:
338 - "server": Server information (json-object)
339   - "host": IP address (json-string)
340   - "port": port number (json-string)
341   - "family": address family (json-string, "ipv4" or "ipv6")
342   - "auth": authentication method (json-string, optional)
343 - "client": Client information (json-object)
344   - "host": IP address (json-string)
345   - "port": port number (json-string)
346   - "family": address family (json-string, "ipv4" or "ipv6")
347   - "connection-id": spice connection id.  All channels with the same id
348                      belong to the same spice session (json-int)
349   - "channel-type": channel type.  "1" is the main control channel, filter for
350                     this one if you want track spice sessions only (json-int)
351   - "channel-id": channel id.  Usually "0", might be different needed when
352                   multiple channels of the same type exist, such as multiple
353                   display channels in a multihead setup (json-int)
354   - "tls": whevener the channel is encrypted (json-bool)
356 Example:
358 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
359   "event": "SPICE_INITIALIZED",
360   "data": {"server": {"auth": "spice", "port": "5921",
361                       "family": "ipv4", "host": "127.0.0.1"},
362            "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
363                       "connection-id": 1804289383, "host": "127.0.0.1",
364                       "channel-id": 0, "tls": true}
367 STOP
368 ----
370 Emitted when the Virtual Machine is stopped.
372 Data: None.
374 Example:
376 { "event": "STOP",
377     "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
379 SUSPEND
380 -------
382 Emitted when guest enters S3 state.
384 Data: None.
386 Example:
388 { "event": "SUSPEND",
389      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
391 SUSPEND_DISK
392 ------------
394 Emitted when the guest makes a request to enter S4 state.
396 Data: None.
398 Example:
400 { "event": "SUSPEND_DISK",
401      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
403 Note: QEMU shuts down when entering S4 state.
405 VNC_CONNECTED
406 -------------
408 Emitted when a VNC client establishes a connection.
410 Data:
412 - "server": Server information (json-object)
413   - "host": IP address (json-string)
414   - "service": port number (json-string)
415   - "family": address family (json-string, "ipv4" or "ipv6")
416   - "auth": authentication method (json-string, optional)
417 - "client": Client information (json-object)
418   - "host": IP address (json-string)
419   - "service": port number (json-string)
420   - "family": address family (json-string, "ipv4" or "ipv6")
422 Example:
424 { "event": "VNC_CONNECTED",
425     "data": {
426         "server": { "auth": "sasl", "family": "ipv4",
427                     "service": "5901", "host": "0.0.0.0" },
428         "client": { "family": "ipv4", "service": "58425",
429                     "host": "127.0.0.1" } },
430     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
433 Note: This event is emitted before any authentication takes place, thus
434 the authentication ID is not provided.
436 VNC_DISCONNECTED
437 ----------------
439 Emitted when the connection is closed.
441 Data:
443 - "server": Server information (json-object)
444   - "host": IP address (json-string)
445   - "service": port number (json-string)
446   - "family": address family (json-string, "ipv4" or "ipv6")
447   - "auth": authentication method (json-string, optional)
448 - "client": Client information (json-object)
449   - "host": IP address (json-string)
450   - "service": port number (json-string)
451   - "family": address family (json-string, "ipv4" or "ipv6")
452   - "x509_dname": TLS dname (json-string, optional)
453   - "sasl_username": SASL username (json-string, optional)
455 Example:
457 { "event": "VNC_DISCONNECTED",
458     "data": {
459         "server": { "auth": "sasl", "family": "ipv4",
460                     "service": "5901", "host": "0.0.0.0" },
461         "client": { "family": "ipv4", "service": "58425",
462                     "host": "127.0.0.1", "sasl_username": "luiz" } },
463     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
465 VNC_INITIALIZED
466 ---------------
468 Emitted after authentication takes place (if any) and the VNC session is
469 made active.
471 Data:
473 - "server": Server information (json-object)
474   - "host": IP address (json-string)
475   - "service": port number (json-string)
476   - "family": address family (json-string, "ipv4" or "ipv6")
477   - "auth": authentication method (json-string, optional)
478 - "client": Client information (json-object)
479   - "host": IP address (json-string)
480   - "service": port number (json-string)
481   - "family": address family (json-string, "ipv4" or "ipv6")
482   - "x509_dname": TLS dname (json-string, optional)
483   - "sasl_username": SASL username (json-string, optional)
485 Example:
487 { "event": "VNC_INITIALIZED",
488     "data": {
489         "server": { "auth": "sasl", "family": "ipv4",
490                     "service": "5901", "host": "0.0.0.0"},
491         "client": { "family": "ipv4", "service": "46089",
492                     "host": "127.0.0.1", "sasl_username": "luiz" } },
493         "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
495 WAKEUP
496 ------
498 Emitted when the guest has woken up from S3 and is running.
500 Data: None.
502 Example:
504 { "event": "WAKEUP",
505      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
507 WATCHDOG
508 --------
510 Emitted when the watchdog device's timer is expired.
512 Data:
514 - "action": Action that has been taken, it's one of the following (json-string):
515             "reset", "shutdown", "poweroff", "pause", "debug", or "none"
517 Example:
519 { "event": "WATCHDOG",
520      "data": { "action": "reset" },
521      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
523 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
524 followed respectively by the RESET, SHUTDOWN, or STOP events.