]>
Commit | Line | Data |
---|---|---|
dfab4892 LC |
1 | QEMU Machine Protocol Events |
2 | ============================ | |
3 | ||
4 | ACPI_DEVICE_OST | |
5 | --------------- | |
6 | ||
7 | Emitted when guest executes ACPI _OST method. | |
8 | ||
9 | - data: ACPIOSTInfo type as described in qapi-schema.json | |
10 | ||
11 | { "event": "ACPI_DEVICE_OST", | |
12 | "data": { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0 } } | |
13 | ||
14 | BALLOON_CHANGE | |
15 | -------------- | |
16 | ||
17 | Emitted when the guest changes the actual BALLOON level. This | |
18 | value is equivalent to the 'actual' field return by the | |
19 | 'query-balloon' command | |
20 | ||
21 | Data: | |
22 | ||
23 | - "actual": actual level of the guest memory balloon in bytes (json-number) | |
24 | ||
25 | Example: | |
26 | ||
27 | { "event": "BALLOON_CHANGE", | |
28 | "data": { "actual": 944766976 }, | |
29 | "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } | |
30 | ||
31 | BLOCK_IMAGE_CORRUPTED | |
32 | --------------------- | |
33 | ||
34 | Emitted when a disk image is being marked corrupt. | |
35 | ||
36 | Data: | |
37 | ||
38 | - "device": Device name (json-string) | |
39 | - "msg": Informative message (e.g., reason for the corruption) (json-string) | |
40 | - "offset": If the corruption resulted from an image access, this is the access | |
41 | offset into the image (json-int) | |
42 | - "size": If the corruption resulted from an image access, this is the access | |
43 | size (json-int) | |
44 | ||
45 | Example: | |
46 | ||
47 | { "event": "BLOCK_IMAGE_CORRUPTED", | |
48 | "data": { "device": "ide0-hd0", | |
49 | "msg": "Prevented active L1 table overwrite", "offset": 196608, | |
50 | "size": 65536 }, | |
51 | "timestamp": { "seconds": 1378126126, "microseconds": 966463 } } | |
52 | ||
53 | BLOCK_IO_ERROR | |
54 | -------------- | |
55 | ||
56 | Emitted when a disk I/O error occurs. | |
57 | ||
58 | Data: | |
59 | ||
60 | - "device": device name (json-string) | |
61 | - "operation": I/O operation (json-string, "read" or "write") | |
62 | - "action": action that has been taken, it's one of the following (json-string): | |
63 | "ignore": error has been ignored | |
64 | "report": error has been reported to the device | |
65 | "stop": the VM is going to stop because of the error | |
66 | ||
67 | Example: | |
68 | ||
69 | { "event": "BLOCK_IO_ERROR", | |
70 | "data": { "device": "ide0-hd1", | |
71 | "operation": "write", | |
72 | "action": "stop" }, | |
73 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
74 | ||
75 | Note: If action is "stop", a STOP event will eventually follow the | |
76 | BLOCK_IO_ERROR event. | |
77 | ||
78 | BLOCK_JOB_CANCELLED | |
79 | ------------------- | |
80 | ||
81 | Emitted when a block job has been cancelled. | |
82 | ||
83 | Data: | |
84 | ||
85 | - "type": Job type (json-string; "stream" for image streaming | |
86 | "commit" for block commit) | |
87 | - "device": Device name (json-string) | |
88 | - "len": Maximum progress value (json-int) | |
89 | - "offset": Current progress value (json-int) | |
90 | On success this is equal to len. | |
91 | On failure this is less than len. | |
92 | - "speed": Rate limit, bytes per second (json-int) | |
93 | ||
94 | Example: | |
95 | ||
96 | { "event": "BLOCK_JOB_CANCELLED", | |
97 | "data": { "type": "stream", "device": "virtio-disk0", | |
98 | "len": 10737418240, "offset": 134217728, | |
99 | "speed": 0 }, | |
100 | "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } | |
101 | ||
102 | BLOCK_JOB_COMPLETED | |
103 | ------------------- | |
104 | ||
105 | Emitted when a block job has completed. | |
106 | ||
107 | Data: | |
108 | ||
109 | - "type": Job type (json-string; "stream" for image streaming | |
110 | "commit" for block commit) | |
111 | - "device": Device name (json-string) | |
112 | - "len": Maximum progress value (json-int) | |
113 | - "offset": Current progress value (json-int) | |
114 | On success this is equal to len. | |
115 | On failure this is less than len. | |
116 | - "speed": Rate limit, bytes per second (json-int) | |
117 | - "error": Error message (json-string, optional) | |
118 | Only present on failure. This field contains a human-readable | |
119 | error message. There are no semantics other than that streaming | |
120 | has failed and clients should not try to interpret the error | |
121 | string. | |
122 | ||
123 | Example: | |
124 | ||
125 | { "event": "BLOCK_JOB_COMPLETED", | |
126 | "data": { "type": "stream", "device": "virtio-disk0", | |
127 | "len": 10737418240, "offset": 10737418240, | |
128 | "speed": 0 }, | |
129 | "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } | |
130 | ||
131 | BLOCK_JOB_ERROR | |
132 | --------------- | |
133 | ||
134 | Emitted when a block job encounters an error. | |
135 | ||
136 | Data: | |
137 | ||
138 | - "device": device name (json-string) | |
139 | - "operation": I/O operation (json-string, "read" or "write") | |
140 | - "action": action that has been taken, it's one of the following (json-string): | |
141 | "ignore": error has been ignored, the job may fail later | |
142 | "report": error will be reported and the job canceled | |
143 | "stop": error caused job to be paused | |
144 | ||
145 | Example: | |
146 | ||
147 | { "event": "BLOCK_JOB_ERROR", | |
148 | "data": { "device": "ide0-hd1", | |
149 | "operation": "write", | |
150 | "action": "stop" }, | |
151 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
152 | ||
153 | BLOCK_JOB_READY | |
154 | --------------- | |
155 | ||
156 | Emitted when a block job is ready to complete. | |
157 | ||
158 | Data: | |
159 | ||
a22d8e47 MA |
160 | - "type": Job type (json-string; "stream" for image streaming |
161 | "commit" for block commit) | |
162 | - "device": Device name (json-string) | |
163 | - "len": Maximum progress value (json-int) | |
164 | - "offset": Current progress value (json-int) | |
165 | On success this is equal to len. | |
166 | On failure this is less than len. | |
167 | - "speed": Rate limit, bytes per second (json-int) | |
dfab4892 LC |
168 | |
169 | Example: | |
170 | ||
171 | { "event": "BLOCK_JOB_READY", | |
a22d8e47 MA |
172 | "data": { "device": "drive0", "type": "mirror", "speed": 0, |
173 | "len": 2097152, "offset": 2097152 } | |
dfab4892 LC |
174 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } |
175 | ||
176 | Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR | |
177 | event. | |
178 | ||
179 | DEVICE_DELETED | |
180 | -------------- | |
181 | ||
182 | Emitted whenever the device removal completion is acknowledged | |
183 | by the guest. | |
184 | At this point, it's safe to reuse the specified device ID. | |
185 | Device removal can be initiated by the guest or by HMP/QMP commands. | |
186 | ||
187 | Data: | |
188 | ||
189 | - "device": device name (json-string, optional) | |
190 | - "path": device path (json-string) | |
191 | ||
192 | { "event": "DEVICE_DELETED", | |
193 | "data": { "device": "virtio-net-pci-0", | |
194 | "path": "/machine/peripheral/virtio-net-pci-0" }, | |
195 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
196 | ||
197 | DEVICE_TRAY_MOVED | |
198 | ----------------- | |
199 | ||
200 | It's emitted whenever the tray of a removable device is moved by the guest | |
201 | or by HMP/QMP commands. | |
202 | ||
203 | Data: | |
204 | ||
205 | - "device": device name (json-string) | |
206 | - "tray-open": true if the tray has been opened or false if it has been closed | |
207 | (json-bool) | |
208 | ||
209 | { "event": "DEVICE_TRAY_MOVED", | |
210 | "data": { "device": "ide1-cd0", | |
211 | "tray-open": true | |
212 | }, | |
213 | "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } | |
214 | ||
215 | GUEST_PANICKED | |
216 | -------------- | |
217 | ||
218 | Emitted when guest OS panic is detected. | |
219 | ||
220 | Data: | |
221 | ||
222 | - "action": Action that has been taken (json-string, currently always "pause"). | |
223 | ||
224 | Example: | |
225 | ||
226 | { "event": "GUEST_PANICKED", | |
227 | "data": { "action": "pause" } } | |
228 | ||
229 | NIC_RX_FILTER_CHANGED | |
230 | --------------------- | |
231 | ||
232 | The event is emitted once until the query command is executed, | |
233 | the first event will always be emitted. | |
234 | ||
235 | Data: | |
236 | ||
237 | - "name": net client name (json-string) | |
238 | - "path": device path (json-string) | |
239 | ||
240 | { "event": "NIC_RX_FILTER_CHANGED", | |
241 | "data": { "name": "vnet0", | |
242 | "path": "/machine/peripheral/vnet0/virtio-backend" }, | |
243 | "timestamp": { "seconds": 1368697518, "microseconds": 326866 } } | |
244 | } | |
245 | ||
246 | QUORUM_FAILURE | |
247 | -------------- | |
248 | ||
249 | Emitted by the Quorum block driver if it fails to establish a quorum. | |
250 | ||
251 | Data: | |
252 | ||
4e855baa BC |
253 | - "reference": device name if defined else node name. |
254 | - "sector-num": Number of the first sector of the failed read operation. | |
255 | - "sectors-count": Failed read operation sector count. | |
dfab4892 LC |
256 | |
257 | Example: | |
258 | ||
259 | { "event": "QUORUM_FAILURE", | |
4e855baa | 260 | "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 }, |
dfab4892 LC |
261 | "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } |
262 | ||
263 | QUORUM_REPORT_BAD | |
264 | ----------------- | |
265 | ||
266 | Emitted to report a corruption of a Quorum file. | |
267 | ||
268 | Data: | |
269 | ||
4e855baa BC |
270 | - "error": Error message (json-string, optional) |
271 | Only present on failure. This field contains a human-readable | |
272 | error message. There are no semantics other than that the | |
273 | block layer reported an error and clients should not try to | |
274 | interpret the error string. | |
275 | - "node-name": The graph node name of the block driver state. | |
276 | - "sector-num": Number of the first sector of the failed read operation. | |
277 | - "sectors-count": Failed read operation sector count. | |
dfab4892 LC |
278 | |
279 | Example: | |
280 | ||
281 | { "event": "QUORUM_REPORT_BAD", | |
4e855baa | 282 | "data": { "node-name": "1.raw", "sector-num": 345435, "sectors-count": 5 }, |
dfab4892 LC |
283 | "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } |
284 | ||
285 | RESET | |
286 | ----- | |
287 | ||
1454ac68 | 288 | Emitted when the Virtual Machine is reset. |
dfab4892 LC |
289 | |
290 | Data: None. | |
291 | ||
292 | Example: | |
293 | ||
294 | { "event": "RESET", | |
295 | "timestamp": { "seconds": 1267041653, "microseconds": 9518 } } | |
296 | ||
297 | RESUME | |
298 | ------ | |
299 | ||
300 | Emitted when the Virtual Machine resumes execution. | |
301 | ||
302 | Data: None. | |
303 | ||
304 | Example: | |
305 | ||
306 | { "event": "RESUME", | |
307 | "timestamp": { "seconds": 1271770767, "microseconds": 582542 } } | |
308 | ||
309 | RTC_CHANGE | |
310 | ---------- | |
311 | ||
312 | Emitted when the guest changes the RTC time. | |
313 | ||
314 | Data: | |
315 | ||
316 | - "offset": Offset between base RTC clock (as specified by -rtc base), and | |
317 | new RTC clock value (json-number) | |
318 | ||
319 | Example: | |
320 | ||
321 | { "event": "RTC_CHANGE", | |
322 | "data": { "offset": 78 }, | |
323 | "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } | |
324 | ||
325 | SHUTDOWN | |
326 | -------- | |
327 | ||
328 | Emitted when the Virtual Machine is powered down. | |
329 | ||
330 | Data: None. | |
331 | ||
332 | Example: | |
333 | ||
334 | { "event": "SHUTDOWN", | |
335 | "timestamp": { "seconds": 1267040730, "microseconds": 682951 } } | |
336 | ||
337 | Note: If the command-line option "-no-shutdown" has been specified, a STOP | |
338 | event will eventually follow the SHUTDOWN event. | |
339 | ||
f8ecd945 EB |
340 | SPICE_CONNECTED |
341 | --------------- | |
dfab4892 | 342 | |
f8ecd945 | 343 | Emitted when a SPICE client connects. |
dfab4892 LC |
344 | |
345 | Data: | |
346 | ||
347 | - "server": Server information (json-object) | |
348 | - "host": IP address (json-string) | |
349 | - "port": port number (json-string) | |
350 | - "family": address family (json-string, "ipv4" or "ipv6") | |
351 | - "client": Client information (json-object) | |
352 | - "host": IP address (json-string) | |
353 | - "port": port number (json-string) | |
354 | - "family": address family (json-string, "ipv4" or "ipv6") | |
355 | ||
356 | Example: | |
357 | ||
358 | { "timestamp": {"seconds": 1290688046, "microseconds": 388707}, | |
359 | "event": "SPICE_CONNECTED", | |
360 | "data": { | |
361 | "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"}, | |
362 | "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"} | |
363 | }} | |
364 | ||
f8ecd945 EB |
365 | SPICE_DISCONNECTED |
366 | ------------------ | |
367 | ||
368 | Emitted when a SPICE client disconnects. | |
369 | ||
370 | Data: | |
371 | ||
372 | - "server": Server information (json-object) | |
373 | - "host": IP address (json-string) | |
374 | - "port": port number (json-string) | |
375 | - "family": address family (json-string, "ipv4" or "ipv6") | |
376 | - "client": Client information (json-object) | |
377 | - "host": IP address (json-string) | |
378 | - "port": port number (json-string) | |
379 | - "family": address family (json-string, "ipv4" or "ipv6") | |
380 | ||
381 | Example: | |
382 | ||
383 | { "timestamp": {"seconds": 1290688046, "microseconds": 388707}, | |
384 | "event": "SPICE_DISCONNECTED", | |
385 | "data": { | |
386 | "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"}, | |
387 | "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"} | |
388 | }} | |
389 | ||
dfab4892 LC |
390 | SPICE_INITIALIZED |
391 | ----------------- | |
392 | ||
393 | Emitted after initial handshake and authentication takes place (if any) | |
1454ac68 | 394 | and the SPICE channel is up and running |
dfab4892 LC |
395 | |
396 | Data: | |
397 | ||
398 | - "server": Server information (json-object) | |
399 | - "host": IP address (json-string) | |
400 | - "port": 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 | - "port": port number (json-string) | |
406 | - "family": address family (json-string, "ipv4" or "ipv6") | |
407 | - "connection-id": spice connection id. All channels with the same id | |
408 | belong to the same spice session (json-int) | |
409 | - "channel-type": channel type. "1" is the main control channel, filter for | |
410 | this one if you want track spice sessions only (json-int) | |
411 | - "channel-id": channel id. Usually "0", might be different needed when | |
412 | multiple channels of the same type exist, such as multiple | |
413 | display channels in a multihead setup (json-int) | |
414 | - "tls": whevener the channel is encrypted (json-bool) | |
415 | ||
416 | Example: | |
417 | ||
418 | { "timestamp": {"seconds": 1290688046, "microseconds": 417172}, | |
419 | "event": "SPICE_INITIALIZED", | |
420 | "data": {"server": {"auth": "spice", "port": "5921", | |
421 | "family": "ipv4", "host": "127.0.0.1"}, | |
422 | "client": {"port": "49004", "family": "ipv4", "channel-type": 3, | |
423 | "connection-id": 1804289383, "host": "127.0.0.1", | |
424 | "channel-id": 0, "tls": true} | |
425 | }} | |
426 | ||
5e255004 EB |
427 | SPICE_MIGRATE_COMPLETED |
428 | ----------------------- | |
429 | ||
430 | Emitted when SPICE migration has completed | |
431 | ||
432 | Data: None. | |
433 | ||
434 | Example: | |
435 | ||
436 | { "timestamp": {"seconds": 1290688046, "microseconds": 417172}, | |
437 | "event": "SPICE_MIGRATE_COMPLETED" } | |
438 | ||
439 | ||
dfab4892 LC |
440 | STOP |
441 | ---- | |
442 | ||
443 | Emitted when the Virtual Machine is stopped. | |
444 | ||
445 | Data: None. | |
446 | ||
447 | Example: | |
448 | ||
449 | { "event": "STOP", | |
450 | "timestamp": { "seconds": 1267041730, "microseconds": 281295 } } | |
451 | ||
452 | SUSPEND | |
453 | ------- | |
454 | ||
455 | Emitted when guest enters S3 state. | |
456 | ||
457 | Data: None. | |
458 | ||
459 | Example: | |
460 | ||
461 | { "event": "SUSPEND", | |
462 | "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } | |
463 | ||
464 | SUSPEND_DISK | |
465 | ------------ | |
466 | ||
467 | Emitted when the guest makes a request to enter S4 state. | |
468 | ||
469 | Data: None. | |
470 | ||
471 | Example: | |
472 | ||
473 | { "event": "SUSPEND_DISK", | |
474 | "timestamp": { "seconds": 1344456160, "microseconds": 309119 } } | |
475 | ||
476 | Note: QEMU shuts down when entering S4 state. | |
477 | ||
478 | VNC_CONNECTED | |
479 | ------------- | |
480 | ||
481 | Emitted when a VNC client establishes a connection. | |
482 | ||
483 | Data: | |
484 | ||
485 | - "server": Server information (json-object) | |
486 | - "host": IP address (json-string) | |
487 | - "service": port number (json-string) | |
488 | - "family": address family (json-string, "ipv4" or "ipv6") | |
489 | - "auth": authentication method (json-string, optional) | |
490 | - "client": Client information (json-object) | |
491 | - "host": IP address (json-string) | |
492 | - "service": port number (json-string) | |
493 | - "family": address family (json-string, "ipv4" or "ipv6") | |
494 | ||
495 | Example: | |
496 | ||
497 | { "event": "VNC_CONNECTED", | |
498 | "data": { | |
499 | "server": { "auth": "sasl", "family": "ipv4", | |
500 | "service": "5901", "host": "0.0.0.0" }, | |
501 | "client": { "family": "ipv4", "service": "58425", | |
502 | "host": "127.0.0.1" } }, | |
503 | "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } | |
504 | ||
505 | ||
506 | Note: This event is emitted before any authentication takes place, thus | |
507 | the authentication ID is not provided. | |
508 | ||
509 | VNC_DISCONNECTED | |
510 | ---------------- | |
511 | ||
512 | Emitted when the connection is closed. | |
513 | ||
514 | Data: | |
515 | ||
516 | - "server": Server information (json-object) | |
517 | - "host": IP address (json-string) | |
518 | - "service": port number (json-string) | |
519 | - "family": address family (json-string, "ipv4" or "ipv6") | |
520 | - "auth": authentication method (json-string, optional) | |
521 | - "client": Client information (json-object) | |
522 | - "host": IP address (json-string) | |
523 | - "service": port number (json-string) | |
524 | - "family": address family (json-string, "ipv4" or "ipv6") | |
525 | - "x509_dname": TLS dname (json-string, optional) | |
526 | - "sasl_username": SASL username (json-string, optional) | |
527 | ||
528 | Example: | |
529 | ||
530 | { "event": "VNC_DISCONNECTED", | |
531 | "data": { | |
532 | "server": { "auth": "sasl", "family": "ipv4", | |
533 | "service": "5901", "host": "0.0.0.0" }, | |
534 | "client": { "family": "ipv4", "service": "58425", | |
535 | "host": "127.0.0.1", "sasl_username": "luiz" } }, | |
536 | "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } | |
537 | ||
538 | VNC_INITIALIZED | |
539 | --------------- | |
540 | ||
541 | Emitted after authentication takes place (if any) and the VNC session is | |
542 | made active. | |
543 | ||
544 | Data: | |
545 | ||
546 | - "server": Server information (json-object) | |
547 | - "host": IP address (json-string) | |
548 | - "service": port number (json-string) | |
549 | - "family": address family (json-string, "ipv4" or "ipv6") | |
550 | - "auth": authentication method (json-string, optional) | |
551 | - "client": Client information (json-object) | |
552 | - "host": IP address (json-string) | |
553 | - "service": port number (json-string) | |
554 | - "family": address family (json-string, "ipv4" or "ipv6") | |
555 | - "x509_dname": TLS dname (json-string, optional) | |
556 | - "sasl_username": SASL username (json-string, optional) | |
557 | ||
558 | Example: | |
559 | ||
560 | { "event": "VNC_INITIALIZED", | |
561 | "data": { | |
562 | "server": { "auth": "sasl", "family": "ipv4", | |
563 | "service": "5901", "host": "0.0.0.0"}, | |
564 | "client": { "family": "ipv4", "service": "46089", | |
565 | "host": "127.0.0.1", "sasl_username": "luiz" } }, | |
566 | "timestamp": { "seconds": 1263475302, "microseconds": 150772 } } | |
567 | ||
568 | WAKEUP | |
569 | ------ | |
570 | ||
571 | Emitted when the guest has woken up from S3 and is running. | |
572 | ||
573 | Data: None. | |
574 | ||
575 | Example: | |
576 | ||
577 | { "event": "WAKEUP", | |
578 | "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } | |
579 | ||
580 | WATCHDOG | |
581 | -------- | |
582 | ||
583 | Emitted when the watchdog device's timer is expired. | |
584 | ||
585 | Data: | |
586 | ||
587 | - "action": Action that has been taken, it's one of the following (json-string): | |
588 | "reset", "shutdown", "poweroff", "pause", "debug", or "none" | |
589 | ||
590 | Example: | |
591 | ||
592 | { "event": "WATCHDOG", | |
593 | "data": { "action": "reset" }, | |
594 | "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } | |
595 | ||
596 | Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is | |
597 | followed respectively by the RESET, SHUTDOWN, or STOP events. |