qmp: add SUSPEND_DISK event
[qemu/kevin.git] / QMP / qmp-events.txt
blob287805825f63ce4e495e8623a62cd43b4ec89e9d
1                    QEMU Monitor Protocol Events
2                    ============================
4 BALLOON_CHANGE
5 --------------
7 Emitted when the guest changes the actual BALLOON level. This
8 value is equivalent to the 'actual' field return by the
9 'query-balloon' command
11 Data:
13 - "actual": actual level of the guest memory balloon in bytes (json-number)
15 Example:
17 { "event": "BALLOON_CHANGE",
18     "data": { "actual": 944766976 },
19     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
21 BLOCK_IO_ERROR
22 --------------
24 Emitted when a disk I/O error occurs.
26 Data:
28 - "device": device name (json-string)
29 - "operation": I/O operation (json-string, "read" or "write")
30 - "action": action that has been taken, it's one of the following (json-string):
31     "ignore": error has been ignored
32     "report": error has been reported to the device
33     "stop": error caused VM to be stopped
35 Example:
37 { "event": "BLOCK_IO_ERROR",
38     "data": { "device": "ide0-hd1",
39               "operation": "write",
40               "action": "stop" },
41     "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
43 Note: If action is "stop", a STOP event will eventually follow the
44 BLOCK_IO_ERROR event.
46 BLOCK_JOB_CANCELLED
47 -------------------
49 Emitted when a block job has been cancelled.
51 Data:
53 - "type":     Job type ("stream" for image streaming, json-string)
54 - "device":   Device name (json-string)
55 - "len":      Maximum progress value (json-int)
56 - "offset":   Current progress value (json-int)
57               On success this is equal to len.
58               On failure this is less than len.
59 - "speed":    Rate limit, bytes per second (json-int)
61 Example:
63 { "event": "BLOCK_JOB_CANCELLED",
64      "data": { "type": "stream", "device": "virtio-disk0",
65                "len": 10737418240, "offset": 134217728,
66                "speed": 0 },
67      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
69 BLOCK_JOB_COMPLETED
70 -------------------
72 Emitted when a block job has completed.
74 Data:
76 - "type":     Job type ("stream" for image streaming, json-string)
77 - "device":   Device name (json-string)
78 - "len":      Maximum progress value (json-int)
79 - "offset":   Current progress value (json-int)
80               On success this is equal to len.
81               On failure this is less than len.
82 - "speed":    Rate limit, bytes per second (json-int)
83 - "error":    Error message (json-string, optional)
84               Only present on failure.  This field contains a human-readable
85               error message.  There are no semantics other than that streaming
86               has failed and clients should not try to interpret the error
87               string.
89 Example:
91 { "event": "BLOCK_JOB_COMPLETED",
92      "data": { "type": "stream", "device": "virtio-disk0",
93                "len": 10737418240, "offset": 10737418240,
94                "speed": 0 },
95      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
97 DEVICE_TRAY_MOVED
98 -----------------
100 It's emitted whenever the tray of a removable device is moved by the guest
101 or by HMP/QMP commands.
103 Data:
105 - "device": device name (json-string)
106 - "tray-open": true if the tray has been opened or false if it has been closed
107                (json-bool)
109 { "event": "DEVICE_TRAY_MOVED",
110   "data": { "device": "ide1-cd0",
111             "tray-open": true
112   },
113   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
115 RESET
116 -----
118 Emitted when the Virtual Machine is reseted.
120 Data: None.
122 Example:
124 { "event": "RESET",
125     "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
127 RESUME
128 ------
130 Emitted when the Virtual Machine resumes execution.
132 Data: None.
134 Example:
136 { "event": "RESUME",
137     "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
139 RTC_CHANGE
140 ----------
142 Emitted when the guest changes the RTC time.
144 Data:
146 - "offset": delta against the host UTC in seconds (json-number)
148 Example:
150 { "event": "RTC_CHANGE",
151     "data": { "offset": 78 },
152     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
154 SHUTDOWN
155 --------
157 Emitted when the Virtual Machine is powered down.
159 Data: None.
161 Example:
163 { "event": "SHUTDOWN",
164     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
166 Note: If the command-line option "-no-shutdown" has been specified, a STOP
167 event will eventually follow the SHUTDOWN event.
169 SPICE_CONNECTED, SPICE_DISCONNECTED
170 -----------------------------------
172 Emitted when a SPICE client connects or disconnects.
174 Data:
176 - "server": Server information (json-object)
177   - "host": IP address (json-string)
178   - "port": port number (json-string)
179   - "family": address family (json-string, "ipv4" or "ipv6")
180 - "client": Client information (json-object)
181   - "host": IP address (json-string)
182   - "port": port number (json-string)
183   - "family": address family (json-string, "ipv4" or "ipv6")
185 Example:
187 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
188   "event": "SPICE_CONNECTED",
189   "data": {
190     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
191     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
194 SPICE_INITIALIZED
195 -----------------
197 Emitted after initial handshake and authentication takes place (if any)
198 and the SPICE channel is up'n'running
200 Data:
202 - "server": Server information (json-object)
203   - "host": IP address (json-string)
204   - "port": port number (json-string)
205   - "family": address family (json-string, "ipv4" or "ipv6")
206   - "auth": authentication method (json-string, optional)
207 - "client": Client information (json-object)
208   - "host": IP address (json-string)
209   - "port": port number (json-string)
210   - "family": address family (json-string, "ipv4" or "ipv6")
211   - "connection-id": spice connection id.  All channels with the same id
212                      belong to the same spice session (json-int)
213   - "channel-type": channel type.  "1" is the main control channel, filter for
214                     this one if you want track spice sessions only (json-int)
215   - "channel-id": channel id.  Usually "0", might be different needed when
216                   multiple channels of the same type exist, such as multiple
217                   display channels in a multihead setup (json-int)
218   - "tls": whevener the channel is encrypted (json-bool)
220 Example:
222 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
223   "event": "SPICE_INITIALIZED",
224   "data": {"server": {"auth": "spice", "port": "5921",
225                       "family": "ipv4", "host": "127.0.0.1"},
226            "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
227                       "connection-id": 1804289383, "host": "127.0.0.1",
228                       "channel-id": 0, "tls": true}
231 STOP
232 ----
234 Emitted when the Virtual Machine is stopped.
236 Data: None.
238 Example:
240 { "event": "STOP",
241     "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
243 SUSPEND
244 -------
246 Emitted when guest enters S3 state.
248 Data: None.
250 Example:
252 { "event": "SUSPEND",
253      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
255 SUSPEND_DISK
256 ------------
258 Emitted when the guest makes a request to enter S4 state.
260 Data: None.
262 Example:
264 { "event": "SUSPEND_DISK",
265      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
267 Note: QEMU shuts down when entering S4 state.
269 VNC_CONNECTED
270 -------------
272 Emitted when a VNC client establishes a connection.
274 Data:
276 - "server": Server information (json-object)
277   - "host": IP address (json-string)
278   - "service": port number (json-string)
279   - "family": address family (json-string, "ipv4" or "ipv6")
280   - "auth": authentication method (json-string, optional)
281 - "client": Client information (json-object)
282   - "host": IP address (json-string)
283   - "service": port number (json-string)
284   - "family": address family (json-string, "ipv4" or "ipv6")
286 Example:
288 { "event": "VNC_CONNECTED",
289     "data": {
290         "server": { "auth": "sasl", "family": "ipv4",
291                     "service": "5901", "host": "0.0.0.0" },
292         "client": { "family": "ipv4", "service": "58425",
293                     "host": "127.0.0.1" } },
294     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
297 Note: This event is emitted before any authentication takes place, thus
298 the authentication ID is not provided.
300 VNC_DISCONNECTED
301 ----------------
303 Emitted when the connection is closed.
305 Data:
307 - "server": Server information (json-object)
308   - "host": IP address (json-string)
309   - "service": port number (json-string)
310   - "family": address family (json-string, "ipv4" or "ipv6")
311   - "auth": authentication method (json-string, optional)
312 - "client": Client information (json-object)
313   - "host": IP address (json-string)
314   - "service": port number (json-string)
315   - "family": address family (json-string, "ipv4" or "ipv6")
316   - "x509_dname": TLS dname (json-string, optional)
317   - "sasl_username": SASL username (json-string, optional)
319 Example:
321 { "event": "VNC_DISCONNECTED",
322     "data": {
323         "server": { "auth": "sasl", "family": "ipv4",
324                     "service": "5901", "host": "0.0.0.0" },
325         "client": { "family": "ipv4", "service": "58425",
326                     "host": "127.0.0.1", "sasl_username": "luiz" } },
327     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
329 VNC_INITIALIZED
330 ---------------
332 Emitted after authentication takes place (if any) and the VNC session is
333 made active.
335 Data:
337 - "server": Server information (json-object)
338   - "host": IP address (json-string)
339   - "service": port number (json-string)
340   - "family": address family (json-string, "ipv4" or "ipv6")
341   - "auth": authentication method (json-string, optional)
342 - "client": Client information (json-object)
343   - "host": IP address (json-string)
344   - "service": port number (json-string)
345   - "family": address family (json-string, "ipv4" or "ipv6")
346   - "x509_dname": TLS dname (json-string, optional)
347   - "sasl_username": SASL username (json-string, optional)
349 Example:
351 { "event": "VNC_INITIALIZED",
352     "data": {
353         "server": { "auth": "sasl", "family": "ipv4",
354                     "service": "5901", "host": "0.0.0.0"},
355         "client": { "family": "ipv4", "service": "46089",
356                     "host": "127.0.0.1", "sasl_username": "luiz" } },
357         "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
359 WAKEUP
360 ------
362 Emitted when the guest has woken up from S3 and is running.
364 Data: None.
366 Example:
368 { "event": "WATCHDOG",
369      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
371 WATCHDOG
372 --------
374 Emitted when the watchdog device's timer is expired.
376 Data:
378 - "action": Action that has been taken, it's one of the following (json-string):
379             "reset", "shutdown", "poweroff", "pause", "debug", or "none"
381 Example:
383 { "event": "WATCHDOG",
384      "data": { "action": "reset" },
385      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
387 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
388 followed respectively by the RESET, SHUTDOWN, or STOP events.