Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging
[qemu/ar7.git] / docs / qmp-events.txt
blob7967ec4c5a27277ec6dce5a5d3a2cca0d0b23a4c
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 BLOCK_IMAGE_CORRUPTED
34 ---------------------
36 Emitted when a disk image is being marked corrupt. The image can be
37 identified by its device or node name. The 'device' field is always
38 present for compatibility reasons, but it can be empty ("") if the
39 image does not have a device name associated.
41 Data:
43 - "device":    Device name (json-string)
44 - "node-name": Node name (json-string, optional)
45 - "msg":       Informative message (e.g., reason for the corruption)
46                (json-string)
47 - "offset":    If the corruption resulted from an image access, this
48                is the host's access offset into the image
49                (json-int, optional)
50 - "size":      If the corruption resulted from an image access, this
51                is the access size (json-int, optional)
53 Example:
55 { "event": "BLOCK_IMAGE_CORRUPTED",
56     "data": { "device": "ide0-hd0", "node-name": "node0",
57         "msg": "Prevented active L1 table overwrite", "offset": 196608,
58         "size": 65536 },
59     "timestamp": { "seconds": 1378126126, "microseconds": 966463 } }
61 BLOCK_IO_ERROR
62 --------------
64 Emitted when a disk I/O error occurs.
66 Data:
68 - "device": device name (json-string)
69 - "operation": I/O operation (json-string, "read" or "write")
70 - "action": action that has been taken, it's one of the following (json-string):
71     "ignore": error has been ignored
72     "report": error has been reported to the device
73     "stop": the VM is going to stop because of the error
75 Example:
77 { "event": "BLOCK_IO_ERROR",
78     "data": { "device": "ide0-hd1",
79               "operation": "write",
80               "action": "stop" },
81     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
83 Note: If action is "stop", a STOP event will eventually follow the
84 BLOCK_IO_ERROR event.
86 BLOCK_JOB_CANCELLED
87 -------------------
89 Emitted when a block job has been cancelled.
91 Data:
93 - "type":     Job type (json-string; "stream" for image streaming
94                                      "commit" for block commit)
95 - "device":   Job identifier. Originally the device name but other
96               values are allowed since QEMU 2.7 (json-string)
97 - "len":      Maximum progress value (json-int)
98 - "offset":   Current progress value (json-int)
99               On success this is equal to len.
100               On failure this is less than len.
101 - "speed":    Rate limit, bytes per second (json-int)
103 Example:
105 { "event": "BLOCK_JOB_CANCELLED",
106      "data": { "type": "stream", "device": "virtio-disk0",
107                "len": 10737418240, "offset": 134217728,
108                "speed": 0 },
109      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
111 BLOCK_JOB_COMPLETED
112 -------------------
114 Emitted when a block job has completed.
116 Data:
118 - "type":     Job type (json-string; "stream" for image streaming
119                                      "commit" for block commit)
120 - "device":   Job identifier. Originally the device name but other
121               values are allowed since QEMU 2.7 (json-string)
122 - "len":      Maximum progress value (json-int)
123 - "offset":   Current progress value (json-int)
124               On success this is equal to len.
125               On failure this is less than len.
126 - "speed":    Rate limit, bytes per second (json-int)
127 - "error":    Error message (json-string, optional)
128               Only present on failure.  This field contains a human-readable
129               error message.  There are no semantics other than that streaming
130               has failed and clients should not try to interpret the error
131               string.
133 Example:
135 { "event": "BLOCK_JOB_COMPLETED",
136      "data": { "type": "stream", "device": "virtio-disk0",
137                "len": 10737418240, "offset": 10737418240,
138                "speed": 0 },
139      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
141 BLOCK_JOB_ERROR
142 ---------------
144 Emitted when a block job encounters an error.
146 Data:
148 - "device": Job identifier. Originally the device name but other
149             values are allowed since QEMU 2.7 (json-string)
150 - "operation": I/O operation (json-string, "read" or "write")
151 - "action": action that has been taken, it's one of the following (json-string):
152     "ignore": error has been ignored, the job may fail later
153     "report": error will be reported and the job canceled
154     "stop": error caused job to be paused
156 Example:
158 { "event": "BLOCK_JOB_ERROR",
159     "data": { "device": "ide0-hd1",
160               "operation": "write",
161               "action": "stop" },
162     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
164 BLOCK_JOB_READY
165 ---------------
167 Emitted when a block job is ready to complete.
169 Data:
171 - "type":     Job type (json-string; "stream" for image streaming
172                                      "commit" for block commit)
173 - "device":   Job identifier. Originally the device name but other
174               values are allowed since QEMU 2.7 (json-string)
175 - "len":      Maximum progress value (json-int)
176 - "offset":   Current progress value (json-int)
177               On success this is equal to len.
178               On failure this is less than len.
179 - "speed":    Rate limit, bytes per second (json-int)
181 Example:
183 { "event": "BLOCK_JOB_READY",
184     "data": { "device": "drive0", "type": "mirror", "speed": 0,
185               "len": 2097152, "offset": 2097152 }
186     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
188 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
189 event.
191 DEVICE_DELETED
192 --------------
194 Emitted whenever the device removal completion is acknowledged
195 by the guest.
196 At this point, it's safe to reuse the specified device ID.
197 Device removal can be initiated by the guest or by HMP/QMP commands.
199 Data:
201 - "device": device name (json-string, optional)
202 - "path": device path (json-string)
204 { "event": "DEVICE_DELETED",
205   "data": { "device": "virtio-net-pci-0",
206             "path": "/machine/peripheral/virtio-net-pci-0" },
207   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
209 DEVICE_TRAY_MOVED
210 -----------------
212 It's emitted whenever the tray of a removable device is moved by the guest
213 or by HMP/QMP commands.
215 Data:
217 - "device": device name (json-string)
218 - "tray-open": true if the tray has been opened or false if it has been closed
219                (json-bool)
221 { "event": "DEVICE_TRAY_MOVED",
222   "data": { "device": "ide1-cd0",
223             "tray-open": true
224   },
225   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
227 DUMP_COMPLETED
228 --------------
230 Emitted when the guest has finished one memory dump.
232 Data:
234 - "result": DumpQueryResult type described in qapi-schema.json
235 - "error": Error message when dump failed. This is only a
236   human-readable string provided when dump failed. It should not be
237   parsed in any way (json-string, optional)
239 Example:
241 { "event": "DUMP_COMPLETED",
242   "data": {"result": {"total": 1090650112, "status": "completed",
243                       "completed": 1090650112} } }
245 GUEST_PANICKED
246 --------------
248 Emitted when guest OS panic is detected.
250 Data:
252 - "action": Action that has been taken (json-string, currently always "pause").
254 Example:
256 { "event": "GUEST_PANICKED",
257      "data": { "action": "pause" } }
259 MEM_UNPLUG_ERROR
260 --------------------
261 Emitted when memory hot unplug error occurs.
263 Data:
265 - "device": device name (json-string)
266 - "msg": Informative message (e.g., reason for the error) (json-string)
268 Example:
270 { "event": "MEM_UNPLUG_ERROR"
271   "data": { "device": "dimm1",
272             "msg": "acpi: device unplug for unsupported device"
273   },
274   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
276 NIC_RX_FILTER_CHANGED
277 ---------------------
279 The event is emitted once until the query command is executed,
280 the first event will always be emitted.
282 Data:
284 - "name": net client name (json-string)
285 - "path": device path (json-string)
287 { "event": "NIC_RX_FILTER_CHANGED",
288   "data": { "name": "vnet0",
289             "path": "/machine/peripheral/vnet0/virtio-backend" },
290   "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
293 POWERDOWN
294 ---------
296 Emitted when the Virtual Machine is powered down through the power
297 control system, such as via ACPI.
299 Data: None.
301 Example:
303 { "event": "POWERDOWN",
304     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
306 QUORUM_FAILURE
307 --------------
309 Emitted by the Quorum block driver if it fails to establish a quorum.
311 Data:
313 - "reference":     device name if defined else node name.
314 - "sector-num":    Number of the first sector of the failed read operation.
315 - "sectors-count": Failed read operation sector count.
317 Example:
319 { "event": "QUORUM_FAILURE",
320      "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
321      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
323 Note: this event is rate-limited.
325 QUORUM_REPORT_BAD
326 -----------------
328 Emitted to report a corruption of a Quorum file.
330 Data:
332 - "type":          Quorum operation type
333 - "error":         Error message (json-string, optional)
334                    Only present on failure.  This field contains a human-readable
335                    error message.  There are no semantics other than that the
336                    block layer reported an error and clients should not try to
337                    interpret the error string.
338 - "node-name":     The graph node name of the block driver state.
339 - "sector-num":    Number of the first sector of the failed read operation.
340 - "sectors-count": Failed read operation sector count.
342 Example:
344 Read operation:
345 { "event": "QUORUM_REPORT_BAD",
346      "data": { "node-name": "node0", "sector-num": 345435, "sectors-count": 5,
347                "type": "read" },
348      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
350 Flush operation:
351 { "event": "QUORUM_REPORT_BAD",
352      "data": { "node-name": "node0", "sector-num": 0, "sectors-count": 2097120,
353                "type": "flush", "error": "Broken pipe" },
354      "timestamp": { "seconds": 1456406829, "microseconds": 291763 } }
356 Note: this event is rate-limited.
358 RESET
359 -----
361 Emitted when the Virtual Machine is reset.
363 Data: None.
365 Example:
367 { "event": "RESET",
368     "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
370 RESUME
371 ------
373 Emitted when the Virtual Machine resumes execution.
375 Data: None.
377 Example:
379 { "event": "RESUME",
380     "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
382 RTC_CHANGE
383 ----------
385 Emitted when the guest changes the RTC time.
387 Data:
389 - "offset": Offset between base RTC clock (as specified by -rtc base), and
390 new RTC clock value (json-number)
392 Example:
394 { "event": "RTC_CHANGE",
395     "data": { "offset": 78 },
396     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
398 Note: this event is rate-limited.
400 SHUTDOWN
401 --------
403 Emitted when the Virtual Machine has shut down, indicating that qemu
404 is about to exit.
406 Data: None.
408 Example:
410 { "event": "SHUTDOWN",
411     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
413 Note: If the command-line option "-no-shutdown" has been specified, a STOP
414 event will eventually follow the SHUTDOWN event.
416 SPICE_CONNECTED
417 ---------------
419 Emitted when a SPICE client connects.
421 Data:
423 - "server": Server information (json-object)
424   - "host": IP address (json-string)
425   - "port": port number (json-string)
426   - "family": address family (json-string, "ipv4" or "ipv6")
427 - "client": Client information (json-object)
428   - "host": IP address (json-string)
429   - "port": port number (json-string)
430   - "family": address family (json-string, "ipv4" or "ipv6")
432 Example:
434 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
435   "event": "SPICE_CONNECTED",
436   "data": {
437     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
438     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
441 SPICE_DISCONNECTED
442 ------------------
444 Emitted when a SPICE client disconnects.
446 Data:
448 - "server": Server information (json-object)
449   - "host": IP address (json-string)
450   - "port": port number (json-string)
451   - "family": address family (json-string, "ipv4" or "ipv6")
452 - "client": Client information (json-object)
453   - "host": IP address (json-string)
454   - "port": port number (json-string)
455   - "family": address family (json-string, "ipv4" or "ipv6")
457 Example:
459 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
460   "event": "SPICE_DISCONNECTED",
461   "data": {
462     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
463     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
466 SPICE_INITIALIZED
467 -----------------
469 Emitted after initial handshake and authentication takes place (if any)
470 and the SPICE channel is up and running
472 Data:
474 - "server": Server information (json-object)
475   - "host": IP address (json-string)
476   - "port": port number (json-string)
477   - "family": address family (json-string, "ipv4" or "ipv6")
478   - "auth": authentication method (json-string, optional)
479 - "client": Client information (json-object)
480   - "host": IP address (json-string)
481   - "port": port number (json-string)
482   - "family": address family (json-string, "ipv4" or "ipv6")
483   - "connection-id": spice connection id.  All channels with the same id
484                      belong to the same spice session (json-int)
485   - "channel-type": channel type.  "1" is the main control channel, filter for
486                     this one if you want track spice sessions only (json-int)
487   - "channel-id": channel id.  Usually "0", might be different needed when
488                   multiple channels of the same type exist, such as multiple
489                   display channels in a multihead setup (json-int)
490   - "tls": whevener the channel is encrypted (json-bool)
492 Example:
494 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
495   "event": "SPICE_INITIALIZED",
496   "data": {"server": {"auth": "spice", "port": "5921",
497                       "family": "ipv4", "host": "127.0.0.1"},
498            "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
499                       "connection-id": 1804289383, "host": "127.0.0.1",
500                       "channel-id": 0, "tls": true}
503 SPICE_MIGRATE_COMPLETED
504 -----------------------
506 Emitted when SPICE migration has completed
508 Data: None.
510 Example:
512 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
513   "event": "SPICE_MIGRATE_COMPLETED" }
515 MIGRATION
516 ---------
518 Emitted when a migration event happens
520 Data: None.
522  - "status": migration status
523      See MigrationStatus in ~/qapi-schema.json for possible values
525 Example:
527 {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
528  "event": "MIGRATION", "data": {"status": "completed"}}
530 MIGRATION_PASS
531 --------------
533 Emitted from the source side of a migration at the start of each pass
534 (when it syncs the dirty bitmap)
536 Data: None.
538   - "pass": An incrementing count (starting at 1 on the first pass)
540 Example:
541 {"timestamp": {"seconds": 1449669631, "microseconds": 239225},
542  "event": "MIGRATION_PASS", "data": {"pass": 2}}
544 STOP
545 ----
547 Emitted when the Virtual Machine is stopped.
549 Data: None.
551 Example:
553 { "event": "STOP",
554     "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
556 SUSPEND
557 -------
559 Emitted when guest enters S3 state.
561 Data: None.
563 Example:
565 { "event": "SUSPEND",
566      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
568 SUSPEND_DISK
569 ------------
571 Emitted when the guest makes a request to enter S4 state.
573 Data: None.
575 Example:
577 { "event": "SUSPEND_DISK",
578      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
580 Note: QEMU shuts down when entering S4 state.
582 VNC_CONNECTED
583 -------------
585 Emitted when a VNC client establishes a connection.
587 Data:
589 - "server": Server information (json-object)
590   - "host": IP address (json-string)
591   - "service": port number (json-string)
592   - "family": address family (json-string, "ipv4" or "ipv6")
593   - "auth": authentication method (json-string, optional)
594 - "client": Client information (json-object)
595   - "host": IP address (json-string)
596   - "service": port number (json-string)
597   - "family": address family (json-string, "ipv4" or "ipv6")
599 Example:
601 { "event": "VNC_CONNECTED",
602     "data": {
603         "server": { "auth": "sasl", "family": "ipv4",
604                     "service": "5901", "host": "0.0.0.0" },
605         "client": { "family": "ipv4", "service": "58425",
606                     "host": "127.0.0.1" } },
607     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
610 Note: This event is emitted before any authentication takes place, thus
611 the authentication ID is not provided.
613 VNC_DISCONNECTED
614 ----------------
616 Emitted when the connection is closed.
618 Data:
620 - "server": Server information (json-object)
621   - "host": IP address (json-string)
622   - "service": port number (json-string)
623   - "family": address family (json-string, "ipv4" or "ipv6")
624   - "auth": authentication method (json-string, optional)
625 - "client": Client information (json-object)
626   - "host": IP address (json-string)
627   - "service": port number (json-string)
628   - "family": address family (json-string, "ipv4" or "ipv6")
629   - "x509_dname": TLS dname (json-string, optional)
630   - "sasl_username": SASL username (json-string, optional)
632 Example:
634 { "event": "VNC_DISCONNECTED",
635     "data": {
636         "server": { "auth": "sasl", "family": "ipv4",
637                     "service": "5901", "host": "0.0.0.0" },
638         "client": { "family": "ipv4", "service": "58425",
639                     "host": "127.0.0.1", "sasl_username": "luiz" } },
640     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
642 VNC_INITIALIZED
643 ---------------
645 Emitted after authentication takes place (if any) and the VNC session is
646 made active.
648 Data:
650 - "server": Server information (json-object)
651   - "host": IP address (json-string)
652   - "service": port number (json-string)
653   - "family": address family (json-string, "ipv4" or "ipv6")
654   - "auth": authentication method (json-string, optional)
655 - "client": Client information (json-object)
656   - "host": IP address (json-string)
657   - "service": port number (json-string)
658   - "family": address family (json-string, "ipv4" or "ipv6")
659   - "x509_dname": TLS dname (json-string, optional)
660   - "sasl_username": SASL username (json-string, optional)
662 Example:
664 { "event": "VNC_INITIALIZED",
665     "data": {
666         "server": { "auth": "sasl", "family": "ipv4",
667                     "service": "5901", "host": "0.0.0.0"},
668         "client": { "family": "ipv4", "service": "46089",
669                     "host": "127.0.0.1", "sasl_username": "luiz" } },
670         "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
672 VSERPORT_CHANGE
673 ---------------
675 Emitted when the guest opens or closes a virtio-serial port.
677 Data:
679 - "id": device identifier of the virtio-serial port (json-string)
680 - "open": true if the guest has opened the virtio-serial port (json-bool)
682 Example:
684 { "event": "VSERPORT_CHANGE",
685     "data": { "id": "channel0", "open": true },
686     "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
688 Note: this event is rate-limited separately for each "id".
690 WAKEUP
691 ------
693 Emitted when the guest has woken up from S3 and is running.
695 Data: None.
697 Example:
699 { "event": "WAKEUP",
700      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
702 WATCHDOG
703 --------
705 Emitted when the watchdog device's timer is expired.
707 Data:
709 - "action": Action that has been taken, it's one of the following (json-string):
710             "reset", "shutdown", "poweroff", "pause", "debug", or "none"
712 Example:
714 { "event": "WATCHDOG",
715      "data": { "action": "reset" },
716      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
718 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
719 followed respectively by the RESET, SHUTDOWN, or STOP events.
721 Note: this event is rate-limited.