root / QMP / qmp-events.txt @ 9914fbed
History | View | Annotate | Download (12.6 kB)
1 |
QEMU Monitor Protocol Events |
---|---|
2 |
============================ |
3 |
|
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 |
|
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 |
|
46 |
BLOCK_JOB_CANCELLED |
47 |
------------------- |
48 |
|
49 |
Emitted when a block job has been cancelled. |
50 |
|
51 |
Data: |
52 |
|
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) |
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 |
|
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. |
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 |
|
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 |
|
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 |
|
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) |
150 |
- "path": device path (json-string) |
151 |
|
152 |
{ "event": "DEVICE_DELETED", |
153 |
"data": { "device": "virtio-net-pci-0", |
154 |
"path": "/machine/peripheral/virtio-net-pci-0" }, |
155 |
"timestamp": { "seconds": 1265044230, "microseconds": 450486 } } |
156 |
|
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 |
|
175 |
RESET |
176 |
----- |
177 |
|
178 |
Emitted when the Virtual Machine is reseted. |
179 |
|
180 |
Data: None. |
181 |
|
182 |
Example: |
183 |
|
184 |
{ "event": "RESET", |
185 |
"timestamp": { "seconds": 1267041653, "microseconds": 9518 } } |
186 |
|
187 |
RESUME |
188 |
------ |
189 |
|
190 |
Emitted when the Virtual Machine resumes execution. |
191 |
|
192 |
Data: None. |
193 |
|
194 |
Example: |
195 |
|
196 |
{ "event": "RESUME", |
197 |
"timestamp": { "seconds": 1271770767, "microseconds": 582542 } } |
198 |
|
199 |
RTC_CHANGE |
200 |
---------- |
201 |
|
202 |
Emitted when the guest changes the RTC time. |
203 |
|
204 |
Data: |
205 |
|
206 |
- "offset": Offset between base RTC clock (as specified by -rtc base), and |
207 |
new RTC clock value (json-number) |
208 |
|
209 |
Example: |
210 |
|
211 |
{ "event": "RTC_CHANGE", |
212 |
"data": { "offset": 78 }, |
213 |
"timestamp": { "seconds": 1267020223, "microseconds": 435656 } } |
214 |
|
215 |
SHUTDOWN |
216 |
-------- |
217 |
|
218 |
Emitted when the Virtual Machine is powered down. |
219 |
|
220 |
Data: None. |
221 |
|
222 |
Example: |
223 |
|
224 |
{ "event": "SHUTDOWN", |
225 |
"timestamp": { "seconds": 1267040730, "microseconds": 682951 } } |
226 |
|
227 |
Note: If the command-line option "-no-shutdown" has been specified, a STOP |
228 |
event will eventually follow the SHUTDOWN event. |
229 |
|
230 |
SPICE_CONNECTED, SPICE_DISCONNECTED |
231 |
----------------------------------- |
232 |
|
233 |
Emitted when a SPICE client connects or disconnects. |
234 |
|
235 |
Data: |
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 |
- "client": Client information (json-object) |
242 |
- "host": IP address (json-string) |
243 |
- "port": port number (json-string) |
244 |
- "family": address family (json-string, "ipv4" or "ipv6") |
245 |
|
246 |
Example: |
247 |
|
248 |
{ "timestamp": {"seconds": 1290688046, "microseconds": 388707}, |
249 |
"event": "SPICE_CONNECTED", |
250 |
"data": { |
251 |
"server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"}, |
252 |
"client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"} |
253 |
}} |
254 |
|
255 |
SPICE_INITIALIZED |
256 |
----------------- |
257 |
|
258 |
Emitted after initial handshake and authentication takes place (if any) |
259 |
and the SPICE channel is up'n'running |
260 |
|
261 |
Data: |
262 |
|
263 |
- "server": Server information (json-object) |
264 |
- "host": IP address (json-string) |
265 |
- "port": port number (json-string) |
266 |
- "family": address family (json-string, "ipv4" or "ipv6") |
267 |
- "auth": authentication method (json-string, optional) |
268 |
- "client": Client information (json-object) |
269 |
- "host": IP address (json-string) |
270 |
- "port": port number (json-string) |
271 |
- "family": address family (json-string, "ipv4" or "ipv6") |
272 |
- "connection-id": spice connection id. All channels with the same id |
273 |
belong to the same spice session (json-int) |
274 |
- "channel-type": channel type. "1" is the main control channel, filter for |
275 |
this one if you want track spice sessions only (json-int) |
276 |
- "channel-id": channel id. Usually "0", might be different needed when |
277 |
multiple channels of the same type exist, such as multiple |
278 |
display channels in a multihead setup (json-int) |
279 |
- "tls": whevener the channel is encrypted (json-bool) |
280 |
|
281 |
Example: |
282 |
|
283 |
{ "timestamp": {"seconds": 1290688046, "microseconds": 417172}, |
284 |
"event": "SPICE_INITIALIZED", |
285 |
"data": {"server": {"auth": "spice", "port": "5921", |
286 |
"family": "ipv4", "host": "127.0.0.1"}, |
287 |
"client": {"port": "49004", "family": "ipv4", "channel-type": 3, |
288 |
"connection-id": 1804289383, "host": "127.0.0.1", |
289 |
"channel-id": 0, "tls": true} |
290 |
}} |
291 |
|
292 |
STOP |
293 |
---- |
294 |
|
295 |
Emitted when the Virtual Machine is stopped. |
296 |
|
297 |
Data: None. |
298 |
|
299 |
Example: |
300 |
|
301 |
{ "event": "STOP", |
302 |
"timestamp": { "seconds": 1267041730, "microseconds": 281295 } } |
303 |
|
304 |
SUSPEND |
305 |
------- |
306 |
|
307 |
Emitted when guest enters S3 state. |
308 |
|
309 |
Data: None. |
310 |
|
311 |
Example: |
312 |
|
313 |
{ "event": "SUSPEND", |
314 |
"timestamp": { "seconds": 1344456160, "microseconds": 309119 } } |
315 |
|
316 |
SUSPEND_DISK |
317 |
------------ |
318 |
|
319 |
Emitted when the guest makes a request to enter S4 state. |
320 |
|
321 |
Data: None. |
322 |
|
323 |
Example: |
324 |
|
325 |
{ "event": "SUSPEND_DISK", |
326 |
"timestamp": { "seconds": 1344456160, "microseconds": 309119 } } |
327 |
|
328 |
Note: QEMU shuts down when entering S4 state. |
329 |
|
330 |
VNC_CONNECTED |
331 |
------------- |
332 |
|
333 |
Emitted when a VNC client establishes a connection. |
334 |
|
335 |
Data: |
336 |
|
337 |
- "server": Server information (json-object) |
338 |
- "host": IP address (json-string) |
339 |
- "service": port number (json-string) |
340 |
- "family": address family (json-string, "ipv4" or "ipv6") |
341 |
- "auth": authentication method (json-string, optional) |
342 |
- "client": Client information (json-object) |
343 |
- "host": IP address (json-string) |
344 |
- "service": port number (json-string) |
345 |
- "family": address family (json-string, "ipv4" or "ipv6") |
346 |
|
347 |
Example: |
348 |
|
349 |
{ "event": "VNC_CONNECTED", |
350 |
"data": { |
351 |
"server": { "auth": "sasl", "family": "ipv4", |
352 |
"service": "5901", "host": "0.0.0.0" }, |
353 |
"client": { "family": "ipv4", "service": "58425", |
354 |
"host": "127.0.0.1" } }, |
355 |
"timestamp": { "seconds": 1262976601, "microseconds": 975795 } } |
356 |
|
357 |
|
358 |
Note: This event is emitted before any authentication takes place, thus |
359 |
the authentication ID is not provided. |
360 |
|
361 |
VNC_DISCONNECTED |
362 |
---------------- |
363 |
|
364 |
Emitted when the connection is closed. |
365 |
|
366 |
Data: |
367 |
|
368 |
- "server": Server information (json-object) |
369 |
- "host": IP address (json-string) |
370 |
- "service": port number (json-string) |
371 |
- "family": address family (json-string, "ipv4" or "ipv6") |
372 |
- "auth": authentication method (json-string, optional) |
373 |
- "client": Client information (json-object) |
374 |
- "host": IP address (json-string) |
375 |
- "service": port number (json-string) |
376 |
- "family": address family (json-string, "ipv4" or "ipv6") |
377 |
- "x509_dname": TLS dname (json-string, optional) |
378 |
- "sasl_username": SASL username (json-string, optional) |
379 |
|
380 |
Example: |
381 |
|
382 |
{ "event": "VNC_DISCONNECTED", |
383 |
"data": { |
384 |
"server": { "auth": "sasl", "family": "ipv4", |
385 |
"service": "5901", "host": "0.0.0.0" }, |
386 |
"client": { "family": "ipv4", "service": "58425", |
387 |
"host": "127.0.0.1", "sasl_username": "luiz" } }, |
388 |
"timestamp": { "seconds": 1262976601, "microseconds": 975795 } } |
389 |
|
390 |
VNC_INITIALIZED |
391 |
--------------- |
392 |
|
393 |
Emitted after authentication takes place (if any) and the VNC session is |
394 |
made active. |
395 |
|
396 |
Data: |
397 |
|
398 |
- "server": Server information (json-object) |
399 |
- "host": IP address (json-string) |
400 |
- "service": port number (json-string) |
401 |
- "family": address family (json-string, "ipv4" or "ipv6") |
402 |
- "auth": authentication method (json-string, optional) |
403 |
- "client": Client information (json-object) |
404 |
- "host": IP address (json-string) |
405 |
- "service": port number (json-string) |
406 |
- "family": address family (json-string, "ipv4" or "ipv6") |
407 |
- "x509_dname": TLS dname (json-string, optional) |
408 |
- "sasl_username": SASL username (json-string, optional) |
409 |
|
410 |
Example: |
411 |
|
412 |
{ "event": "VNC_INITIALIZED", |
413 |
"data": { |
414 |
"server": { "auth": "sasl", "family": "ipv4", |
415 |
"service": "5901", "host": "0.0.0.0"}, |
416 |
"client": { "family": "ipv4", "service": "46089", |
417 |
"host": "127.0.0.1", "sasl_username": "luiz" } }, |
418 |
"timestamp": { "seconds": 1263475302, "microseconds": 150772 } } |
419 |
|
420 |
WAKEUP |
421 |
------ |
422 |
|
423 |
Emitted when the guest has woken up from S3 and is running. |
424 |
|
425 |
Data: None. |
426 |
|
427 |
Example: |
428 |
|
429 |
{ "event": "WATCHDOG", |
430 |
"timestamp": { "seconds": 1344522075, "microseconds": 745528 } } |
431 |
|
432 |
WATCHDOG |
433 |
-------- |
434 |
|
435 |
Emitted when the watchdog device's timer is expired. |
436 |
|
437 |
Data: |
438 |
|
439 |
- "action": Action that has been taken, it's one of the following (json-string): |
440 |
"reset", "shutdown", "poweroff", "pause", "debug", or "none" |
441 |
|
442 |
Example: |
443 |
|
444 |
{ "event": "WATCHDOG", |
445 |
"data": { "action": "reset" }, |
446 |
"timestamp": { "seconds": 1267061043, "microseconds": 959568 } } |
447 |
|
448 |
Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is |
449 |
followed respectively by the RESET, SHUTDOWN, or STOP events. |
450 |
|
451 |
GUEST_PANICKED |
452 |
-------------- |
453 |
|
454 |
Emitted when guest OS panic is detected. |
455 |
|
456 |
Data: |
457 |
|
458 |
- "action": Action that has been taken (json-string, currently always "pause"). |
459 |
|
460 |
Example: |
461 |
|
462 |
{ "event": "GUEST_PANICKED", |
463 |
"data": { "action": "pause" } } |