]> git.proxmox.com Git - qemu.git/blame - QMP/qmp-events.txt
Merge branch 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa
[qemu.git] / QMP / qmp-events.txt
CommitLineData
d74c7dfd
LC
1 QEMU Monitor Protocol Events
2 ============================
e2419113 3
d74c7dfd
LC
4BLOCK_IO_ERROR
5--------------
6
7Emitted when a disk I/O error occurs.
8
9Data:
10
11- "device": device name (json-string)
12- "operation": I/O operation (json-string, "read" or "write")
13- "action": action that has been taken, it's one of the following (json-string):
14 "ignore": error has been ignored
15 "report": error has been reported to the device
16 "stop": error caused VM to be stopped
17
18Example:
19
20{ "event": "BLOCK_IO_ERROR",
21 "data": { "device": "ide0-hd1",
22 "operation": "write",
23 "action": "stop" },
24 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
25
26Note: If action is "stop", a STOP event will eventually follow the
27BLOCK_IO_ERROR event.
28
6f382ed2
LC
29DEVICE_TRAY_MOVED
30-----------------
31
32It's emitted whenever the tray of a removable device is moved by the guest
33or by HMP/QMP commands.
34
35Data:
36
37- "device": device name (json-string)
38- "tray-open": true if the tray has been opened or false if it has been closed
39 (json-bool)
40
41{ "event": "DEVICE_TRAY_MOVED",
42 "data": { "device": "ide1-cd0",
43 "tray-open": true
44 },
45 "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
46
d74c7dfd
LC
47RESET
48-----
49
50Emitted when the Virtual Machine is reseted.
e2419113 51
e2419113
LC
52Data: None.
53
d74c7dfd
LC
54Example:
55
56{ "event": "RESET",
57 "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
58
6ed2c484
LC
59RESUME
60------
61
62Emitted when the Virtual Machine resumes execution.
63
64Data: None.
65
66Example:
67
68{ "event": "RESUME",
69 "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
70
80cd3478
LC
71RTC_CHANGE
72----------
73
db11571f 74Emitted when the guest changes the RTC time.
80cd3478
LC
75
76Data:
77
78- "offset": delta against the host UTC in seconds (json-number)
79
80Example:
81
82{ "event": "RTC_CHANGE",
83 "data": { "offset": 78 },
84 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
85
d74c7dfd
LC
86SHUTDOWN
87--------
88
89Emitted when the Virtual Machine is powered down.
e2419113 90
e2419113
LC
91Data: None.
92
d74c7dfd
LC
93Example:
94
95{ "event": "SHUTDOWN",
96 "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
97
98Note: If the command-line option "-no-shutdown" has been specified, a STOP
99event will eventually follow the SHUTDOWN event.
100
101STOP
102----
103
104Emitted when the Virtual Machine is stopped.
e2419113 105
e2419113
LC
106Data: None.
107
d74c7dfd 108Example:
586153d9 109
7af72c24 110{ "event": "STOP",
d74c7dfd 111 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
0d72f3d3 112
d74c7dfd
LC
113VNC_CONNECTED
114-------------
0d72f3d3 115
d74c7dfd
LC
116Emitted when a VNC client establishes a connection.
117
118Data:
119
120- "server": Server information (json-object)
121 - "host": IP address (json-string)
122 - "service": port number (json-string)
123 - "family": address family (json-string, "ipv4" or "ipv6")
124 - "auth": authentication method (json-string, optional)
125- "client": Client information (json-object)
126 - "host": IP address (json-string)
127 - "service": port number (json-string)
128 - "family": address family (json-string, "ipv4" or "ipv6")
129
130Example:
0d2ed46a 131
d74c7dfd
LC
132{ "event": "VNC_CONNECTED",
133 "data": {
134 "server": { "auth": "sasl", "family": "ipv4",
135 "service": "5901", "host": "0.0.0.0" },
136 "client": { "family": "ipv4", "service": "58425",
137 "host": "127.0.0.1" } },
138 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
0d2ed46a 139
aa1db6ed 140
d74c7dfd
LC
141Note: This event is emitted before any authentication takes place, thus
142the authentication ID is not provided.
143
144VNC_DISCONNECTED
aa1db6ed
LC
145----------------
146
dee3bffc 147Emitted when the connection is closed.
d74c7dfd 148
aa1db6ed
LC
149Data:
150
d74c7dfd
LC
151- "server": Server information (json-object)
152 - "host": IP address (json-string)
153 - "service": port number (json-string)
154 - "family": address family (json-string, "ipv4" or "ipv6")
155 - "auth": authentication method (json-string, optional)
156- "client": Client information (json-object)
157 - "host": IP address (json-string)
158 - "service": port number (json-string)
159 - "family": address family (json-string, "ipv4" or "ipv6")
160 - "x509_dname": TLS dname (json-string, optional)
161 - "sasl_username": SASL username (json-string, optional)
aa1db6ed
LC
162
163Example:
164
d74c7dfd
LC
165{ "event": "VNC_DISCONNECTED",
166 "data": {
167 "server": { "auth": "sasl", "family": "ipv4",
168 "service": "5901", "host": "0.0.0.0" },
169 "client": { "family": "ipv4", "service": "58425",
170 "host": "127.0.0.1", "sasl_username": "luiz" } },
171 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
172
173VNC_INITIALIZED
174---------------
175
176Emitted after authentication takes place (if any) and the VNC session is
177made active.
178
179Data:
180
181- "server": Server information (json-object)
182 - "host": IP address (json-string)
183 - "service": port number (json-string)
184 - "family": address family (json-string, "ipv4" or "ipv6")
185 - "auth": authentication method (json-string, optional)
186- "client": Client information (json-object)
187 - "host": IP address (json-string)
188 - "service": port number (json-string)
189 - "family": address family (json-string, "ipv4" or "ipv6")
190 - "x509_dname": TLS dname (json-string, optional)
191 - "sasl_username": SASL username (json-string, optional)
192
193Example:
194
195{ "event": "VNC_INITIALIZED",
196 "data": {
197 "server": { "auth": "sasl", "family": "ipv4",
198 "service": "5901", "host": "0.0.0.0"},
199 "client": { "family": "ipv4", "service": "46089",
200 "host": "127.0.0.1", "sasl_username": "luiz" } },
201 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
9eedeb3b 202
6f8c63fb
GH
203SPICE_CONNECTED, SPICE_DISCONNECTED
204-----------------------------------
205
206Emitted when a SPICE client connects or disconnects.
207
208Data:
209
210- "server": Server information (json-object)
211 - "host": IP address (json-string)
212 - "port": port number (json-string)
213 - "family": address family (json-string, "ipv4" or "ipv6")
214- "client": Client information (json-object)
215 - "host": IP address (json-string)
216 - "port": port number (json-string)
217 - "family": address family (json-string, "ipv4" or "ipv6")
218
219Example:
220
221{ "timestamp": {"seconds": 1290688046, "microseconds": 388707},
222 "event": "SPICE_CONNECTED",
223 "data": {
224 "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
225 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
226}}
227
228
229SPICE_INITIALIZED
230-----------------
231
232Emitted after initial handshake and authentication takes place (if any)
233and the SPICE channel is up'n'running
234
235Data:
236
237- "server": Server information (json-object)
238 - "host": IP address (json-string)
239 - "port": port number (json-string)
240 - "family": address family (json-string, "ipv4" or "ipv6")
241 - "auth": authentication method (json-string, optional)
242- "client": Client information (json-object)
243 - "host": IP address (json-string)
244 - "port": port number (json-string)
245 - "family": address family (json-string, "ipv4" or "ipv6")
246 - "connection-id": spice connection id. All channels with the same id
247 belong to the same spice session (json-int)
248 - "channel-type": channel type. "1" is the main control channel, filter for
249 this one if you want track spice sessions only (json-int)
250 - "channel-id": channel id. Usually "0", might be different needed when
251 multiple channels of the same type exist, such as multiple
252 display channels in a multihead setup (json-int)
253 - "tls": whevener the channel is encrypted (json-bool)
254
255Example:
256
257{ "timestamp": {"seconds": 1290688046, "microseconds": 417172},
258 "event": "SPICE_INITIALIZED",
259 "data": {"server": {"auth": "spice", "port": "5921",
260 "family": "ipv4", "host": "127.0.0.1"},
261 "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
262 "connection-id": 1804289383, "host": "127.0.0.1",
263 "channel-id": 0, "tls": true}
264}}
265
266
9eedeb3b
LC
267WATCHDOG
268--------
269
270Emitted when the watchdog device's timer is expired.
271
272Data:
273
274- "action": Action that has been taken, it's one of the following (json-string):
275 "reset", "shutdown", "poweroff", "pause", "debug", or "none"
276
277Example:
278
279{ "event": "WATCHDOG",
280 "data": { "action": "reset" },
281 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
282
283Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
284followed respectively by the RESET, SHUTDOWN, or STOP events.
12bd451f
SH
285
286
287BLOCK_JOB_COMPLETED
288-------------------
289
290Emitted when a block job has completed.
291
292Data:
293
294- "type": Job type ("stream" for image streaming, json-string)
295- "device": Device name (json-string)
296- "len": Maximum progress value (json-int)
297- "offset": Current progress value (json-int)
298 On success this is equal to len.
299 On failure this is less than len.
300- "speed": Rate limit, bytes per second (json-int)
301- "error": Error message (json-string, optional)
302 Only present on failure. This field contains a human-readable
303 error message. There are no semantics other than that streaming
304 has failed and clients should not try to interpret the error
305 string.
306
307Example:
308
309{ "event": "BLOCK_JOB_COMPLETED",
310 "data": { "type": "stream", "device": "virtio-disk0",
311 "len": 10737418240, "offset": 10737418240,
312 "speed": 0 },
313 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
370521a1
SH
314
315
316BLOCK_JOB_CANCELLED
317-------------------
318
319Emitted when a block job has been cancelled.
320
321Data:
322
323- "type": Job type ("stream" for image streaming, json-string)
324- "device": Device name (json-string)
325- "len": Maximum progress value (json-int)
326- "offset": Current progress value (json-int)
327 On success this is equal to len.
328 On failure this is less than len.
329- "speed": Rate limit, bytes per second (json-int)
330
331Example:
332
333{ "event": "BLOCK_JOB_CANCELLED",
334 "data": { "type": "stream", "device": "virtio-disk0",
335 "len": 10737418240, "offset": 134217728,
336 "speed": 0 },
337 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }