qmp-event: add event notification for memory hot unplug error
[qemu/ar7.git] / docs / qmp / qmp-events.txt
blob3be468f6d6771eb7b078f8676b1a38b3e64cab42
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 - "type":     Job type (json-string; "stream" for image streaming
161                                      "commit" for block commit)
162 - "device":   Device name (json-string)
163 - "len":      Maximum progress value (json-int)
164 - "offset":   Current progress value (json-int)
165               On success this is equal to len.
166               On failure this is less than len.
167 - "speed":    Rate limit, bytes per second (json-int)
169 Example:
171 { "event": "BLOCK_JOB_READY",
172     "data": { "device": "drive0", "type": "mirror", "speed": 0,
173               "len": 2097152, "offset": 2097152 }
174     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
176 Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
177 event.
179 DEVICE_DELETED
180 --------------
182 Emitted whenever the device removal completion is acknowledged
183 by the guest.
184 At this point, it's safe to reuse the specified device ID.
185 Device removal can be initiated by the guest or by HMP/QMP commands.
187 Data:
189 - "device": device name (json-string, optional)
190 - "path": device path (json-string)
192 { "event": "DEVICE_DELETED",
193   "data": { "device": "virtio-net-pci-0",
194             "path": "/machine/peripheral/virtio-net-pci-0" },
195   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
197 DEVICE_TRAY_MOVED
198 -----------------
200 It's emitted whenever the tray of a removable device is moved by the guest
201 or by HMP/QMP commands.
203 Data:
205 - "device": device name (json-string)
206 - "tray-open": true if the tray has been opened or false if it has been closed
207                (json-bool)
209 { "event": "DEVICE_TRAY_MOVED",
210   "data": { "device": "ide1-cd0",
211             "tray-open": true
212   },
213   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
215 GUEST_PANICKED
216 --------------
218 Emitted when guest OS panic is detected.
220 Data:
222 - "action": Action that has been taken (json-string, currently always "pause").
224 Example:
226 { "event": "GUEST_PANICKED",
227      "data": { "action": "pause" } }
229 MEM_HOT_UNPLUG_ERROR
230 --------------------
231 Emitted when memory hot unplug error occurs.
233 Data:
235 - "device": device name (json-string)
236 - "msg": Informative message (e.g., reason for the error) (json-string)
238 Example:
240 { "event": "MEM_HOT_UNPLUG_ERROR"
241   "data": { "device": "dimm1",
242             "msg": "acpi: device unplug for unsupported device"
243   },
244   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
246 NIC_RX_FILTER_CHANGED
247 ---------------------
249 The event is emitted once until the query command is executed,
250 the first event will always be emitted.
252 Data:
254 - "name": net client name (json-string)
255 - "path": device path (json-string)
257 { "event": "NIC_RX_FILTER_CHANGED",
258   "data": { "name": "vnet0",
259             "path": "/machine/peripheral/vnet0/virtio-backend" },
260   "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
263 POWERDOWN
264 ---------
266 Emitted when the Virtual Machine is powered down through the power
267 control system, such as via ACPI.
269 Data: None.
271 Example:
273 { "event": "POWERDOWN",
274     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
276 QUORUM_FAILURE
277 --------------
279 Emitted by the Quorum block driver if it fails to establish a quorum.
281 Data:
283 - "reference":     device name if defined else node name.
284 - "sector-num":    Number of the first sector of the failed read operation.
285 - "sectors-count": Failed read operation sector count.
287 Example:
289 { "event": "QUORUM_FAILURE",
290      "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
291      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
293 QUORUM_REPORT_BAD
294 -----------------
296 Emitted to report a corruption of a Quorum file.
298 Data:
300 - "error":         Error message (json-string, optional)
301                    Only present on failure.  This field contains a human-readable
302                    error message.  There are no semantics other than that the
303                    block layer reported an error and clients should not try to
304                    interpret the error string.
305 - "node-name":     The graph node name of the block driver state.
306 - "sector-num":    Number of the first sector of the failed read operation.
307 - "sectors-count": Failed read operation sector count.
309 Example:
311 { "event": "QUORUM_REPORT_BAD",
312      "data": { "node-name": "1.raw", "sector-num": 345435, "sectors-count": 5 },
313      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
315 RESET
316 -----
318 Emitted when the Virtual Machine is reset.
320 Data: None.
322 Example:
324 { "event": "RESET",
325     "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
327 RESUME
328 ------
330 Emitted when the Virtual Machine resumes execution.
332 Data: None.
334 Example:
336 { "event": "RESUME",
337     "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
339 RTC_CHANGE
340 ----------
342 Emitted when the guest changes the RTC time.
344 Data:
346 - "offset": Offset between base RTC clock (as specified by -rtc base), and
347 new RTC clock value (json-number)
349 Example:
351 { "event": "RTC_CHANGE",
352     "data": { "offset": 78 },
353     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
355 SHUTDOWN
356 --------
358 Emitted when the Virtual Machine has shut down, indicating that qemu
359 is about to exit.
361 Data: None.
363 Example:
365 { "event": "SHUTDOWN",
366     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
368 Note: If the command-line option "-no-shutdown" has been specified, a STOP
369 event will eventually follow the SHUTDOWN event.
371 SPICE_CONNECTED
372 ---------------
374 Emitted when a SPICE client connects.
376 Data:
378 - "server": Server information (json-object)
379   - "host": IP address (json-string)
380   - "port": port number (json-string)
381   - "family": address family (json-string, "ipv4" or "ipv6")
382 - "client": Client information (json-object)
383   - "host": IP address (json-string)
384   - "port": port number (json-string)
385   - "family": address family (json-string, "ipv4" or "ipv6")
387 Example:
389 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
390   "event": "SPICE_CONNECTED",
391   "data": {
392     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
393     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
396 SPICE_DISCONNECTED
397 ------------------
399 Emitted when a SPICE client disconnects.
401 Data:
403 - "server": Server information (json-object)
404   - "host": IP address (json-string)
405   - "port": port number (json-string)
406   - "family": address family (json-string, "ipv4" or "ipv6")
407 - "client": Client information (json-object)
408   - "host": IP address (json-string)
409   - "port": port number (json-string)
410   - "family": address family (json-string, "ipv4" or "ipv6")
412 Example:
414 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
415   "event": "SPICE_DISCONNECTED",
416   "data": {
417     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
418     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
421 SPICE_INITIALIZED
422 -----------------
424 Emitted after initial handshake and authentication takes place (if any)
425 and the SPICE channel is up and running
427 Data:
429 - "server": Server information (json-object)
430   - "host": IP address (json-string)
431   - "port": port number (json-string)
432   - "family": address family (json-string, "ipv4" or "ipv6")
433   - "auth": authentication method (json-string, optional)
434 - "client": Client information (json-object)
435   - "host": IP address (json-string)
436   - "port": port number (json-string)
437   - "family": address family (json-string, "ipv4" or "ipv6")
438   - "connection-id": spice connection id.  All channels with the same id
439                      belong to the same spice session (json-int)
440   - "channel-type": channel type.  "1" is the main control channel, filter for
441                     this one if you want track spice sessions only (json-int)
442   - "channel-id": channel id.  Usually "0", might be different needed when
443                   multiple channels of the same type exist, such as multiple
444                   display channels in a multihead setup (json-int)
445   - "tls": whevener the channel is encrypted (json-bool)
447 Example:
449 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
450   "event": "SPICE_INITIALIZED",
451   "data": {"server": {"auth": "spice", "port": "5921",
452                       "family": "ipv4", "host": "127.0.0.1"},
453            "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
454                       "connection-id": 1804289383, "host": "127.0.0.1",
455                       "channel-id": 0, "tls": true}
458 SPICE_MIGRATE_COMPLETED
459 -----------------------
461 Emitted when SPICE migration has completed
463 Data: None.
465 Example:
467 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
468   "event": "SPICE_MIGRATE_COMPLETED" }
471 STOP
472 ----
474 Emitted when the Virtual Machine is stopped.
476 Data: None.
478 Example:
480 { "event": "STOP",
481     "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
483 SUSPEND
484 -------
486 Emitted when guest enters S3 state.
488 Data: None.
490 Example:
492 { "event": "SUSPEND",
493      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
495 SUSPEND_DISK
496 ------------
498 Emitted when the guest makes a request to enter S4 state.
500 Data: None.
502 Example:
504 { "event": "SUSPEND_DISK",
505      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
507 Note: QEMU shuts down when entering S4 state.
509 VNC_CONNECTED
510 -------------
512 Emitted when a VNC client establishes a connection.
514 Data:
516 - "server": Server information (json-object)
517   - "host": IP address (json-string)
518   - "service": port number (json-string)
519   - "family": address family (json-string, "ipv4" or "ipv6")
520   - "auth": authentication method (json-string, optional)
521 - "client": Client information (json-object)
522   - "host": IP address (json-string)
523   - "service": port number (json-string)
524   - "family": address family (json-string, "ipv4" or "ipv6")
526 Example:
528 { "event": "VNC_CONNECTED",
529     "data": {
530         "server": { "auth": "sasl", "family": "ipv4",
531                     "service": "5901", "host": "0.0.0.0" },
532         "client": { "family": "ipv4", "service": "58425",
533                     "host": "127.0.0.1" } },
534     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
537 Note: This event is emitted before any authentication takes place, thus
538 the authentication ID is not provided.
540 VNC_DISCONNECTED
541 ----------------
543 Emitted when the connection is closed.
545 Data:
547 - "server": Server information (json-object)
548   - "host": IP address (json-string)
549   - "service": port number (json-string)
550   - "family": address family (json-string, "ipv4" or "ipv6")
551   - "auth": authentication method (json-string, optional)
552 - "client": Client information (json-object)
553   - "host": IP address (json-string)
554   - "service": port number (json-string)
555   - "family": address family (json-string, "ipv4" or "ipv6")
556   - "x509_dname": TLS dname (json-string, optional)
557   - "sasl_username": SASL username (json-string, optional)
559 Example:
561 { "event": "VNC_DISCONNECTED",
562     "data": {
563         "server": { "auth": "sasl", "family": "ipv4",
564                     "service": "5901", "host": "0.0.0.0" },
565         "client": { "family": "ipv4", "service": "58425",
566                     "host": "127.0.0.1", "sasl_username": "luiz" } },
567     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
569 VNC_INITIALIZED
570 ---------------
572 Emitted after authentication takes place (if any) and the VNC session is
573 made active.
575 Data:
577 - "server": Server information (json-object)
578   - "host": IP address (json-string)
579   - "service": port number (json-string)
580   - "family": address family (json-string, "ipv4" or "ipv6")
581   - "auth": authentication method (json-string, optional)
582 - "client": Client information (json-object)
583   - "host": IP address (json-string)
584   - "service": port number (json-string)
585   - "family": address family (json-string, "ipv4" or "ipv6")
586   - "x509_dname": TLS dname (json-string, optional)
587   - "sasl_username": SASL username (json-string, optional)
589 Example:
591 { "event": "VNC_INITIALIZED",
592     "data": {
593         "server": { "auth": "sasl", "family": "ipv4",
594                     "service": "5901", "host": "0.0.0.0"},
595         "client": { "family": "ipv4", "service": "46089",
596                     "host": "127.0.0.1", "sasl_username": "luiz" } },
597         "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
599 VSERPORT_CHANGE
600 ---------------
602 Emitted when the guest opens or closes a virtio-serial port.
604 Data:
606 - "id": device identifier of the virtio-serial port (json-string)
607 - "open": true if the guest has opened the virtio-serial port (json-bool)
609 Example:
611 { "event": "VSERPORT_CHANGE",
612     "data": { "id": "channel0", "open": true },
613     "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
615 WAKEUP
616 ------
618 Emitted when the guest has woken up from S3 and is running.
620 Data: None.
622 Example:
624 { "event": "WAKEUP",
625      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
627 WATCHDOG
628 --------
630 Emitted when the watchdog device's timer is expired.
632 Data:
634 - "action": Action that has been taken, it's one of the following (json-string):
635             "reset", "shutdown", "poweroff", "pause", "debug", or "none"
637 Example:
639 { "event": "WATCHDOG",
640      "data": { "action": "reset" },
641      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
643 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
644 followed respectively by the RESET, SHUTDOWN, or STOP events.