qmp-events: move 'POWERDOWN' doc to schema
[qemu/ar7.git] / docs / qmp-events.txt
blob44840cea6f860a4db64df33ebbf44e73575cc87e
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 DUMP_COMPLETED
52 --------------
54 Emitted when the guest has finished one memory dump.
56 Data:
58 - "result": DumpQueryResult type described in qapi-schema.json
59 - "error": Error message when dump failed. This is only a
60   human-readable string provided when dump failed. It should not be
61   parsed in any way (json-string, optional)
63 Example:
65 { "event": "DUMP_COMPLETED",
66   "data": {"result": {"total": 1090650112, "status": "completed",
67                       "completed": 1090650112} } }
69 GUEST_PANICKED
70 --------------
72 Emitted when guest OS panic is detected.
74 Data:
76 - "action": Action that has been taken (json-string, currently always "pause").
78 Example:
80 { "event": "GUEST_PANICKED",
81      "data": { "action": "pause" } }
83 MEM_UNPLUG_ERROR
84 --------------------
85 Emitted when memory hot unplug error occurs.
87 Data:
89 - "device": device name (json-string)
90 - "msg": Informative message (e.g., reason for the error) (json-string)
92 Example:
94 { "event": "MEM_UNPLUG_ERROR"
95   "data": { "device": "dimm1",
96             "msg": "acpi: device unplug for unsupported device"
97   },
98   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
100 NIC_RX_FILTER_CHANGED
101 ---------------------
103 The event is emitted once until the query command is executed,
104 the first event will always be emitted.
106 Data:
108 - "name": net client name (json-string)
109 - "path": device path (json-string)
111 { "event": "NIC_RX_FILTER_CHANGED",
112   "data": { "name": "vnet0",
113             "path": "/machine/peripheral/vnet0/virtio-backend" },
114   "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
117 QUORUM_FAILURE
118 --------------
120 Emitted by the Quorum block driver if it fails to establish a quorum.
122 Data:
124 - "reference":     device name if defined else node name.
125 - "sector-num":    Number of the first sector of the failed read operation.
126 - "sectors-count": Failed read operation sector count.
128 Example:
130 { "event": "QUORUM_FAILURE",
131      "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
132      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
134 Note: this event is rate-limited.
136 QUORUM_REPORT_BAD
137 -----------------
139 Emitted to report a corruption of a Quorum file.
141 Data:
143 - "type":          Quorum operation type
144 - "error":         Error message (json-string, optional)
145                    Only present on failure.  This field contains a human-readable
146                    error message.  There are no semantics other than that the
147                    block layer reported an error and clients should not try to
148                    interpret the error string.
149 - "node-name":     The graph node name of the block driver state.
150 - "sector-num":    Number of the first sector of the failed read operation.
151 - "sectors-count": Failed read operation sector count.
153 Example:
155 Read operation:
156 { "event": "QUORUM_REPORT_BAD",
157      "data": { "node-name": "node0", "sector-num": 345435, "sectors-count": 5,
158                "type": "read" },
159      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
161 Flush operation:
162 { "event": "QUORUM_REPORT_BAD",
163      "data": { "node-name": "node0", "sector-num": 0, "sectors-count": 2097120,
164                "type": "flush", "error": "Broken pipe" },
165      "timestamp": { "seconds": 1456406829, "microseconds": 291763 } }
167 Note: this event is rate-limited.
169 RESET
170 -----
172 Emitted when the Virtual Machine is reset.
174 Data: None.
176 Example:
178 { "event": "RESET",
179     "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
181 RESUME
182 ------
184 Emitted when the Virtual Machine resumes execution.
186 Data: None.
188 Example:
190 { "event": "RESUME",
191     "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
193 RTC_CHANGE
194 ----------
196 Emitted when the guest changes the RTC time.
198 Data:
200 - "offset": Offset between base RTC clock (as specified by -rtc base), and
201 new RTC clock value (json-number)
203 Example:
205 { "event": "RTC_CHANGE",
206     "data": { "offset": 78 },
207     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
209 Note: this event is rate-limited.
211 SPICE_CONNECTED
212 ---------------
214 Emitted when a SPICE client connects.
216 Data:
218 - "server": Server information (json-object)
219   - "host": IP address (json-string)
220   - "port": port number (json-string)
221   - "family": address family (json-string, "ipv4" or "ipv6")
222 - "client": Client information (json-object)
223   - "host": IP address (json-string)
224   - "port": port number (json-string)
225   - "family": address family (json-string, "ipv4" or "ipv6")
227 Example:
229 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
230   "event": "SPICE_CONNECTED",
231   "data": {
232     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
233     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
236 SPICE_DISCONNECTED
237 ------------------
239 Emitted when a SPICE client disconnects.
241 Data:
243 - "server": Server information (json-object)
244   - "host": IP address (json-string)
245   - "port": port number (json-string)
246   - "family": address family (json-string, "ipv4" or "ipv6")
247 - "client": Client information (json-object)
248   - "host": IP address (json-string)
249   - "port": port number (json-string)
250   - "family": address family (json-string, "ipv4" or "ipv6")
252 Example:
254 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
255   "event": "SPICE_DISCONNECTED",
256   "data": {
257     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
258     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
261 SPICE_INITIALIZED
262 -----------------
264 Emitted after initial handshake and authentication takes place (if any)
265 and the SPICE channel is up and running
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   - "auth": authentication method (json-string, optional)
274 - "client": Client information (json-object)
275   - "host": IP address (json-string)
276   - "port": port number (json-string)
277   - "family": address family (json-string, "ipv4" or "ipv6")
278   - "connection-id": spice connection id.  All channels with the same id
279                      belong to the same spice session (json-int)
280   - "channel-type": channel type.  "1" is the main control channel, filter for
281                     this one if you want track spice sessions only (json-int)
282   - "channel-id": channel id.  Usually "0", might be different needed when
283                   multiple channels of the same type exist, such as multiple
284                   display channels in a multihead setup (json-int)
285   - "tls": whevener the channel is encrypted (json-bool)
287 Example:
289 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
290   "event": "SPICE_INITIALIZED",
291   "data": {"server": {"auth": "spice", "port": "5921",
292                       "family": "ipv4", "host": "127.0.0.1"},
293            "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
294                       "connection-id": 1804289383, "host": "127.0.0.1",
295                       "channel-id": 0, "tls": true}
298 SPICE_MIGRATE_COMPLETED
299 -----------------------
301 Emitted when SPICE migration has completed
303 Data: None.
305 Example:
307 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
308   "event": "SPICE_MIGRATE_COMPLETED" }
310 MIGRATION
311 ---------
313 Emitted when a migration event happens
315 Data: None.
317  - "status": migration status
318      See MigrationStatus in ~/qapi-schema.json for possible values
320 Example:
322 {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
323  "event": "MIGRATION", "data": {"status": "completed"}}
325 MIGRATION_PASS
326 --------------
328 Emitted from the source side of a migration at the start of each pass
329 (when it syncs the dirty bitmap)
331 Data: None.
333   - "pass": An incrementing count (starting at 1 on the first pass)
335 Example:
336 {"timestamp": {"seconds": 1449669631, "microseconds": 239225},
337  "event": "MIGRATION_PASS", "data": {"pass": 2}}
339 STOP
340 ----
342 Emitted when the Virtual Machine is stopped.
344 Data: None.
346 Example:
348 { "event": "STOP",
349     "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
351 SUSPEND
352 -------
354 Emitted when guest enters S3 state.
356 Data: None.
358 Example:
360 { "event": "SUSPEND",
361      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
363 SUSPEND_DISK
364 ------------
366 Emitted when the guest makes a request to enter S4 state.
368 Data: None.
370 Example:
372 { "event": "SUSPEND_DISK",
373      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
375 Note: QEMU shuts down when entering S4 state.
377 VNC_CONNECTED
378 -------------
380 Emitted when a VNC client establishes a connection.
382 Data:
384 - "server": Server information (json-object)
385   - "host": IP address (json-string)
386   - "service": port number (json-string)
387   - "family": address family (json-string, "ipv4" or "ipv6")
388   - "auth": authentication method (json-string, optional)
389 - "client": Client information (json-object)
390   - "host": IP address (json-string)
391   - "service": port number (json-string)
392   - "family": address family (json-string, "ipv4" or "ipv6")
394 Example:
396 { "event": "VNC_CONNECTED",
397     "data": {
398         "server": { "auth": "sasl", "family": "ipv4",
399                     "service": "5901", "host": "0.0.0.0" },
400         "client": { "family": "ipv4", "service": "58425",
401                     "host": "127.0.0.1" } },
402     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
405 Note: This event is emitted before any authentication takes place, thus
406 the authentication ID is not provided.
408 VNC_DISCONNECTED
409 ----------------
411 Emitted when the connection is closed.
413 Data:
415 - "server": Server information (json-object)
416   - "host": IP address (json-string)
417   - "service": port number (json-string)
418   - "family": address family (json-string, "ipv4" or "ipv6")
419   - "auth": authentication method (json-string, optional)
420 - "client": Client information (json-object)
421   - "host": IP address (json-string)
422   - "service": port number (json-string)
423   - "family": address family (json-string, "ipv4" or "ipv6")
424   - "x509_dname": TLS dname (json-string, optional)
425   - "sasl_username": SASL username (json-string, optional)
427 Example:
429 { "event": "VNC_DISCONNECTED",
430     "data": {
431         "server": { "auth": "sasl", "family": "ipv4",
432                     "service": "5901", "host": "0.0.0.0" },
433         "client": { "family": "ipv4", "service": "58425",
434                     "host": "127.0.0.1", "sasl_username": "luiz" } },
435     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
437 VNC_INITIALIZED
438 ---------------
440 Emitted after authentication takes place (if any) and the VNC session is
441 made active.
443 Data:
445 - "server": Server information (json-object)
446   - "host": IP address (json-string)
447   - "service": port number (json-string)
448   - "family": address family (json-string, "ipv4" or "ipv6")
449   - "auth": authentication method (json-string, optional)
450 - "client": Client information (json-object)
451   - "host": IP address (json-string)
452   - "service": port number (json-string)
453   - "family": address family (json-string, "ipv4" or "ipv6")
454   - "x509_dname": TLS dname (json-string, optional)
455   - "sasl_username": SASL username (json-string, optional)
457 Example:
459 { "event": "VNC_INITIALIZED",
460     "data": {
461         "server": { "auth": "sasl", "family": "ipv4",
462                     "service": "5901", "host": "0.0.0.0"},
463         "client": { "family": "ipv4", "service": "46089",
464                     "host": "127.0.0.1", "sasl_username": "luiz" } },
465         "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
467 VSERPORT_CHANGE
468 ---------------
470 Emitted when the guest opens or closes a virtio-serial port.
472 Data:
474 - "id": device identifier of the virtio-serial port (json-string)
475 - "open": true if the guest has opened the virtio-serial port (json-bool)
477 Example:
479 { "event": "VSERPORT_CHANGE",
480     "data": { "id": "channel0", "open": true },
481     "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
483 Note: this event is rate-limited separately for each "id".
485 WAKEUP
486 ------
488 Emitted when the guest has woken up from S3 and is running.
490 Data: None.
492 Example:
494 { "event": "WAKEUP",
495      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
497 WATCHDOG
498 --------
500 Emitted when the watchdog device's timer is expired.
502 Data:
504 - "action": Action that has been taken, it's one of the following (json-string):
505             "reset", "shutdown", "poweroff", "pause", "debug", or "none"
507 Example:
509 { "event": "WATCHDOG",
510      "data": { "action": "reset" },
511      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
513 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
514 followed respectively by the RESET, SHUTDOWN, or STOP events.
516 Note: this event is rate-limited.