]>
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 | ||
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 | ||
6f382ed2 LC |
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 | ||
d74c7dfd LC |
115 | RESET |
116 | ----- | |
117 | ||
118 | Emitted when the Virtual Machine is reseted. | |
e2419113 | 119 | |
e2419113 LC |
120 | Data: None. |
121 | ||
d74c7dfd LC |
122 | Example: |
123 | ||
124 | { "event": "RESET", | |
125 | "timestamp": { "seconds": 1267041653, "microseconds": 9518 } } | |
126 | ||
6ed2c484 LC |
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 | ||
80cd3478 LC |
139 | RTC_CHANGE |
140 | ---------- | |
141 | ||
db11571f | 142 | Emitted when the guest changes the RTC time. |
80cd3478 LC |
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 | ||
d74c7dfd LC |
154 | SHUTDOWN |
155 | -------- | |
156 | ||
157 | Emitted when the Virtual Machine is powered down. | |
e2419113 | 158 | |
e2419113 LC |
159 | Data: None. |
160 | ||
d74c7dfd LC |
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 | ||
cb8900fe LC |
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 | ||
d74c7dfd LC |
231 | STOP |
232 | ---- | |
233 | ||
234 | Emitted when the Virtual Machine is stopped. | |
e2419113 | 235 | |
e2419113 LC |
236 | Data: None. |
237 | ||
d74c7dfd | 238 | Example: |
586153d9 | 239 | |
7af72c24 | 240 | { "event": "STOP", |
d74c7dfd | 241 | "timestamp": { "seconds": 1267041730, "microseconds": 281295 } } |
0d72f3d3 | 242 | |
67e3cf26 LC |
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 | ||
25df49f6 LC |
255 | SUSPEND_DISK |
256 | ------------ | |
257 | ||
258 | Emitted when the guest makes a request to enter S4 state. | |
259 | ||
260 | Data: None. | |
261 | ||
262 | Example: | |
263 | ||
264 | { "event": "SUSPEND_DISK", | |
265 | "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } | |
266 | ||
267 | Note: QEMU shuts down when entering S4 state. | |
268 | ||
d74c7dfd LC |
269 | VNC_CONNECTED |
270 | ------------- | |
0d72f3d3 | 271 | |
d74c7dfd LC |
272 | Emitted when a VNC client establishes a connection. |
273 | ||
274 | Data: | |
275 | ||
276 | - "server": Server information (json-object) | |
277 | - "host": IP address (json-string) | |
278 | - "service": port number (json-string) | |
279 | - "family": address family (json-string, "ipv4" or "ipv6") | |
280 | - "auth": authentication method (json-string, optional) | |
281 | - "client": Client information (json-object) | |
282 | - "host": IP address (json-string) | |
283 | - "service": port number (json-string) | |
284 | - "family": address family (json-string, "ipv4" or "ipv6") | |
285 | ||
286 | Example: | |
0d2ed46a | 287 | |
d74c7dfd LC |
288 | { "event": "VNC_CONNECTED", |
289 | "data": { | |
290 | "server": { "auth": "sasl", "family": "ipv4", | |
291 | "service": "5901", "host": "0.0.0.0" }, | |
292 | "client": { "family": "ipv4", "service": "58425", | |
293 | "host": "127.0.0.1" } }, | |
294 | "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } | |
0d2ed46a | 295 | |
aa1db6ed | 296 | |
d74c7dfd LC |
297 | Note: This event is emitted before any authentication takes place, thus |
298 | the authentication ID is not provided. | |
299 | ||
300 | VNC_DISCONNECTED | |
aa1db6ed LC |
301 | ---------------- |
302 | ||
dee3bffc | 303 | Emitted when the connection is closed. |
d74c7dfd | 304 | |
aa1db6ed LC |
305 | Data: |
306 | ||
d74c7dfd LC |
307 | - "server": Server information (json-object) |
308 | - "host": IP address (json-string) | |
309 | - "service": port number (json-string) | |
310 | - "family": address family (json-string, "ipv4" or "ipv6") | |
311 | - "auth": authentication method (json-string, optional) | |
312 | - "client": Client information (json-object) | |
313 | - "host": IP address (json-string) | |
314 | - "service": port number (json-string) | |
315 | - "family": address family (json-string, "ipv4" or "ipv6") | |
316 | - "x509_dname": TLS dname (json-string, optional) | |
317 | - "sasl_username": SASL username (json-string, optional) | |
aa1db6ed LC |
318 | |
319 | Example: | |
320 | ||
d74c7dfd LC |
321 | { "event": "VNC_DISCONNECTED", |
322 | "data": { | |
323 | "server": { "auth": "sasl", "family": "ipv4", | |
324 | "service": "5901", "host": "0.0.0.0" }, | |
325 | "client": { "family": "ipv4", "service": "58425", | |
326 | "host": "127.0.0.1", "sasl_username": "luiz" } }, | |
327 | "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } | |
328 | ||
329 | VNC_INITIALIZED | |
330 | --------------- | |
331 | ||
332 | Emitted after authentication takes place (if any) and the VNC session is | |
333 | made active. | |
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 | - "x509_dname": TLS dname (json-string, optional) | |
347 | - "sasl_username": SASL username (json-string, optional) | |
348 | ||
349 | Example: | |
350 | ||
351 | { "event": "VNC_INITIALIZED", | |
352 | "data": { | |
353 | "server": { "auth": "sasl", "family": "ipv4", | |
354 | "service": "5901", "host": "0.0.0.0"}, | |
355 | "client": { "family": "ipv4", "service": "46089", | |
356 | "host": "127.0.0.1", "sasl_username": "luiz" } }, | |
357 | "timestamp": { "seconds": 1263475302, "microseconds": 150772 } } | |
9eedeb3b | 358 | |
17c8660b LC |
359 | WAKEUP |
360 | ------ | |
361 | ||
362 | Emitted when the guest has woken up from S3 and is running. | |
363 | ||
364 | Data: None. | |
365 | ||
366 | Example: | |
367 | ||
368 | { "event": "WATCHDOG", | |
369 | "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } | |
370 | ||
9eedeb3b LC |
371 | WATCHDOG |
372 | -------- | |
373 | ||
374 | Emitted when the watchdog device's timer is expired. | |
375 | ||
376 | Data: | |
377 | ||
378 | - "action": Action that has been taken, it's one of the following (json-string): | |
379 | "reset", "shutdown", "poweroff", "pause", "debug", or "none" | |
380 | ||
381 | Example: | |
382 | ||
383 | { "event": "WATCHDOG", | |
384 | "data": { "action": "reset" }, | |
385 | "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } | |
386 | ||
387 | Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is | |
388 | followed respectively by the RESET, SHUTDOWN, or STOP events. |