qmp-events: move 'BLOCK_JOB_READY' doc to schema
[qemu/kevin.git] / docs / qmp-events.txt
blob71882a6c927354a0bcdcd3578baad4ccb6672122
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 Note: this event is rate-limited.
33 DEVICE_DELETED
34 --------------
36 Emitted whenever the device removal completion is acknowledged
37 by the guest.
38 At this point, it's safe to reuse the specified device ID.
39 Device removal can be initiated by the guest or by HMP/QMP commands.
41 Data:
43 - "device": device name (json-string, optional)
44 - "path": device path (json-string)
46 { "event": "DEVICE_DELETED",
47   "data": { "device": "virtio-net-pci-0",
48             "path": "/machine/peripheral/virtio-net-pci-0" },
49   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
51 DEVICE_TRAY_MOVED
52 -----------------
54 It's emitted whenever the tray of a removable device is moved by the guest
55 or by HMP/QMP commands.
57 Data:
59 - "device": Block device name. This is always present for compatibility
60             reasons, but it can be empty ("") if the image does not have a
61             device name associated. (json-string)
62 - "id": The name or QOM path of the guest device (json-string)
63 - "tray-open": true if the tray has been opened or false if it has been closed
64                (json-bool)
66 { "event": "DEVICE_TRAY_MOVED",
67   "data": { "device": "ide1-cd0",
68             "id": "/machine/unattached/device[22]",
69             "tray-open": true
70   },
71   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
73 DUMP_COMPLETED
74 --------------
76 Emitted when the guest has finished one memory dump.
78 Data:
80 - "result": DumpQueryResult type described in qapi-schema.json
81 - "error": Error message when dump failed. This is only a
82   human-readable string provided when dump failed. It should not be
83   parsed in any way (json-string, optional)
85 Example:
87 { "event": "DUMP_COMPLETED",
88   "data": {"result": {"total": 1090650112, "status": "completed",
89                       "completed": 1090650112} } }
91 GUEST_PANICKED
92 --------------
94 Emitted when guest OS panic is detected.
96 Data:
98 - "action": Action that has been taken (json-string, currently always "pause").
100 Example:
102 { "event": "GUEST_PANICKED",
103      "data": { "action": "pause" } }
105 MEM_UNPLUG_ERROR
106 --------------------
107 Emitted when memory hot unplug error occurs.
109 Data:
111 - "device": device name (json-string)
112 - "msg": Informative message (e.g., reason for the error) (json-string)
114 Example:
116 { "event": "MEM_UNPLUG_ERROR"
117   "data": { "device": "dimm1",
118             "msg": "acpi: device unplug for unsupported device"
119   },
120   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
122 NIC_RX_FILTER_CHANGED
123 ---------------------
125 The event is emitted once until the query command is executed,
126 the first event will always be emitted.
128 Data:
130 - "name": net client name (json-string)
131 - "path": device path (json-string)
133 { "event": "NIC_RX_FILTER_CHANGED",
134   "data": { "name": "vnet0",
135             "path": "/machine/peripheral/vnet0/virtio-backend" },
136   "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
139 POWERDOWN
140 ---------
142 Emitted when the Virtual Machine is powered down through the power
143 control system, such as via ACPI.
145 Data: None.
147 Example:
149 { "event": "POWERDOWN",
150     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
152 QUORUM_FAILURE
153 --------------
155 Emitted by the Quorum block driver if it fails to establish a quorum.
157 Data:
159 - "reference":     device name if defined else node name.
160 - "sector-num":    Number of the first sector of the failed read operation.
161 - "sectors-count": Failed read operation sector count.
163 Example:
165 { "event": "QUORUM_FAILURE",
166      "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
167      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
169 Note: this event is rate-limited.
171 QUORUM_REPORT_BAD
172 -----------------
174 Emitted to report a corruption of a Quorum file.
176 Data:
178 - "type":          Quorum operation type
179 - "error":         Error message (json-string, optional)
180                    Only present on failure.  This field contains a human-readable
181                    error message.  There are no semantics other than that the
182                    block layer reported an error and clients should not try to
183                    interpret the error string.
184 - "node-name":     The graph node name of the block driver state.
185 - "sector-num":    Number of the first sector of the failed read operation.
186 - "sectors-count": Failed read operation sector count.
188 Example:
190 Read operation:
191 { "event": "QUORUM_REPORT_BAD",
192      "data": { "node-name": "node0", "sector-num": 345435, "sectors-count": 5,
193                "type": "read" },
194      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
196 Flush operation:
197 { "event": "QUORUM_REPORT_BAD",
198      "data": { "node-name": "node0", "sector-num": 0, "sectors-count": 2097120,
199                "type": "flush", "error": "Broken pipe" },
200      "timestamp": { "seconds": 1456406829, "microseconds": 291763 } }
202 Note: this event is rate-limited.
204 RESET
205 -----
207 Emitted when the Virtual Machine is reset.
209 Data: None.
211 Example:
213 { "event": "RESET",
214     "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
216 RESUME
217 ------
219 Emitted when the Virtual Machine resumes execution.
221 Data: None.
223 Example:
225 { "event": "RESUME",
226     "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
228 RTC_CHANGE
229 ----------
231 Emitted when the guest changes the RTC time.
233 Data:
235 - "offset": Offset between base RTC clock (as specified by -rtc base), and
236 new RTC clock value (json-number)
238 Example:
240 { "event": "RTC_CHANGE",
241     "data": { "offset": 78 },
242     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
244 Note: this event is rate-limited.
246 SHUTDOWN
247 --------
249 Emitted when the Virtual Machine has shut down, indicating that qemu
250 is about to exit.
252 Data: None.
254 Example:
256 { "event": "SHUTDOWN",
257     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
259 Note: If the command-line option "-no-shutdown" has been specified, a STOP
260 event will eventually follow the SHUTDOWN event.
262 SPICE_CONNECTED
263 ---------------
265 Emitted when a SPICE client connects.
267 Data:
269 - "server": Server information (json-object)
270   - "host": IP address (json-string)
271   - "port": port number (json-string)
272   - "family": address family (json-string, "ipv4" or "ipv6")
273 - "client": Client information (json-object)
274   - "host": IP address (json-string)
275   - "port": port number (json-string)
276   - "family": address family (json-string, "ipv4" or "ipv6")
278 Example:
280 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
281   "event": "SPICE_CONNECTED",
282   "data": {
283     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
284     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
287 SPICE_DISCONNECTED
288 ------------------
290 Emitted when a SPICE client disconnects.
292 Data:
294 - "server": Server information (json-object)
295   - "host": IP address (json-string)
296   - "port": port number (json-string)
297   - "family": address family (json-string, "ipv4" or "ipv6")
298 - "client": Client information (json-object)
299   - "host": IP address (json-string)
300   - "port": port number (json-string)
301   - "family": address family (json-string, "ipv4" or "ipv6")
303 Example:
305 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
306   "event": "SPICE_DISCONNECTED",
307   "data": {
308     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
309     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
312 SPICE_INITIALIZED
313 -----------------
315 Emitted after initial handshake and authentication takes place (if any)
316 and the SPICE channel is up and running
318 Data:
320 - "server": Server information (json-object)
321   - "host": IP address (json-string)
322   - "port": port number (json-string)
323   - "family": address family (json-string, "ipv4" or "ipv6")
324   - "auth": authentication method (json-string, optional)
325 - "client": Client information (json-object)
326   - "host": IP address (json-string)
327   - "port": port number (json-string)
328   - "family": address family (json-string, "ipv4" or "ipv6")
329   - "connection-id": spice connection id.  All channels with the same id
330                      belong to the same spice session (json-int)
331   - "channel-type": channel type.  "1" is the main control channel, filter for
332                     this one if you want track spice sessions only (json-int)
333   - "channel-id": channel id.  Usually "0", might be different needed when
334                   multiple channels of the same type exist, such as multiple
335                   display channels in a multihead setup (json-int)
336   - "tls": whevener the channel is encrypted (json-bool)
338 Example:
340 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
341   "event": "SPICE_INITIALIZED",
342   "data": {"server": {"auth": "spice", "port": "5921",
343                       "family": "ipv4", "host": "127.0.0.1"},
344            "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
345                       "connection-id": 1804289383, "host": "127.0.0.1",
346                       "channel-id": 0, "tls": true}
349 SPICE_MIGRATE_COMPLETED
350 -----------------------
352 Emitted when SPICE migration has completed
354 Data: None.
356 Example:
358 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
359   "event": "SPICE_MIGRATE_COMPLETED" }
361 MIGRATION
362 ---------
364 Emitted when a migration event happens
366 Data: None.
368  - "status": migration status
369      See MigrationStatus in ~/qapi-schema.json for possible values
371 Example:
373 {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
374  "event": "MIGRATION", "data": {"status": "completed"}}
376 MIGRATION_PASS
377 --------------
379 Emitted from the source side of a migration at the start of each pass
380 (when it syncs the dirty bitmap)
382 Data: None.
384   - "pass": An incrementing count (starting at 1 on the first pass)
386 Example:
387 {"timestamp": {"seconds": 1449669631, "microseconds": 239225},
388  "event": "MIGRATION_PASS", "data": {"pass": 2}}
390 STOP
391 ----
393 Emitted when the Virtual Machine is stopped.
395 Data: None.
397 Example:
399 { "event": "STOP",
400     "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
402 SUSPEND
403 -------
405 Emitted when guest enters S3 state.
407 Data: None.
409 Example:
411 { "event": "SUSPEND",
412      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
414 SUSPEND_DISK
415 ------------
417 Emitted when the guest makes a request to enter S4 state.
419 Data: None.
421 Example:
423 { "event": "SUSPEND_DISK",
424      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
426 Note: QEMU shuts down when entering S4 state.
428 VNC_CONNECTED
429 -------------
431 Emitted when a VNC client establishes a connection.
433 Data:
435 - "server": Server information (json-object)
436   - "host": IP address (json-string)
437   - "service": port number (json-string)
438   - "family": address family (json-string, "ipv4" or "ipv6")
439   - "auth": authentication method (json-string, optional)
440 - "client": Client information (json-object)
441   - "host": IP address (json-string)
442   - "service": port number (json-string)
443   - "family": address family (json-string, "ipv4" or "ipv6")
445 Example:
447 { "event": "VNC_CONNECTED",
448     "data": {
449         "server": { "auth": "sasl", "family": "ipv4",
450                     "service": "5901", "host": "0.0.0.0" },
451         "client": { "family": "ipv4", "service": "58425",
452                     "host": "127.0.0.1" } },
453     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
456 Note: This event is emitted before any authentication takes place, thus
457 the authentication ID is not provided.
459 VNC_DISCONNECTED
460 ----------------
462 Emitted when the connection is closed.
464 Data:
466 - "server": Server information (json-object)
467   - "host": IP address (json-string)
468   - "service": port number (json-string)
469   - "family": address family (json-string, "ipv4" or "ipv6")
470   - "auth": authentication method (json-string, optional)
471 - "client": Client information (json-object)
472   - "host": IP address (json-string)
473   - "service": port number (json-string)
474   - "family": address family (json-string, "ipv4" or "ipv6")
475   - "x509_dname": TLS dname (json-string, optional)
476   - "sasl_username": SASL username (json-string, optional)
478 Example:
480 { "event": "VNC_DISCONNECTED",
481     "data": {
482         "server": { "auth": "sasl", "family": "ipv4",
483                     "service": "5901", "host": "0.0.0.0" },
484         "client": { "family": "ipv4", "service": "58425",
485                     "host": "127.0.0.1", "sasl_username": "luiz" } },
486     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
488 VNC_INITIALIZED
489 ---------------
491 Emitted after authentication takes place (if any) and the VNC session is
492 made active.
494 Data:
496 - "server": Server information (json-object)
497   - "host": IP address (json-string)
498   - "service": port number (json-string)
499   - "family": address family (json-string, "ipv4" or "ipv6")
500   - "auth": authentication method (json-string, optional)
501 - "client": Client information (json-object)
502   - "host": IP address (json-string)
503   - "service": port number (json-string)
504   - "family": address family (json-string, "ipv4" or "ipv6")
505   - "x509_dname": TLS dname (json-string, optional)
506   - "sasl_username": SASL username (json-string, optional)
508 Example:
510 { "event": "VNC_INITIALIZED",
511     "data": {
512         "server": { "auth": "sasl", "family": "ipv4",
513                     "service": "5901", "host": "0.0.0.0"},
514         "client": { "family": "ipv4", "service": "46089",
515                     "host": "127.0.0.1", "sasl_username": "luiz" } },
516         "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
518 VSERPORT_CHANGE
519 ---------------
521 Emitted when the guest opens or closes a virtio-serial port.
523 Data:
525 - "id": device identifier of the virtio-serial port (json-string)
526 - "open": true if the guest has opened the virtio-serial port (json-bool)
528 Example:
530 { "event": "VSERPORT_CHANGE",
531     "data": { "id": "channel0", "open": true },
532     "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
534 Note: this event is rate-limited separately for each "id".
536 WAKEUP
537 ------
539 Emitted when the guest has woken up from S3 and is running.
541 Data: None.
543 Example:
545 { "event": "WAKEUP",
546      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
548 WATCHDOG
549 --------
551 Emitted when the watchdog device's timer is expired.
553 Data:
555 - "action": Action that has been taken, it's one of the following (json-string):
556             "reset", "shutdown", "poweroff", "pause", "debug", or "none"
558 Example:
560 { "event": "WATCHDOG",
561      "data": { "action": "reset" },
562      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
564 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
565 followed respectively by the RESET, SHUTDOWN, or STOP events.
567 Note: this event is rate-limited.