]>
Commit | Line | Data |
---|---|---|
d74c7dfd LC |
1 | QEMU Monitor Protocol Events |
2 | ============================ | |
e2419113 | 3 | |
cb8900fe LC |
4 | BALLOON_CHANGE |
5 | -------------- | |
6 | ||
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 | |
10 | ||
11 | Data: | |
12 | ||
13 | - "actual": actual level of the guest memory balloon in bytes (json-number) | |
14 | ||
15 | Example: | |
16 | ||
17 | { "event": "BALLOON_CHANGE", | |
18 | "data": { "actual": 944766976 }, | |
19 | "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } | |
20 | ||
d74c7dfd LC |
21 | BLOCK_IO_ERROR |
22 | -------------- | |
23 | ||
24 | Emitted when a disk I/O error occurs. | |
25 | ||
26 | Data: | |
27 | ||
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 | |
34 | ||
35 | Example: | |
36 | ||
37 | { "event": "BLOCK_IO_ERROR", | |
38 | "data": { "device": "ide0-hd1", | |
39 | "operation": "write", | |
40 | "action": "stop" }, | |
41 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
42 | ||
43 | Note: If action is "stop", a STOP event will eventually follow the | |
44 | BLOCK_IO_ERROR event. | |
45 | ||
cb8900fe LC |
46 | BLOCK_JOB_CANCELLED |
47 | ------------------- | |
48 | ||
49 | Emitted when a block job has been cancelled. | |
50 | ||
51 | Data: | |
52 | ||
ed61fc10 JC |
53 | - "type": Job type (json-string; "stream" for image streaming |
54 | "commit" for block commit) | |
cb8900fe LC |
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) | |
61 | ||
62 | Example: | |
63 | ||
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 } } | |
69 | ||
70 | BLOCK_JOB_COMPLETED | |
71 | ------------------- | |
72 | ||
73 | Emitted when a block job has completed. | |
74 | ||
75 | Data: | |
76 | ||
ed61fc10 JC |
77 | - "type": Job type (json-string; "stream" for image streaming |
78 | "commit" for block commit) | |
cb8900fe LC |
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. | |
90 | ||
91 | Example: | |
92 | ||
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 } } | |
98 | ||
32c81a4a PB |
99 | BLOCK_JOB_ERROR |
100 | --------------- | |
101 | ||
102 | Emitted when a block job encounters an error. | |
103 | ||
104 | Data: | |
105 | ||
106 | - "device": device name (json-string) | |
107 | - "operation": I/O operation (json-string, "read" or "write") | |
108 | - "action": action that has been taken, it's one of the following (json-string): | |
109 | "ignore": error has been ignored, the job may fail later | |
110 | "report": error will be reported and the job canceled | |
111 | "stop": error caused job to be paused | |
112 | ||
113 | Example: | |
114 | ||
115 | { "event": "BLOCK_JOB_ERROR", | |
116 | "data": { "device": "ide0-hd1", | |
117 | "operation": "write", | |
118 | "action": "stop" }, | |
119 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
120 | ||
6f382ed2 LC |
121 | DEVICE_TRAY_MOVED |
122 | ----------------- | |
123 | ||
124 | It's emitted whenever the tray of a removable device is moved by the guest | |
125 | or by HMP/QMP commands. | |
126 | ||
127 | Data: | |
128 | ||
129 | - "device": device name (json-string) | |
130 | - "tray-open": true if the tray has been opened or false if it has been closed | |
131 | (json-bool) | |
132 | ||
133 | { "event": "DEVICE_TRAY_MOVED", | |
134 | "data": { "device": "ide1-cd0", | |
135 | "tray-open": true | |
136 | }, | |
137 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
138 | ||
d74c7dfd LC |
139 | RESET |
140 | ----- | |
141 | ||
142 | Emitted when the Virtual Machine is reseted. | |
e2419113 | 143 | |
e2419113 LC |
144 | Data: None. |
145 | ||
d74c7dfd LC |
146 | Example: |
147 | ||
148 | { "event": "RESET", | |
149 | "timestamp": { "seconds": 1267041653, "microseconds": 9518 } } | |
150 | ||
6ed2c484 LC |
151 | RESUME |
152 | ------ | |
153 | ||
154 | Emitted when the Virtual Machine resumes execution. | |
155 | ||
156 | Data: None. | |
157 | ||
158 | Example: | |
159 | ||
160 | { "event": "RESUME", | |
161 | "timestamp": { "seconds": 1271770767, "microseconds": 582542 } } | |
162 | ||
80cd3478 LC |
163 | RTC_CHANGE |
164 | ---------- | |
165 | ||
db11571f | 166 | Emitted when the guest changes the RTC time. |
80cd3478 LC |
167 | |
168 | Data: | |
169 | ||
170 | - "offset": delta against the host UTC in seconds (json-number) | |
171 | ||
172 | Example: | |
173 | ||
174 | { "event": "RTC_CHANGE", | |
175 | "data": { "offset": 78 }, | |
176 | "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } | |
177 | ||
d74c7dfd LC |
178 | SHUTDOWN |
179 | -------- | |
180 | ||
181 | Emitted when the Virtual Machine is powered down. | |
e2419113 | 182 | |
e2419113 LC |
183 | Data: None. |
184 | ||
d74c7dfd LC |
185 | Example: |
186 | ||
187 | { "event": "SHUTDOWN", | |
188 | "timestamp": { "seconds": 1267040730, "microseconds": 682951 } } | |
189 | ||
190 | Note: If the command-line option "-no-shutdown" has been specified, a STOP | |
191 | event will eventually follow the SHUTDOWN event. | |
192 | ||
cb8900fe LC |
193 | SPICE_CONNECTED, SPICE_DISCONNECTED |
194 | ----------------------------------- | |
195 | ||
196 | Emitted when a SPICE client connects or disconnects. | |
197 | ||
198 | Data: | |
199 | ||
200 | - "server": Server information (json-object) | |
201 | - "host": IP address (json-string) | |
202 | - "port": port number (json-string) | |
203 | - "family": address family (json-string, "ipv4" or "ipv6") | |
204 | - "client": Client 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 | ||
209 | Example: | |
210 | ||
211 | { "timestamp": {"seconds": 1290688046, "microseconds": 388707}, | |
212 | "event": "SPICE_CONNECTED", | |
213 | "data": { | |
214 | "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"}, | |
215 | "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"} | |
216 | }} | |
217 | ||
218 | SPICE_INITIALIZED | |
219 | ----------------- | |
220 | ||
221 | Emitted after initial handshake and authentication takes place (if any) | |
222 | and the SPICE channel is up'n'running | |
223 | ||
224 | Data: | |
225 | ||
226 | - "server": Server information (json-object) | |
227 | - "host": IP address (json-string) | |
228 | - "port": port number (json-string) | |
229 | - "family": address family (json-string, "ipv4" or "ipv6") | |
230 | - "auth": authentication method (json-string, optional) | |
231 | - "client": Client information (json-object) | |
232 | - "host": IP address (json-string) | |
233 | - "port": port number (json-string) | |
234 | - "family": address family (json-string, "ipv4" or "ipv6") | |
235 | - "connection-id": spice connection id. All channels with the same id | |
236 | belong to the same spice session (json-int) | |
237 | - "channel-type": channel type. "1" is the main control channel, filter for | |
238 | this one if you want track spice sessions only (json-int) | |
239 | - "channel-id": channel id. Usually "0", might be different needed when | |
240 | multiple channels of the same type exist, such as multiple | |
241 | display channels in a multihead setup (json-int) | |
242 | - "tls": whevener the channel is encrypted (json-bool) | |
243 | ||
244 | Example: | |
245 | ||
246 | { "timestamp": {"seconds": 1290688046, "microseconds": 417172}, | |
247 | "event": "SPICE_INITIALIZED", | |
248 | "data": {"server": {"auth": "spice", "port": "5921", | |
249 | "family": "ipv4", "host": "127.0.0.1"}, | |
250 | "client": {"port": "49004", "family": "ipv4", "channel-type": 3, | |
251 | "connection-id": 1804289383, "host": "127.0.0.1", | |
252 | "channel-id": 0, "tls": true} | |
253 | }} | |
254 | ||
d74c7dfd LC |
255 | STOP |
256 | ---- | |
257 | ||
258 | Emitted when the Virtual Machine is stopped. | |
e2419113 | 259 | |
e2419113 LC |
260 | Data: None. |
261 | ||
d74c7dfd | 262 | Example: |
586153d9 | 263 | |
7af72c24 | 264 | { "event": "STOP", |
d74c7dfd | 265 | "timestamp": { "seconds": 1267041730, "microseconds": 281295 } } |
0d72f3d3 | 266 | |
67e3cf26 LC |
267 | SUSPEND |
268 | ------- | |
269 | ||
270 | Emitted when guest enters S3 state. | |
271 | ||
272 | Data: None. | |
273 | ||
274 | Example: | |
275 | ||
276 | { "event": "SUSPEND", | |
277 | "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } | |
278 | ||
25df49f6 LC |
279 | SUSPEND_DISK |
280 | ------------ | |
281 | ||
282 | Emitted when the guest makes a request to enter S4 state. | |
283 | ||
284 | Data: None. | |
285 | ||
286 | Example: | |
287 | ||
288 | { "event": "SUSPEND_DISK", | |
289 | "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } | |
290 | ||
291 | Note: QEMU shuts down when entering S4 state. | |
292 | ||
d74c7dfd LC |
293 | VNC_CONNECTED |
294 | ------------- | |
0d72f3d3 | 295 | |
d74c7dfd LC |
296 | Emitted when a VNC client establishes a connection. |
297 | ||
298 | Data: | |
299 | ||
300 | - "server": Server information (json-object) | |
301 | - "host": IP address (json-string) | |
302 | - "service": port number (json-string) | |
303 | - "family": address family (json-string, "ipv4" or "ipv6") | |
304 | - "auth": authentication method (json-string, optional) | |
305 | - "client": Client information (json-object) | |
306 | - "host": IP address (json-string) | |
307 | - "service": port number (json-string) | |
308 | - "family": address family (json-string, "ipv4" or "ipv6") | |
309 | ||
310 | Example: | |
0d2ed46a | 311 | |
d74c7dfd LC |
312 | { "event": "VNC_CONNECTED", |
313 | "data": { | |
314 | "server": { "auth": "sasl", "family": "ipv4", | |
315 | "service": "5901", "host": "0.0.0.0" }, | |
316 | "client": { "family": "ipv4", "service": "58425", | |
317 | "host": "127.0.0.1" } }, | |
318 | "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } | |
0d2ed46a | 319 | |
aa1db6ed | 320 | |
d74c7dfd LC |
321 | Note: This event is emitted before any authentication takes place, thus |
322 | the authentication ID is not provided. | |
323 | ||
324 | VNC_DISCONNECTED | |
aa1db6ed LC |
325 | ---------------- |
326 | ||
dee3bffc | 327 | Emitted when the connection is closed. |
d74c7dfd | 328 | |
aa1db6ed LC |
329 | Data: |
330 | ||
d74c7dfd LC |
331 | - "server": Server information (json-object) |
332 | - "host": IP address (json-string) | |
333 | - "service": port number (json-string) | |
334 | - "family": address family (json-string, "ipv4" or "ipv6") | |
335 | - "auth": authentication method (json-string, optional) | |
336 | - "client": Client information (json-object) | |
337 | - "host": IP address (json-string) | |
338 | - "service": port number (json-string) | |
339 | - "family": address family (json-string, "ipv4" or "ipv6") | |
340 | - "x509_dname": TLS dname (json-string, optional) | |
341 | - "sasl_username": SASL username (json-string, optional) | |
aa1db6ed LC |
342 | |
343 | Example: | |
344 | ||
d74c7dfd LC |
345 | { "event": "VNC_DISCONNECTED", |
346 | "data": { | |
347 | "server": { "auth": "sasl", "family": "ipv4", | |
348 | "service": "5901", "host": "0.0.0.0" }, | |
349 | "client": { "family": "ipv4", "service": "58425", | |
350 | "host": "127.0.0.1", "sasl_username": "luiz" } }, | |
351 | "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } | |
352 | ||
353 | VNC_INITIALIZED | |
354 | --------------- | |
355 | ||
356 | Emitted after authentication takes place (if any) and the VNC session is | |
357 | made active. | |
358 | ||
359 | Data: | |
360 | ||
361 | - "server": Server information (json-object) | |
362 | - "host": IP address (json-string) | |
363 | - "service": port number (json-string) | |
364 | - "family": address family (json-string, "ipv4" or "ipv6") | |
365 | - "auth": authentication method (json-string, optional) | |
366 | - "client": Client information (json-object) | |
367 | - "host": IP address (json-string) | |
368 | - "service": port number (json-string) | |
369 | - "family": address family (json-string, "ipv4" or "ipv6") | |
370 | - "x509_dname": TLS dname (json-string, optional) | |
371 | - "sasl_username": SASL username (json-string, optional) | |
372 | ||
373 | Example: | |
374 | ||
375 | { "event": "VNC_INITIALIZED", | |
376 | "data": { | |
377 | "server": { "auth": "sasl", "family": "ipv4", | |
378 | "service": "5901", "host": "0.0.0.0"}, | |
379 | "client": { "family": "ipv4", "service": "46089", | |
380 | "host": "127.0.0.1", "sasl_username": "luiz" } }, | |
381 | "timestamp": { "seconds": 1263475302, "microseconds": 150772 } } | |
9eedeb3b | 382 | |
17c8660b LC |
383 | WAKEUP |
384 | ------ | |
385 | ||
386 | Emitted when the guest has woken up from S3 and is running. | |
387 | ||
388 | Data: None. | |
389 | ||
390 | Example: | |
391 | ||
392 | { "event": "WATCHDOG", | |
393 | "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } | |
394 | ||
9eedeb3b LC |
395 | WATCHDOG |
396 | -------- | |
397 | ||
398 | Emitted when the watchdog device's timer is expired. | |
399 | ||
400 | Data: | |
401 | ||
402 | - "action": Action that has been taken, it's one of the following (json-string): | |
403 | "reset", "shutdown", "poweroff", "pause", "debug", or "none" | |
404 | ||
405 | Example: | |
406 | ||
407 | { "event": "WATCHDOG", | |
408 | "data": { "action": "reset" }, | |
409 | "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } | |
410 | ||
411 | Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is | |
412 | followed respectively by the RESET, SHUTDOWN, or STOP events. |