Merge commit '92aa5c6d77ac29574c1717bcf57827fa1e586f31' into upstream-merge
[qemu-kvm.git] / QMP / qmp-events.txt
blob4491020423da59fcfd3207fa9d12a093de5356c9
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 (json-string; "stream" for image streaming
54                                      "commit" for block commit)
55 - "device":   Device name (json-string)
56 - "len":      Maximum progress value (json-int)
57 - "offset":   Current progress value (json-int)
58               On success this is equal to len.
59               On failure this is less than len.
60 - "speed":    Rate limit, bytes per second (json-int)
62 Example:
64 { "event": "BLOCK_JOB_CANCELLED",
65      "data": { "type": "stream", "device": "virtio-disk0",
66                "len": 10737418240, "offset": 134217728,
67                "speed": 0 },
68      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
70 BLOCK_JOB_COMPLETED
71 -------------------
73 Emitted when a block job has completed.
75 Data:
77 - "type":     Job type (json-string; "stream" for image streaming
78                                      "commit" for block commit)
79 - "device":   Device name (json-string)
80 - "len":      Maximum progress value (json-int)
81 - "offset":   Current progress value (json-int)
82               On success this is equal to len.
83               On failure this is less than len.
84 - "speed":    Rate limit, bytes per second (json-int)
85 - "error":    Error message (json-string, optional)
86               Only present on failure.  This field contains a human-readable
87               error message.  There are no semantics other than that streaming
88               has failed and clients should not try to interpret the error
89               string.
91 Example:
93 { "event": "BLOCK_JOB_COMPLETED",
94      "data": { "type": "stream", "device": "virtio-disk0",
95                "len": 10737418240, "offset": 10737418240,
96                "speed": 0 },
97      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
99 DEVICE_TRAY_MOVED
100 -----------------
102 It's emitted whenever the tray of a removable device is moved by the guest
103 or by HMP/QMP commands.
105 Data:
107 - "device": device name (json-string)
108 - "tray-open": true if the tray has been opened or false if it has been closed
109                (json-bool)
111 { "event": "DEVICE_TRAY_MOVED",
112   "data": { "device": "ide1-cd0",
113             "tray-open": true
114   },
115   "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
117 RESET
118 -----
120 Emitted when the Virtual Machine is reseted.
122 Data: None.
124 Example:
126 { "event": "RESET",
127     "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
129 RESUME
130 ------
132 Emitted when the Virtual Machine resumes execution.
134 Data: None.
136 Example:
138 { "event": "RESUME",
139     "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
141 RTC_CHANGE
142 ----------
144 Emitted when the guest changes the RTC time.
146 Data:
148 - "offset": delta against the host UTC in seconds (json-number)
150 Example:
152 { "event": "RTC_CHANGE",
153     "data": { "offset": 78 },
154     "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
156 SHUTDOWN
157 --------
159 Emitted when the Virtual Machine is powered down.
161 Data: None.
163 Example:
165 { "event": "SHUTDOWN",
166     "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
168 Note: If the command-line option "-no-shutdown" has been specified, a STOP
169 event will eventually follow the SHUTDOWN event.
171 SPICE_CONNECTED, SPICE_DISCONNECTED
172 -----------------------------------
174 Emitted when a SPICE client connects or disconnects.
176 Data:
178 - "server": Server information (json-object)
179   - "host": IP address (json-string)
180   - "port": port number (json-string)
181   - "family": address family (json-string, "ipv4" or "ipv6")
182 - "client": Client information (json-object)
183   - "host": IP address (json-string)
184   - "port": port number (json-string)
185   - "family": address family (json-string, "ipv4" or "ipv6")
187 Example:
189 { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
190   "event": "SPICE_CONNECTED",
191   "data": {
192     "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
193     "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
196 SPICE_INITIALIZED
197 -----------------
199 Emitted after initial handshake and authentication takes place (if any)
200 and the SPICE channel is up'n'running
202 Data:
204 - "server": Server information (json-object)
205   - "host": IP address (json-string)
206   - "port": port number (json-string)
207   - "family": address family (json-string, "ipv4" or "ipv6")
208   - "auth": authentication method (json-string, optional)
209 - "client": Client information (json-object)
210   - "host": IP address (json-string)
211   - "port": port number (json-string)
212   - "family": address family (json-string, "ipv4" or "ipv6")
213   - "connection-id": spice connection id.  All channels with the same id
214                      belong to the same spice session (json-int)
215   - "channel-type": channel type.  "1" is the main control channel, filter for
216                     this one if you want track spice sessions only (json-int)
217   - "channel-id": channel id.  Usually "0", might be different needed when
218                   multiple channels of the same type exist, such as multiple
219                   display channels in a multihead setup (json-int)
220   - "tls": whevener the channel is encrypted (json-bool)
222 Example:
224 { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
225   "event": "SPICE_INITIALIZED",
226   "data": {"server": {"auth": "spice", "port": "5921",
227                       "family": "ipv4", "host": "127.0.0.1"},
228            "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
229                       "connection-id": 1804289383, "host": "127.0.0.1",
230                       "channel-id": 0, "tls": true}
233 STOP
234 ----
236 Emitted when the Virtual Machine is stopped.
238 Data: None.
240 Example:
242 { "event": "STOP",
243     "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
245 SUSPEND
246 -------
248 Emitted when guest enters S3 state.
250 Data: None.
252 Example:
254 { "event": "SUSPEND",
255      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
257 SUSPEND_DISK
258 ------------
260 Emitted when the guest makes a request to enter S4 state.
262 Data: None.
264 Example:
266 { "event": "SUSPEND_DISK",
267      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
269 Note: QEMU shuts down when entering S4 state.
271 VNC_CONNECTED
272 -------------
274 Emitted when a VNC client establishes a connection.
276 Data:
278 - "server": Server information (json-object)
279   - "host": IP address (json-string)
280   - "service": port number (json-string)
281   - "family": address family (json-string, "ipv4" or "ipv6")
282   - "auth": authentication method (json-string, optional)
283 - "client": Client information (json-object)
284   - "host": IP address (json-string)
285   - "service": port number (json-string)
286   - "family": address family (json-string, "ipv4" or "ipv6")
288 Example:
290 { "event": "VNC_CONNECTED",
291     "data": {
292         "server": { "auth": "sasl", "family": "ipv4",
293                     "service": "5901", "host": "0.0.0.0" },
294         "client": { "family": "ipv4", "service": "58425",
295                     "host": "127.0.0.1" } },
296     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
299 Note: This event is emitted before any authentication takes place, thus
300 the authentication ID is not provided.
302 VNC_DISCONNECTED
303 ----------------
305 Emitted when the connection is closed.
307 Data:
309 - "server": Server information (json-object)
310   - "host": IP address (json-string)
311   - "service": port number (json-string)
312   - "family": address family (json-string, "ipv4" or "ipv6")
313   - "auth": authentication method (json-string, optional)
314 - "client": Client information (json-object)
315   - "host": IP address (json-string)
316   - "service": port number (json-string)
317   - "family": address family (json-string, "ipv4" or "ipv6")
318   - "x509_dname": TLS dname (json-string, optional)
319   - "sasl_username": SASL username (json-string, optional)
321 Example:
323 { "event": "VNC_DISCONNECTED",
324     "data": {
325         "server": { "auth": "sasl", "family": "ipv4",
326                     "service": "5901", "host": "0.0.0.0" },
327         "client": { "family": "ipv4", "service": "58425",
328                     "host": "127.0.0.1", "sasl_username": "luiz" } },
329     "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
331 VNC_INITIALIZED
332 ---------------
334 Emitted after authentication takes place (if any) and the VNC session is
335 made active.
337 Data:
339 - "server": Server information (json-object)
340   - "host": IP address (json-string)
341   - "service": port number (json-string)
342   - "family": address family (json-string, "ipv4" or "ipv6")
343   - "auth": authentication method (json-string, optional)
344 - "client": Client information (json-object)
345   - "host": IP address (json-string)
346   - "service": port number (json-string)
347   - "family": address family (json-string, "ipv4" or "ipv6")
348   - "x509_dname": TLS dname (json-string, optional)
349   - "sasl_username": SASL username (json-string, optional)
351 Example:
353 { "event": "VNC_INITIALIZED",
354     "data": {
355         "server": { "auth": "sasl", "family": "ipv4",
356                     "service": "5901", "host": "0.0.0.0"},
357         "client": { "family": "ipv4", "service": "46089",
358                     "host": "127.0.0.1", "sasl_username": "luiz" } },
359         "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
361 WAKEUP
362 ------
364 Emitted when the guest has woken up from S3 and is running.
366 Data: None.
368 Example:
370 { "event": "WATCHDOG",
371      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
373 WATCHDOG
374 --------
376 Emitted when the watchdog device's timer is expired.
378 Data:
380 - "action": Action that has been taken, it's one of the following (json-string):
381             "reset", "shutdown", "poweroff", "pause", "debug", or "none"
383 Example:
385 { "event": "WATCHDOG",
386      "data": { "action": "reset" },
387      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
389 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
390 followed respectively by the RESET, SHUTDOWN, or STOP events.