]>
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 | ||
0ca0b0d5 HR |
21 | BLOCK_IMAGE_CORRUPTED |
22 | --------------------- | |
23 | ||
24 | Emitted when a disk image is being marked corrupt. | |
25 | ||
26 | Data: | |
27 | ||
28 | - "device": Device name (json-string) | |
29 | - "msg": Informative message (e.g., reason for the corruption) (json-string) | |
30 | - "offset": If the corruption resulted from an image access, this is the access | |
31 | offset into the image (json-int) | |
32 | - "size": If the corruption resulted from an image access, this is the access | |
33 | size (json-int) | |
34 | ||
35 | Example: | |
36 | ||
37 | { "event": "BLOCK_IMAGE_CORRUPTED", | |
38 | "data": { "device": "ide0-hd0", | |
39 | "msg": "Prevented active L1 table overwrite", "offset": 196608, | |
40 | "size": 65536 }, | |
41 | "timestamp": { "seconds": 1378126126, "microseconds": 966463 } } | |
42 | ||
d74c7dfd LC |
43 | BLOCK_IO_ERROR |
44 | -------------- | |
45 | ||
46 | Emitted when a disk I/O error occurs. | |
47 | ||
48 | Data: | |
49 | ||
50 | - "device": device name (json-string) | |
51 | - "operation": I/O operation (json-string, "read" or "write") | |
52 | - "action": action that has been taken, it's one of the following (json-string): | |
53 | "ignore": error has been ignored | |
54 | "report": error has been reported to the device | |
55 | "stop": error caused VM to be stopped | |
56 | ||
57 | Example: | |
58 | ||
59 | { "event": "BLOCK_IO_ERROR", | |
60 | "data": { "device": "ide0-hd1", | |
61 | "operation": "write", | |
62 | "action": "stop" }, | |
63 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
64 | ||
65 | Note: If action is "stop", a STOP event will eventually follow the | |
66 | BLOCK_IO_ERROR event. | |
67 | ||
cb8900fe LC |
68 | BLOCK_JOB_CANCELLED |
69 | ------------------- | |
70 | ||
71 | Emitted when a block job has been cancelled. | |
72 | ||
73 | Data: | |
74 | ||
ed61fc10 JC |
75 | - "type": Job type (json-string; "stream" for image streaming |
76 | "commit" for block commit) | |
cb8900fe LC |
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 | ||
84 | Example: | |
85 | ||
86 | { "event": "BLOCK_JOB_CANCELLED", | |
87 | "data": { "type": "stream", "device": "virtio-disk0", | |
88 | "len": 10737418240, "offset": 134217728, | |
89 | "speed": 0 }, | |
90 | "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } | |
91 | ||
92 | BLOCK_JOB_COMPLETED | |
93 | ------------------- | |
94 | ||
95 | Emitted when a block job has completed. | |
96 | ||
97 | Data: | |
98 | ||
ed61fc10 JC |
99 | - "type": Job type (json-string; "stream" for image streaming |
100 | "commit" for block commit) | |
cb8900fe LC |
101 | - "device": Device name (json-string) |
102 | - "len": Maximum progress value (json-int) | |
103 | - "offset": Current progress value (json-int) | |
104 | On success this is equal to len. | |
105 | On failure this is less than len. | |
106 | - "speed": Rate limit, bytes per second (json-int) | |
107 | - "error": Error message (json-string, optional) | |
108 | Only present on failure. This field contains a human-readable | |
109 | error message. There are no semantics other than that streaming | |
110 | has failed and clients should not try to interpret the error | |
111 | string. | |
112 | ||
113 | Example: | |
114 | ||
115 | { "event": "BLOCK_JOB_COMPLETED", | |
116 | "data": { "type": "stream", "device": "virtio-disk0", | |
117 | "len": 10737418240, "offset": 10737418240, | |
118 | "speed": 0 }, | |
119 | "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } | |
120 | ||
32c81a4a PB |
121 | BLOCK_JOB_ERROR |
122 | --------------- | |
123 | ||
124 | Emitted when a block job encounters an error. | |
125 | ||
126 | Data: | |
127 | ||
128 | - "device": device name (json-string) | |
129 | - "operation": I/O operation (json-string, "read" or "write") | |
130 | - "action": action that has been taken, it's one of the following (json-string): | |
131 | "ignore": error has been ignored, the job may fail later | |
132 | "report": error will be reported and the job canceled | |
133 | "stop": error caused job to be paused | |
134 | ||
135 | Example: | |
136 | ||
137 | { "event": "BLOCK_JOB_ERROR", | |
138 | "data": { "device": "ide0-hd1", | |
139 | "operation": "write", | |
140 | "action": "stop" }, | |
141 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
142 | ||
a66a2a36 PB |
143 | BLOCK_JOB_READY |
144 | --------------- | |
145 | ||
146 | Emitted when a block job is ready to complete. | |
147 | ||
148 | Data: | |
149 | ||
150 | - "device": device name (json-string) | |
151 | ||
152 | Example: | |
153 | ||
154 | { "event": "BLOCK_JOB_READY", | |
155 | "data": { "device": "ide0-hd1" }, | |
156 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
157 | ||
158 | Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR | |
159 | event. | |
160 | ||
0402a5d6 MT |
161 | DEVICE_DELETED |
162 | ----------------- | |
163 | ||
164 | Emitted whenever the device removal completion is acknowledged | |
165 | by the guest. | |
166 | At this point, it's safe to reuse the specified device ID. | |
167 | Device removal can be initiated by the guest or by HMP/QMP commands. | |
168 | ||
169 | Data: | |
170 | ||
171 | - "device": device name (json-string, optional) | |
15054fce | 172 | - "path": device path (json-string) |
0402a5d6 MT |
173 | |
174 | { "event": "DEVICE_DELETED", | |
15054fce MT |
175 | "data": { "device": "virtio-net-pci-0", |
176 | "path": "/machine/peripheral/virtio-net-pci-0" }, | |
0402a5d6 MT |
177 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } |
178 | ||
6f382ed2 LC |
179 | DEVICE_TRAY_MOVED |
180 | ----------------- | |
181 | ||
182 | It's emitted whenever the tray of a removable device is moved by the guest | |
183 | or by HMP/QMP commands. | |
184 | ||
185 | Data: | |
186 | ||
187 | - "device": device name (json-string) | |
188 | - "tray-open": true if the tray has been opened or false if it has been closed | |
189 | (json-bool) | |
190 | ||
191 | { "event": "DEVICE_TRAY_MOVED", | |
192 | "data": { "device": "ide1-cd0", | |
193 | "tray-open": true | |
194 | }, | |
195 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
196 | ||
b1be4280 AK |
197 | NIC_RX_FILTER_CHANGED |
198 | ----------------- | |
199 | ||
200 | The event is emitted once until the query command is executed, | |
201 | the first event will always be emitted. | |
202 | ||
203 | Data: | |
204 | ||
205 | - "name": net client name (json-string) | |
206 | - "path": device path (json-string) | |
207 | ||
208 | { "event": "NIC_RX_FILTER_CHANGED", | |
209 | "data": { "name": "vnet0", | |
210 | "path": "/machine/peripheral/vnet0/virtio-backend" }, | |
211 | "timestamp": { "seconds": 1368697518, "microseconds": 326866 } } | |
212 | } | |
213 | ||
d74c7dfd LC |
214 | RESET |
215 | ----- | |
216 | ||
217 | Emitted when the Virtual Machine is reseted. | |
e2419113 | 218 | |
e2419113 LC |
219 | Data: None. |
220 | ||
d74c7dfd LC |
221 | Example: |
222 | ||
223 | { "event": "RESET", | |
224 | "timestamp": { "seconds": 1267041653, "microseconds": 9518 } } | |
225 | ||
6ed2c484 LC |
226 | RESUME |
227 | ------ | |
228 | ||
229 | Emitted when the Virtual Machine resumes execution. | |
230 | ||
231 | Data: None. | |
232 | ||
233 | Example: | |
234 | ||
235 | { "event": "RESUME", | |
236 | "timestamp": { "seconds": 1271770767, "microseconds": 582542 } } | |
237 | ||
80cd3478 LC |
238 | RTC_CHANGE |
239 | ---------- | |
240 | ||
db11571f | 241 | Emitted when the guest changes the RTC time. |
80cd3478 LC |
242 | |
243 | Data: | |
244 | ||
9914fbed MT |
245 | - "offset": Offset between base RTC clock (as specified by -rtc base), and |
246 | new RTC clock value (json-number) | |
80cd3478 LC |
247 | |
248 | Example: | |
249 | ||
250 | { "event": "RTC_CHANGE", | |
251 | "data": { "offset": 78 }, | |
252 | "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } | |
253 | ||
d74c7dfd LC |
254 | SHUTDOWN |
255 | -------- | |
256 | ||
257 | Emitted when the Virtual Machine is powered down. | |
e2419113 | 258 | |
e2419113 LC |
259 | Data: None. |
260 | ||
d74c7dfd LC |
261 | Example: |
262 | ||
263 | { "event": "SHUTDOWN", | |
264 | "timestamp": { "seconds": 1267040730, "microseconds": 682951 } } | |
265 | ||
266 | Note: If the command-line option "-no-shutdown" has been specified, a STOP | |
267 | event will eventually follow the SHUTDOWN event. | |
268 | ||
cb8900fe LC |
269 | SPICE_CONNECTED, SPICE_DISCONNECTED |
270 | ----------------------------------- | |
271 | ||
272 | Emitted when a SPICE client connects or disconnects. | |
273 | ||
274 | Data: | |
275 | ||
276 | - "server": Server information (json-object) | |
277 | - "host": IP address (json-string) | |
278 | - "port": port number (json-string) | |
279 | - "family": address family (json-string, "ipv4" or "ipv6") | |
280 | - "client": Client 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 | ||
285 | Example: | |
286 | ||
287 | { "timestamp": {"seconds": 1290688046, "microseconds": 388707}, | |
288 | "event": "SPICE_CONNECTED", | |
289 | "data": { | |
290 | "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"}, | |
291 | "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"} | |
292 | }} | |
293 | ||
294 | SPICE_INITIALIZED | |
295 | ----------------- | |
296 | ||
297 | Emitted after initial handshake and authentication takes place (if any) | |
298 | and the SPICE channel is up'n'running | |
299 | ||
300 | Data: | |
301 | ||
302 | - "server": Server information (json-object) | |
303 | - "host": IP address (json-string) | |
304 | - "port": port number (json-string) | |
305 | - "family": address family (json-string, "ipv4" or "ipv6") | |
306 | - "auth": authentication method (json-string, optional) | |
307 | - "client": Client information (json-object) | |
308 | - "host": IP address (json-string) | |
309 | - "port": port number (json-string) | |
310 | - "family": address family (json-string, "ipv4" or "ipv6") | |
311 | - "connection-id": spice connection id. All channels with the same id | |
312 | belong to the same spice session (json-int) | |
313 | - "channel-type": channel type. "1" is the main control channel, filter for | |
314 | this one if you want track spice sessions only (json-int) | |
315 | - "channel-id": channel id. Usually "0", might be different needed when | |
316 | multiple channels of the same type exist, such as multiple | |
317 | display channels in a multihead setup (json-int) | |
318 | - "tls": whevener the channel is encrypted (json-bool) | |
319 | ||
320 | Example: | |
321 | ||
322 | { "timestamp": {"seconds": 1290688046, "microseconds": 417172}, | |
323 | "event": "SPICE_INITIALIZED", | |
324 | "data": {"server": {"auth": "spice", "port": "5921", | |
325 | "family": "ipv4", "host": "127.0.0.1"}, | |
326 | "client": {"port": "49004", "family": "ipv4", "channel-type": 3, | |
327 | "connection-id": 1804289383, "host": "127.0.0.1", | |
328 | "channel-id": 0, "tls": true} | |
329 | }} | |
330 | ||
d74c7dfd LC |
331 | STOP |
332 | ---- | |
333 | ||
334 | Emitted when the Virtual Machine is stopped. | |
e2419113 | 335 | |
e2419113 LC |
336 | Data: None. |
337 | ||
d74c7dfd | 338 | Example: |
586153d9 | 339 | |
7af72c24 | 340 | { "event": "STOP", |
d74c7dfd | 341 | "timestamp": { "seconds": 1267041730, "microseconds": 281295 } } |
0d72f3d3 | 342 | |
67e3cf26 LC |
343 | SUSPEND |
344 | ------- | |
345 | ||
346 | Emitted when guest enters S3 state. | |
347 | ||
348 | Data: None. | |
349 | ||
350 | Example: | |
351 | ||
352 | { "event": "SUSPEND", | |
353 | "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } | |
354 | ||
25df49f6 LC |
355 | SUSPEND_DISK |
356 | ------------ | |
357 | ||
358 | Emitted when the guest makes a request to enter S4 state. | |
359 | ||
360 | Data: None. | |
361 | ||
362 | Example: | |
363 | ||
364 | { "event": "SUSPEND_DISK", | |
365 | "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } | |
366 | ||
367 | Note: QEMU shuts down when entering S4 state. | |
368 | ||
d74c7dfd LC |
369 | VNC_CONNECTED |
370 | ------------- | |
0d72f3d3 | 371 | |
d74c7dfd LC |
372 | Emitted when a VNC client establishes a connection. |
373 | ||
374 | Data: | |
375 | ||
376 | - "server": Server information (json-object) | |
377 | - "host": IP address (json-string) | |
378 | - "service": port number (json-string) | |
379 | - "family": address family (json-string, "ipv4" or "ipv6") | |
380 | - "auth": authentication method (json-string, optional) | |
381 | - "client": Client information (json-object) | |
382 | - "host": IP address (json-string) | |
383 | - "service": port number (json-string) | |
384 | - "family": address family (json-string, "ipv4" or "ipv6") | |
385 | ||
386 | Example: | |
0d2ed46a | 387 | |
d74c7dfd LC |
388 | { "event": "VNC_CONNECTED", |
389 | "data": { | |
390 | "server": { "auth": "sasl", "family": "ipv4", | |
391 | "service": "5901", "host": "0.0.0.0" }, | |
392 | "client": { "family": "ipv4", "service": "58425", | |
393 | "host": "127.0.0.1" } }, | |
394 | "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } | |
0d2ed46a | 395 | |
aa1db6ed | 396 | |
d74c7dfd LC |
397 | Note: This event is emitted before any authentication takes place, thus |
398 | the authentication ID is not provided. | |
399 | ||
400 | VNC_DISCONNECTED | |
aa1db6ed LC |
401 | ---------------- |
402 | ||
dee3bffc | 403 | Emitted when the connection is closed. |
d74c7dfd | 404 | |
aa1db6ed LC |
405 | Data: |
406 | ||
d74c7dfd LC |
407 | - "server": Server information (json-object) |
408 | - "host": IP address (json-string) | |
409 | - "service": port number (json-string) | |
410 | - "family": address family (json-string, "ipv4" or "ipv6") | |
411 | - "auth": authentication method (json-string, optional) | |
412 | - "client": Client information (json-object) | |
413 | - "host": IP address (json-string) | |
414 | - "service": port number (json-string) | |
415 | - "family": address family (json-string, "ipv4" or "ipv6") | |
416 | - "x509_dname": TLS dname (json-string, optional) | |
417 | - "sasl_username": SASL username (json-string, optional) | |
aa1db6ed LC |
418 | |
419 | Example: | |
420 | ||
d74c7dfd LC |
421 | { "event": "VNC_DISCONNECTED", |
422 | "data": { | |
423 | "server": { "auth": "sasl", "family": "ipv4", | |
424 | "service": "5901", "host": "0.0.0.0" }, | |
425 | "client": { "family": "ipv4", "service": "58425", | |
426 | "host": "127.0.0.1", "sasl_username": "luiz" } }, | |
427 | "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } | |
428 | ||
429 | VNC_INITIALIZED | |
430 | --------------- | |
431 | ||
432 | Emitted after authentication takes place (if any) and the VNC session is | |
433 | made active. | |
434 | ||
435 | Data: | |
436 | ||
437 | - "server": Server information (json-object) | |
438 | - "host": IP address (json-string) | |
439 | - "service": port number (json-string) | |
440 | - "family": address family (json-string, "ipv4" or "ipv6") | |
441 | - "auth": authentication method (json-string, optional) | |
442 | - "client": Client information (json-object) | |
443 | - "host": IP address (json-string) | |
444 | - "service": port number (json-string) | |
445 | - "family": address family (json-string, "ipv4" or "ipv6") | |
446 | - "x509_dname": TLS dname (json-string, optional) | |
447 | - "sasl_username": SASL username (json-string, optional) | |
448 | ||
449 | Example: | |
450 | ||
451 | { "event": "VNC_INITIALIZED", | |
452 | "data": { | |
453 | "server": { "auth": "sasl", "family": "ipv4", | |
454 | "service": "5901", "host": "0.0.0.0"}, | |
455 | "client": { "family": "ipv4", "service": "46089", | |
456 | "host": "127.0.0.1", "sasl_username": "luiz" } }, | |
457 | "timestamp": { "seconds": 1263475302, "microseconds": 150772 } } | |
9eedeb3b | 458 | |
17c8660b LC |
459 | WAKEUP |
460 | ------ | |
461 | ||
462 | Emitted when the guest has woken up from S3 and is running. | |
463 | ||
464 | Data: None. | |
465 | ||
466 | Example: | |
467 | ||
468 | { "event": "WATCHDOG", | |
469 | "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } | |
470 | ||
9eedeb3b LC |
471 | WATCHDOG |
472 | -------- | |
473 | ||
474 | Emitted when the watchdog device's timer is expired. | |
475 | ||
476 | Data: | |
477 | ||
478 | - "action": Action that has been taken, it's one of the following (json-string): | |
479 | "reset", "shutdown", "poweroff", "pause", "debug", or "none" | |
480 | ||
481 | Example: | |
482 | ||
483 | { "event": "WATCHDOG", | |
484 | "data": { "action": "reset" }, | |
485 | "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } | |
486 | ||
487 | Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is | |
488 | followed respectively by the RESET, SHUTDOWN, or STOP events. | |
c401a8a5 HT |
489 | |
490 | GUEST_PANICKED | |
491 | -------------- | |
492 | ||
493 | Emitted when guest OS panic is detected. | |
494 | ||
495 | Data: | |
496 | ||
497 | - "action": Action that has been taken (json-string, currently always "pause"). | |
498 | ||
499 | Example: | |
500 | ||
501 | { "event": "GUEST_PANICKED", | |
502 | "data": { "action": "pause" } } |