console: delayed ui_info guest notification
[qemu/ar7.git] / docs / qmp / qmp-events.txt
blobb19e490eb5588439ee56751cff6383ca00bea988
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. The image can be
35 identified by its device or node name. The 'device' field is always
36 present for compatibility reasons, but it can be empty ("") if the
37 image does not have a device name associated.
39 Data:
41 - "device":    Device name (json-string)
42 - "node-name": Node name (json-string, optional)
43 - "msg":       Informative message (e.g., reason for the corruption)
44                (json-string)
45 - "offset":    If the corruption resulted from an image access, this
46                is the access offset into the image (json-int)
47 - "size":      If the corruption resulted from an image access, this
48                is the access size (json-int)
50 Example:
52 { "event": "BLOCK_IMAGE_CORRUPTED",
53     "data": { "device": "ide0-hd0", "node-name": "node0",
54         "msg": "Prevented active L1 table overwrite", "offset": 196608,
55         "size": 65536 },
56     "timestamp": { "seconds": 1378126126, "microseconds": 966463 } }
58 BLOCK_IO_ERROR
59 --------------
61 Emitted when a disk I/O error occurs.
63 Data:
65 - "device": device name (json-string)
66 - "operation": I/O operation (json-string, "read" or "write")
67 - "action": action that has been taken, it's one of the following (json-string):
68     "ignore": error has been ignored
69     "report": error has been reported to the device
70     "stop": the VM is going to stop because of the error
72 Example:
74 { "event": "BLOCK_IO_ERROR",
75     "data": { "device": "ide0-hd1",
76               "operation": "write",
77               "action": "stop" },
78     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
80 Note: If action is "stop", a STOP event will eventually follow the
81 BLOCK_IO_ERROR event.
83 BLOCK_JOB_CANCELLED
84 -------------------
86 Emitted when a block job has been cancelled.
88 Data:
90 - "type":     Job type (json-string; "stream" for image streaming
91                                      "commit" for block commit)
92 - "device":   Device name (json-string)
93 - "len":      Maximum progress value (json-int)
94 - "offset":   Current progress value (json-int)
95               On success this is equal to len.
96               On failure this is less than len.
97 - "speed":    Rate limit, bytes per second (json-int)
99 Example:
101 { "event": "BLOCK_JOB_CANCELLED",
102      "data": { "type": "stream", "device": "virtio-disk0",
103                "len": 10737418240, "offset": 134217728,
104                "speed": 0 },
105      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
107 BLOCK_JOB_COMPLETED
108 -------------------
110 Emitted when a block job has completed.
112 Data:
114 - "type":     Job type (json-string; "stream" for image streaming
115                                      "commit" for block commit)
116 - "device":   Device name (json-string)
117 - "len":      Maximum progress value (json-int)
118 - "offset":   Current progress value (json-int)
119               On success this is equal to len.
120               On failure this is less than len.
121 - "speed":    Rate limit, bytes per second (json-int)
122 - "error":    Error message (json-string, optional)
123               Only present on failure.  This field contains a human-readable
124               error message.  There are no semantics other than that streaming
125               has failed and clients should not try to interpret the error
126               string.
128 Example:
130 { "event": "BLOCK_JOB_COMPLETED",
131      "data": { "type": "stream", "device": "virtio-disk0",
132                "len": 10737418240, "offset": 10737418240,
133                "speed": 0 },
134      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
136 BLOCK_JOB_ERROR
137 ---------------
139 Emitted when a block job encounters an error.
141 Data:
143 - "device": device name (json-string)
144 - "operation": I/O operation (json-string, "read" or "write")
145 - "action": action that has been taken, it's one of the following (json-string):
146     "ignore": error has been ignored, the job may fail later
147     "report": error will be reported and the job canceled
148     "stop": error caused job to be paused
150 Example:
152 { "event": "BLOCK_JOB_ERROR",
153     "data": { "device": "ide0-hd1",
154               "operation": "write",
155               "action": "stop" },
156     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
158 BLOCK_JOB_READY
159 ---------------
161 Emitted when a block job is ready to complete.
163 Data:
165 - "type":     Job type (json-string; "stream" for image streaming
166                                      "commit" for block commit)
167 - "device":   Device name (json-string)
168 - "len":      Maximum progress value (json-int)
169 - "offset":   Current progress value (json-int)
170               On success this is equal to len.
171               On failure this is less than len.
172 - "speed":    Rate limit, bytes per second (json-int)
174 Example:
176 { "event": "BLOCK_JOB_READY",
177     "data": { "device": "drive0", "type": "mirror", "speed": 0,
178               "len": 2097152, "offset": 2097152 }
179     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
181 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
182 event.
184 DEVICE_DELETED
185 --------------
187 Emitted whenever the device removal completion is acknowledged
188 by the guest.
189 At this point, it's safe to reuse the specified device ID.
190 Device removal can be initiated by the guest or by HMP/QMP commands.
192 Data:
194 - "device": device name (json-string, optional)
195 - "path": device path (json-string)
197 { "event": "DEVICE_DELETED",
198   "data": { "device": "virtio-net-pci-0",
199             "path": "/machine/peripheral/virtio-net-pci-0" },
200   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
202 DEVICE_TRAY_MOVED
203 -----------------
205 It's emitted whenever the tray of a removable device is moved by the guest
206 or by HMP/QMP commands.
208 Data:
210 - "device": device name (json-string)
211 - "tray-open": true if the tray has been opened or false if it has been closed
212                (json-bool)
214 { "event": "DEVICE_TRAY_MOVED",
215   "data": { "device": "ide1-cd0",
216             "tray-open": true
217   },
218   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
220 GUEST_PANICKED
221 --------------
223 Emitted when guest OS panic is detected.
225 Data:
227 - "action": Action that has been taken (json-string, currently always "pause").
229 Example:
231 { "event": "GUEST_PANICKED",
232      "data": { "action": "pause" } }
234 NIC_RX_FILTER_CHANGED
235 ---------------------
237 The event is emitted once until the query command is executed,
238 the first event will always be emitted.
240 Data:
242 - "name": net client name (json-string)
243 - "path": device path (json-string)
245 { "event": "NIC_RX_FILTER_CHANGED",
246   "data": { "name": "vnet0",
247             "path": "/machine/peripheral/vnet0/virtio-backend" },
248   "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
251 POWERDOWN
252 ---------
254 Emitted when the Virtual Machine is powered down through the power
255 control system, such as via ACPI.
257 Data: None.
259 Example:
261 { "event": "POWERDOWN",
262     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
264 QUORUM_FAILURE
265 --------------
267 Emitted by the Quorum block driver if it fails to establish a quorum.
269 Data:
271 - "reference":     device name if defined else node name.
272 - "sector-num":    Number of the first sector of the failed read operation.
273 - "sectors-count": Failed read operation sector count.
275 Example:
277 { "event": "QUORUM_FAILURE",
278      "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
279      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
281 QUORUM_REPORT_BAD
282 -----------------
284 Emitted to report a corruption of a Quorum file.
286 Data:
288 - "error":         Error message (json-string, optional)
289                    Only present on failure.  This field contains a human-readable
290                    error message.  There are no semantics other than that the
291                    block layer reported an error and clients should not try to
292                    interpret the error string.
293 - "node-name":     The graph node name of the block driver state.
294 - "sector-num":    Number of the first sector of the failed read operation.
295 - "sectors-count": Failed read operation sector count.
297 Example:
299 { "event": "QUORUM_REPORT_BAD",
300      "data": { "node-name": "1.raw", "sector-num": 345435, "sectors-count": 5 },
301      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
303 RESET
304 -----
306 Emitted when the Virtual Machine is reset.
308 Data: None.
310 Example:
312 { "event": "RESET",
313     "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
315 RESUME
316 ------
318 Emitted when the Virtual Machine resumes execution.
320 Data: None.
322 Example:
324 { "event": "RESUME",
325     "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
327 RTC_CHANGE
328 ----------
330 Emitted when the guest changes the RTC time.
332 Data:
334 - "offset": Offset between base RTC clock (as specified by -rtc base), and
335 new RTC clock value (json-number)
337 Example:
339 { "event": "RTC_CHANGE",
340     "data": { "offset": 78 },
341     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
343 SHUTDOWN
344 --------
346 Emitted when the Virtual Machine has shut down, indicating that qemu
347 is about to exit.
349 Data: None.
351 Example:
353 { "event": "SHUTDOWN",
354     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
356 Note: If the command-line option "-no-shutdown" has been specified, a STOP
357 event will eventually follow the SHUTDOWN event.
359 SPICE_CONNECTED
360 ---------------
362 Emitted when a SPICE client connects.
364 Data:
366 - "server": Server information (json-object)
367   - "host": IP address (json-string)
368   - "port": port number (json-string)
369   - "family": address family (json-string, "ipv4" or "ipv6")
370 - "client": Client information (json-object)
371   - "host": IP address (json-string)
372   - "port": port number (json-string)
373   - "family": address family (json-string, "ipv4" or "ipv6")
375 Example:
377 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
378   "event": "SPICE_CONNECTED",
379   "data": {
380     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
381     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
384 SPICE_DISCONNECTED
385 ------------------
387 Emitted when a SPICE client disconnects.
389 Data:
391 - "server": Server information (json-object)
392   - "host": IP address (json-string)
393   - "port": port number (json-string)
394   - "family": address family (json-string, "ipv4" or "ipv6")
395 - "client": Client information (json-object)
396   - "host": IP address (json-string)
397   - "port": port number (json-string)
398   - "family": address family (json-string, "ipv4" or "ipv6")
400 Example:
402 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
403   "event": "SPICE_DISCONNECTED",
404   "data": {
405     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
406     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
409 SPICE_INITIALIZED
410 -----------------
412 Emitted after initial handshake and authentication takes place (if any)
413 and the SPICE channel is up and running
415 Data:
417 - "server": Server information (json-object)
418   - "host": IP address (json-string)
419   - "port": port number (json-string)
420   - "family": address family (json-string, "ipv4" or "ipv6")
421   - "auth": authentication method (json-string, optional)
422 - "client": Client information (json-object)
423   - "host": IP address (json-string)
424   - "port": port number (json-string)
425   - "family": address family (json-string, "ipv4" or "ipv6")
426   - "connection-id": spice connection id.  All channels with the same id
427                      belong to the same spice session (json-int)
428   - "channel-type": channel type.  "1" is the main control channel, filter for
429                     this one if you want track spice sessions only (json-int)
430   - "channel-id": channel id.  Usually "0", might be different needed when
431                   multiple channels of the same type exist, such as multiple
432                   display channels in a multihead setup (json-int)
433   - "tls": whevener the channel is encrypted (json-bool)
435 Example:
437 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
438   "event": "SPICE_INITIALIZED",
439   "data": {"server": {"auth": "spice", "port": "5921",
440                       "family": "ipv4", "host": "127.0.0.1"},
441            "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
442                       "connection-id": 1804289383, "host": "127.0.0.1",
443                       "channel-id": 0, "tls": true}
446 SPICE_MIGRATE_COMPLETED
447 -----------------------
449 Emitted when SPICE migration has completed
451 Data: None.
453 Example:
455 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
456   "event": "SPICE_MIGRATE_COMPLETED" }
459 STOP
460 ----
462 Emitted when the Virtual Machine is stopped.
464 Data: None.
466 Example:
468 { "event": "STOP",
469     "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
471 SUSPEND
472 -------
474 Emitted when guest enters S3 state.
476 Data: None.
478 Example:
480 { "event": "SUSPEND",
481      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
483 SUSPEND_DISK
484 ------------
486 Emitted when the guest makes a request to enter S4 state.
488 Data: None.
490 Example:
492 { "event": "SUSPEND_DISK",
493      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
495 Note: QEMU shuts down when entering S4 state.
497 VNC_CONNECTED
498 -------------
500 Emitted when a VNC client establishes a connection.
502 Data:
504 - "server": Server information (json-object)
505   - "host": IP address (json-string)
506   - "service": port number (json-string)
507   - "family": address family (json-string, "ipv4" or "ipv6")
508   - "auth": authentication method (json-string, optional)
509 - "client": Client information (json-object)
510   - "host": IP address (json-string)
511   - "service": port number (json-string)
512   - "family": address family (json-string, "ipv4" or "ipv6")
514 Example:
516 { "event": "VNC_CONNECTED",
517     "data": {
518         "server": { "auth": "sasl", "family": "ipv4",
519                     "service": "5901", "host": "0.0.0.0" },
520         "client": { "family": "ipv4", "service": "58425",
521                     "host": "127.0.0.1" } },
522     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
525 Note: This event is emitted before any authentication takes place, thus
526 the authentication ID is not provided.
528 VNC_DISCONNECTED
529 ----------------
531 Emitted when the connection is closed.
533 Data:
535 - "server": Server information (json-object)
536   - "host": IP address (json-string)
537   - "service": port number (json-string)
538   - "family": address family (json-string, "ipv4" or "ipv6")
539   - "auth": authentication method (json-string, optional)
540 - "client": Client information (json-object)
541   - "host": IP address (json-string)
542   - "service": port number (json-string)
543   - "family": address family (json-string, "ipv4" or "ipv6")
544   - "x509_dname": TLS dname (json-string, optional)
545   - "sasl_username": SASL username (json-string, optional)
547 Example:
549 { "event": "VNC_DISCONNECTED",
550     "data": {
551         "server": { "auth": "sasl", "family": "ipv4",
552                     "service": "5901", "host": "0.0.0.0" },
553         "client": { "family": "ipv4", "service": "58425",
554                     "host": "127.0.0.1", "sasl_username": "luiz" } },
555     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
557 VNC_INITIALIZED
558 ---------------
560 Emitted after authentication takes place (if any) and the VNC session is
561 made active.
563 Data:
565 - "server": Server information (json-object)
566   - "host": IP address (json-string)
567   - "service": port number (json-string)
568   - "family": address family (json-string, "ipv4" or "ipv6")
569   - "auth": authentication method (json-string, optional)
570 - "client": Client information (json-object)
571   - "host": IP address (json-string)
572   - "service": port number (json-string)
573   - "family": address family (json-string, "ipv4" or "ipv6")
574   - "x509_dname": TLS dname (json-string, optional)
575   - "sasl_username": SASL username (json-string, optional)
577 Example:
579 { "event": "VNC_INITIALIZED",
580     "data": {
581         "server": { "auth": "sasl", "family": "ipv4",
582                     "service": "5901", "host": "0.0.0.0"},
583         "client": { "family": "ipv4", "service": "46089",
584                     "host": "127.0.0.1", "sasl_username": "luiz" } },
585         "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
587 VSERPORT_CHANGE
588 ---------------
590 Emitted when the guest opens or closes a virtio-serial port.
592 Data:
594 - "id": device identifier of the virtio-serial port (json-string)
595 - "open": true if the guest has opened the virtio-serial port (json-bool)
597 Example:
599 { "event": "VSERPORT_CHANGE",
600     "data": { "id": "channel0", "open": true },
601     "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
603 WAKEUP
604 ------
606 Emitted when the guest has woken up from S3 and is running.
608 Data: None.
610 Example:
612 { "event": "WAKEUP",
613      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
615 WATCHDOG
616 --------
618 Emitted when the watchdog device's timer is expired.
620 Data:
622 - "action": Action that has been taken, it's one of the following (json-string):
623             "reset", "shutdown", "poweroff", "pause", "debug", or "none"
625 Example:
627 { "event": "WATCHDOG",
628      "data": { "action": "reset" },
629      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
631 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
632 followed respectively by the RESET, SHUTDOWN, or STOP events.