qmp-events: move 'RESUME' doc to schema
[qemu/kevin.git] / docs / qmp-events.txt
blob27f9e59ef59a416e05427ba9af8a972c34099de1
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 RTC_CHANGE
170 ----------
172 Emitted when the guest changes the RTC time.
174 Data:
176 - "offset": Offset between base RTC clock (as specified by -rtc base), and
177 new RTC clock value (json-number)
179 Example:
181 { "event": "RTC_CHANGE",
182     "data": { "offset": 78 },
183     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
185 Note: this event is rate-limited.
187 SPICE_CONNECTED
188 ---------------
190 Emitted when a SPICE client connects.
192 Data:
194 - "server": Server information (json-object)
195   - "host": IP address (json-string)
196   - "port": port number (json-string)
197   - "family": address family (json-string, "ipv4" or "ipv6")
198 - "client": Client information (json-object)
199   - "host": IP address (json-string)
200   - "port": port number (json-string)
201   - "family": address family (json-string, "ipv4" or "ipv6")
203 Example:
205 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
206   "event": "SPICE_CONNECTED",
207   "data": {
208     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
209     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
212 SPICE_DISCONNECTED
213 ------------------
215 Emitted when a SPICE client disconnects.
217 Data:
219 - "server": Server information (json-object)
220   - "host": IP address (json-string)
221   - "port": port number (json-string)
222   - "family": address family (json-string, "ipv4" or "ipv6")
223 - "client": Client information (json-object)
224   - "host": IP address (json-string)
225   - "port": port number (json-string)
226   - "family": address family (json-string, "ipv4" or "ipv6")
228 Example:
230 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
231   "event": "SPICE_DISCONNECTED",
232   "data": {
233     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
234     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
237 SPICE_INITIALIZED
238 -----------------
240 Emitted after initial handshake and authentication takes place (if any)
241 and the SPICE channel is up and running
243 Data:
245 - "server": Server information (json-object)
246   - "host": IP address (json-string)
247   - "port": port number (json-string)
248   - "family": address family (json-string, "ipv4" or "ipv6")
249   - "auth": authentication method (json-string, optional)
250 - "client": Client information (json-object)
251   - "host": IP address (json-string)
252   - "port": port number (json-string)
253   - "family": address family (json-string, "ipv4" or "ipv6")
254   - "connection-id": spice connection id.  All channels with the same id
255                      belong to the same spice session (json-int)
256   - "channel-type": channel type.  "1" is the main control channel, filter for
257                     this one if you want track spice sessions only (json-int)
258   - "channel-id": channel id.  Usually "0", might be different needed when
259                   multiple channels of the same type exist, such as multiple
260                   display channels in a multihead setup (json-int)
261   - "tls": whevener the channel is encrypted (json-bool)
263 Example:
265 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
266   "event": "SPICE_INITIALIZED",
267   "data": {"server": {"auth": "spice", "port": "5921",
268                       "family": "ipv4", "host": "127.0.0.1"},
269            "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
270                       "connection-id": 1804289383, "host": "127.0.0.1",
271                       "channel-id": 0, "tls": true}
274 SPICE_MIGRATE_COMPLETED
275 -----------------------
277 Emitted when SPICE migration has completed
279 Data: None.
281 Example:
283 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
284   "event": "SPICE_MIGRATE_COMPLETED" }
286 MIGRATION
287 ---------
289 Emitted when a migration event happens
291 Data: None.
293  - "status": migration status
294      See MigrationStatus in ~/qapi-schema.json for possible values
296 Example:
298 {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
299  "event": "MIGRATION", "data": {"status": "completed"}}
301 MIGRATION_PASS
302 --------------
304 Emitted from the source side of a migration at the start of each pass
305 (when it syncs the dirty bitmap)
307 Data: None.
309   - "pass": An incrementing count (starting at 1 on the first pass)
311 Example:
312 {"timestamp": {"seconds": 1449669631, "microseconds": 239225},
313  "event": "MIGRATION_PASS", "data": {"pass": 2}}
315 SUSPEND
316 -------
318 Emitted when guest enters S3 state.
320 Data: None.
322 Example:
324 { "event": "SUSPEND",
325      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
327 SUSPEND_DISK
328 ------------
330 Emitted when the guest makes a request to enter S4 state.
332 Data: None.
334 Example:
336 { "event": "SUSPEND_DISK",
337      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
339 Note: QEMU shuts down when entering S4 state.
341 VNC_CONNECTED
342 -------------
344 Emitted when a VNC client establishes a connection.
346 Data:
348 - "server": Server information (json-object)
349   - "host": IP address (json-string)
350   - "service": port number (json-string)
351   - "family": address family (json-string, "ipv4" or "ipv6")
352   - "auth": authentication method (json-string, optional)
353 - "client": Client information (json-object)
354   - "host": IP address (json-string)
355   - "service": port number (json-string)
356   - "family": address family (json-string, "ipv4" or "ipv6")
358 Example:
360 { "event": "VNC_CONNECTED",
361     "data": {
362         "server": { "auth": "sasl", "family": "ipv4",
363                     "service": "5901", "host": "0.0.0.0" },
364         "client": { "family": "ipv4", "service": "58425",
365                     "host": "127.0.0.1" } },
366     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
369 Note: This event is emitted before any authentication takes place, thus
370 the authentication ID is not provided.
372 VNC_DISCONNECTED
373 ----------------
375 Emitted when the connection is closed.
377 Data:
379 - "server": Server information (json-object)
380   - "host": IP address (json-string)
381   - "service": port number (json-string)
382   - "family": address family (json-string, "ipv4" or "ipv6")
383   - "auth": authentication method (json-string, optional)
384 - "client": Client 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   - "x509_dname": TLS dname (json-string, optional)
389   - "sasl_username": SASL username (json-string, optional)
391 Example:
393 { "event": "VNC_DISCONNECTED",
394     "data": {
395         "server": { "auth": "sasl", "family": "ipv4",
396                     "service": "5901", "host": "0.0.0.0" },
397         "client": { "family": "ipv4", "service": "58425",
398                     "host": "127.0.0.1", "sasl_username": "luiz" } },
399     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
401 VNC_INITIALIZED
402 ---------------
404 Emitted after authentication takes place (if any) and the VNC session is
405 made active.
407 Data:
409 - "server": Server information (json-object)
410   - "host": IP address (json-string)
411   - "service": port number (json-string)
412   - "family": address family (json-string, "ipv4" or "ipv6")
413   - "auth": authentication method (json-string, optional)
414 - "client": Client information (json-object)
415   - "host": IP address (json-string)
416   - "service": port number (json-string)
417   - "family": address family (json-string, "ipv4" or "ipv6")
418   - "x509_dname": TLS dname (json-string, optional)
419   - "sasl_username": SASL username (json-string, optional)
421 Example:
423 { "event": "VNC_INITIALIZED",
424     "data": {
425         "server": { "auth": "sasl", "family": "ipv4",
426                     "service": "5901", "host": "0.0.0.0"},
427         "client": { "family": "ipv4", "service": "46089",
428                     "host": "127.0.0.1", "sasl_username": "luiz" } },
429         "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
431 VSERPORT_CHANGE
432 ---------------
434 Emitted when the guest opens or closes a virtio-serial port.
436 Data:
438 - "id": device identifier of the virtio-serial port (json-string)
439 - "open": true if the guest has opened the virtio-serial port (json-bool)
441 Example:
443 { "event": "VSERPORT_CHANGE",
444     "data": { "id": "channel0", "open": true },
445     "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
447 Note: this event is rate-limited separately for each "id".
449 WAKEUP
450 ------
452 Emitted when the guest has woken up from S3 and is running.
454 Data: None.
456 Example:
458 { "event": "WAKEUP",
459      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
461 WATCHDOG
462 --------
464 Emitted when the watchdog device's timer is expired.
466 Data:
468 - "action": Action that has been taken, it's one of the following (json-string):
469             "reset", "shutdown", "poweroff", "pause", "debug", or "none"
471 Example:
473 { "event": "WATCHDOG",
474      "data": { "action": "reset" },
475      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
477 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
478 followed respectively by the RESET, SHUTDOWN, or STOP events.
480 Note: this event is rate-limited.