root / QMP / qmp-events.txt @ 67e3cf26
History | View | Annotate | Download (10.4 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 ("stream" for image streaming, json-string) |
54 |
- "device": Device name (json-string) |
55 |
- "len": Maximum progress value (json-int) |
56 |
- "offset": Current progress value (json-int) |
57 |
On success this is equal to len. |
58 |
On failure this is less than len. |
59 |
- "speed": Rate limit, bytes per second (json-int) |
60 |
|
61 |
Example: |
62 |
|
63 |
{ "event": "BLOCK_JOB_CANCELLED", |
64 |
"data": { "type": "stream", "device": "virtio-disk0", |
65 |
"len": 10737418240, "offset": 134217728, |
66 |
"speed": 0 }, |
67 |
"timestamp": { "seconds": 1267061043, "microseconds": 959568 } } |
68 |
|
69 |
BLOCK_JOB_COMPLETED |
70 |
------------------- |
71 |
|
72 |
Emitted when a block job has completed. |
73 |
|
74 |
Data: |
75 |
|
76 |
- "type": Job type ("stream" for image streaming, json-string) |
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 |
- "error": Error message (json-string, optional) |
84 |
Only present on failure. This field contains a human-readable |
85 |
error message. There are no semantics other than that streaming |
86 |
has failed and clients should not try to interpret the error |
87 |
string. |
88 |
|
89 |
Example: |
90 |
|
91 |
{ "event": "BLOCK_JOB_COMPLETED", |
92 |
"data": { "type": "stream", "device": "virtio-disk0", |
93 |
"len": 10737418240, "offset": 10737418240, |
94 |
"speed": 0 }, |
95 |
"timestamp": { "seconds": 1267061043, "microseconds": 959568 } } |
96 |
|
97 |
DEVICE_TRAY_MOVED |
98 |
----------------- |
99 |
|
100 |
It's emitted whenever the tray of a removable device is moved by the guest |
101 |
or by HMP/QMP commands. |
102 |
|
103 |
Data: |
104 |
|
105 |
- "device": device name (json-string) |
106 |
- "tray-open": true if the tray has been opened or false if it has been closed |
107 |
(json-bool) |
108 |
|
109 |
{ "event": "DEVICE_TRAY_MOVED", |
110 |
"data": { "device": "ide1-cd0", |
111 |
"tray-open": true |
112 |
}, |
113 |
"timestamp": { "seconds": 1265044230, "microseconds": 450486 } } |
114 |
|
115 |
RESET |
116 |
----- |
117 |
|
118 |
Emitted when the Virtual Machine is reseted. |
119 |
|
120 |
Data: None. |
121 |
|
122 |
Example: |
123 |
|
124 |
{ "event": "RESET", |
125 |
"timestamp": { "seconds": 1267041653, "microseconds": 9518 } } |
126 |
|
127 |
RESUME |
128 |
------ |
129 |
|
130 |
Emitted when the Virtual Machine resumes execution. |
131 |
|
132 |
Data: None. |
133 |
|
134 |
Example: |
135 |
|
136 |
{ "event": "RESUME", |
137 |
"timestamp": { "seconds": 1271770767, "microseconds": 582542 } } |
138 |
|
139 |
RTC_CHANGE |
140 |
---------- |
141 |
|
142 |
Emitted when the guest changes the RTC time. |
143 |
|
144 |
Data: |
145 |
|
146 |
- "offset": delta against the host UTC in seconds (json-number) |
147 |
|
148 |
Example: |
149 |
|
150 |
{ "event": "RTC_CHANGE", |
151 |
"data": { "offset": 78 }, |
152 |
"timestamp": { "seconds": 1267020223, "microseconds": 435656 } } |
153 |
|
154 |
SHUTDOWN |
155 |
-------- |
156 |
|
157 |
Emitted when the Virtual Machine is powered down. |
158 |
|
159 |
Data: None. |
160 |
|
161 |
Example: |
162 |
|
163 |
{ "event": "SHUTDOWN", |
164 |
"timestamp": { "seconds": 1267040730, "microseconds": 682951 } } |
165 |
|
166 |
Note: If the command-line option "-no-shutdown" has been specified, a STOP |
167 |
event will eventually follow the SHUTDOWN event. |
168 |
|
169 |
SPICE_CONNECTED, SPICE_DISCONNECTED |
170 |
----------------------------------- |
171 |
|
172 |
Emitted when a SPICE client connects or disconnects. |
173 |
|
174 |
Data: |
175 |
|
176 |
- "server": Server information (json-object) |
177 |
- "host": IP address (json-string) |
178 |
- "port": port number (json-string) |
179 |
- "family": address family (json-string, "ipv4" or "ipv6") |
180 |
- "client": Client information (json-object) |
181 |
- "host": IP address (json-string) |
182 |
- "port": port number (json-string) |
183 |
- "family": address family (json-string, "ipv4" or "ipv6") |
184 |
|
185 |
Example: |
186 |
|
187 |
{ "timestamp": {"seconds": 1290688046, "microseconds": 388707}, |
188 |
"event": "SPICE_CONNECTED", |
189 |
"data": { |
190 |
"server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"}, |
191 |
"client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"} |
192 |
}} |
193 |
|
194 |
SPICE_INITIALIZED |
195 |
----------------- |
196 |
|
197 |
Emitted after initial handshake and authentication takes place (if any) |
198 |
and the SPICE channel is up'n'running |
199 |
|
200 |
Data: |
201 |
|
202 |
- "server": Server information (json-object) |
203 |
- "host": IP address (json-string) |
204 |
- "port": port number (json-string) |
205 |
- "family": address family (json-string, "ipv4" or "ipv6") |
206 |
- "auth": authentication method (json-string, optional) |
207 |
- "client": Client information (json-object) |
208 |
- "host": IP address (json-string) |
209 |
- "port": port number (json-string) |
210 |
- "family": address family (json-string, "ipv4" or "ipv6") |
211 |
- "connection-id": spice connection id. All channels with the same id |
212 |
belong to the same spice session (json-int) |
213 |
- "channel-type": channel type. "1" is the main control channel, filter for |
214 |
this one if you want track spice sessions only (json-int) |
215 |
- "channel-id": channel id. Usually "0", might be different needed when |
216 |
multiple channels of the same type exist, such as multiple |
217 |
display channels in a multihead setup (json-int) |
218 |
- "tls": whevener the channel is encrypted (json-bool) |
219 |
|
220 |
Example: |
221 |
|
222 |
{ "timestamp": {"seconds": 1290688046, "microseconds": 417172}, |
223 |
"event": "SPICE_INITIALIZED", |
224 |
"data": {"server": {"auth": "spice", "port": "5921", |
225 |
"family": "ipv4", "host": "127.0.0.1"}, |
226 |
"client": {"port": "49004", "family": "ipv4", "channel-type": 3, |
227 |
"connection-id": 1804289383, "host": "127.0.0.1", |
228 |
"channel-id": 0, "tls": true} |
229 |
}} |
230 |
|
231 |
STOP |
232 |
---- |
233 |
|
234 |
Emitted when the Virtual Machine is stopped. |
235 |
|
236 |
Data: None. |
237 |
|
238 |
Example: |
239 |
|
240 |
{ "event": "STOP", |
241 |
"timestamp": { "seconds": 1267041730, "microseconds": 281295 } } |
242 |
|
243 |
SUSPEND |
244 |
------- |
245 |
|
246 |
Emitted when guest enters S3 state. |
247 |
|
248 |
Data: None. |
249 |
|
250 |
Example: |
251 |
|
252 |
{ "event": "SUSPEND", |
253 |
"timestamp": { "seconds": 1344456160, "microseconds": 309119 } } |
254 |
|
255 |
VNC_CONNECTED |
256 |
------------- |
257 |
|
258 |
Emitted when a VNC client establishes a connection. |
259 |
|
260 |
Data: |
261 |
|
262 |
- "server": Server information (json-object) |
263 |
- "host": IP address (json-string) |
264 |
- "service": port number (json-string) |
265 |
- "family": address family (json-string, "ipv4" or "ipv6") |
266 |
- "auth": authentication method (json-string, optional) |
267 |
- "client": Client information (json-object) |
268 |
- "host": IP address (json-string) |
269 |
- "service": port number (json-string) |
270 |
- "family": address family (json-string, "ipv4" or "ipv6") |
271 |
|
272 |
Example: |
273 |
|
274 |
{ "event": "VNC_CONNECTED", |
275 |
"data": { |
276 |
"server": { "auth": "sasl", "family": "ipv4", |
277 |
"service": "5901", "host": "0.0.0.0" }, |
278 |
"client": { "family": "ipv4", "service": "58425", |
279 |
"host": "127.0.0.1" } }, |
280 |
"timestamp": { "seconds": 1262976601, "microseconds": 975795 } } |
281 |
|
282 |
|
283 |
Note: This event is emitted before any authentication takes place, thus |
284 |
the authentication ID is not provided. |
285 |
|
286 |
VNC_DISCONNECTED |
287 |
---------------- |
288 |
|
289 |
Emitted when the connection is closed. |
290 |
|
291 |
Data: |
292 |
|
293 |
- "server": Server information (json-object) |
294 |
- "host": IP address (json-string) |
295 |
- "service": port number (json-string) |
296 |
- "family": address family (json-string, "ipv4" or "ipv6") |
297 |
- "auth": authentication method (json-string, optional) |
298 |
- "client": Client information (json-object) |
299 |
- "host": IP address (json-string) |
300 |
- "service": port number (json-string) |
301 |
- "family": address family (json-string, "ipv4" or "ipv6") |
302 |
- "x509_dname": TLS dname (json-string, optional) |
303 |
- "sasl_username": SASL username (json-string, optional) |
304 |
|
305 |
Example: |
306 |
|
307 |
{ "event": "VNC_DISCONNECTED", |
308 |
"data": { |
309 |
"server": { "auth": "sasl", "family": "ipv4", |
310 |
"service": "5901", "host": "0.0.0.0" }, |
311 |
"client": { "family": "ipv4", "service": "58425", |
312 |
"host": "127.0.0.1", "sasl_username": "luiz" } }, |
313 |
"timestamp": { "seconds": 1262976601, "microseconds": 975795 } } |
314 |
|
315 |
VNC_INITIALIZED |
316 |
--------------- |
317 |
|
318 |
Emitted after authentication takes place (if any) and the VNC session is |
319 |
made active. |
320 |
|
321 |
Data: |
322 |
|
323 |
- "server": Server information (json-object) |
324 |
- "host": IP address (json-string) |
325 |
- "service": port number (json-string) |
326 |
- "family": address family (json-string, "ipv4" or "ipv6") |
327 |
- "auth": authentication method (json-string, optional) |
328 |
- "client": Client information (json-object) |
329 |
- "host": IP address (json-string) |
330 |
- "service": port number (json-string) |
331 |
- "family": address family (json-string, "ipv4" or "ipv6") |
332 |
- "x509_dname": TLS dname (json-string, optional) |
333 |
- "sasl_username": SASL username (json-string, optional) |
334 |
|
335 |
Example: |
336 |
|
337 |
{ "event": "VNC_INITIALIZED", |
338 |
"data": { |
339 |
"server": { "auth": "sasl", "family": "ipv4", |
340 |
"service": "5901", "host": "0.0.0.0"}, |
341 |
"client": { "family": "ipv4", "service": "46089", |
342 |
"host": "127.0.0.1", "sasl_username": "luiz" } }, |
343 |
"timestamp": { "seconds": 1263475302, "microseconds": 150772 } } |
344 |
|
345 |
WAKEUP |
346 |
------ |
347 |
|
348 |
Emitted when the guest has woken up from S3 and is running. |
349 |
|
350 |
Data: None. |
351 |
|
352 |
Example: |
353 |
|
354 |
{ "event": "WATCHDOG", |
355 |
"timestamp": { "seconds": 1344522075, "microseconds": 745528 } } |
356 |
|
357 |
WATCHDOG |
358 |
-------- |
359 |
|
360 |
Emitted when the watchdog device's timer is expired. |
361 |
|
362 |
Data: |
363 |
|
364 |
- "action": Action that has been taken, it's one of the following (json-string): |
365 |
"reset", "shutdown", "poweroff", "pause", "debug", or "none" |
366 |
|
367 |
Example: |
368 |
|
369 |
{ "event": "WATCHDOG", |
370 |
"data": { "action": "reset" }, |
371 |
"timestamp": { "seconds": 1267061043, "microseconds": 959568 } } |
372 |
|
373 |
Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is |
374 |
followed respectively by the RESET, SHUTDOWN, or STOP events. |