]>
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 | ||
a66a2a36 PB |
121 | BLOCK_JOB_READY |
122 | --------------- | |
123 | ||
124 | Emitted when a block job is ready to complete. | |
125 | ||
126 | Data: | |
127 | ||
128 | - "device": device name (json-string) | |
129 | ||
130 | Example: | |
131 | ||
132 | { "event": "BLOCK_JOB_READY", | |
133 | "data": { "device": "ide0-hd1" }, | |
134 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
135 | ||
136 | Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR | |
137 | event. | |
138 | ||
0402a5d6 MT |
139 | DEVICE_DELETED |
140 | ----------------- | |
141 | ||
142 | Emitted whenever the device removal completion is acknowledged | |
143 | by the guest. | |
144 | At this point, it's safe to reuse the specified device ID. | |
145 | Device removal can be initiated by the guest or by HMP/QMP commands. | |
146 | ||
147 | Data: | |
148 | ||
149 | - "device": device name (json-string, optional) | |
15054fce | 150 | - "path": device path (json-string) |
0402a5d6 MT |
151 | |
152 | { "event": "DEVICE_DELETED", | |
15054fce MT |
153 | "data": { "device": "virtio-net-pci-0", |
154 | "path": "/machine/peripheral/virtio-net-pci-0" }, | |
0402a5d6 MT |
155 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } |
156 | ||
6f382ed2 LC |
157 | DEVICE_TRAY_MOVED |
158 | ----------------- | |
159 | ||
160 | It's emitted whenever the tray of a removable device is moved by the guest | |
161 | or by HMP/QMP commands. | |
162 | ||
163 | Data: | |
164 | ||
165 | - "device": device name (json-string) | |
166 | - "tray-open": true if the tray has been opened or false if it has been closed | |
167 | (json-bool) | |
168 | ||
169 | { "event": "DEVICE_TRAY_MOVED", | |
170 | "data": { "device": "ide1-cd0", | |
171 | "tray-open": true | |
172 | }, | |
173 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
174 | ||
b1be4280 AK |
175 | NIC_RX_FILTER_CHANGED |
176 | ----------------- | |
177 | ||
178 | The event is emitted once until the query command is executed, | |
179 | the first event will always be emitted. | |
180 | ||
181 | Data: | |
182 | ||
183 | - "name": net client name (json-string) | |
184 | - "path": device path (json-string) | |
185 | ||
186 | { "event": "NIC_RX_FILTER_CHANGED", | |
187 | "data": { "name": "vnet0", | |
188 | "path": "/machine/peripheral/vnet0/virtio-backend" }, | |
189 | "timestamp": { "seconds": 1368697518, "microseconds": 326866 } } | |
190 | } | |
191 | ||
d74c7dfd LC |
192 | RESET |
193 | ----- | |
194 | ||
195 | Emitted when the Virtual Machine is reseted. | |
e2419113 | 196 | |
e2419113 LC |
197 | Data: None. |
198 | ||
d74c7dfd LC |
199 | Example: |
200 | ||
201 | { "event": "RESET", | |
202 | "timestamp": { "seconds": 1267041653, "microseconds": 9518 } } | |
203 | ||
6ed2c484 LC |
204 | RESUME |
205 | ------ | |
206 | ||
207 | Emitted when the Virtual Machine resumes execution. | |
208 | ||
209 | Data: None. | |
210 | ||
211 | Example: | |
212 | ||
213 | { "event": "RESUME", | |
214 | "timestamp": { "seconds": 1271770767, "microseconds": 582542 } } | |
215 | ||
80cd3478 LC |
216 | RTC_CHANGE |
217 | ---------- | |
218 | ||
db11571f | 219 | Emitted when the guest changes the RTC time. |
80cd3478 LC |
220 | |
221 | Data: | |
222 | ||
9914fbed MT |
223 | - "offset": Offset between base RTC clock (as specified by -rtc base), and |
224 | new RTC clock value (json-number) | |
80cd3478 LC |
225 | |
226 | Example: | |
227 | ||
228 | { "event": "RTC_CHANGE", | |
229 | "data": { "offset": 78 }, | |
230 | "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } | |
231 | ||
d74c7dfd LC |
232 | SHUTDOWN |
233 | -------- | |
234 | ||
235 | Emitted when the Virtual Machine is powered down. | |
e2419113 | 236 | |
e2419113 LC |
237 | Data: None. |
238 | ||
d74c7dfd LC |
239 | Example: |
240 | ||
241 | { "event": "SHUTDOWN", | |
242 | "timestamp": { "seconds": 1267040730, "microseconds": 682951 } } | |
243 | ||
244 | Note: If the command-line option "-no-shutdown" has been specified, a STOP | |
245 | event will eventually follow the SHUTDOWN event. | |
246 | ||
cb8900fe LC |
247 | SPICE_CONNECTED, SPICE_DISCONNECTED |
248 | ----------------------------------- | |
249 | ||
250 | Emitted when a SPICE client connects or disconnects. | |
251 | ||
252 | Data: | |
253 | ||
254 | - "server": Server information (json-object) | |
255 | - "host": IP address (json-string) | |
256 | - "port": port number (json-string) | |
257 | - "family": address family (json-string, "ipv4" or "ipv6") | |
258 | - "client": Client information (json-object) | |
259 | - "host": IP address (json-string) | |
260 | - "port": port number (json-string) | |
261 | - "family": address family (json-string, "ipv4" or "ipv6") | |
262 | ||
263 | Example: | |
264 | ||
265 | { "timestamp": {"seconds": 1290688046, "microseconds": 388707}, | |
266 | "event": "SPICE_CONNECTED", | |
267 | "data": { | |
268 | "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"}, | |
269 | "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"} | |
270 | }} | |
271 | ||
272 | SPICE_INITIALIZED | |
273 | ----------------- | |
274 | ||
275 | Emitted after initial handshake and authentication takes place (if any) | |
276 | and the SPICE channel is up'n'running | |
277 | ||
278 | Data: | |
279 | ||
280 | - "server": Server information (json-object) | |
281 | - "host": IP address (json-string) | |
282 | - "port": port number (json-string) | |
283 | - "family": address family (json-string, "ipv4" or "ipv6") | |
284 | - "auth": authentication method (json-string, optional) | |
285 | - "client": Client information (json-object) | |
286 | - "host": IP address (json-string) | |
287 | - "port": port number (json-string) | |
288 | - "family": address family (json-string, "ipv4" or "ipv6") | |
289 | - "connection-id": spice connection id. All channels with the same id | |
290 | belong to the same spice session (json-int) | |
291 | - "channel-type": channel type. "1" is the main control channel, filter for | |
292 | this one if you want track spice sessions only (json-int) | |
293 | - "channel-id": channel id. Usually "0", might be different needed when | |
294 | multiple channels of the same type exist, such as multiple | |
295 | display channels in a multihead setup (json-int) | |
296 | - "tls": whevener the channel is encrypted (json-bool) | |
297 | ||
298 | Example: | |
299 | ||
300 | { "timestamp": {"seconds": 1290688046, "microseconds": 417172}, | |
301 | "event": "SPICE_INITIALIZED", | |
302 | "data": {"server": {"auth": "spice", "port": "5921", | |
303 | "family": "ipv4", "host": "127.0.0.1"}, | |
304 | "client": {"port": "49004", "family": "ipv4", "channel-type": 3, | |
305 | "connection-id": 1804289383, "host": "127.0.0.1", | |
306 | "channel-id": 0, "tls": true} | |
307 | }} | |
308 | ||
d74c7dfd LC |
309 | STOP |
310 | ---- | |
311 | ||
312 | Emitted when the Virtual Machine is stopped. | |
e2419113 | 313 | |
e2419113 LC |
314 | Data: None. |
315 | ||
d74c7dfd | 316 | Example: |
586153d9 | 317 | |
7af72c24 | 318 | { "event": "STOP", |
d74c7dfd | 319 | "timestamp": { "seconds": 1267041730, "microseconds": 281295 } } |
0d72f3d3 | 320 | |
67e3cf26 LC |
321 | SUSPEND |
322 | ------- | |
323 | ||
324 | Emitted when guest enters S3 state. | |
325 | ||
326 | Data: None. | |
327 | ||
328 | Example: | |
329 | ||
330 | { "event": "SUSPEND", | |
331 | "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } | |
332 | ||
25df49f6 LC |
333 | SUSPEND_DISK |
334 | ------------ | |
335 | ||
336 | Emitted when the guest makes a request to enter S4 state. | |
337 | ||
338 | Data: None. | |
339 | ||
340 | Example: | |
341 | ||
342 | { "event": "SUSPEND_DISK", | |
343 | "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } | |
344 | ||
345 | Note: QEMU shuts down when entering S4 state. | |
346 | ||
d74c7dfd LC |
347 | VNC_CONNECTED |
348 | ------------- | |
0d72f3d3 | 349 | |
d74c7dfd LC |
350 | Emitted when a VNC client establishes a connection. |
351 | ||
352 | Data: | |
353 | ||
354 | - "server": Server information (json-object) | |
355 | - "host": IP address (json-string) | |
356 | - "service": port number (json-string) | |
357 | - "family": address family (json-string, "ipv4" or "ipv6") | |
358 | - "auth": authentication method (json-string, optional) | |
359 | - "client": Client information (json-object) | |
360 | - "host": IP address (json-string) | |
361 | - "service": port number (json-string) | |
362 | - "family": address family (json-string, "ipv4" or "ipv6") | |
363 | ||
364 | Example: | |
0d2ed46a | 365 | |
d74c7dfd LC |
366 | { "event": "VNC_CONNECTED", |
367 | "data": { | |
368 | "server": { "auth": "sasl", "family": "ipv4", | |
369 | "service": "5901", "host": "0.0.0.0" }, | |
370 | "client": { "family": "ipv4", "service": "58425", | |
371 | "host": "127.0.0.1" } }, | |
372 | "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } | |
0d2ed46a | 373 | |
aa1db6ed | 374 | |
d74c7dfd LC |
375 | Note: This event is emitted before any authentication takes place, thus |
376 | the authentication ID is not provided. | |
377 | ||
378 | VNC_DISCONNECTED | |
aa1db6ed LC |
379 | ---------------- |
380 | ||
dee3bffc | 381 | Emitted when the connection is closed. |
d74c7dfd | 382 | |
aa1db6ed LC |
383 | Data: |
384 | ||
d74c7dfd LC |
385 | - "server": Server information (json-object) |
386 | - "host": IP address (json-string) | |
387 | - "service": port number (json-string) | |
388 | - "family": address family (json-string, "ipv4" or "ipv6") | |
389 | - "auth": authentication method (json-string, optional) | |
390 | - "client": Client information (json-object) | |
391 | - "host": IP address (json-string) | |
392 | - "service": port number (json-string) | |
393 | - "family": address family (json-string, "ipv4" or "ipv6") | |
394 | - "x509_dname": TLS dname (json-string, optional) | |
395 | - "sasl_username": SASL username (json-string, optional) | |
aa1db6ed LC |
396 | |
397 | Example: | |
398 | ||
d74c7dfd LC |
399 | { "event": "VNC_DISCONNECTED", |
400 | "data": { | |
401 | "server": { "auth": "sasl", "family": "ipv4", | |
402 | "service": "5901", "host": "0.0.0.0" }, | |
403 | "client": { "family": "ipv4", "service": "58425", | |
404 | "host": "127.0.0.1", "sasl_username": "luiz" } }, | |
405 | "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } | |
406 | ||
407 | VNC_INITIALIZED | |
408 | --------------- | |
409 | ||
410 | Emitted after authentication takes place (if any) and the VNC session is | |
411 | made active. | |
412 | ||
413 | Data: | |
414 | ||
415 | - "server": Server information (json-object) | |
416 | - "host": IP address (json-string) | |
417 | - "service": port number (json-string) | |
418 | - "family": address family (json-string, "ipv4" or "ipv6") | |
419 | - "auth": authentication method (json-string, optional) | |
420 | - "client": Client information (json-object) | |
421 | - "host": IP address (json-string) | |
422 | - "service": port number (json-string) | |
423 | - "family": address family (json-string, "ipv4" or "ipv6") | |
424 | - "x509_dname": TLS dname (json-string, optional) | |
425 | - "sasl_username": SASL username (json-string, optional) | |
426 | ||
427 | Example: | |
428 | ||
429 | { "event": "VNC_INITIALIZED", | |
430 | "data": { | |
431 | "server": { "auth": "sasl", "family": "ipv4", | |
432 | "service": "5901", "host": "0.0.0.0"}, | |
433 | "client": { "family": "ipv4", "service": "46089", | |
434 | "host": "127.0.0.1", "sasl_username": "luiz" } }, | |
435 | "timestamp": { "seconds": 1263475302, "microseconds": 150772 } } | |
9eedeb3b | 436 | |
17c8660b LC |
437 | WAKEUP |
438 | ------ | |
439 | ||
440 | Emitted when the guest has woken up from S3 and is running. | |
441 | ||
442 | Data: None. | |
443 | ||
444 | Example: | |
445 | ||
446 | { "event": "WATCHDOG", | |
447 | "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } | |
448 | ||
9eedeb3b LC |
449 | WATCHDOG |
450 | -------- | |
451 | ||
452 | Emitted when the watchdog device's timer is expired. | |
453 | ||
454 | Data: | |
455 | ||
456 | - "action": Action that has been taken, it's one of the following (json-string): | |
457 | "reset", "shutdown", "poweroff", "pause", "debug", or "none" | |
458 | ||
459 | Example: | |
460 | ||
461 | { "event": "WATCHDOG", | |
462 | "data": { "action": "reset" }, | |
463 | "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } | |
464 | ||
465 | Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is | |
466 | followed respectively by the RESET, SHUTDOWN, or STOP events. | |
c401a8a5 HT |
467 | |
468 | GUEST_PANICKED | |
469 | -------------- | |
470 | ||
471 | Emitted when guest OS panic is detected. | |
472 | ||
473 | Data: | |
474 | ||
475 | - "action": Action that has been taken (json-string, currently always "pause"). | |
476 | ||
477 | Example: | |
478 | ||
479 | { "event": "GUEST_PANICKED", | |
480 | "data": { "action": "pause" } } |