]>
Commit | Line | Data |
---|---|---|
82a56f0d | 1 | HXCOMM QMP dispatch table and documentation |
3599d46b | 2 | HXCOMM Text between SQMP and EQMP is copied to the QMP documentation file and |
82a56f0d LC |
3 | HXCOMM does not show up in the other formats. |
4 | ||
5 | SQMP | |
6 | QMP Supported Commands | |
7 | ---------------------- | |
8 | ||
9 | This document describes all commands currently supported by QMP. | |
10 | ||
11 | Most of the time their usage is exactly the same as in the user Monitor, this | |
12 | means that any other document which also describe commands (the manpage, | |
13 | QEMU's manual, etc) can and should be consulted. | |
14 | ||
15 | QMP has two types of commands: regular and query commands. Regular commands | |
16 | usually change the Virtual Machine's state someway, while query commands just | |
17 | return information. The sections below are divided accordingly. | |
18 | ||
19 | It's important to observe that all communication examples are formatted in | |
20 | a reader-friendly way, so that they're easier to understand. However, in real | |
21 | protocol usage, they're emitted as a single line. | |
22 | ||
23 | Also, the following notation is used to denote data flow: | |
24 | ||
25 | -> data issued by the Client | |
26 | <- Server data response | |
27 | ||
28 | Please, refer to the QMP specification (QMP/qmp-spec.txt) for detailed | |
29 | information on the Server command and response formats. | |
30 | ||
31 | NOTE: This document is temporary and will be replaced soon. | |
32 | ||
33 | 1. Stability Considerations | |
34 | =========================== | |
35 | ||
36 | The current QMP command set (described in this file) may be useful for a | |
37 | number of use cases, however it's limited and several commands have bad | |
38 | defined semantics, specially with regard to command completion. | |
39 | ||
40 | These problems are going to be solved incrementally in the next QEMU releases | |
41 | and we're going to establish a deprecation policy for badly defined commands. | |
42 | ||
43 | If you're planning to adopt QMP, please observe the following: | |
44 | ||
c20cdf8b | 45 | 1. The deprecation policy will take effect and be documented soon, please |
82a56f0d LC |
46 | check the documentation of each used command as soon as a new release of |
47 | QEMU is available | |
48 | ||
49 | 2. DO NOT rely on anything which is not explicit documented | |
50 | ||
51 | 3. Errors, in special, are not documented. Applications should NOT check | |
52 | for specific errors classes or data (it's strongly recommended to only | |
53 | check for the "error" key) | |
54 | ||
55 | 2. Regular Commands | |
56 | =================== | |
57 | ||
58 | Server's responses in the examples below are always a success response, please | |
59 | refer to the QMP specification for more details on error responses. | |
60 | ||
61 | EQMP | |
62 | ||
63 | { | |
64 | .name = "quit", | |
65 | .args_type = "", | |
82a56f0d LC |
66 | }, |
67 | ||
68 | SQMP | |
69 | quit | |
70 | ---- | |
71 | ||
72 | Quit the emulator. | |
73 | ||
74 | Arguments: None. | |
75 | ||
76 | Example: | |
77 | ||
78 | -> { "execute": "quit" } | |
79 | <- { "return": {} } | |
80 | ||
81 | EQMP | |
82 | ||
83 | { | |
84 | .name = "eject", | |
85 | .args_type = "force:-f,device:B", | |
82a56f0d LC |
86 | }, |
87 | ||
88 | SQMP | |
89 | eject | |
90 | ----- | |
91 | ||
92 | Eject a removable medium. | |
93 | ||
bdf05133 | 94 | Arguments: |
82a56f0d LC |
95 | |
96 | - force: force ejection (json-bool, optional) | |
97 | - device: device name (json-string) | |
98 | ||
99 | Example: | |
100 | ||
101 | -> { "execute": "eject", "arguments": { "device": "ide1-cd0" } } | |
102 | <- { "return": {} } | |
103 | ||
104 | Note: The "force" argument defaults to false. | |
105 | ||
106 | EQMP | |
107 | ||
108 | { | |
109 | .name = "change", | |
110 | .args_type = "device:B,target:F,arg:s?", | |
82a56f0d LC |
111 | }, |
112 | ||
113 | SQMP | |
114 | change | |
115 | ------ | |
116 | ||
117 | Change a removable medium or VNC configuration. | |
118 | ||
119 | Arguments: | |
120 | ||
121 | - "device": device name (json-string) | |
122 | - "target": filename or item (json-string) | |
123 | - "arg": additional argument (json-string, optional) | |
124 | ||
125 | Examples: | |
126 | ||
127 | 1. Change a removable medium | |
128 | ||
129 | -> { "execute": "change", | |
130 | "arguments": { "device": "ide1-cd0", | |
131 | "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } } | |
132 | <- { "return": {} } | |
133 | ||
134 | 2. Change VNC password | |
135 | ||
136 | -> { "execute": "change", | |
137 | "arguments": { "device": "vnc", "target": "password", | |
138 | "arg": "foobar1" } } | |
139 | <- { "return": {} } | |
140 | ||
141 | EQMP | |
142 | ||
143 | { | |
144 | .name = "screendump", | |
145 | .args_type = "filename:F", | |
82a56f0d LC |
146 | }, |
147 | ||
148 | SQMP | |
149 | screendump | |
150 | ---------- | |
151 | ||
152 | Save screen into PPM image. | |
153 | ||
154 | Arguments: | |
155 | ||
156 | - "filename": file path (json-string) | |
157 | ||
158 | Example: | |
159 | ||
160 | -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } } | |
161 | <- { "return": {} } | |
162 | ||
163 | EQMP | |
164 | ||
165 | { | |
166 | .name = "stop", | |
167 | .args_type = "", | |
82a56f0d LC |
168 | }, |
169 | ||
170 | SQMP | |
171 | stop | |
172 | ---- | |
173 | ||
174 | Stop the emulator. | |
175 | ||
176 | Arguments: None. | |
177 | ||
178 | Example: | |
179 | ||
180 | -> { "execute": "stop" } | |
181 | <- { "return": {} } | |
182 | ||
183 | EQMP | |
184 | ||
185 | { | |
186 | .name = "cont", | |
187 | .args_type = "", | |
82a56f0d LC |
188 | }, |
189 | ||
190 | SQMP | |
191 | cont | |
192 | ---- | |
193 | ||
194 | Resume emulation. | |
195 | ||
196 | Arguments: None. | |
197 | ||
198 | Example: | |
199 | ||
200 | -> { "execute": "cont" } | |
201 | <- { "return": {} } | |
9b9df25a GH |
202 | |
203 | EQMP | |
204 | ||
205 | { | |
206 | .name = "system_wakeup", | |
207 | .args_type = "", | |
9b9df25a GH |
208 | }, |
209 | ||
210 | SQMP | |
211 | system_wakeup | |
212 | ------------- | |
213 | ||
214 | Wakeup guest from suspend. | |
215 | ||
216 | Arguments: None. | |
217 | ||
218 | Example: | |
219 | ||
220 | -> { "execute": "system_wakeup" } | |
221 | <- { "return": {} } | |
82a56f0d LC |
222 | |
223 | EQMP | |
224 | ||
225 | { | |
226 | .name = "system_reset", | |
227 | .args_type = "", | |
82a56f0d LC |
228 | }, |
229 | ||
230 | SQMP | |
231 | system_reset | |
232 | ------------ | |
233 | ||
234 | Reset the system. | |
235 | ||
236 | Arguments: None. | |
237 | ||
238 | Example: | |
239 | ||
240 | -> { "execute": "system_reset" } | |
241 | <- { "return": {} } | |
242 | ||
243 | EQMP | |
244 | ||
245 | { | |
246 | .name = "system_powerdown", | |
247 | .args_type = "", | |
82a56f0d LC |
248 | }, |
249 | ||
250 | SQMP | |
251 | system_powerdown | |
252 | ---------------- | |
253 | ||
254 | Send system power down event. | |
255 | ||
256 | Arguments: None. | |
257 | ||
258 | Example: | |
259 | ||
260 | -> { "execute": "system_powerdown" } | |
261 | <- { "return": {} } | |
262 | ||
263 | EQMP | |
264 | ||
265 | { | |
266 | .name = "device_add", | |
267 | .args_type = "device:O", | |
268 | .params = "driver[,prop=value][,...]", | |
269 | .help = "add device, like -device on the command line", | |
82a56f0d LC |
270 | }, |
271 | ||
272 | SQMP | |
273 | device_add | |
274 | ---------- | |
275 | ||
276 | Add a device. | |
277 | ||
278 | Arguments: | |
279 | ||
280 | - "driver": the name of the new device's driver (json-string) | |
281 | - "bus": the device's parent bus (device tree path, json-string, optional) | |
282 | - "id": the device's ID, must be unique (json-string) | |
283 | - device properties | |
284 | ||
285 | Example: | |
286 | ||
287 | -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } } | |
288 | <- { "return": {} } | |
289 | ||
290 | Notes: | |
291 | ||
292 | (1) For detailed information about this command, please refer to the | |
293 | 'docs/qdev-device-use.txt' file. | |
294 | ||
295 | (2) It's possible to list device properties by running QEMU with the | |
296 | "-device DEVICE,\?" command-line argument, where DEVICE is the device's name | |
297 | ||
298 | EQMP | |
299 | ||
300 | { | |
301 | .name = "device_del", | |
302 | .args_type = "id:s", | |
82a56f0d LC |
303 | }, |
304 | ||
305 | SQMP | |
306 | device_del | |
307 | ---------- | |
308 | ||
309 | Remove a device. | |
310 | ||
311 | Arguments: | |
312 | ||
6287d827 | 313 | - "id": the device's ID or QOM path (json-string) |
82a56f0d LC |
314 | |
315 | Example: | |
316 | ||
317 | -> { "execute": "device_del", "arguments": { "id": "net1" } } | |
318 | <- { "return": {} } | |
319 | ||
6287d827 DB |
320 | Example: |
321 | ||
322 | -> { "execute": "device_del", "arguments": { "id": "/machine/peripheral-anon/device[0]" } } | |
323 | <- { "return": {} } | |
324 | ||
e4c8f004 AK |
325 | EQMP |
326 | ||
327 | { | |
328 | .name = "send-key", | |
43d0a2c1 | 329 | .args_type = "keys:q,hold-time:i?", |
e4c8f004 AK |
330 | }, |
331 | ||
332 | SQMP | |
333 | send-key | |
334 | ---------- | |
335 | ||
336 | Send keys to VM. | |
337 | ||
338 | Arguments: | |
339 | ||
340 | keys array: | |
f9b1d9b2 AK |
341 | - "key": key sequence (a json-array of key union values, |
342 | union can be number or qcode enum) | |
e4c8f004 AK |
343 | |
344 | - hold-time: time to delay key up events, milliseconds. Defaults to 100 | |
345 | (json-int, optional) | |
346 | ||
347 | Example: | |
348 | ||
349 | -> { "execute": "send-key", | |
f9b1d9b2 AK |
350 | "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" }, |
351 | { "type": "qcode", "data": "alt" }, | |
352 | { "type": "qcode", "data": "delete" } ] } } | |
e4c8f004 AK |
353 | <- { "return": {} } |
354 | ||
82a56f0d LC |
355 | EQMP |
356 | ||
357 | { | |
358 | .name = "cpu", | |
359 | .args_type = "index:i", | |
82a56f0d LC |
360 | }, |
361 | ||
362 | SQMP | |
363 | cpu | |
364 | --- | |
365 | ||
366 | Set the default CPU. | |
367 | ||
368 | Arguments: | |
369 | ||
370 | - "index": the CPU's index (json-int) | |
371 | ||
372 | Example: | |
373 | ||
374 | -> { "execute": "cpu", "arguments": { "index": 0 } } | |
375 | <- { "return": {} } | |
376 | ||
377 | Note: CPUs' indexes are obtained with the 'query-cpus' command. | |
378 | ||
69ca3ea5 IM |
379 | EQMP |
380 | ||
381 | { | |
382 | .name = "cpu-add", | |
383 | .args_type = "id:i", | |
69ca3ea5 IM |
384 | }, |
385 | ||
386 | SQMP | |
387 | cpu-add | |
388 | ------- | |
389 | ||
390 | Adds virtual cpu | |
391 | ||
392 | Arguments: | |
393 | ||
394 | - "id": cpu id (json-int) | |
395 | ||
396 | Example: | |
397 | ||
398 | -> { "execute": "cpu-add", "arguments": { "id": 2 } } | |
399 | <- { "return": {} } | |
400 | ||
82a56f0d LC |
401 | EQMP |
402 | ||
403 | { | |
404 | .name = "memsave", | |
0cfd6a9a | 405 | .args_type = "val:l,size:i,filename:s,cpu:i?", |
82a56f0d LC |
406 | }, |
407 | ||
408 | SQMP | |
409 | memsave | |
410 | ------- | |
411 | ||
412 | Save to disk virtual memory dump starting at 'val' of size 'size'. | |
413 | ||
414 | Arguments: | |
415 | ||
416 | - "val": the starting address (json-int) | |
417 | - "size": the memory size, in bytes (json-int) | |
418 | - "filename": file path (json-string) | |
0cfd6a9a | 419 | - "cpu": virtual CPU index (json-int, optional) |
82a56f0d LC |
420 | |
421 | Example: | |
422 | ||
423 | -> { "execute": "memsave", | |
424 | "arguments": { "val": 10, | |
425 | "size": 100, | |
426 | "filename": "/tmp/virtual-mem-dump" } } | |
427 | <- { "return": {} } | |
428 | ||
82a56f0d LC |
429 | EQMP |
430 | ||
431 | { | |
432 | .name = "pmemsave", | |
433 | .args_type = "val:l,size:i,filename:s", | |
82a56f0d LC |
434 | }, |
435 | ||
436 | SQMP | |
437 | pmemsave | |
438 | -------- | |
439 | ||
440 | Save to disk physical memory dump starting at 'val' of size 'size'. | |
441 | ||
442 | Arguments: | |
443 | ||
444 | - "val": the starting address (json-int) | |
445 | - "size": the memory size, in bytes (json-int) | |
446 | - "filename": file path (json-string) | |
447 | ||
448 | Example: | |
449 | ||
450 | -> { "execute": "pmemsave", | |
451 | "arguments": { "val": 10, | |
452 | "size": 100, | |
453 | "filename": "/tmp/physical-mem-dump" } } | |
454 | <- { "return": {} } | |
455 | ||
a4046664 LJ |
456 | EQMP |
457 | ||
458 | { | |
459 | .name = "inject-nmi", | |
460 | .args_type = "", | |
a4046664 LJ |
461 | }, |
462 | ||
463 | SQMP | |
464 | inject-nmi | |
465 | ---------- | |
466 | ||
9cb805fd | 467 | Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64). |
a4046664 LJ |
468 | |
469 | Arguments: None. | |
470 | ||
471 | Example: | |
472 | ||
473 | -> { "execute": "inject-nmi" } | |
474 | <- { "return": {} } | |
475 | ||
de253f14 | 476 | Note: inject-nmi fails when the guest doesn't support injecting. |
a4046664 | 477 | |
1f590cf9 LL |
478 | EQMP |
479 | ||
480 | { | |
3949e594 | 481 | .name = "ringbuf-write", |
82e59a67 | 482 | .args_type = "device:s,data:s,format:s?", |
1f590cf9 LL |
483 | }, |
484 | ||
485 | SQMP | |
3949e594 | 486 | ringbuf-write |
1f590cf9 LL |
487 | ------------- |
488 | ||
3949e594 | 489 | Write to a ring buffer character device. |
1f590cf9 LL |
490 | |
491 | Arguments: | |
492 | ||
3949e594 MA |
493 | - "device": ring buffer character device name (json-string) |
494 | - "data": data to write (json-string) | |
495 | - "format": data format (json-string, optional) | |
496 | - Possible values: "utf8" (default), "base64" | |
1f590cf9 LL |
497 | |
498 | Example: | |
499 | ||
3949e594 MA |
500 | -> { "execute": "ringbuf-write", |
501 | "arguments": { "device": "foo", | |
1f590cf9 LL |
502 | "data": "abcdefgh", |
503 | "format": "utf8" } } | |
504 | <- { "return": {} } | |
505 | ||
49b6d722 LL |
506 | EQMP |
507 | ||
508 | { | |
3949e594 | 509 | .name = "ringbuf-read", |
49b6d722 | 510 | .args_type = "device:s,size:i,format:s?", |
49b6d722 LL |
511 | }, |
512 | ||
513 | SQMP | |
3949e594 | 514 | ringbuf-read |
49b6d722 LL |
515 | ------------- |
516 | ||
3949e594 | 517 | Read from a ring buffer character device. |
49b6d722 LL |
518 | |
519 | Arguments: | |
520 | ||
3949e594 MA |
521 | - "device": ring buffer character device name (json-string) |
522 | - "size": how many bytes to read at most (json-int) | |
523 | - Number of data bytes, not number of characters in encoded data | |
524 | - "format": data format (json-string, optional) | |
525 | - Possible values: "utf8" (default), "base64" | |
526 | - Naturally, format "utf8" works only when the ring buffer | |
527 | contains valid UTF-8 text. Invalid UTF-8 sequences get | |
528 | replaced. Bug: replacement doesn't work. Bug: can screw | |
529 | up on encountering NUL characters, after the ring buffer | |
530 | lost data, and when reading stops because the size limit | |
531 | is reached. | |
49b6d722 LL |
532 | |
533 | Example: | |
534 | ||
3949e594 MA |
535 | -> { "execute": "ringbuf-read", |
536 | "arguments": { "device": "foo", | |
49b6d722 LL |
537 | "size": 1000, |
538 | "format": "utf8" } } | |
3ab651fc | 539 | <- {"return": "abcdefgh"} |
49b6d722 | 540 | |
a7ae8355 SS |
541 | EQMP |
542 | ||
543 | { | |
544 | .name = "xen-save-devices-state", | |
545 | .args_type = "filename:F", | |
a7ae8355 SS |
546 | }, |
547 | ||
548 | SQMP | |
549 | xen-save-devices-state | |
550 | ------- | |
551 | ||
552 | Save the state of all devices to file. The RAM and the block devices | |
553 | of the VM are not saved by this command. | |
554 | ||
555 | Arguments: | |
556 | ||
557 | - "filename": the file to save the state of the devices to as binary | |
558 | data. See xen-save-devices-state.txt for a description of the binary | |
559 | format. | |
560 | ||
561 | Example: | |
562 | ||
563 | -> { "execute": "xen-save-devices-state", | |
564 | "arguments": { "filename": "/tmp/save" } } | |
565 | <- { "return": {} } | |
566 | ||
88c16567 WC |
567 | EQMP |
568 | ||
569 | { | |
570 | .name = "xen-load-devices-state", | |
571 | .args_type = "filename:F", | |
88c16567 WC |
572 | }, |
573 | ||
574 | SQMP | |
575 | xen-load-devices-state | |
576 | ---------------------- | |
577 | ||
578 | Load the state of all devices from file. The RAM and the block devices | |
579 | of the VM are not loaded by this command. | |
580 | ||
581 | Arguments: | |
582 | ||
583 | - "filename": the file to load the state of the devices from as binary | |
584 | data. See xen-save-devices-state.txt for a description of the binary | |
585 | format. | |
586 | ||
587 | Example: | |
588 | ||
589 | -> { "execute": "xen-load-devices-state", | |
590 | "arguments": { "filename": "/tmp/resume" } } | |
591 | <- { "return": {} } | |
592 | ||
39f42439 AP |
593 | EQMP |
594 | ||
595 | { | |
596 | .name = "xen-set-global-dirty-log", | |
597 | .args_type = "enable:b", | |
39f42439 AP |
598 | }, |
599 | ||
600 | SQMP | |
601 | xen-set-global-dirty-log | |
602 | ------- | |
603 | ||
604 | Enable or disable the global dirty log mode. | |
605 | ||
606 | Arguments: | |
607 | ||
608 | - "enable": Enable it or disable it. | |
609 | ||
610 | Example: | |
611 | ||
612 | -> { "execute": "xen-set-global-dirty-log", | |
613 | "arguments": { "enable": true } } | |
614 | <- { "return": {} } | |
615 | ||
82a56f0d LC |
616 | EQMP |
617 | ||
618 | { | |
619 | .name = "migrate", | |
620 | .args_type = "detach:-d,blk:-b,inc:-i,uri:s", | |
82a56f0d LC |
621 | }, |
622 | ||
623 | SQMP | |
624 | migrate | |
625 | ------- | |
626 | ||
627 | Migrate to URI. | |
628 | ||
629 | Arguments: | |
630 | ||
631 | - "blk": block migration, full disk copy (json-bool, optional) | |
632 | - "inc": incremental disk copy (json-bool, optional) | |
633 | - "uri": Destination URI (json-string) | |
634 | ||
635 | Example: | |
636 | ||
637 | -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } | |
638 | <- { "return": {} } | |
639 | ||
640 | Notes: | |
641 | ||
642 | (1) The 'query-migrate' command should be used to check migration's progress | |
643 | and final result (this information is provided by the 'status' member) | |
644 | (2) All boolean arguments default to false | |
645 | (3) The user Monitor's "detach" argument is invalid in QMP and should not | |
646 | be used | |
647 | ||
648 | EQMP | |
649 | ||
650 | { | |
651 | .name = "migrate_cancel", | |
652 | .args_type = "", | |
82a56f0d LC |
653 | }, |
654 | ||
655 | SQMP | |
656 | migrate_cancel | |
657 | -------------- | |
658 | ||
659 | Cancel the current migration. | |
660 | ||
661 | Arguments: None. | |
662 | ||
663 | Example: | |
664 | ||
665 | -> { "execute": "migrate_cancel" } | |
666 | <- { "return": {} } | |
667 | ||
9e1ba4cc | 668 | EQMP |
bf1ae1f4 DDAG |
669 | |
670 | { | |
671 | .name = "migrate-incoming", | |
672 | .args_type = "uri:s", | |
bf1ae1f4 DDAG |
673 | }, |
674 | ||
675 | SQMP | |
676 | migrate-incoming | |
677 | ---------------- | |
678 | ||
679 | Continue an incoming migration | |
680 | ||
681 | Arguments: | |
682 | ||
683 | - "uri": Source/listening URI (json-string) | |
684 | ||
685 | Example: | |
686 | ||
687 | -> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } } | |
688 | <- { "return": {} } | |
689 | ||
690 | Notes: | |
691 | ||
692 | (1) QEMU must be started with -incoming defer to allow migrate-incoming to | |
693 | be used | |
4aab6282 | 694 | (2) The uri format is the same as for -incoming |
bf1ae1f4 DDAG |
695 | |
696 | EQMP | |
697 | { | |
9e1ba4cc OW |
698 | .name = "migrate-set-cache-size", |
699 | .args_type = "value:o", | |
9e1ba4cc OW |
700 | }, |
701 | ||
702 | SQMP | |
703 | migrate-set-cache-size | |
817c6045 | 704 | ---------------------- |
9e1ba4cc OW |
705 | |
706 | Set cache size to be used by XBZRLE migration, the cache size will be rounded | |
707 | down to the nearest power of 2 | |
708 | ||
709 | Arguments: | |
710 | ||
711 | - "value": cache size in bytes (json-int) | |
712 | ||
713 | Example: | |
714 | ||
715 | -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } } | |
716 | <- { "return": {} } | |
717 | ||
718 | EQMP | |
4886a1bc DDAG |
719 | { |
720 | .name = "migrate-start-postcopy", | |
721 | .args_type = "", | |
4886a1bc DDAG |
722 | }, |
723 | ||
724 | SQMP | |
725 | migrate-start-postcopy | |
726 | ---------------------- | |
727 | ||
728 | Switch an in-progress migration to postcopy mode. Ignored after the end of | |
729 | migration (or once already in postcopy). | |
730 | ||
731 | Example: | |
732 | -> { "execute": "migrate-start-postcopy" } | |
733 | <- { "return": {} } | |
734 | ||
735 | EQMP | |
736 | ||
9e1ba4cc OW |
737 | { |
738 | .name = "query-migrate-cache-size", | |
739 | .args_type = "", | |
9e1ba4cc OW |
740 | }, |
741 | ||
742 | SQMP | |
743 | query-migrate-cache-size | |
817c6045 | 744 | ------------------------ |
9e1ba4cc OW |
745 | |
746 | Show cache size to be used by XBZRLE migration | |
747 | ||
748 | returns a json-object with the following information: | |
749 | - "size" : json-int | |
750 | ||
751 | Example: | |
752 | ||
753 | -> { "execute": "query-migrate-cache-size" } | |
754 | <- { "return": 67108864 } | |
755 | ||
82a56f0d LC |
756 | EQMP |
757 | ||
758 | { | |
759 | .name = "migrate_set_speed", | |
3a019b6e | 760 | .args_type = "value:o", |
82a56f0d LC |
761 | }, |
762 | ||
e866e239 | 763 | SQMP |
ff73edf5 JS |
764 | migrate_set_speed |
765 | ----------------- | |
e866e239 | 766 | |
ff73edf5 | 767 | Set maximum speed for migrations. |
e866e239 GH |
768 | |
769 | Arguments: | |
770 | ||
ff73edf5 | 771 | - "value": maximum speed, in bytes per second (json-int) |
e866e239 GH |
772 | |
773 | Example: | |
774 | ||
ff73edf5 | 775 | -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } |
e866e239 GH |
776 | <- { "return": {} } |
777 | ||
778 | EQMP | |
779 | ||
780 | { | |
ff73edf5 JS |
781 | .name = "migrate_set_downtime", |
782 | .args_type = "value:T", | |
e866e239 GH |
783 | }, |
784 | ||
82a56f0d | 785 | SQMP |
ff73edf5 JS |
786 | migrate_set_downtime |
787 | -------------------- | |
82a56f0d | 788 | |
ff73edf5 | 789 | Set maximum tolerated downtime (in seconds) for migrations. |
82a56f0d LC |
790 | |
791 | Arguments: | |
792 | ||
ff73edf5 | 793 | - "value": maximum downtime (json-number) |
82a56f0d LC |
794 | |
795 | Example: | |
796 | ||
ff73edf5 | 797 | -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } } |
82a56f0d LC |
798 | <- { "return": {} } |
799 | ||
800 | EQMP | |
801 | ||
802 | { | |
ff73edf5 JS |
803 | .name = "client_migrate_info", |
804 | .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?", | |
805 | .params = "protocol hostname port tls-port cert-subject", | |
13cadefb | 806 | .help = "set migration information for remote display", |
82a56f0d LC |
807 | }, |
808 | ||
809 | SQMP | |
ff73edf5 | 810 | client_migrate_info |
13cadefb | 811 | ------------------- |
82a56f0d | 812 | |
13cadefb MA |
813 | Set migration information for remote display. This makes the server |
814 | ask the client to automatically reconnect using the new parameters | |
815 | once migration finished successfully. Only implemented for SPICE. | |
82a56f0d LC |
816 | |
817 | Arguments: | |
818 | ||
13cadefb | 819 | - "protocol": must be "spice" (json-string) |
ff73edf5 | 820 | - "hostname": migration target hostname (json-string) |
13cadefb | 821 | - "port": spice tcp port for plaintext channels (json-int, optional) |
ff73edf5 JS |
822 | - "tls-port": spice tcp port for tls-secured channels (json-int, optional) |
823 | - "cert-subject": server certificate subject (json-string, optional) | |
82a56f0d LC |
824 | |
825 | Example: | |
826 | ||
ff73edf5 JS |
827 | -> { "execute": "client_migrate_info", |
828 | "arguments": { "protocol": "spice", | |
829 | "hostname": "virt42.lab.kraxel.org", | |
830 | "port": 1234 } } | |
82a56f0d LC |
831 | <- { "return": {} } |
832 | ||
783e9b48 WC |
833 | EQMP |
834 | ||
835 | { | |
836 | .name = "dump-guest-memory", | |
228de9cf PX |
837 | .args_type = "paging:b,protocol:s,detach:b?,begin:i?,end:i?,format:s?", |
838 | .params = "-p protocol [-d] [begin] [length] [format]", | |
783e9b48 | 839 | .help = "dump guest memory to file", |
783e9b48 WC |
840 | }, |
841 | ||
842 | SQMP | |
843 | dump | |
844 | ||
845 | ||
846 | Dump guest memory to file. The file can be processed with crash or gdb. | |
847 | ||
848 | Arguments: | |
849 | ||
850 | - "paging": do paging to get guest's memory mapping (json-bool) | |
851 | - "protocol": destination file(started with "file:") or destination file | |
852 | descriptor (started with "fd:") (json-string) | |
228de9cf | 853 | - "detach": if specified, command will return immediately, without waiting |
39ba2ea6 PX |
854 | for the dump to finish. The user can track progress using |
855 | "query-dump". (json-bool) | |
783e9b48 WC |
856 | - "begin": the starting physical address. It's optional, and should be specified |
857 | with length together (json-int) | |
858 | - "length": the memory size, in bytes. It's optional, and should be specified | |
859 | with begin together (json-int) | |
b53ccc30 QN |
860 | - "format": the format of guest memory dump. It's optional, and can be |
861 | elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will | |
862 | conflict with paging and filter, ie. begin and length (json-string) | |
783e9b48 WC |
863 | |
864 | Example: | |
865 | ||
866 | -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } } | |
867 | <- { "return": {} } | |
868 | ||
869 | Notes: | |
870 | ||
871 | (1) All boolean arguments default to false | |
872 | ||
7d6dc7f3 QN |
873 | EQMP |
874 | ||
875 | { | |
876 | .name = "query-dump-guest-memory-capability", | |
877 | .args_type = "", | |
7d6dc7f3 QN |
878 | }, |
879 | ||
880 | SQMP | |
881 | query-dump-guest-memory-capability | |
882 | ---------- | |
883 | ||
884 | Show available formats for 'dump-guest-memory' | |
885 | ||
886 | Example: | |
887 | ||
888 | -> { "execute": "query-dump-guest-memory-capability" } | |
889 | <- { "return": { "formats": | |
890 | ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } | |
891 | ||
39ba2ea6 PX |
892 | EQMP |
893 | ||
894 | { | |
895 | .name = "query-dump", | |
896 | .args_type = "", | |
897 | .params = "", | |
898 | .help = "query background dump status", | |
39ba2ea6 PX |
899 | }, |
900 | ||
901 | SQMP | |
902 | query-dump | |
903 | ---------- | |
904 | ||
905 | Query background dump status. | |
906 | ||
907 | Arguments: None. | |
908 | ||
909 | Example: | |
910 | ||
911 | -> { "execute": "query-dump" } | |
912 | <- { "return": { "status": "active", "completed": 1024000, | |
913 | "total": 2048000 } } | |
914 | ||
7ee0c3e3 JH |
915 | EQMP |
916 | ||
917 | #if defined TARGET_S390X | |
918 | { | |
919 | .name = "dump-skeys", | |
920 | .args_type = "filename:F", | |
7ee0c3e3 JH |
921 | }, |
922 | #endif | |
923 | ||
924 | SQMP | |
925 | dump-skeys | |
926 | ---------- | |
927 | ||
928 | Save guest storage keys to file. | |
929 | ||
930 | Arguments: | |
931 | ||
932 | - "filename": file path (json-string) | |
933 | ||
934 | Example: | |
935 | ||
936 | -> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } } | |
937 | <- { "return": {} } | |
938 | ||
82a56f0d LC |
939 | EQMP |
940 | ||
941 | { | |
942 | .name = "netdev_add", | |
943 | .args_type = "netdev:O", | |
82a56f0d LC |
944 | }, |
945 | ||
946 | SQMP | |
947 | netdev_add | |
948 | ---------- | |
949 | ||
950 | Add host network device. | |
951 | ||
952 | Arguments: | |
953 | ||
954 | - "type": the device type, "tap", "user", ... (json-string) | |
955 | - "id": the device's ID, must be unique (json-string) | |
956 | - device options | |
957 | ||
958 | Example: | |
959 | ||
b8a98326 MA |
960 | -> { "execute": "netdev_add", |
961 | "arguments": { "type": "user", "id": "netdev1", | |
962 | "dnssearch": "example.org" } } | |
82a56f0d LC |
963 | <- { "return": {} } |
964 | ||
af347aa5 | 965 | Note: The supported device options are the same ones supported by the '-netdev' |
82a56f0d LC |
966 | command-line argument, which are listed in the '-help' output or QEMU's |
967 | manual | |
968 | ||
969 | EQMP | |
970 | ||
971 | { | |
972 | .name = "netdev_del", | |
973 | .args_type = "id:s", | |
82a56f0d LC |
974 | }, |
975 | ||
976 | SQMP | |
977 | netdev_del | |
978 | ---------- | |
979 | ||
980 | Remove host network device. | |
981 | ||
982 | Arguments: | |
983 | ||
984 | - "id": the device's ID, must be unique (json-string) | |
985 | ||
986 | Example: | |
987 | ||
988 | -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } } | |
989 | <- { "return": {} } | |
990 | ||
6d4a2b3a | 991 | |
cff8b2c6 PB |
992 | EQMP |
993 | ||
994 | { | |
995 | .name = "object-add", | |
996 | .args_type = "qom-type:s,id:s,props:q?", | |
cff8b2c6 PB |
997 | }, |
998 | ||
999 | SQMP | |
1000 | object-add | |
1001 | ---------- | |
1002 | ||
1003 | Create QOM object. | |
1004 | ||
1005 | Arguments: | |
1006 | ||
1007 | - "qom-type": the object's QOM type, i.e. the class name (json-string) | |
1008 | - "id": the object's ID, must be unique (json-string) | |
1009 | - "props": a dictionary of object property values (optional, json-dict) | |
1010 | ||
1011 | Example: | |
1012 | ||
1013 | -> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1", | |
1014 | "props": { "filename": "/dev/hwrng" } } } | |
1015 | <- { "return": {} } | |
1016 | ||
6d4a2b3a CH |
1017 | EQMP |
1018 | ||
ab2d0531 PB |
1019 | { |
1020 | .name = "object-del", | |
1021 | .args_type = "id:s", | |
ab2d0531 PB |
1022 | }, |
1023 | ||
1024 | SQMP | |
1025 | object-del | |
1026 | ---------- | |
1027 | ||
1028 | Remove QOM object. | |
1029 | ||
1030 | Arguments: | |
1031 | ||
1032 | - "id": the object's ID (json-string) | |
1033 | ||
1034 | Example: | |
1035 | ||
1036 | -> { "execute": "object-del", "arguments": { "id": "rng1" } } | |
1037 | <- { "return": {} } | |
1038 | ||
1039 | ||
1040 | EQMP | |
1041 | ||
1042 | ||
6d4a2b3a CH |
1043 | { |
1044 | .name = "block_resize", | |
3b1dbd11 | 1045 | .args_type = "device:s?,node-name:s?,size:o", |
6d4a2b3a CH |
1046 | }, |
1047 | ||
1048 | SQMP | |
1049 | block_resize | |
1050 | ------------ | |
1051 | ||
1052 | Resize a block image while a guest is running. | |
1053 | ||
1054 | Arguments: | |
1055 | ||
1056 | - "device": the device's ID, must be unique (json-string) | |
3b1dbd11 | 1057 | - "node-name": the node name in the block driver state graph (json-string) |
6d4a2b3a CH |
1058 | - "size": new size |
1059 | ||
1060 | Example: | |
1061 | ||
1062 | -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } } | |
1063 | <- { "return": {} } | |
1064 | ||
d967b2f1 JS |
1065 | EQMP |
1066 | ||
12bd451f | 1067 | { |
db58f9c0 | 1068 | .name = "block-stream", |
2323322e | 1069 | .args_type = "job-id:s?,device:B,base:s?,speed:o?,backing-file:s?,on-error:s?", |
12bd451f SH |
1070 | }, |
1071 | ||
ec683d60 SH |
1072 | SQMP |
1073 | block-stream | |
1074 | ------------ | |
1075 | ||
1076 | Copy data from a backing file into a block device. | |
1077 | ||
1078 | Arguments: | |
1079 | ||
2323322e AG |
1080 | - "job-id": Identifier for the newly-created block job. If omitted, |
1081 | the device name will be used. (json-string, optional) | |
b6c1bae5 | 1082 | - "device": The device name or node-name of a root node (json-string) |
ec683d60 SH |
1083 | - "base": The file name of the backing image above which copying starts |
1084 | (json-string, optional) | |
1085 | - "backing-file": The backing file string to write into the active layer. This | |
1086 | filename is not validated. | |
1087 | ||
1088 | If a pathname string is such that it cannot be resolved by | |
1089 | QEMU, that means that subsequent QMP or HMP commands must use | |
1090 | node-names for the image in question, as filename lookup | |
1091 | methods will fail. | |
1092 | ||
1093 | If not specified, QEMU will automatically determine the | |
1094 | backing file string to use, or error out if there is no | |
1095 | obvious choice. Care should be taken when specifying the | |
1096 | string, to specify a valid filename or protocol. | |
1097 | (json-string, optional) (Since 2.1) | |
1098 | - "speed": the maximum speed, in bytes per second (json-int, optional) | |
1099 | - "on-error": the action to take on an error (default 'report'). 'stop' and | |
1100 | 'enospc' can only be used if the block device supports io-status. | |
1101 | (json-string, optional) (Since 2.1) | |
1102 | ||
1103 | Example: | |
1104 | ||
1105 | -> { "execute": "block-stream", "arguments": { "device": "virtio0", | |
1106 | "base": "/tmp/master.qcow2" } } | |
1107 | <- { "return": {} } | |
1108 | ||
1109 | EQMP | |
1110 | ||
ed61fc10 JC |
1111 | { |
1112 | .name = "block-commit", | |
fd62c609 | 1113 | .args_type = "job-id:s?,device:B,base:s?,top:s?,backing-file:s?,speed:o?", |
ed61fc10 JC |
1114 | }, |
1115 | ||
37222900 JC |
1116 | SQMP |
1117 | block-commit | |
1118 | ------------ | |
1119 | ||
1120 | Live commit of data from overlay image nodes into backing nodes - i.e., writes | |
1121 | data between 'top' and 'base' into 'base'. | |
1122 | ||
1123 | Arguments: | |
1124 | ||
fd62c609 AG |
1125 | - "job-id": Identifier for the newly-created block job. If omitted, |
1126 | the device name will be used. (json-string, optional) | |
1d13b167 | 1127 | - "device": The device name or node-name of a root node (json-string) |
37222900 JC |
1128 | - "base": The file name of the backing image to write data into. |
1129 | If not specified, this is the deepest backing image | |
1130 | (json-string, optional) | |
1131 | - "top": The file name of the backing image within the image chain, | |
7676e2c5 JC |
1132 | which contains the topmost data to be committed down. If |
1133 | not specified, this is the active layer. (json-string, optional) | |
37222900 | 1134 | |
54e26900 JC |
1135 | - backing-file: The backing file string to write into the overlay |
1136 | image of 'top'. If 'top' is the active layer, | |
1137 | specifying a backing file string is an error. This | |
1138 | filename is not validated. | |
1139 | ||
1140 | If a pathname string is such that it cannot be | |
1141 | resolved by QEMU, that means that subsequent QMP or | |
1142 | HMP commands must use node-names for the image in | |
1143 | question, as filename lookup methods will fail. | |
1144 | ||
1145 | If not specified, QEMU will automatically determine | |
1146 | the backing file string to use, or error out if | |
1147 | there is no obvious choice. Care should be taken | |
1148 | when specifying the string, to specify a valid | |
1149 | filename or protocol. | |
1150 | (json-string, optional) (Since 2.1) | |
1151 | ||
37222900 JC |
1152 | If top == base, that is an error. |
1153 | If top == active, the job will not be completed by itself, | |
1154 | user needs to complete the job with the block-job-complete | |
1155 | command after getting the ready event. (Since 2.0) | |
1156 | ||
1157 | If the base image is smaller than top, then the base image | |
1158 | will be resized to be the same size as top. If top is | |
1159 | smaller than the base image, the base will not be | |
1160 | truncated. If you want the base image size to match the | |
1161 | size of the smaller top, you can safely truncate it | |
1162 | yourself once the commit operation successfully completes. | |
1163 | (json-string) | |
1164 | - "speed": the maximum speed, in bytes per second (json-int, optional) | |
1165 | ||
1166 | ||
1167 | Example: | |
1168 | ||
1169 | -> { "execute": "block-commit", "arguments": { "device": "virtio0", | |
1170 | "top": "/tmp/snap1.qcow2" } } | |
1171 | <- { "return": {} } | |
1172 | ||
1173 | EQMP | |
1174 | ||
99a9addf SH |
1175 | { |
1176 | .name = "drive-backup", | |
70559d49 | 1177 | .args_type = "job-id:s?,sync:s,device:B,target:s,speed:i?,mode:s?," |
13b9414b PB |
1178 | "format:s?,bitmap:s?,compress:b?," |
1179 | "on-source-error:s?,on-target-error:s?", | |
99a9addf SH |
1180 | }, |
1181 | ||
1182 | SQMP | |
1183 | drive-backup | |
1184 | ------------ | |
1185 | ||
1186 | Start a point-in-time copy of a block device to a new destination. The | |
1187 | status of ongoing drive-backup operations can be checked with | |
1188 | query-block-jobs where the BlockJobInfo.type field has the value 'backup'. | |
1189 | The operation can be stopped before it has completed using the | |
1190 | block-job-cancel command. | |
1191 | ||
1192 | Arguments: | |
1193 | ||
70559d49 AG |
1194 | - "job-id": Identifier for the newly-created block job. If omitted, |
1195 | the device name will be used. (json-string, optional) | |
b7e4fa22 | 1196 | - "device": the device name or node-name of a root node which should be copied. |
99a9addf SH |
1197 | (json-string) |
1198 | - "target": the target of the new image. If the file exists, or if it is a | |
1199 | device, the existing file/device will be used as the new | |
1200 | destination. If it does not exist, a new file will be created. | |
1201 | (json-string) | |
1202 | - "format": the format of the new destination, default is to probe if 'mode' is | |
1203 | 'existing', else the format of the source | |
1204 | (json-string, optional) | |
b53169ea SH |
1205 | - "sync": what parts of the disk image should be copied to the destination; |
1206 | possibilities include "full" for all the disk, "top" for only the sectors | |
4b80ab2b | 1207 | allocated in the topmost image, "incremental" for only the dirty sectors in |
d58d8453 | 1208 | the bitmap, or "none" to only replicate new I/O (MirrorSyncMode). |
4b80ab2b JS |
1209 | - "bitmap": dirty bitmap name for sync==incremental. Must be present if sync |
1210 | is "incremental", must NOT be present otherwise. | |
99a9addf SH |
1211 | - "mode": whether and how QEMU should create a new image |
1212 | (NewImageMode, optional, default 'absolute-paths') | |
1213 | - "speed": the maximum speed, in bytes per second (json-int, optional) | |
13b9414b PB |
1214 | - "compress": true to compress data, if the target format supports it. |
1215 | (json-bool, optional, default false) | |
99a9addf SH |
1216 | - "on-source-error": the action to take on an error on the source, default |
1217 | 'report'. 'stop' and 'enospc' can only be used | |
1218 | if the block device supports io-status. | |
1219 | (BlockdevOnError, optional) | |
1220 | - "on-target-error": the action to take on an error on the target, default | |
1221 | 'report' (no limitations, since this applies to | |
1222 | a different block device than device). | |
1223 | (BlockdevOnError, optional) | |
1224 | ||
1225 | Example: | |
1226 | -> { "execute": "drive-backup", "arguments": { "device": "drive0", | |
fc5d3f84 | 1227 | "sync": "full", |
99a9addf SH |
1228 | "target": "backup.img" } } |
1229 | <- { "return": {} } | |
c29c1dd3 FZ |
1230 | |
1231 | EQMP | |
1232 | ||
1233 | { | |
1234 | .name = "blockdev-backup", | |
3b7b1236 | 1235 | .args_type = "job-id:s?,sync:s,device:B,target:B,speed:i?,compress:b?," |
c29c1dd3 | 1236 | "on-source-error:s?,on-target-error:s?", |
c29c1dd3 FZ |
1237 | }, |
1238 | ||
1239 | SQMP | |
1240 | blockdev-backup | |
1241 | --------------- | |
1242 | ||
1243 | The device version of drive-backup: this command takes an existing named device | |
1244 | as backup target. | |
1245 | ||
1246 | Arguments: | |
1247 | ||
70559d49 AG |
1248 | - "job-id": Identifier for the newly-created block job. If omitted, |
1249 | the device name will be used. (json-string, optional) | |
cef34eeb | 1250 | - "device": the device name or node-name of a root node which should be copied. |
c29c1dd3 FZ |
1251 | (json-string) |
1252 | - "target": the name of the backup target device. (json-string) | |
1253 | - "sync": what parts of the disk image should be copied to the destination; | |
1254 | possibilities include "full" for all the disk, "top" for only the | |
1255 | sectors allocated in the topmost image, or "none" to only replicate | |
1256 | new I/O (MirrorSyncMode). | |
1257 | - "speed": the maximum speed, in bytes per second (json-int, optional) | |
3b7b1236 PB |
1258 | - "compress": true to compress data, if the target format supports it. |
1259 | (json-bool, optional, default false) | |
c29c1dd3 FZ |
1260 | - "on-source-error": the action to take on an error on the source, default |
1261 | 'report'. 'stop' and 'enospc' can only be used | |
1262 | if the block device supports io-status. | |
1263 | (BlockdevOnError, optional) | |
1264 | - "on-target-error": the action to take on an error on the target, default | |
1265 | 'report' (no limitations, since this applies to | |
1266 | a different block device than device). | |
1267 | (BlockdevOnError, optional) | |
1268 | ||
1269 | Example: | |
1270 | -> { "execute": "blockdev-backup", "arguments": { "device": "src-id", | |
1271 | "sync": "full", | |
1272 | "target": "tgt-id" } } | |
1273 | <- { "return": {} } | |
1274 | ||
99a9addf SH |
1275 | EQMP |
1276 | ||
2d47c6e9 | 1277 | { |
db58f9c0 | 1278 | .name = "block-job-set-speed", |
882ec7ce | 1279 | .args_type = "device:B,speed:o", |
2d47c6e9 SH |
1280 | }, |
1281 | ||
370521a1 | 1282 | { |
db58f9c0 | 1283 | .name = "block-job-cancel", |
6e37fb81 | 1284 | .args_type = "device:B,force:b?", |
370521a1 | 1285 | }, |
6e37fb81 PB |
1286 | { |
1287 | .name = "block-job-pause", | |
1288 | .args_type = "device:B", | |
6e37fb81 PB |
1289 | }, |
1290 | { | |
1291 | .name = "block-job-resume", | |
1292 | .args_type = "device:B", | |
6e37fb81 | 1293 | }, |
aeae883b PB |
1294 | { |
1295 | .name = "block-job-complete", | |
1296 | .args_type = "device:B", | |
aeae883b | 1297 | }, |
c186402c | 1298 | { |
52e7c241 | 1299 | .name = "transaction", |
94d16a64 | 1300 | .args_type = "actions:q,properties:q?", |
c186402c JC |
1301 | }, |
1302 | ||
1303 | SQMP | |
52e7c241 PB |
1304 | transaction |
1305 | ----------- | |
c186402c | 1306 | |
a910523a KC |
1307 | Atomically operate on one or more block devices. Operations that are |
1308 | currently supported: | |
1309 | ||
1310 | - drive-backup | |
1311 | - blockdev-backup | |
1312 | - blockdev-snapshot-sync | |
1313 | - blockdev-snapshot-internal-sync | |
1314 | - abort | |
1315 | - block-dirty-bitmap-add | |
1316 | - block-dirty-bitmap-clear | |
1317 | ||
1318 | Refer to the qemu/qapi-schema.json file for minimum required QEMU | |
1319 | versions for these operations. A list of dictionaries is accepted, | |
1320 | that contains the actions to be performed. If there is any failure | |
1321 | performing any of the operations, all operations for the group are | |
1322 | abandoned. | |
c186402c | 1323 | |
bbe86010 WX |
1324 | For external snapshots, the dictionary contains the device, the file to use for |
1325 | the new snapshot, and the format. The default format, if not specified, is | |
1326 | qcow2. | |
c186402c | 1327 | |
bc8b094f PB |
1328 | Each new snapshot defaults to being created by QEMU (wiping any |
1329 | contents if the file already exists), but it is also possible to reuse | |
1330 | an externally-created file. In the latter case, you should ensure that | |
1331 | the new image file has the same contents as the current one; QEMU cannot | |
1332 | perform any meaningful check. Typically this is achieved by using the | |
1333 | current image file as the backing file for the new image. | |
1334 | ||
bbe86010 WX |
1335 | On failure, the original disks pre-snapshot attempt will be used. |
1336 | ||
1337 | For internal snapshots, the dictionary contains the device and the snapshot's | |
1338 | name. If an internal snapshot matching name already exists, the request will | |
1339 | be rejected. Only some image formats support it, for example, qcow2, rbd, | |
1340 | and sheepdog. | |
1341 | ||
1342 | On failure, qemu will try delete the newly created internal snapshot in the | |
1343 | transaction. When an I/O error occurs during deletion, the user needs to fix | |
1344 | it later with qemu-img or other command. | |
1345 | ||
c186402c JC |
1346 | Arguments: |
1347 | ||
52e7c241 | 1348 | actions array: |
a910523a KC |
1349 | - "type": the operation to perform (json-string). Possible |
1350 | values: "drive-backup", "blockdev-backup", | |
1351 | "blockdev-snapshot-sync", | |
1352 | "blockdev-snapshot-internal-sync", | |
1353 | "abort", "block-dirty-bitmap-add", | |
1354 | "block-dirty-bitmap-clear" | |
52e7c241 PB |
1355 | - "data": a dictionary. The contents depend on the value |
1356 | of "type". When "type" is "blockdev-snapshot-sync": | |
1357 | - "device": device name to snapshot (json-string) | |
0901f67e | 1358 | - "node-name": graph node name to snapshot (json-string) |
52e7c241 | 1359 | - "snapshot-file": name of new image file (json-string) |
0901f67e | 1360 | - "snapshot-node-name": graph node name of the new snapshot (json-string) |
52e7c241 | 1361 | - "format": format of new image (json-string, optional) |
bc8b094f PB |
1362 | - "mode": whether and how QEMU should create the snapshot file |
1363 | (NewImageMode, optional, default "absolute-paths") | |
bbe86010 | 1364 | When "type" is "blockdev-snapshot-internal-sync": |
75dfd402 KW |
1365 | - "device": the device name or node-name of a root node to snapshot |
1366 | (json-string) | |
bbe86010 | 1367 | - "name": name of the new snapshot (json-string) |
c186402c JC |
1368 | |
1369 | Example: | |
1370 | ||
52e7c241 PB |
1371 | -> { "execute": "transaction", |
1372 | "arguments": { "actions": [ | |
cd0c5389 | 1373 | { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0", |
52e7c241 PB |
1374 | "snapshot-file": "/some/place/my-image", |
1375 | "format": "qcow2" } }, | |
cd0c5389 | 1376 | { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile", |
0901f67e BC |
1377 | "snapshot-file": "/some/place/my-image2", |
1378 | "snapshot-node-name": "node3432", | |
1379 | "mode": "existing", | |
1380 | "format": "qcow2" } }, | |
cd0c5389 | 1381 | { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1", |
52e7c241 | 1382 | "snapshot-file": "/some/place/my-image2", |
bc8b094f | 1383 | "mode": "existing", |
bbe86010 | 1384 | "format": "qcow2" } }, |
cd0c5389 | 1385 | { "type": "blockdev-snapshot-internal-sync", "data" : { |
bbe86010 WX |
1386 | "device": "ide-hd2", |
1387 | "name": "snapshot0" } } ] } } | |
c186402c JC |
1388 | <- { "return": {} } |
1389 | ||
341ebc2f JS |
1390 | EQMP |
1391 | ||
1392 | { | |
1393 | .name = "block-dirty-bitmap-add", | |
1394 | .args_type = "node:B,name:s,granularity:i?", | |
341ebc2f JS |
1395 | }, |
1396 | ||
1397 | SQMP | |
341ebc2f JS |
1398 | block-dirty-bitmap-add |
1399 | ---------------------- | |
1400 | Since 2.4 | |
1401 | ||
1402 | Create a dirty bitmap with a name on the device, and start tracking the writes. | |
1403 | ||
1404 | Arguments: | |
1405 | ||
1406 | - "node": device/node on which to create dirty bitmap (json-string) | |
1407 | - "name": name of the new dirty bitmap (json-string) | |
1408 | - "granularity": granularity to track writes with (int, optional) | |
1409 | ||
1410 | Example: | |
1411 | ||
1412 | -> { "execute": "block-dirty-bitmap-add", "arguments": { "node": "drive0", | |
1413 | "name": "bitmap0" } } | |
1414 | <- { "return": {} } | |
1415 | ||
1416 | EQMP | |
1417 | ||
1418 | { | |
1419 | .name = "block-dirty-bitmap-remove", | |
1420 | .args_type = "node:B,name:s", | |
341ebc2f JS |
1421 | }, |
1422 | ||
1423 | SQMP | |
341ebc2f JS |
1424 | block-dirty-bitmap-remove |
1425 | ------------------------- | |
1426 | Since 2.4 | |
1427 | ||
1428 | Stop write tracking and remove the dirty bitmap that was created with | |
1429 | block-dirty-bitmap-add. | |
1430 | ||
1431 | Arguments: | |
1432 | ||
1433 | - "node": device/node on which to remove dirty bitmap (json-string) | |
1434 | - "name": name of the dirty bitmap to remove (json-string) | |
1435 | ||
1436 | Example: | |
1437 | ||
1438 | -> { "execute": "block-dirty-bitmap-remove", "arguments": { "node": "drive0", | |
1439 | "name": "bitmap0" } } | |
1440 | <- { "return": {} } | |
1441 | ||
e74e6b78 JS |
1442 | EQMP |
1443 | ||
1444 | { | |
1445 | .name = "block-dirty-bitmap-clear", | |
1446 | .args_type = "node:B,name:s", | |
e74e6b78 JS |
1447 | }, |
1448 | ||
1449 | SQMP | |
e74e6b78 JS |
1450 | block-dirty-bitmap-clear |
1451 | ------------------------ | |
1452 | Since 2.4 | |
1453 | ||
1454 | Reset the dirty bitmap associated with a node so that an incremental backup | |
1455 | from this point in time forward will only backup clusters modified after this | |
1456 | clear operation. | |
1457 | ||
1458 | Arguments: | |
1459 | ||
1460 | - "node": device/node on which to remove dirty bitmap (json-string) | |
1461 | - "name": name of the dirty bitmap to remove (json-string) | |
1462 | ||
1463 | Example: | |
1464 | ||
1465 | -> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0", | |
1466 | "name": "bitmap0" } } | |
1467 | <- { "return": {} } | |
1468 | ||
c186402c | 1469 | EQMP |
370521a1 | 1470 | |
d967b2f1 JS |
1471 | { |
1472 | .name = "blockdev-snapshot-sync", | |
0901f67e | 1473 | .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?", |
d967b2f1 JS |
1474 | }, |
1475 | ||
1476 | SQMP | |
1477 | blockdev-snapshot-sync | |
1478 | ---------------------- | |
1479 | ||
1480 | Synchronous snapshot of a block device. snapshot-file specifies the | |
1481 | target of the new image. If the file exists, or if it is a device, the | |
1482 | snapshot will be created in the existing file/device. If does not | |
1483 | exist, a new file will be created. format specifies the format of the | |
1484 | snapshot image, default is qcow2. | |
1485 | ||
1486 | Arguments: | |
1487 | ||
1488 | - "device": device name to snapshot (json-string) | |
0901f67e | 1489 | - "node-name": graph node name to snapshot (json-string) |
d967b2f1 | 1490 | - "snapshot-file": name of new image file (json-string) |
0901f67e | 1491 | - "snapshot-node-name": graph node name of the new snapshot (json-string) |
6cc2a415 PB |
1492 | - "mode": whether and how QEMU should create the snapshot file |
1493 | (NewImageMode, optional, default "absolute-paths") | |
d967b2f1 JS |
1494 | - "format": format of new image (json-string, optional) |
1495 | ||
1496 | Example: | |
1497 | ||
7f3850c2 LC |
1498 | -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0", |
1499 | "snapshot-file": | |
1500 | "/some/place/my-image", | |
1501 | "format": "qcow2" } } | |
d967b2f1 JS |
1502 | <- { "return": {} } |
1503 | ||
43de7e2d AG |
1504 | EQMP |
1505 | ||
1506 | { | |
1507 | .name = "blockdev-snapshot", | |
1508 | .args_type = "node:s,overlay:s", | |
43de7e2d AG |
1509 | }, |
1510 | ||
1511 | SQMP | |
1512 | blockdev-snapshot | |
1513 | ----------------- | |
1514 | Since 2.5 | |
1515 | ||
1516 | Create a snapshot, by installing 'node' as the backing image of | |
1517 | 'overlay'. Additionally, if 'node' is associated with a block | |
1518 | device, the block device changes to using 'overlay' as its new active | |
1519 | image. | |
1520 | ||
1521 | Arguments: | |
1522 | ||
1523 | - "node": device that will have a snapshot created (json-string) | |
1524 | - "overlay": device that will have 'node' as its backing image (json-string) | |
1525 | ||
1526 | Example: | |
1527 | ||
1528 | -> { "execute": "blockdev-add", | |
1529 | "arguments": { "options": { "driver": "qcow2", | |
1530 | "node-name": "node1534", | |
1531 | "file": { "driver": "file", | |
1532 | "filename": "hd1.qcow2" }, | |
1533 | "backing": "" } } } | |
1534 | ||
1535 | <- { "return": {} } | |
1536 | ||
1537 | -> { "execute": "blockdev-snapshot", "arguments": { "node": "ide-hd0", | |
1538 | "overlay": "node1534" } } | |
1539 | <- { "return": {} } | |
1540 | ||
f323bc9e WX |
1541 | EQMP |
1542 | ||
1543 | { | |
1544 | .name = "blockdev-snapshot-internal-sync", | |
1545 | .args_type = "device:B,name:s", | |
f323bc9e WX |
1546 | }, |
1547 | ||
1548 | SQMP | |
1549 | blockdev-snapshot-internal-sync | |
1550 | ------------------------------- | |
1551 | ||
1552 | Synchronously take an internal snapshot of a block device when the format of | |
1553 | image used supports it. If the name is an empty string, or a snapshot with | |
1554 | name already exists, the operation will fail. | |
1555 | ||
1556 | Arguments: | |
1557 | ||
75dfd402 KW |
1558 | - "device": the device name or node-name of a root node to snapshot |
1559 | (json-string) | |
f323bc9e WX |
1560 | - "name": name of the new snapshot (json-string) |
1561 | ||
1562 | Example: | |
1563 | ||
1564 | -> { "execute": "blockdev-snapshot-internal-sync", | |
1565 | "arguments": { "device": "ide-hd0", | |
1566 | "name": "snapshot0" } | |
1567 | } | |
1568 | <- { "return": {} } | |
1569 | ||
44e3e053 WX |
1570 | EQMP |
1571 | ||
1572 | { | |
1573 | .name = "blockdev-snapshot-delete-internal-sync", | |
1574 | .args_type = "device:B,id:s?,name:s?", | |
44e3e053 WX |
1575 | }, |
1576 | ||
1577 | SQMP | |
1578 | blockdev-snapshot-delete-internal-sync | |
1579 | -------------------------------------- | |
1580 | ||
1581 | Synchronously delete an internal snapshot of a block device when the format of | |
1582 | image used supports it. The snapshot is identified by name or id or both. One | |
1583 | of name or id is required. If the snapshot is not found, the operation will | |
1584 | fail. | |
1585 | ||
1586 | Arguments: | |
1587 | ||
2dfb4c03 | 1588 | - "device": the device name or node-name of a root node (json-string) |
44e3e053 WX |
1589 | - "id": ID of the snapshot (json-string, optional) |
1590 | - "name": name of the snapshot (json-string, optional) | |
1591 | ||
1592 | Example: | |
1593 | ||
1594 | -> { "execute": "blockdev-snapshot-delete-internal-sync", | |
1595 | "arguments": { "device": "ide-hd0", | |
1596 | "name": "snapshot0" } | |
1597 | } | |
1598 | <- { "return": { | |
1599 | "id": "1", | |
1600 | "name": "snapshot0", | |
1601 | "vm-state-size": 0, | |
1602 | "date-sec": 1000012, | |
1603 | "date-nsec": 10, | |
1604 | "vm-clock-sec": 100, | |
1605 | "vm-clock-nsec": 20 | |
1606 | } | |
1607 | } | |
1608 | ||
d9b902db PB |
1609 | EQMP |
1610 | ||
1611 | { | |
1612 | .name = "drive-mirror", | |
71aa9867 AG |
1613 | .args_type = "job-id:s?,sync:s,device:B,target:s,speed:i?,mode:s?," |
1614 | "format:s?,node-name:s?,replaces:s?," | |
eee13dfe | 1615 | "on-source-error:s?,on-target-error:s?," |
0fc9f8ea | 1616 | "unmap:b?," |
08e4ed6c | 1617 | "granularity:i?,buf-size:i?", |
d9b902db PB |
1618 | }, |
1619 | ||
1620 | SQMP | |
1621 | drive-mirror | |
1622 | ------------ | |
1623 | ||
1624 | Start mirroring a block device's writes to a new destination. target | |
1625 | specifies the target of the new image. If the file exists, or if it is | |
1626 | a device, it will be used as the new destination for writes. If it does not | |
1627 | exist, a new file will be created. format specifies the format of the | |
1628 | mirror image, default is to probe if mode='existing', else the format | |
1629 | of the source. | |
1630 | ||
1631 | Arguments: | |
1632 | ||
71aa9867 AG |
1633 | - "job-id": Identifier for the newly-created block job. If omitted, |
1634 | the device name will be used. (json-string, optional) | |
0524e93a KW |
1635 | - "device": the device name or node-name of a root node whose writes should be |
1636 | mirrored. (json-string) | |
d9b902db PB |
1637 | - "target": name of new image file (json-string) |
1638 | - "format": format of new image (json-string, optional) | |
4c828dc6 BC |
1639 | - "node-name": the name of the new block driver state in the node graph |
1640 | (json-string, optional) | |
09158f00 BC |
1641 | - "replaces": the block driver node name to replace when finished |
1642 | (json-string, optional) | |
d9b902db PB |
1643 | - "mode": how an image file should be created into the target |
1644 | file/device (NewImageMode, optional, default 'absolute-paths') | |
1645 | - "speed": maximum speed of the streaming job, in bytes per second | |
1646 | (json-int) | |
eee13dfe | 1647 | - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional) |
df92562e | 1648 | - "buf-size": maximum amount of data in flight from source to target, in bytes |
08e4ed6c | 1649 | (json-int, default 10M) |
d9b902db PB |
1650 | - "sync": what parts of the disk image should be copied to the destination; |
1651 | possibilities include "full" for all the disk, "top" for only the sectors | |
1652 | allocated in the topmost image, or "none" to only replicate new I/O | |
1653 | (MirrorSyncMode). | |
b952b558 PB |
1654 | - "on-source-error": the action to take on an error on the source |
1655 | (BlockdevOnError, default 'report') | |
1656 | - "on-target-error": the action to take on an error on the target | |
1657 | (BlockdevOnError, default 'report') | |
0fc9f8ea FZ |
1658 | - "unmap": whether the target sectors should be discarded where source has only |
1659 | zeroes. (json-bool, optional, default true) | |
b952b558 | 1660 | |
eee13dfe PB |
1661 | The default value of the granularity is the image cluster size clamped |
1662 | between 4096 and 65536, if the image format defines one. If the format | |
1663 | does not define a cluster size, the default value of the granularity | |
1664 | is 65536. | |
d9b902db PB |
1665 | |
1666 | ||
1667 | Example: | |
1668 | ||
1669 | -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0", | |
1670 | "target": "/some/place/my-image", | |
1671 | "sync": "full", | |
1672 | "format": "qcow2" } } | |
1673 | <- { "return": {} } | |
1674 | ||
fa40e656 JC |
1675 | EQMP |
1676 | ||
df92562e FZ |
1677 | { |
1678 | .name = "blockdev-mirror", | |
71aa9867 | 1679 | .args_type = "job-id:s?,sync:s,device:B,target:B,replaces:s?,speed:i?," |
df92562e FZ |
1680 | "on-source-error:s?,on-target-error:s?," |
1681 | "granularity:i?,buf-size:i?", | |
df92562e FZ |
1682 | }, |
1683 | ||
1684 | SQMP | |
1685 | blockdev-mirror | |
1686 | ------------ | |
1687 | ||
1688 | Start mirroring a block device's writes to another block device. target | |
1689 | specifies the target of mirror operation. | |
1690 | ||
1691 | Arguments: | |
1692 | ||
71aa9867 AG |
1693 | - "job-id": Identifier for the newly-created block job. If omitted, |
1694 | the device name will be used. (json-string, optional) | |
07eec652 KW |
1695 | - "device": The device name or node-name of a root node whose writes should be |
1696 | mirrored (json-string) | |
df92562e FZ |
1697 | - "target": device name to mirror to (json-string) |
1698 | - "replaces": the block driver node name to replace when finished | |
1699 | (json-string, optional) | |
1700 | - "speed": maximum speed of the streaming job, in bytes per second | |
1701 | (json-int) | |
1702 | - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional) | |
1703 | - "buf_size": maximum amount of data in flight from source to target, in bytes | |
1704 | (json-int, default 10M) | |
1705 | - "sync": what parts of the disk image should be copied to the destination; | |
1706 | possibilities include "full" for all the disk, "top" for only the sectors | |
1707 | allocated in the topmost image, or "none" to only replicate new I/O | |
1708 | (MirrorSyncMode). | |
1709 | - "on-source-error": the action to take on an error on the source | |
1710 | (BlockdevOnError, default 'report') | |
1711 | - "on-target-error": the action to take on an error on the target | |
1712 | (BlockdevOnError, default 'report') | |
1713 | ||
1714 | The default value of the granularity is the image cluster size clamped | |
1715 | between 4096 and 65536, if the image format defines one. If the format | |
1716 | does not define a cluster size, the default value of the granularity | |
1717 | is 65536. | |
1718 | ||
1719 | Example: | |
1720 | ||
1721 | -> { "execute": "blockdev-mirror", "arguments": { "device": "ide-hd0", | |
1722 | "target": "target0", | |
1723 | "sync": "full" } } | |
1724 | <- { "return": {} } | |
1725 | ||
1726 | EQMP | |
fa40e656 JC |
1727 | { |
1728 | .name = "change-backing-file", | |
1729 | .args_type = "device:s,image-node-name:s,backing-file:s", | |
fa40e656 JC |
1730 | }, |
1731 | ||
1732 | SQMP | |
1733 | change-backing-file | |
1734 | ------------------- | |
1735 | Since: 2.1 | |
1736 | ||
1737 | Change the backing file in the image file metadata. This does not cause | |
1738 | QEMU to reopen the image file to reparse the backing filename (it may, | |
1739 | however, perform a reopen to change permissions from r/o -> r/w -> r/o, | |
1740 | if needed). The new backing file string is written into the image file | |
1741 | metadata, and the QEMU internal strings are updated. | |
1742 | ||
1743 | Arguments: | |
1744 | ||
1745 | - "image-node-name": The name of the block driver state node of the | |
1746 | image to modify. The "device" is argument is used to | |
1747 | verify "image-node-name" is in the chain described by | |
1748 | "device". | |
1749 | (json-string, optional) | |
1750 | ||
7b5dca3f KW |
1751 | - "device": The device name or node-name of the root node that owns |
1752 | image-node-name. | |
fa40e656 JC |
1753 | (json-string) |
1754 | ||
1755 | - "backing-file": The string to write as the backing file. This string is | |
1756 | not validated, so care should be taken when specifying | |
1757 | the string or the image chain may not be able to be | |
1758 | reopened again. | |
1759 | (json-string) | |
1760 | ||
1761 | Returns: Nothing on success | |
1762 | If "device" does not exist or cannot be determined, DeviceNotFound | |
1763 | ||
82a56f0d LC |
1764 | EQMP |
1765 | ||
1766 | { | |
1767 | .name = "balloon", | |
1768 | .args_type = "value:M", | |
82a56f0d LC |
1769 | }, |
1770 | ||
1771 | SQMP | |
1772 | balloon | |
1773 | ------- | |
1774 | ||
1775 | Request VM to change its memory allocation (in bytes). | |
1776 | ||
1777 | Arguments: | |
1778 | ||
1779 | - "value": New memory allocation (json-int) | |
1780 | ||
1781 | Example: | |
1782 | ||
1783 | -> { "execute": "balloon", "arguments": { "value": 536870912 } } | |
1784 | <- { "return": {} } | |
1785 | ||
1786 | EQMP | |
1787 | ||
1788 | { | |
1789 | .name = "set_link", | |
1790 | .args_type = "name:s,up:b", | |
82a56f0d LC |
1791 | }, |
1792 | ||
1793 | SQMP | |
1794 | set_link | |
1795 | -------- | |
1796 | ||
1797 | Change the link status of a network adapter. | |
1798 | ||
1799 | Arguments: | |
1800 | ||
1801 | - "name": network device name (json-string) | |
1802 | - "up": status is up (json-bool) | |
1803 | ||
1804 | Example: | |
1805 | ||
1806 | -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } } | |
1807 | <- { "return": {} } | |
1808 | ||
1809 | EQMP | |
1810 | ||
1811 | { | |
1812 | .name = "getfd", | |
1813 | .args_type = "fdname:s", | |
1814 | .params = "getfd name", | |
1815 | .help = "receive a file descriptor via SCM rights and assign it a name", | |
82a56f0d LC |
1816 | }, |
1817 | ||
1818 | SQMP | |
1819 | getfd | |
1820 | ----- | |
1821 | ||
1822 | Receive a file descriptor via SCM rights and assign it a name. | |
1823 | ||
1824 | Arguments: | |
1825 | ||
1826 | - "fdname": file descriptor name (json-string) | |
1827 | ||
1828 | Example: | |
1829 | ||
1830 | -> { "execute": "getfd", "arguments": { "fdname": "fd1" } } | |
1831 | <- { "return": {} } | |
1832 | ||
208c9d1b CB |
1833 | Notes: |
1834 | ||
1835 | (1) If the name specified by the "fdname" argument already exists, | |
1836 | the file descriptor assigned to it will be closed and replaced | |
1837 | by the received file descriptor. | |
1838 | (2) The 'closefd' command can be used to explicitly close the file | |
1839 | descriptor when it is no longer needed. | |
1840 | ||
82a56f0d LC |
1841 | EQMP |
1842 | ||
1843 | { | |
1844 | .name = "closefd", | |
1845 | .args_type = "fdname:s", | |
1846 | .params = "closefd name", | |
1847 | .help = "close a file descriptor previously passed via SCM rights", | |
82a56f0d LC |
1848 | }, |
1849 | ||
1850 | SQMP | |
1851 | closefd | |
1852 | ------- | |
1853 | ||
1854 | Close a file descriptor previously passed via SCM rights. | |
1855 | ||
1856 | Arguments: | |
1857 | ||
1858 | - "fdname": file descriptor name (json-string) | |
1859 | ||
1860 | Example: | |
1861 | ||
1862 | -> { "execute": "closefd", "arguments": { "fdname": "fd1" } } | |
1863 | <- { "return": {} } | |
1864 | ||
ba1c048a CB |
1865 | EQMP |
1866 | ||
1867 | { | |
1868 | .name = "add-fd", | |
1869 | .args_type = "fdset-id:i?,opaque:s?", | |
1870 | .params = "add-fd fdset-id opaque", | |
1871 | .help = "Add a file descriptor, that was passed via SCM rights, to an fd set", | |
ba1c048a CB |
1872 | }, |
1873 | ||
1874 | SQMP | |
1875 | add-fd | |
1876 | ------- | |
1877 | ||
1878 | Add a file descriptor, that was passed via SCM rights, to an fd set. | |
1879 | ||
1880 | Arguments: | |
1881 | ||
1882 | - "fdset-id": The ID of the fd set to add the file descriptor to. | |
1883 | (json-int, optional) | |
1884 | - "opaque": A free-form string that can be used to describe the fd. | |
1885 | (json-string, optional) | |
1886 | ||
1887 | Return a json-object with the following information: | |
1888 | ||
1889 | - "fdset-id": The ID of the fd set that the fd was added to. (json-int) | |
1890 | - "fd": The file descriptor that was received via SCM rights and added to the | |
1891 | fd set. (json-int) | |
1892 | ||
1893 | Example: | |
1894 | ||
1895 | -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } } | |
1896 | <- { "return": { "fdset-id": 1, "fd": 3 } } | |
1897 | ||
1898 | Notes: | |
1899 | ||
1900 | (1) The list of fd sets is shared by all monitor connections. | |
1901 | (2) If "fdset-id" is not specified, a new fd set will be created. | |
1902 | ||
1903 | EQMP | |
1904 | ||
1905 | { | |
1906 | .name = "remove-fd", | |
1907 | .args_type = "fdset-id:i,fd:i?", | |
1908 | .params = "remove-fd fdset-id fd", | |
1909 | .help = "Remove a file descriptor from an fd set", | |
ba1c048a CB |
1910 | }, |
1911 | ||
1912 | SQMP | |
1913 | remove-fd | |
1914 | --------- | |
1915 | ||
1916 | Remove a file descriptor from an fd set. | |
1917 | ||
1918 | Arguments: | |
1919 | ||
1920 | - "fdset-id": The ID of the fd set that the file descriptor belongs to. | |
1921 | (json-int) | |
1922 | - "fd": The file descriptor that is to be removed. (json-int, optional) | |
1923 | ||
1924 | Example: | |
1925 | ||
1926 | -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } } | |
1927 | <- { "return": {} } | |
1928 | ||
1929 | Notes: | |
1930 | ||
1931 | (1) The list of fd sets is shared by all monitor connections. | |
1932 | (2) If "fd" is not specified, all file descriptors in "fdset-id" will be | |
1933 | removed. | |
1934 | ||
1935 | EQMP | |
1936 | ||
1937 | { | |
1938 | .name = "query-fdsets", | |
1939 | .args_type = "", | |
1940 | .help = "Return information describing all fd sets", | |
ba1c048a CB |
1941 | }, |
1942 | ||
1943 | SQMP | |
1944 | query-fdsets | |
1945 | ------------- | |
1946 | ||
1947 | Return information describing all fd sets. | |
1948 | ||
1949 | Arguments: None | |
1950 | ||
1951 | Example: | |
1952 | ||
1953 | -> { "execute": "query-fdsets" } | |
1954 | <- { "return": [ | |
1955 | { | |
1956 | "fds": [ | |
1957 | { | |
1958 | "fd": 30, | |
1959 | "opaque": "rdonly:/path/to/file" | |
1960 | }, | |
1961 | { | |
1962 | "fd": 24, | |
1963 | "opaque": "rdwr:/path/to/file" | |
1964 | } | |
1965 | ], | |
1966 | "fdset-id": 1 | |
1967 | }, | |
1968 | { | |
1969 | "fds": [ | |
1970 | { | |
1971 | "fd": 28 | |
1972 | }, | |
1973 | { | |
1974 | "fd": 29 | |
1975 | } | |
1976 | ], | |
1977 | "fdset-id": 0 | |
1978 | } | |
1979 | ] | |
1980 | } | |
1981 | ||
1982 | Note: The list of fd sets is shared by all monitor connections. | |
1983 | ||
82a56f0d LC |
1984 | EQMP |
1985 | ||
1986 | { | |
1987 | .name = "block_passwd", | |
12d3ba82 | 1988 | .args_type = "device:s?,node-name:s?,password:s", |
82a56f0d LC |
1989 | }, |
1990 | ||
1991 | SQMP | |
1992 | block_passwd | |
1993 | ------------ | |
1994 | ||
1995 | Set the password of encrypted block devices. | |
1996 | ||
1997 | Arguments: | |
1998 | ||
1999 | - "device": device name (json-string) | |
12d3ba82 | 2000 | - "node-name": name in the block driver state graph (json-string) |
82a56f0d LC |
2001 | - "password": password (json-string) |
2002 | ||
2003 | Example: | |
2004 | ||
2005 | -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0", | |
2006 | "password": "12345" } } | |
2007 | <- { "return": {} } | |
2008 | ||
727f005e ZYW |
2009 | EQMP |
2010 | ||
2011 | { | |
2012 | .name = "block_set_io_throttle", | |
dce13204 | 2013 | .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,bps_max_length:l?,bps_rd_max_length:l?,bps_wr_max_length:l?,iops_max_length:l?,iops_rd_max_length:l?,iops_wr_max_length:l?,iops_size:l?,group:s?", |
727f005e ZYW |
2014 | }, |
2015 | ||
2016 | SQMP | |
2017 | block_set_io_throttle | |
2018 | ------------ | |
2019 | ||
2020 | Change I/O throttle limits for a block drive. | |
2021 | ||
2022 | Arguments: | |
2023 | ||
2024 | - "device": device name (json-string) | |
586b5466 EB |
2025 | - "bps": total throughput limit in bytes per second (json-int) |
2026 | - "bps_rd": read throughput limit in bytes per second (json-int) | |
2027 | - "bps_wr": write throughput limit in bytes per second (json-int) | |
2028 | - "iops": total I/O operations per second (json-int) | |
2029 | - "iops_rd": read I/O operations per second (json-int) | |
2030 | - "iops_wr": write I/O operations per second (json-int) | |
dce13204 AG |
2031 | - "bps_max": total throughput limit during bursts, in bytes (json-int, optional) |
2032 | - "bps_rd_max": read throughput limit during bursts, in bytes (json-int, optional) | |
2033 | - "bps_wr_max": write throughput limit during bursts, in bytes (json-int, optional) | |
2034 | - "iops_max": total I/O operations per second during bursts (json-int, optional) | |
2035 | - "iops_rd_max": read I/O operations per second during bursts (json-int, optional) | |
2036 | - "iops_wr_max": write I/O operations per second during bursts (json-int, optional) | |
2037 | - "bps_max_length": maximum length of the @bps_max burst period, in seconds (json-int, optional) | |
2038 | - "bps_rd_max_length": maximum length of the @bps_rd_max burst period, in seconds (json-int, optional) | |
2039 | - "bps_wr_max_length": maximum length of the @bps_wr_max burst period, in seconds (json-int, optional) | |
2040 | - "iops_max_length": maximum length of the @iops_max burst period, in seconds (json-int, optional) | |
2041 | - "iops_rd_max_length": maximum length of the @iops_rd_max burst period, in seconds (json-int, optional) | |
2042 | - "iops_wr_max_length": maximum length of the @iops_wr_max burst period, in seconds (json-int, optional) | |
2043 | - "iops_size": I/O size in bytes when limiting (json-int, optional) | |
2044 | - "group": throttle group name (json-string, optional) | |
727f005e ZYW |
2045 | |
2046 | Example: | |
2047 | ||
2048 | -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0", | |
586b5466 EB |
2049 | "bps": 1000000, |
2050 | "bps_rd": 0, | |
2051 | "bps_wr": 0, | |
2052 | "iops": 0, | |
2053 | "iops_rd": 0, | |
3e9fab69 BC |
2054 | "iops_wr": 0, |
2055 | "bps_max": 8000000, | |
2056 | "bps_rd_max": 0, | |
2057 | "bps_wr_max": 0, | |
2058 | "iops_max": 0, | |
2059 | "iops_rd_max": 0, | |
2024c1df | 2060 | "iops_wr_max": 0, |
dce13204 | 2061 | "bps_max_length": 60, |
2024c1df | 2062 | "iops_size": 0 } } |
727f005e ZYW |
2063 | <- { "return": {} } |
2064 | ||
7572150c GH |
2065 | EQMP |
2066 | ||
2067 | { | |
2068 | .name = "set_password", | |
2069 | .args_type = "protocol:s,password:s,connected:s?", | |
7572150c GH |
2070 | }, |
2071 | ||
2072 | SQMP | |
2073 | set_password | |
2074 | ------------ | |
2075 | ||
2076 | Set the password for vnc/spice protocols. | |
2077 | ||
2078 | Arguments: | |
2079 | ||
2080 | - "protocol": protocol name (json-string) | |
2081 | - "password": password (json-string) | |
3599d46b | 2082 | - "connected": [ keep | disconnect | fail ] (json-string, optional) |
7572150c GH |
2083 | |
2084 | Example: | |
2085 | ||
2086 | -> { "execute": "set_password", "arguments": { "protocol": "vnc", | |
2087 | "password": "secret" } } | |
2088 | <- { "return": {} } | |
2089 | ||
2090 | EQMP | |
2091 | ||
2092 | { | |
2093 | .name = "expire_password", | |
2094 | .args_type = "protocol:s,time:s", | |
7572150c GH |
2095 | }, |
2096 | ||
2097 | SQMP | |
2098 | expire_password | |
2099 | --------------- | |
2100 | ||
2101 | Set the password expire time for vnc/spice protocols. | |
2102 | ||
2103 | Arguments: | |
2104 | ||
2105 | - "protocol": protocol name (json-string) | |
2106 | - "time": [ now | never | +secs | secs ] (json-string) | |
2107 | ||
2108 | Example: | |
2109 | ||
2110 | -> { "execute": "expire_password", "arguments": { "protocol": "vnc", | |
2111 | "time": "+60" } } | |
2112 | <- { "return": {} } | |
2113 | ||
82a56f0d LC |
2114 | EQMP |
2115 | ||
13661089 DB |
2116 | { |
2117 | .name = "add_client", | |
f1f5f407 | 2118 | .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?", |
13661089 DB |
2119 | }, |
2120 | ||
2121 | SQMP | |
2122 | add_client | |
2123 | ---------- | |
2124 | ||
2125 | Add a graphics client | |
2126 | ||
2127 | Arguments: | |
2128 | ||
2129 | - "protocol": protocol name (json-string) | |
2130 | - "fdname": file descriptor name (json-string) | |
f1f5f407 DB |
2131 | - "skipauth": whether to skip authentication (json-bool, optional) |
2132 | - "tls": whether to perform TLS (json-bool, optional) | |
13661089 DB |
2133 | |
2134 | Example: | |
2135 | ||
2136 | -> { "execute": "add_client", "arguments": { "protocol": "vnc", | |
2137 | "fdname": "myclient" } } | |
2138 | <- { "return": {} } | |
2139 | ||
2140 | EQMP | |
82a56f0d LC |
2141 | { |
2142 | .name = "qmp_capabilities", | |
2143 | .args_type = "", | |
2144 | .params = "", | |
2145 | .help = "enable QMP capabilities", | |
82a56f0d LC |
2146 | }, |
2147 | ||
2148 | SQMP | |
2149 | qmp_capabilities | |
2150 | ---------------- | |
2151 | ||
2152 | Enable QMP capabilities. | |
2153 | ||
2154 | Arguments: None. | |
2155 | ||
2156 | Example: | |
2157 | ||
2158 | -> { "execute": "qmp_capabilities" } | |
2159 | <- { "return": {} } | |
2160 | ||
2161 | Note: This command must be issued before issuing any other command. | |
2162 | ||
0268d97c LC |
2163 | EQMP |
2164 | ||
2165 | { | |
2166 | .name = "human-monitor-command", | |
2167 | .args_type = "command-line:s,cpu-index:i?", | |
0268d97c LC |
2168 | }, |
2169 | ||
2170 | SQMP | |
2171 | human-monitor-command | |
2172 | --------------------- | |
2173 | ||
2174 | Execute a Human Monitor command. | |
2175 | ||
bdf05133 | 2176 | Arguments: |
0268d97c LC |
2177 | |
2178 | - command-line: the command name and its arguments, just like the | |
2179 | Human Monitor's shell (json-string) | |
2180 | - cpu-index: select the CPU number to be used by commands which access CPU | |
2181 | data, like 'info registers'. The Monitor selects CPU 0 if this | |
2182 | argument is not provided (json-int, optional) | |
2183 | ||
2184 | Example: | |
2185 | ||
2186 | -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } } | |
2187 | <- { "return": "kvm support: enabled\r\n" } | |
2188 | ||
2189 | Notes: | |
2190 | ||
2191 | (1) The Human Monitor is NOT an stable interface, this means that command | |
2192 | names, arguments and responses can change or be removed at ANY time. | |
2193 | Applications that rely on long term stability guarantees should NOT | |
2194 | use this command | |
2195 | ||
2196 | (2) Limitations: | |
2197 | ||
2198 | o This command is stateless, this means that commands that depend | |
2199 | on state information (such as getfd) might not work | |
2200 | ||
2201 | o Commands that prompt the user for data (eg. 'cont' when the block | |
2202 | device is encrypted) don't currently work | |
2203 | ||
82a56f0d LC |
2204 | 3. Query Commands |
2205 | ================= | |
2206 | ||
2207 | HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change | |
2208 | HXCOMM this! We will possibly move query commands definitions inside those | |
2209 | HXCOMM sections, just like regular commands. | |
2210 | ||
2211 | EQMP | |
2212 | ||
2213 | SQMP | |
2214 | query-version | |
2215 | ------------- | |
2216 | ||
2217 | Show QEMU version. | |
2218 | ||
2219 | Return a json-object with the following information: | |
2220 | ||
2221 | - "qemu": A json-object containing three integer values: | |
2222 | - "major": QEMU's major version (json-int) | |
2223 | - "minor": QEMU's minor version (json-int) | |
2224 | - "micro": QEMU's micro version (json-int) | |
2225 | - "package": package's version (json-string) | |
2226 | ||
2227 | Example: | |
2228 | ||
2229 | -> { "execute": "query-version" } | |
2230 | <- { | |
2231 | "return":{ | |
2232 | "qemu":{ | |
2233 | "major":0, | |
2234 | "minor":11, | |
2235 | "micro":5 | |
2236 | }, | |
2237 | "package":"" | |
2238 | } | |
2239 | } | |
2240 | ||
2241 | EQMP | |
2242 | ||
b9c15f16 LC |
2243 | { |
2244 | .name = "query-version", | |
2245 | .args_type = "", | |
b9c15f16 LC |
2246 | }, |
2247 | ||
82a56f0d LC |
2248 | SQMP |
2249 | query-commands | |
2250 | -------------- | |
2251 | ||
2252 | List QMP available commands. | |
2253 | ||
2254 | Each command is represented by a json-object, the returned value is a json-array | |
2255 | of all commands. | |
2256 | ||
2257 | Each json-object contain: | |
2258 | ||
2259 | - "name": command's name (json-string) | |
2260 | ||
2261 | Example: | |
2262 | ||
2263 | -> { "execute": "query-commands" } | |
2264 | <- { | |
2265 | "return":[ | |
2266 | { | |
2267 | "name":"query-balloon" | |
2268 | }, | |
2269 | { | |
2270 | "name":"system_powerdown" | |
2271 | } | |
2272 | ] | |
2273 | } | |
2274 | ||
2275 | Note: This example has been shortened as the real response is too long. | |
2276 | ||
2277 | EQMP | |
2278 | ||
aa9b79bc LC |
2279 | { |
2280 | .name = "query-commands", | |
2281 | .args_type = "", | |
aa9b79bc LC |
2282 | }, |
2283 | ||
4860853d DB |
2284 | SQMP |
2285 | query-events | |
2286 | -------------- | |
2287 | ||
2288 | List QMP available events. | |
2289 | ||
2290 | Each event is represented by a json-object, the returned value is a json-array | |
2291 | of all events. | |
2292 | ||
2293 | Each json-object contains: | |
2294 | ||
2295 | - "name": event's name (json-string) | |
2296 | ||
2297 | Example: | |
2298 | ||
2299 | -> { "execute": "query-events" } | |
2300 | <- { | |
2301 | "return":[ | |
2302 | { | |
2303 | "name":"SHUTDOWN" | |
2304 | }, | |
2305 | { | |
2306 | "name":"RESET" | |
2307 | } | |
2308 | ] | |
2309 | } | |
2310 | ||
2311 | Note: This example has been shortened as the real response is too long. | |
2312 | ||
2313 | EQMP | |
2314 | ||
2315 | { | |
2316 | .name = "query-events", | |
2317 | .args_type = "", | |
4860853d DB |
2318 | }, |
2319 | ||
39a18158 MA |
2320 | SQMP |
2321 | query-qmp-schema | |
2322 | ---------------- | |
2323 | ||
2324 | Return the QMP wire schema. The returned value is a json-array of | |
2325 | named schema entities. Entities are commands, events and various | |
2326 | types. See docs/qapi-code-gen.txt for information on their structure | |
2327 | and intended use. | |
2328 | ||
2329 | EQMP | |
2330 | ||
2331 | { | |
2332 | .name = "query-qmp-schema", | |
2333 | .args_type = "", | |
39a18158 MA |
2334 | }, |
2335 | ||
82a56f0d LC |
2336 | SQMP |
2337 | query-chardev | |
2338 | ------------- | |
2339 | ||
2340 | Each device is represented by a json-object. The returned value is a json-array | |
2341 | of all devices. | |
2342 | ||
2343 | Each json-object contain the following: | |
2344 | ||
2345 | - "label": device's label (json-string) | |
2346 | - "filename": device's file (json-string) | |
32a97ea1 LE |
2347 | - "frontend-open": open/closed state of the frontend device attached to this |
2348 | backend (json-bool) | |
82a56f0d LC |
2349 | |
2350 | Example: | |
2351 | ||
2352 | -> { "execute": "query-chardev" } | |
2353 | <- { | |
32a97ea1 LE |
2354 | "return": [ |
2355 | { | |
2356 | "label": "charchannel0", | |
2357 | "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server", | |
2358 | "frontend-open": false | |
2359 | }, | |
82a56f0d | 2360 | { |
32a97ea1 LE |
2361 | "label": "charmonitor", |
2362 | "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server", | |
2363 | "frontend-open": true | |
82a56f0d LC |
2364 | }, |
2365 | { | |
32a97ea1 LE |
2366 | "label": "charserial0", |
2367 | "filename": "pty:/dev/pts/2", | |
2368 | "frontend-open": true | |
82a56f0d LC |
2369 | } |
2370 | ] | |
2371 | } | |
2372 | ||
2373 | EQMP | |
2374 | ||
c5a415a0 LC |
2375 | { |
2376 | .name = "query-chardev", | |
2377 | .args_type = "", | |
c5a415a0 LC |
2378 | }, |
2379 | ||
77d1c3c6 MK |
2380 | SQMP |
2381 | query-chardev-backends | |
2382 | ------------- | |
2383 | ||
2384 | List available character device backends. | |
2385 | ||
2386 | Each backend is represented by a json-object, the returned value is a json-array | |
2387 | of all backends. | |
2388 | ||
2389 | Each json-object contains: | |
2390 | ||
2391 | - "name": backend name (json-string) | |
2392 | ||
2393 | Example: | |
2394 | ||
2395 | -> { "execute": "query-chardev-backends" } | |
2396 | <- { | |
2397 | "return":[ | |
2398 | { | |
2399 | "name":"udp" | |
2400 | }, | |
2401 | { | |
2402 | "name":"tcp" | |
2403 | }, | |
2404 | { | |
2405 | "name":"unix" | |
2406 | }, | |
2407 | { | |
2408 | "name":"spiceport" | |
2409 | } | |
2410 | ] | |
2411 | } | |
2412 | ||
2413 | EQMP | |
2414 | ||
2415 | { | |
2416 | .name = "query-chardev-backends", | |
2417 | .args_type = "", | |
77d1c3c6 MK |
2418 | }, |
2419 | ||
82a56f0d LC |
2420 | SQMP |
2421 | query-block | |
2422 | ----------- | |
2423 | ||
2424 | Show the block devices. | |
2425 | ||
2426 | Each block device information is stored in a json-object and the returned value | |
2427 | is a json-array of all devices. | |
2428 | ||
2429 | Each json-object contain the following: | |
2430 | ||
2431 | - "device": device name (json-string) | |
2432 | - "type": device type (json-string) | |
d8aeeb31 MA |
2433 | - deprecated, retained for backward compatibility |
2434 | - Possible values: "unknown" | |
82a56f0d LC |
2435 | - "removable": true if the device is removable, false otherwise (json-bool) |
2436 | - "locked": true if the device is locked, false otherwise (json-bool) | |
99f42808 | 2437 | - "tray_open": only present if removable, true if the device has a tray, |
e4def80b | 2438 | and it is open (json-bool) |
82a56f0d LC |
2439 | - "inserted": only present if the device is inserted, it is a json-object |
2440 | containing the following: | |
2441 | - "file": device file name (json-string) | |
2442 | - "ro": true if read-only, false otherwise (json-bool) | |
2443 | - "drv": driver format name (json-string) | |
550830f9 | 2444 | - Possible values: "blkdebug", "bochs", "cloop", "dmg", |
82a56f0d | 2445 | "file", "file", "ftp", "ftps", "host_cdrom", |
92a539d2 | 2446 | "host_device", "http", "https", |
82a56f0d LC |
2447 | "nbd", "parallels", "qcow", "qcow2", "raw", |
2448 | "tftp", "vdi", "vmdk", "vpc", "vvfat" | |
2449 | - "backing_file": backing file name (json-string, optional) | |
2e3e3317 | 2450 | - "backing_file_depth": number of files in the backing file chain (json-int) |
82a56f0d | 2451 | - "encrypted": true if encrypted, false otherwise (json-bool) |
727f005e ZYW |
2452 | - "bps": limit total bytes per second (json-int) |
2453 | - "bps_rd": limit read bytes per second (json-int) | |
2454 | - "bps_wr": limit write bytes per second (json-int) | |
2455 | - "iops": limit total I/O operations per second (json-int) | |
2456 | - "iops_rd": limit read operations per second (json-int) | |
2457 | - "iops_wr": limit write operations per second (json-int) | |
3e9fab69 BC |
2458 | - "bps_max": total max in bytes (json-int) |
2459 | - "bps_rd_max": read max in bytes (json-int) | |
2460 | - "bps_wr_max": write max in bytes (json-int) | |
2461 | - "iops_max": total I/O operations max (json-int) | |
2462 | - "iops_rd_max": read I/O operations max (json-int) | |
2463 | - "iops_wr_max": write I/O operations max (json-int) | |
2024c1df | 2464 | - "iops_size": I/O size when limiting by iops (json-int) |
465bee1d PL |
2465 | - "detect_zeroes": detect and optimize zero writing (json-string) |
2466 | - Possible values: "off", "on", "unmap" | |
e2462113 FR |
2467 | - "write_threshold": write offset threshold in bytes, a event will be |
2468 | emitted if crossed. Zero if disabled (json-int) | |
553a7e87 WX |
2469 | - "image": the detail of the image, it is a json-object containing |
2470 | the following: | |
2471 | - "filename": image file name (json-string) | |
2472 | - "format": image format (json-string) | |
2473 | - "virtual-size": image capacity in bytes (json-int) | |
2474 | - "dirty-flag": true if image is not cleanly closed, not present | |
2475 | means clean (json-bool, optional) | |
2476 | - "actual-size": actual size on disk in bytes of the image, not | |
2477 | present when image does not support thin | |
2478 | provision (json-int, optional) | |
2479 | - "cluster-size": size of a cluster in bytes, not present if image | |
2480 | format does not support it (json-int, optional) | |
2481 | - "encrypted": true if the image is encrypted, not present means | |
2482 | false or the image format does not support | |
2483 | encryption (json-bool, optional) | |
2484 | - "backing_file": backing file name, not present means no backing | |
2485 | file is used or the image format does not | |
2486 | support backing file chain | |
2487 | (json-string, optional) | |
2488 | - "full-backing-filename": full path of the backing file, not | |
2489 | present if it equals backing_file or no | |
2490 | backing file is used | |
2491 | (json-string, optional) | |
2492 | - "backing-filename-format": the format of the backing file, not | |
2493 | present means unknown or no backing | |
2494 | file (json-string, optional) | |
2495 | - "snapshots": the internal snapshot info, it is an optional list | |
2496 | of json-object containing the following: | |
2497 | - "id": unique snapshot id (json-string) | |
2498 | - "name": snapshot name (json-string) | |
2499 | - "vm-state-size": size of the VM state in bytes (json-int) | |
2500 | - "date-sec": UTC date of the snapshot in seconds (json-int) | |
2501 | - "date-nsec": fractional part in nanoseconds to be used with | |
586b5466 | 2502 | date-sec (json-int) |
553a7e87 WX |
2503 | - "vm-clock-sec": VM clock relative to boot in seconds |
2504 | (json-int) | |
2505 | - "vm-clock-nsec": fractional part in nanoseconds to be used | |
2506 | with vm-clock-sec (json-int) | |
2507 | - "backing-image": the detail of the backing image, it is an | |
2508 | optional json-object only present when a | |
2509 | backing image present for this image | |
727f005e | 2510 | |
f04ef601 LC |
2511 | - "io-status": I/O operation status, only present if the device supports it |
2512 | and the VM is configured to stop on errors. It's always reset | |
2513 | to "ok" when the "cont" command is issued (json_string, optional) | |
2514 | - Possible values: "ok", "failed", "nospace" | |
82a56f0d LC |
2515 | |
2516 | Example: | |
2517 | ||
2518 | -> { "execute": "query-block" } | |
2519 | <- { | |
2520 | "return":[ | |
2521 | { | |
f04ef601 | 2522 | "io-status": "ok", |
82a56f0d LC |
2523 | "device":"ide0-hd0", |
2524 | "locked":false, | |
2525 | "removable":false, | |
2526 | "inserted":{ | |
2527 | "ro":false, | |
2528 | "drv":"qcow2", | |
2529 | "encrypted":false, | |
553a7e87 WX |
2530 | "file":"disks/test.qcow2", |
2531 | "backing_file_depth":1, | |
727f005e ZYW |
2532 | "bps":1000000, |
2533 | "bps_rd":0, | |
2534 | "bps_wr":0, | |
2535 | "iops":1000000, | |
2536 | "iops_rd":0, | |
2537 | "iops_wr":0, | |
3e9fab69 BC |
2538 | "bps_max": 8000000, |
2539 | "bps_rd_max": 0, | |
2540 | "bps_wr_max": 0, | |
2541 | "iops_max": 0, | |
2542 | "iops_rd_max": 0, | |
2543 | "iops_wr_max": 0, | |
2024c1df | 2544 | "iops_size": 0, |
465bee1d | 2545 | "detect_zeroes": "on", |
e2462113 | 2546 | "write_threshold": 0, |
553a7e87 WX |
2547 | "image":{ |
2548 | "filename":"disks/test.qcow2", | |
2549 | "format":"qcow2", | |
2550 | "virtual-size":2048000, | |
2551 | "backing_file":"base.qcow2", | |
2552 | "full-backing-filename":"disks/base.qcow2", | |
5403432f | 2553 | "backing-filename-format":"qcow2", |
553a7e87 WX |
2554 | "snapshots":[ |
2555 | { | |
2556 | "id": "1", | |
2557 | "name": "snapshot1", | |
2558 | "vm-state-size": 0, | |
2559 | "date-sec": 10000200, | |
2560 | "date-nsec": 12, | |
2561 | "vm-clock-sec": 206, | |
2562 | "vm-clock-nsec": 30 | |
2563 | } | |
2564 | ], | |
2565 | "backing-image":{ | |
2566 | "filename":"disks/base.qcow2", | |
2567 | "format":"qcow2", | |
2568 | "virtual-size":2048000 | |
2569 | } | |
2570 | } | |
82a56f0d | 2571 | }, |
d8aeeb31 | 2572 | "type":"unknown" |
82a56f0d LC |
2573 | }, |
2574 | { | |
f04ef601 | 2575 | "io-status": "ok", |
82a56f0d LC |
2576 | "device":"ide1-cd0", |
2577 | "locked":false, | |
2578 | "removable":true, | |
d8aeeb31 | 2579 | "type":"unknown" |
82a56f0d LC |
2580 | }, |
2581 | { | |
2582 | "device":"floppy0", | |
2583 | "locked":false, | |
2584 | "removable":true, | |
d8aeeb31 | 2585 | "type":"unknown" |
82a56f0d LC |
2586 | }, |
2587 | { | |
2588 | "device":"sd0", | |
2589 | "locked":false, | |
2590 | "removable":true, | |
d8aeeb31 | 2591 | "type":"unknown" |
82a56f0d LC |
2592 | } |
2593 | ] | |
2594 | } | |
2595 | ||
2596 | EQMP | |
2597 | ||
b2023818 LC |
2598 | { |
2599 | .name = "query-block", | |
2600 | .args_type = "", | |
b2023818 LC |
2601 | }, |
2602 | ||
82a56f0d LC |
2603 | SQMP |
2604 | query-blockstats | |
2605 | ---------------- | |
2606 | ||
2607 | Show block device statistics. | |
2608 | ||
2609 | Each device statistic information is stored in a json-object and the returned | |
2610 | value is a json-array of all devices. | |
2611 | ||
2612 | Each json-object contain the following: | |
2613 | ||
2614 | - "device": device name (json-string) | |
2615 | - "stats": A json-object with the statistics information, it contains: | |
2616 | - "rd_bytes": bytes read (json-int) | |
2617 | - "wr_bytes": bytes written (json-int) | |
2618 | - "rd_operations": read operations (json-int) | |
2619 | - "wr_operations": write operations (json-int) | |
e8045d67 | 2620 | - "flush_operations": cache flush operations (json-int) |
c488c7f6 CH |
2621 | - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int) |
2622 | - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int) | |
2623 | - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int) | |
53d8f9d8 HR |
2624 | - "wr_highest_offset": The offset after the greatest byte written to the |
2625 | BlockDriverState since it has been opened (json-int) | |
f4564d53 PL |
2626 | - "rd_merged": number of read requests that have been merged into |
2627 | another request (json-int) | |
2628 | - "wr_merged": number of write requests that have been merged into | |
2629 | another request (json-int) | |
cb38fffb AG |
2630 | - "idle_time_ns": time since the last I/O operation, in |
2631 | nanoseconds. If the field is absent it means | |
2632 | that there haven't been any operations yet | |
2633 | (json-int, optional) | |
7ee12daf AG |
2634 | - "failed_rd_operations": number of failed read operations |
2635 | (json-int) | |
2636 | - "failed_wr_operations": number of failed write operations | |
2637 | (json-int) | |
2638 | - "failed_flush_operations": number of failed flush operations | |
2639 | (json-int) | |
2640 | - "invalid_rd_operations": number of invalid read operations | |
2641 | (json-int) | |
2642 | - "invalid_wr_operations": number of invalid write operations | |
2643 | (json-int) | |
2644 | - "invalid_flush_operations": number of invalid flush operations | |
2645 | (json-int) | |
362e9299 AG |
2646 | - "account_invalid": whether invalid operations are included in |
2647 | the last access statistics (json-bool) | |
2648 | - "account_failed": whether failed operations are included in the | |
2649 | latency and last access statistics | |
2650 | (json-bool) | |
979e9b03 AG |
2651 | - "timed_stats": A json-array containing statistics collected in |
2652 | specific intervals, with the following members: | |
2653 | - "interval_length": interval used for calculating the | |
2654 | statistics, in seconds (json-int) | |
2655 | - "min_rd_latency_ns": minimum latency of read operations in | |
2656 | the defined interval, in nanoseconds | |
2657 | (json-int) | |
2658 | - "min_wr_latency_ns": minimum latency of write operations in | |
2659 | the defined interval, in nanoseconds | |
2660 | (json-int) | |
2661 | - "min_flush_latency_ns": minimum latency of flush operations | |
2662 | in the defined interval, in | |
2663 | nanoseconds (json-int) | |
2664 | - "max_rd_latency_ns": maximum latency of read operations in | |
2665 | the defined interval, in nanoseconds | |
2666 | (json-int) | |
2667 | - "max_wr_latency_ns": maximum latency of write operations in | |
2668 | the defined interval, in nanoseconds | |
2669 | (json-int) | |
2670 | - "max_flush_latency_ns": maximum latency of flush operations | |
2671 | in the defined interval, in | |
2672 | nanoseconds (json-int) | |
2673 | - "avg_rd_latency_ns": average latency of read operations in | |
2674 | the defined interval, in nanoseconds | |
2675 | (json-int) | |
2676 | - "avg_wr_latency_ns": average latency of write operations in | |
2677 | the defined interval, in nanoseconds | |
2678 | (json-int) | |
2679 | - "avg_flush_latency_ns": average latency of flush operations | |
2680 | in the defined interval, in | |
2681 | nanoseconds (json-int) | |
96e4deda AG |
2682 | - "avg_rd_queue_depth": average number of pending read |
2683 | operations in the defined interval | |
2684 | (json-number) | |
2685 | - "avg_wr_queue_depth": average number of pending write | |
2686 | operations in the defined interval | |
2687 | (json-number). | |
82a56f0d LC |
2688 | - "parent": Contains recursively the statistics of the underlying |
2689 | protocol (e.g. the host file for a qcow2 image). If there is | |
2690 | no underlying protocol, this field is omitted | |
2691 | (json-object, optional) | |
2692 | ||
2693 | Example: | |
2694 | ||
2695 | -> { "execute": "query-blockstats" } | |
2696 | <- { | |
2697 | "return":[ | |
2698 | { | |
2699 | "device":"ide0-hd0", | |
2700 | "parent":{ | |
2701 | "stats":{ | |
2702 | "wr_highest_offset":3686448128, | |
2703 | "wr_bytes":9786368, | |
2704 | "wr_operations":751, | |
2705 | "rd_bytes":122567168, | |
2706 | "rd_operations":36772 | |
c488c7f6 CH |
2707 | "wr_total_times_ns":313253456 |
2708 | "rd_total_times_ns":3465673657 | |
2709 | "flush_total_times_ns":49653 | |
e8045d67 | 2710 | "flush_operations":61, |
f4564d53 | 2711 | "rd_merged":0, |
cb38fffb | 2712 | "wr_merged":0, |
362e9299 AG |
2713 | "idle_time_ns":2953431879, |
2714 | "account_invalid":true, | |
2715 | "account_failed":false | |
82a56f0d LC |
2716 | } |
2717 | }, | |
2718 | "stats":{ | |
2719 | "wr_highest_offset":2821110784, | |
2720 | "wr_bytes":9786368, | |
2721 | "wr_operations":692, | |
2722 | "rd_bytes":122739200, | |
2723 | "rd_operations":36604 | |
e8045d67 | 2724 | "flush_operations":51, |
c488c7f6 CH |
2725 | "wr_total_times_ns":313253456 |
2726 | "rd_total_times_ns":3465673657 | |
f4564d53 PL |
2727 | "flush_total_times_ns":49653, |
2728 | "rd_merged":0, | |
cb38fffb | 2729 | "wr_merged":0, |
362e9299 AG |
2730 | "idle_time_ns":2953431879, |
2731 | "account_invalid":true, | |
2732 | "account_failed":false | |
82a56f0d LC |
2733 | } |
2734 | }, | |
2735 | { | |
2736 | "device":"ide1-cd0", | |
2737 | "stats":{ | |
2738 | "wr_highest_offset":0, | |
2739 | "wr_bytes":0, | |
2740 | "wr_operations":0, | |
2741 | "rd_bytes":0, | |
2742 | "rd_operations":0 | |
e8045d67 | 2743 | "flush_operations":0, |
c488c7f6 CH |
2744 | "wr_total_times_ns":0 |
2745 | "rd_total_times_ns":0 | |
f4564d53 PL |
2746 | "flush_total_times_ns":0, |
2747 | "rd_merged":0, | |
362e9299 AG |
2748 | "wr_merged":0, |
2749 | "account_invalid":false, | |
2750 | "account_failed":false | |
82a56f0d LC |
2751 | } |
2752 | }, | |
2753 | { | |
2754 | "device":"floppy0", | |
2755 | "stats":{ | |
2756 | "wr_highest_offset":0, | |
2757 | "wr_bytes":0, | |
2758 | "wr_operations":0, | |
2759 | "rd_bytes":0, | |
2760 | "rd_operations":0 | |
e8045d67 | 2761 | "flush_operations":0, |
c488c7f6 CH |
2762 | "wr_total_times_ns":0 |
2763 | "rd_total_times_ns":0 | |
f4564d53 PL |
2764 | "flush_total_times_ns":0, |
2765 | "rd_merged":0, | |
362e9299 AG |
2766 | "wr_merged":0, |
2767 | "account_invalid":false, | |
2768 | "account_failed":false | |
82a56f0d LC |
2769 | } |
2770 | }, | |
2771 | { | |
2772 | "device":"sd0", | |
2773 | "stats":{ | |
2774 | "wr_highest_offset":0, | |
2775 | "wr_bytes":0, | |
2776 | "wr_operations":0, | |
2777 | "rd_bytes":0, | |
2778 | "rd_operations":0 | |
e8045d67 | 2779 | "flush_operations":0, |
c488c7f6 CH |
2780 | "wr_total_times_ns":0 |
2781 | "rd_total_times_ns":0 | |
f4564d53 PL |
2782 | "flush_total_times_ns":0, |
2783 | "rd_merged":0, | |
362e9299 AG |
2784 | "wr_merged":0, |
2785 | "account_invalid":false, | |
2786 | "account_failed":false | |
82a56f0d LC |
2787 | } |
2788 | } | |
2789 | ] | |
2790 | } | |
2791 | ||
2792 | EQMP | |
2793 | ||
f11f57e4 LC |
2794 | { |
2795 | .name = "query-blockstats", | |
f71eaa74 | 2796 | .args_type = "query-nodes:b?", |
f11f57e4 LC |
2797 | }, |
2798 | ||
82a56f0d LC |
2799 | SQMP |
2800 | query-cpus | |
2801 | ---------- | |
2802 | ||
2803 | Show CPU information. | |
2804 | ||
2805 | Return a json-array. Each CPU is represented by a json-object, which contains: | |
2806 | ||
2807 | - "CPU": CPU index (json-int) | |
2808 | - "current": true if this is the current CPU, false otherwise (json-bool) | |
2809 | - "halted": true if the cpu is halted, false otherwise (json-bool) | |
58f88d4b | 2810 | - "qom_path": path to the CPU object in the QOM tree (json-str) |
86f4b687 EB |
2811 | - "arch": architecture of the cpu, which determines what additional |
2812 | keys will be present (json-str) | |
82a56f0d LC |
2813 | - Current program counter. The key's name depends on the architecture: |
2814 | "pc": i386/x86_64 (json-int) | |
2815 | "nip": PPC (json-int) | |
2816 | "pc" and "npc": sparc (json-int) | |
2817 | "PC": mips (json-int) | |
dc7a09cf | 2818 | - "thread_id": ID of the underlying host thread (json-int) |
82a56f0d LC |
2819 | |
2820 | Example: | |
2821 | ||
2822 | -> { "execute": "query-cpus" } | |
2823 | <- { | |
2824 | "return":[ | |
2825 | { | |
2826 | "CPU":0, | |
2827 | "current":true, | |
2828 | "halted":false, | |
58f88d4b | 2829 | "qom_path":"/machine/unattached/device[0]", |
86f4b687 | 2830 | "arch":"x86", |
58f88d4b | 2831 | "pc":3227107138, |
dc7a09cf | 2832 | "thread_id":3134 |
82a56f0d LC |
2833 | }, |
2834 | { | |
2835 | "CPU":1, | |
2836 | "current":false, | |
2837 | "halted":true, | |
58f88d4b | 2838 | "qom_path":"/machine/unattached/device[2]", |
86f4b687 | 2839 | "arch":"x86", |
58f88d4b | 2840 | "pc":7108165, |
dc7a09cf | 2841 | "thread_id":3135 |
82a56f0d LC |
2842 | } |
2843 | ] | |
2844 | } | |
2845 | ||
2846 | EQMP | |
2847 | ||
de0b36b6 LC |
2848 | { |
2849 | .name = "query-cpus", | |
2850 | .args_type = "", | |
de0b36b6 LC |
2851 | }, |
2852 | ||
dc3dd0d2 SH |
2853 | SQMP |
2854 | query-iothreads | |
2855 | --------------- | |
2856 | ||
2857 | Returns a list of information about each iothread. | |
2858 | ||
2859 | Note this list excludes the QEMU main loop thread, which is not declared | |
2860 | using the -object iothread command-line option. It is always the main thread | |
2861 | of the process. | |
2862 | ||
2863 | Return a json-array. Each iothread is represented by a json-object, which contains: | |
2864 | ||
2865 | - "id": name of iothread (json-str) | |
2866 | - "thread-id": ID of the underlying host thread (json-int) | |
2867 | ||
2868 | Example: | |
2869 | ||
2870 | -> { "execute": "query-iothreads" } | |
2871 | <- { | |
2872 | "return":[ | |
2873 | { | |
2874 | "id":"iothread0", | |
2875 | "thread-id":3134 | |
2876 | }, | |
2877 | { | |
2878 | "id":"iothread1", | |
2879 | "thread-id":3135 | |
2880 | } | |
2881 | ] | |
2882 | } | |
2883 | ||
2884 | EQMP | |
2885 | ||
2886 | { | |
2887 | .name = "query-iothreads", | |
2888 | .args_type = "", | |
dc3dd0d2 SH |
2889 | }, |
2890 | ||
82a56f0d LC |
2891 | SQMP |
2892 | query-pci | |
2893 | --------- | |
2894 | ||
2895 | PCI buses and devices information. | |
2896 | ||
2897 | The returned value is a json-array of all buses. Each bus is represented by | |
2898 | a json-object, which has a key with a json-array of all PCI devices attached | |
2899 | to it. Each device is represented by a json-object. | |
2900 | ||
2901 | The bus json-object contains the following: | |
2902 | ||
2903 | - "bus": bus number (json-int) | |
2904 | - "devices": a json-array of json-objects, each json-object represents a | |
2905 | PCI device | |
2906 | ||
2907 | The PCI device json-object contains the following: | |
2908 | ||
2909 | - "bus": identical to the parent's bus number (json-int) | |
2910 | - "slot": slot number (json-int) | |
2911 | - "function": function number (json-int) | |
2912 | - "class_info": a json-object containing: | |
2913 | - "desc": device class description (json-string, optional) | |
2914 | - "class": device class number (json-int) | |
2915 | - "id": a json-object containing: | |
2916 | - "device": device ID (json-int) | |
2917 | - "vendor": vendor ID (json-int) | |
2918 | - "irq": device's IRQ if assigned (json-int, optional) | |
2919 | - "qdev_id": qdev id string (json-string) | |
2920 | - "pci_bridge": It's a json-object, only present if this device is a | |
2921 | PCI bridge, contains: | |
2922 | - "bus": bus number (json-int) | |
2923 | - "secondary": secondary bus number (json-int) | |
2924 | - "subordinate": subordinate bus number (json-int) | |
2925 | - "io_range": I/O memory range information, a json-object with the | |
2926 | following members: | |
2927 | - "base": base address, in bytes (json-int) | |
2928 | - "limit": limit address, in bytes (json-int) | |
2929 | - "memory_range": memory range information, a json-object with the | |
2930 | following members: | |
2931 | - "base": base address, in bytes (json-int) | |
2932 | - "limit": limit address, in bytes (json-int) | |
2933 | - "prefetchable_range": Prefetchable memory range information, a | |
2934 | json-object with the following members: | |
2935 | - "base": base address, in bytes (json-int) | |
2936 | - "limit": limit address, in bytes (json-int) | |
2937 | - "devices": a json-array of PCI devices if there's any attached, each | |
2938 | each element is represented by a json-object, which contains | |
2939 | the same members of the 'PCI device json-object' described | |
2940 | above (optional) | |
2941 | - "regions": a json-array of json-objects, each json-object represents a | |
2942 | memory region of this device | |
2943 | ||
2944 | The memory range json-object contains the following: | |
2945 | ||
2946 | - "base": base memory address (json-int) | |
2947 | - "limit": limit value (json-int) | |
2948 | ||
2949 | The region json-object can be an I/O region or a memory region, an I/O region | |
2950 | json-object contains the following: | |
2951 | ||
2952 | - "type": "io" (json-string, fixed) | |
2953 | - "bar": BAR number (json-int) | |
2954 | - "address": memory address (json-int) | |
2955 | - "size": memory size (json-int) | |
2956 | ||
2957 | A memory region json-object contains the following: | |
2958 | ||
2959 | - "type": "memory" (json-string, fixed) | |
2960 | - "bar": BAR number (json-int) | |
2961 | - "address": memory address (json-int) | |
2962 | - "size": memory size (json-int) | |
2963 | - "mem_type_64": true or false (json-bool) | |
2964 | - "prefetch": true or false (json-bool) | |
2965 | ||
2966 | Example: | |
2967 | ||
2968 | -> { "execute": "query-pci" } | |
2969 | <- { | |
2970 | "return":[ | |
2971 | { | |
2972 | "bus":0, | |
2973 | "devices":[ | |
2974 | { | |
2975 | "bus":0, | |
2976 | "qdev_id":"", | |
2977 | "slot":0, | |
2978 | "class_info":{ | |
2979 | "class":1536, | |
2980 | "desc":"Host bridge" | |
2981 | }, | |
2982 | "id":{ | |
2983 | "device":32902, | |
2984 | "vendor":4663 | |
2985 | }, | |
2986 | "function":0, | |
2987 | "regions":[ | |
bdf05133 | 2988 | |
82a56f0d LC |
2989 | ] |
2990 | }, | |
2991 | { | |
2992 | "bus":0, | |
2993 | "qdev_id":"", | |
2994 | "slot":1, | |
2995 | "class_info":{ | |
2996 | "class":1537, | |
2997 | "desc":"ISA bridge" | |
2998 | }, | |
2999 | "id":{ | |
3000 | "device":32902, | |
3001 | "vendor":28672 | |
3002 | }, | |
3003 | "function":0, | |
3004 | "regions":[ | |
bdf05133 | 3005 | |
82a56f0d LC |
3006 | ] |
3007 | }, | |
3008 | { | |
3009 | "bus":0, | |
3010 | "qdev_id":"", | |
3011 | "slot":1, | |
3012 | "class_info":{ | |
3013 | "class":257, | |
3014 | "desc":"IDE controller" | |
3015 | }, | |
3016 | "id":{ | |
3017 | "device":32902, | |
3018 | "vendor":28688 | |
3019 | }, | |
3020 | "function":1, | |
3021 | "regions":[ | |
3022 | { | |
3023 | "bar":4, | |
3024 | "size":16, | |
3025 | "address":49152, | |
3026 | "type":"io" | |
3027 | } | |
3028 | ] | |
3029 | }, | |
3030 | { | |
3031 | "bus":0, | |
3032 | "qdev_id":"", | |
3033 | "slot":2, | |
3034 | "class_info":{ | |
3035 | "class":768, | |
3036 | "desc":"VGA controller" | |
3037 | }, | |
3038 | "id":{ | |
3039 | "device":4115, | |
3040 | "vendor":184 | |
3041 | }, | |
3042 | "function":0, | |
3043 | "regions":[ | |
3044 | { | |
3045 | "prefetch":true, | |
3046 | "mem_type_64":false, | |
3047 | "bar":0, | |
3048 | "size":33554432, | |
3049 | "address":4026531840, | |
3050 | "type":"memory" | |
3051 | }, | |
3052 | { | |
3053 | "prefetch":false, | |
3054 | "mem_type_64":false, | |
3055 | "bar":1, | |
3056 | "size":4096, | |
3057 | "address":4060086272, | |
3058 | "type":"memory" | |
3059 | }, | |
3060 | { | |
3061 | "prefetch":false, | |
3062 | "mem_type_64":false, | |
3063 | "bar":6, | |
3064 | "size":65536, | |
3065 | "address":-1, | |
3066 | "type":"memory" | |
3067 | } | |
3068 | ] | |
3069 | }, | |
3070 | { | |
3071 | "bus":0, | |
3072 | "qdev_id":"", | |
3073 | "irq":11, | |
3074 | "slot":4, | |
3075 | "class_info":{ | |
3076 | "class":1280, | |
3077 | "desc":"RAM controller" | |
3078 | }, | |
3079 | "id":{ | |
3080 | "device":6900, | |
3081 | "vendor":4098 | |
3082 | }, | |
3083 | "function":0, | |
3084 | "regions":[ | |
3085 | { | |
3086 | "bar":0, | |
3087 | "size":32, | |
3088 | "address":49280, | |
3089 | "type":"io" | |
3090 | } | |
3091 | ] | |
3092 | } | |
3093 | ] | |
3094 | } | |
3095 | ] | |
3096 | } | |
3097 | ||
3098 | Note: This example has been shortened as the real response is too long. | |
3099 | ||
3100 | EQMP | |
3101 | ||
79627472 LC |
3102 | { |
3103 | .name = "query-pci", | |
3104 | .args_type = "", | |
79627472 LC |
3105 | }, |
3106 | ||
82a56f0d LC |
3107 | SQMP |
3108 | query-kvm | |
3109 | --------- | |
3110 | ||
3111 | Show KVM information. | |
3112 | ||
3113 | Return a json-object with the following information: | |
3114 | ||
3115 | - "enabled": true if KVM support is enabled, false otherwise (json-bool) | |
3116 | - "present": true if QEMU has KVM support, false otherwise (json-bool) | |
3117 | ||
3118 | Example: | |
3119 | ||
3120 | -> { "execute": "query-kvm" } | |
3121 | <- { "return": { "enabled": true, "present": true } } | |
3122 | ||
3123 | EQMP | |
3124 | ||
292a2602 LC |
3125 | { |
3126 | .name = "query-kvm", | |
3127 | .args_type = "", | |
292a2602 LC |
3128 | }, |
3129 | ||
82a56f0d LC |
3130 | SQMP |
3131 | query-status | |
3132 | ------------ | |
3133 | ||
3134 | Return a json-object with the following information: | |
3135 | ||
3136 | - "running": true if the VM is running, or false if it is paused (json-bool) | |
3137 | - "singlestep": true if the VM is in single step mode, | |
3138 | false otherwise (json-bool) | |
9e37b9dc LC |
3139 | - "status": one of the following values (json-string) |
3140 | "debug" - QEMU is running on a debugger | |
3141 | "inmigrate" - guest is paused waiting for an incoming migration | |
3142 | "internal-error" - An internal error that prevents further guest | |
3143 | execution has occurred | |
3144 | "io-error" - the last IOP has failed and the device is configured | |
3145 | to pause on I/O errors | |
3146 | "paused" - guest has been paused via the 'stop' command | |
3147 | "postmigrate" - guest is paused following a successful 'migrate' | |
3148 | "prelaunch" - QEMU was started with -S and guest has not started | |
3149 | "finish-migrate" - guest is paused to finish the migration process | |
3150 | "restore-vm" - guest is paused to restore VM state | |
3151 | "running" - guest is actively running | |
3152 | "save-vm" - guest is paused to save the VM state | |
3153 | "shutdown" - guest is shut down (and -no-shutdown is in use) | |
3154 | "watchdog" - the watchdog action is configured to pause and | |
3155 | has been triggered | |
82a56f0d LC |
3156 | |
3157 | Example: | |
3158 | ||
3159 | -> { "execute": "query-status" } | |
9e37b9dc | 3160 | <- { "return": { "running": true, "singlestep": false, "status": "running" } } |
82a56f0d LC |
3161 | |
3162 | EQMP | |
1fa9a5e4 LC |
3163 | |
3164 | { | |
3165 | .name = "query-status", | |
3166 | .args_type = "", | |
1fa9a5e4 | 3167 | }, |
82a56f0d LC |
3168 | |
3169 | SQMP | |
3170 | query-mice | |
3171 | ---------- | |
3172 | ||
3173 | Show VM mice information. | |
3174 | ||
3175 | Each mouse is represented by a json-object, the returned value is a json-array | |
3176 | of all mice. | |
3177 | ||
3178 | The mouse json-object contains the following: | |
3179 | ||
3180 | - "name": mouse's name (json-string) | |
3181 | - "index": mouse's index (json-int) | |
3182 | - "current": true if this mouse is receiving events, false otherwise (json-bool) | |
3183 | - "absolute": true if the mouse generates absolute input events (json-bool) | |
3184 | ||
3185 | Example: | |
3186 | ||
3187 | -> { "execute": "query-mice" } | |
3188 | <- { | |
3189 | "return":[ | |
3190 | { | |
3191 | "name":"QEMU Microsoft Mouse", | |
3192 | "index":0, | |
3193 | "current":false, | |
3194 | "absolute":false | |
3195 | }, | |
3196 | { | |
3197 | "name":"QEMU PS/2 Mouse", | |
3198 | "index":1, | |
3199 | "current":true, | |
3200 | "absolute":true | |
3201 | } | |
3202 | ] | |
3203 | } | |
3204 | ||
3205 | EQMP | |
3206 | ||
e235cec3 LC |
3207 | { |
3208 | .name = "query-mice", | |
3209 | .args_type = "", | |
e235cec3 LC |
3210 | }, |
3211 | ||
82a56f0d LC |
3212 | SQMP |
3213 | query-vnc | |
3214 | --------- | |
3215 | ||
3216 | Show VNC server information. | |
3217 | ||
3218 | Return a json-object with server information. Connected clients are returned | |
3219 | as a json-array of json-objects. | |
3220 | ||
3221 | The main json-object contains the following: | |
3222 | ||
3223 | - "enabled": true or false (json-bool) | |
3224 | - "host": server's IP address (json-string) | |
3225 | - "family": address family (json-string) | |
3226 | - Possible values: "ipv4", "ipv6", "unix", "unknown" | |
3227 | - "service": server's port number (json-string) | |
3228 | - "auth": authentication method (json-string) | |
3229 | - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight", | |
3230 | "tls", "ultra", "unknown", "vencrypt", "vencrypt", | |
3231 | "vencrypt+plain", "vencrypt+tls+none", | |
3232 | "vencrypt+tls+plain", "vencrypt+tls+sasl", | |
3233 | "vencrypt+tls+vnc", "vencrypt+x509+none", | |
3234 | "vencrypt+x509+plain", "vencrypt+x509+sasl", | |
3235 | "vencrypt+x509+vnc", "vnc" | |
3236 | - "clients": a json-array of all connected clients | |
3237 | ||
3238 | Clients are described by a json-object, each one contain the following: | |
3239 | ||
3240 | - "host": client's IP address (json-string) | |
3241 | - "family": address family (json-string) | |
3242 | - Possible values: "ipv4", "ipv6", "unix", "unknown" | |
3243 | - "service": client's port number (json-string) | |
3244 | - "x509_dname": TLS dname (json-string, optional) | |
3245 | - "sasl_username": SASL username (json-string, optional) | |
3246 | ||
3247 | Example: | |
3248 | ||
3249 | -> { "execute": "query-vnc" } | |
3250 | <- { | |
3251 | "return":{ | |
3252 | "enabled":true, | |
3253 | "host":"0.0.0.0", | |
3254 | "service":"50402", | |
3255 | "auth":"vnc", | |
3256 | "family":"ipv4", | |
3257 | "clients":[ | |
3258 | { | |
3259 | "host":"127.0.0.1", | |
3260 | "service":"50401", | |
3261 | "family":"ipv4" | |
3262 | } | |
3263 | ] | |
3264 | } | |
3265 | } | |
3266 | ||
3267 | EQMP | |
3268 | ||
2b54aa87 LC |
3269 | { |
3270 | .name = "query-vnc", | |
3271 | .args_type = "", | |
2b54aa87 | 3272 | }, |
df887684 GH |
3273 | { |
3274 | .name = "query-vnc-servers", | |
3275 | .args_type = "", | |
df887684 | 3276 | }, |
2b54aa87 | 3277 | |
cb42a870 GH |
3278 | SQMP |
3279 | query-spice | |
3280 | ----------- | |
3281 | ||
3282 | Show SPICE server information. | |
3283 | ||
3284 | Return a json-object with server information. Connected clients are returned | |
3285 | as a json-array of json-objects. | |
3286 | ||
3287 | The main json-object contains the following: | |
3288 | ||
3289 | - "enabled": true or false (json-bool) | |
3290 | - "host": server's IP address (json-string) | |
3291 | - "port": server's port number (json-int, optional) | |
3292 | - "tls-port": server's port number (json-int, optional) | |
3293 | - "auth": authentication method (json-string) | |
3294 | - Possible values: "none", "spice" | |
3295 | - "channels": a json-array of all active channels clients | |
3296 | ||
3297 | Channels are described by a json-object, each one contain the following: | |
3298 | ||
3299 | - "host": client's IP address (json-string) | |
3300 | - "family": address family (json-string) | |
3301 | - Possible values: "ipv4", "ipv6", "unix", "unknown" | |
3302 | - "port": client's port number (json-string) | |
3303 | - "connection-id": spice connection id. All channels with the same id | |
3304 | belong to the same spice session (json-int) | |
3305 | - "channel-type": channel type. "1" is the main control channel, filter for | |
3306 | this one if you want track spice sessions only (json-int) | |
3307 | - "channel-id": channel id. Usually "0", might be different needed when | |
3308 | multiple channels of the same type exist, such as multiple | |
3309 | display channels in a multihead setup (json-int) | |
3599d46b | 3310 | - "tls": whether the channel is encrypted (json-bool) |
cb42a870 GH |
3311 | |
3312 | Example: | |
3313 | ||
3314 | -> { "execute": "query-spice" } | |
3315 | <- { | |
3316 | "return": { | |
3317 | "enabled": true, | |
3318 | "auth": "spice", | |
3319 | "port": 5920, | |
3320 | "tls-port": 5921, | |
3321 | "host": "0.0.0.0", | |
3322 | "channels": [ | |
3323 | { | |
3324 | "port": "54924", | |
3325 | "family": "ipv4", | |
3326 | "channel-type": 1, | |
3327 | "connection-id": 1804289383, | |
3328 | "host": "127.0.0.1", | |
3329 | "channel-id": 0, | |
3330 | "tls": true | |
3331 | }, | |
3332 | { | |
3333 | "port": "36710", | |
3334 | "family": "ipv4", | |
3335 | "channel-type": 4, | |
3336 | "connection-id": 1804289383, | |
3337 | "host": "127.0.0.1", | |
3338 | "channel-id": 0, | |
3339 | "tls": false | |
3340 | }, | |
3341 | [ ... more channels follow ... ] | |
3342 | ] | |
3343 | } | |
3344 | } | |
3345 | ||
3346 | EQMP | |
3347 | ||
d1f29646 LC |
3348 | #if defined(CONFIG_SPICE) |
3349 | { | |
3350 | .name = "query-spice", | |
3351 | .args_type = "", | |
d1f29646 LC |
3352 | }, |
3353 | #endif | |
3354 | ||
82a56f0d LC |
3355 | SQMP |
3356 | query-name | |
3357 | ---------- | |
3358 | ||
3359 | Show VM name. | |
3360 | ||
3361 | Return a json-object with the following information: | |
3362 | ||
3363 | - "name": VM's name (json-string, optional) | |
3364 | ||
3365 | Example: | |
3366 | ||
3367 | -> { "execute": "query-name" } | |
3368 | <- { "return": { "name": "qemu-name" } } | |
3369 | ||
3370 | EQMP | |
3371 | ||
48a32bed AL |
3372 | { |
3373 | .name = "query-name", | |
3374 | .args_type = "", | |
48a32bed AL |
3375 | }, |
3376 | ||
82a56f0d LC |
3377 | SQMP |
3378 | query-uuid | |
3379 | ---------- | |
3380 | ||
3381 | Show VM UUID. | |
3382 | ||
3383 | Return a json-object with the following information: | |
3384 | ||
3385 | - "UUID": Universally Unique Identifier (json-string) | |
3386 | ||
3387 | Example: | |
3388 | ||
3389 | -> { "execute": "query-uuid" } | |
3390 | <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } | |
3391 | ||
3392 | EQMP | |
3393 | ||
efab767e LC |
3394 | { |
3395 | .name = "query-uuid", | |
3396 | .args_type = "", | |
efab767e LC |
3397 | }, |
3398 | ||
1f8f987d AK |
3399 | SQMP |
3400 | query-command-line-options | |
3401 | -------------------------- | |
3402 | ||
3403 | Show command line option schema. | |
3404 | ||
3405 | Return a json-array of command line option schema for all options (or for | |
3406 | the given option), returning an error if the given option doesn't exist. | |
3407 | ||
3408 | Each array entry contains the following: | |
3409 | ||
3410 | - "option": option name (json-string) | |
3411 | - "parameters": a json-array describes all parameters of the option: | |
3412 | - "name": parameter name (json-string) | |
3413 | - "type": parameter type (one of 'string', 'boolean', 'number', | |
3414 | or 'size') | |
3415 | - "help": human readable description of the parameter | |
3416 | (json-string, optional) | |
e36af94f CL |
3417 | - "default": default value string for the parameter |
3418 | (json-string, optional) | |
1f8f987d AK |
3419 | |
3420 | Example: | |
3421 | ||
3422 | -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } } | |
3423 | <- { "return": [ | |
3424 | { | |
3425 | "parameters": [ | |
3426 | { | |
3427 | "name": "romfile", | |
3428 | "type": "string" | |
3429 | }, | |
3430 | { | |
3431 | "name": "bootindex", | |
3432 | "type": "number" | |
3433 | } | |
3434 | ], | |
3435 | "option": "option-rom" | |
3436 | } | |
3437 | ] | |
3438 | } | |
3439 | ||
3440 | EQMP | |
3441 | ||
3442 | { | |
3443 | .name = "query-command-line-options", | |
3444 | .args_type = "option:s?", | |
1f8f987d AK |
3445 | }, |
3446 | ||
82a56f0d LC |
3447 | SQMP |
3448 | query-migrate | |
3449 | ------------- | |
3450 | ||
3451 | Migration status. | |
3452 | ||
3453 | Return a json-object. If migration is active there will be another json-object | |
3454 | with RAM migration status and if block migration is active another one with | |
3455 | block migration status. | |
3456 | ||
3457 | The main json-object contains the following: | |
3458 | ||
3459 | - "status": migration status (json-string) | |
3b695950 | 3460 | - Possible values: "setup", "active", "completed", "failed", "cancelled" |
7aa939af JQ |
3461 | - "total-time": total amount of ms since migration started. If |
3462 | migration has ended, it returns the total migration | |
817c6045 | 3463 | time (json-int) |
8f3067bd MH |
3464 | - "setup-time" amount of setup time in milliseconds _before_ the |
3465 | iterations begin but _after_ the QMP command is issued. | |
3466 | This is designed to provide an accounting of any activities | |
bdf05133 MAL |
3467 | (such as RDMA pinning) which may be expensive, but do not |
3468 | actually occur during the iterative migration rounds | |
8f3067bd | 3469 | themselves. (json-int) |
9c5a9fcf JQ |
3470 | - "downtime": only present when migration has finished correctly |
3471 | total amount in ms for downtime that happened (json-int) | |
2c52ddf1 JQ |
3472 | - "expected-downtime": only present while migration is active |
3473 | total amount in ms for downtime that was calculated on | |
817c6045 | 3474 | the last bitmap round (json-int) |
82a56f0d | 3475 | - "ram": only present if "status" is "active", it is a json-object with the |
817c6045 JQ |
3476 | following RAM information: |
3477 | - "transferred": amount transferred in bytes (json-int) | |
3478 | - "remaining": amount remaining to transfer in bytes (json-int) | |
3479 | - "total": total amount of memory in bytes (json-int) | |
3480 | - "duplicate": number of pages filled entirely with the same | |
3481 | byte (json-int) | |
3482 | These are sent over the wire much more efficiently. | |
f1c72795 | 3483 | - "skipped": number of skipped zero pages (json-int) |
805a2505 | 3484 | - "normal" : number of whole pages transferred. I.e. they |
817c6045 JQ |
3485 | were not sent as duplicate or xbzrle pages (json-int) |
3486 | - "normal-bytes" : number of bytes transferred in whole | |
3487 | pages. This is just normal pages times size of one page, | |
3488 | but this way upper levels don't need to care about page | |
3489 | size (json-int) | |
58570ed8 | 3490 | - "dirty-sync-count": times that dirty ram was synchronized (json-int) |
82a56f0d | 3491 | - "disk": only present if "status" is "active" and it is a block migration, |
817c6045 JQ |
3492 | it is a json-object with the following disk information: |
3493 | - "transferred": amount transferred in bytes (json-int) | |
3494 | - "remaining": amount remaining to transfer in bytes json-int) | |
3495 | - "total": total disk size in bytes (json-int) | |
f36d55af OW |
3496 | - "xbzrle-cache": only present if XBZRLE is active. |
3497 | It is a json-object with the following XBZRLE information: | |
817c6045 JQ |
3498 | - "cache-size": XBZRLE cache size in bytes |
3499 | - "bytes": number of bytes transferred for XBZRLE compressed pages | |
f36d55af | 3500 | - "pages": number of XBZRLE compressed pages |
817c6045 | 3501 | - "cache-miss": number of XBRZRLE page cache misses |
8bc39233 | 3502 | - "cache-miss-rate": rate of XBRZRLE page cache misses |
817c6045 JQ |
3503 | - "overflow": number of times XBZRLE overflows. This means |
3504 | that the XBZRLE encoding was bigger than just sent the | |
3505 | whole page, and then we sent the whole page instead (as as | |
3506 | normal page). | |
3507 | ||
82a56f0d LC |
3508 | Examples: |
3509 | ||
3510 | 1. Before the first migration | |
3511 | ||
3512 | -> { "execute": "query-migrate" } | |
3513 | <- { "return": {} } | |
3514 | ||
3515 | 2. Migration is done and has succeeded | |
3516 | ||
3517 | -> { "execute": "query-migrate" } | |
004d4c10 OW |
3518 | <- { "return": { |
3519 | "status": "completed", | |
3520 | "ram":{ | |
3521 | "transferred":123, | |
3522 | "remaining":123, | |
3523 | "total":246, | |
3524 | "total-time":12345, | |
8f3067bd | 3525 | "setup-time":12345, |
9c5a9fcf | 3526 | "downtime":12345, |
004d4c10 OW |
3527 | "duplicate":123, |
3528 | "normal":123, | |
58570ed8 C |
3529 | "normal-bytes":123456, |
3530 | "dirty-sync-count":15 | |
004d4c10 OW |
3531 | } |
3532 | } | |
3533 | } | |
82a56f0d LC |
3534 | |
3535 | 3. Migration is done and has failed | |
3536 | ||
3537 | -> { "execute": "query-migrate" } | |
3538 | <- { "return": { "status": "failed" } } | |
3539 | ||
3540 | 4. Migration is being performed and is not a block migration: | |
3541 | ||
3542 | -> { "execute": "query-migrate" } | |
3543 | <- { | |
3544 | "return":{ | |
3545 | "status":"active", | |
3546 | "ram":{ | |
3547 | "transferred":123, | |
3548 | "remaining":123, | |
62d4e3fe | 3549 | "total":246, |
004d4c10 | 3550 | "total-time":12345, |
8f3067bd | 3551 | "setup-time":12345, |
2c52ddf1 | 3552 | "expected-downtime":12345, |
004d4c10 OW |
3553 | "duplicate":123, |
3554 | "normal":123, | |
58570ed8 C |
3555 | "normal-bytes":123456, |
3556 | "dirty-sync-count":15 | |
82a56f0d LC |
3557 | } |
3558 | } | |
3559 | } | |
3560 | ||
3561 | 5. Migration is being performed and is a block migration: | |
3562 | ||
3563 | -> { "execute": "query-migrate" } | |
3564 | <- { | |
3565 | "return":{ | |
3566 | "status":"active", | |
3567 | "ram":{ | |
3568 | "total":1057024, | |
3569 | "remaining":1053304, | |
62d4e3fe | 3570 | "transferred":3720, |
004d4c10 | 3571 | "total-time":12345, |
8f3067bd | 3572 | "setup-time":12345, |
2c52ddf1 | 3573 | "expected-downtime":12345, |
004d4c10 OW |
3574 | "duplicate":123, |
3575 | "normal":123, | |
58570ed8 C |
3576 | "normal-bytes":123456, |
3577 | "dirty-sync-count":15 | |
82a56f0d LC |
3578 | }, |
3579 | "disk":{ | |
3580 | "total":20971520, | |
3581 | "remaining":20880384, | |
3582 | "transferred":91136 | |
3583 | } | |
3584 | } | |
3585 | } | |
3586 | ||
f36d55af OW |
3587 | 6. Migration is being performed and XBZRLE is active: |
3588 | ||
3589 | -> { "execute": "query-migrate" } | |
3590 | <- { | |
3591 | "return":{ | |
3592 | "status":"active", | |
3593 | "capabilities" : [ { "capability": "xbzrle", "state" : true } ], | |
3594 | "ram":{ | |
3595 | "total":1057024, | |
3596 | "remaining":1053304, | |
3597 | "transferred":3720, | |
3598 | "total-time":12345, | |
8f3067bd | 3599 | "setup-time":12345, |
2c52ddf1 | 3600 | "expected-downtime":12345, |
f36d55af OW |
3601 | "duplicate":10, |
3602 | "normal":3333, | |
58570ed8 C |
3603 | "normal-bytes":3412992, |
3604 | "dirty-sync-count":15 | |
f36d55af OW |
3605 | }, |
3606 | "xbzrle-cache":{ | |
3607 | "cache-size":67108864, | |
3608 | "bytes":20971520, | |
3609 | "pages":2444343, | |
3610 | "cache-miss":2244, | |
8bc39233 | 3611 | "cache-miss-rate":0.123, |
f36d55af OW |
3612 | "overflow":34434 |
3613 | } | |
3614 | } | |
3615 | } | |
3616 | ||
82a56f0d LC |
3617 | EQMP |
3618 | ||
791e7c82 LC |
3619 | { |
3620 | .name = "query-migrate", | |
3621 | .args_type = "", | |
791e7c82 LC |
3622 | }, |
3623 | ||
bbf6da32 | 3624 | SQMP |
00458433 | 3625 | migrate-set-capabilities |
817c6045 | 3626 | ------------------------ |
00458433 OW |
3627 | |
3628 | Enable/Disable migration capabilities | |
3629 | ||
817c6045 | 3630 | - "xbzrle": XBZRLE support |
d6d69731 HZ |
3631 | - "rdma-pin-all": pin all pages when using RDMA during migration |
3632 | - "auto-converge": throttle down guest to help convergence of migration | |
3633 | - "zero-blocks": compress zero blocks during block migration | |
164f59e8 | 3634 | - "compress": use multiple compression threads to accelerate live migration |
72e72e1a | 3635 | - "events": generate events for each migration state change |
32c3db5b | 3636 | - "postcopy-ram": postcopy mode for live migration |
00458433 OW |
3637 | |
3638 | Arguments: | |
3639 | ||
3640 | Example: | |
3641 | ||
3642 | -> { "execute": "migrate-set-capabilities" , "arguments": | |
3643 | { "capabilities": [ { "capability": "xbzrle", "state": true } ] } } | |
3644 | ||
3645 | EQMP | |
3646 | ||
3647 | { | |
3648 | .name = "migrate-set-capabilities", | |
43d0a2c1 | 3649 | .args_type = "capabilities:q", |
00458433 | 3650 | .params = "capability:s,state:b", |
00458433 OW |
3651 | }, |
3652 | SQMP | |
bbf6da32 | 3653 | query-migrate-capabilities |
817c6045 | 3654 | -------------------------- |
bbf6da32 OW |
3655 | |
3656 | Query current migration capabilities | |
3657 | ||
3658 | - "capabilities": migration capabilities state | |
3659 | - "xbzrle" : XBZRLE state (json-bool) | |
d6d69731 HZ |
3660 | - "rdma-pin-all" : RDMA Pin Page state (json-bool) |
3661 | - "auto-converge" : Auto Converge state (json-bool) | |
3662 | - "zero-blocks" : Zero Blocks state (json-bool) | |
164f59e8 HZ |
3663 | - "compress": Multiple compression threads state (json-bool) |
3664 | - "events": Migration state change event state (json-bool) | |
32c3db5b | 3665 | - "postcopy-ram": postcopy ram state (json-bool) |
bbf6da32 OW |
3666 | |
3667 | Arguments: | |
3668 | ||
3669 | Example: | |
3670 | ||
3671 | -> { "execute": "query-migrate-capabilities" } | |
164f59e8 HZ |
3672 | <- {"return": [ |
3673 | {"state": false, "capability": "xbzrle"}, | |
3674 | {"state": false, "capability": "rdma-pin-all"}, | |
3675 | {"state": false, "capability": "auto-converge"}, | |
3676 | {"state": false, "capability": "zero-blocks"}, | |
3677 | {"state": false, "capability": "compress"}, | |
3678 | {"state": true, "capability": "events"}, | |
32c3db5b | 3679 | {"state": false, "capability": "postcopy-ram"} |
164f59e8 | 3680 | ]} |
dbca1b37 | 3681 | |
bbf6da32 OW |
3682 | EQMP |
3683 | ||
3684 | { | |
3685 | .name = "query-migrate-capabilities", | |
3686 | .args_type = "", | |
bbf6da32 OW |
3687 | }, |
3688 | ||
85de8323 LL |
3689 | SQMP |
3690 | migrate-set-parameters | |
3691 | ---------------------- | |
3692 | ||
3693 | Set migration parameters | |
3694 | ||
3695 | - "compress-level": set compression level during migration (json-int) | |
3696 | - "compress-threads": set compression thread count for migration (json-int) | |
3697 | - "decompress-threads": set decompression thread count for migration (json-int) | |
d85a31d1 JH |
3698 | - "cpu-throttle-initial": set initial percentage of time guest cpus are |
3699 | throttled for auto-converge (json-int) | |
3700 | - "cpu-throttle-increment": set throttle increasing percentage for | |
3701 | auto-converge (json-int) | |
85de8323 LL |
3702 | |
3703 | Arguments: | |
3704 | ||
3705 | Example: | |
3706 | ||
3707 | -> { "execute": "migrate-set-parameters" , "arguments": | |
3708 | { "compress-level": 1 } } | |
3709 | ||
3710 | EQMP | |
3711 | ||
3712 | { | |
3713 | .name = "migrate-set-parameters", | |
3714 | .args_type = | |
d85a31d1 | 3715 | "compress-level:i?,compress-threads:i?,decompress-threads:i?,cpu-throttle-initial:i?,cpu-throttle-increment:i?", |
85de8323 LL |
3716 | }, |
3717 | SQMP | |
3718 | query-migrate-parameters | |
3719 | ------------------------ | |
3720 | ||
3721 | Query current migration parameters | |
3722 | ||
3723 | - "parameters": migration parameters value | |
3724 | - "compress-level" : compression level value (json-int) | |
3725 | - "compress-threads" : compression thread count value (json-int) | |
3726 | - "decompress-threads" : decompression thread count value (json-int) | |
d85a31d1 JH |
3727 | - "cpu-throttle-initial" : initial percentage of time guest cpus are |
3728 | throttled (json-int) | |
3729 | - "cpu-throttle-increment" : throttle increasing percentage for | |
3730 | auto-converge (json-int) | |
85de8323 LL |
3731 | |
3732 | Arguments: | |
3733 | ||
3734 | Example: | |
3735 | ||
3736 | -> { "execute": "query-migrate-parameters" } | |
3737 | <- { | |
3738 | "return": { | |
9c994a97 | 3739 | "decompress-threads": 2, |
d85a31d1 | 3740 | "cpu-throttle-increment": 10, |
9c994a97 HZ |
3741 | "compress-threads": 8, |
3742 | "compress-level": 1, | |
d85a31d1 | 3743 | "cpu-throttle-initial": 20 |
85de8323 LL |
3744 | } |
3745 | } | |
3746 | ||
3747 | EQMP | |
3748 | ||
3749 | { | |
3750 | .name = "query-migrate-parameters", | |
3751 | .args_type = "", | |
85de8323 LL |
3752 | }, |
3753 | ||
82a56f0d LC |
3754 | SQMP |
3755 | query-balloon | |
3756 | ------------- | |
3757 | ||
3758 | Show balloon information. | |
3759 | ||
3760 | Make an asynchronous request for balloon info. When the request completes a | |
3761 | json-object will be returned containing the following data: | |
3762 | ||
3763 | - "actual": current balloon value in bytes (json-int) | |
82a56f0d LC |
3764 | |
3765 | Example: | |
3766 | ||
3767 | -> { "execute": "query-balloon" } | |
3768 | <- { | |
3769 | "return":{ | |
3770 | "actual":1073741824, | |
82a56f0d LC |
3771 | } |
3772 | } | |
3773 | ||
3774 | EQMP | |
3775 | ||
96637bcd LC |
3776 | { |
3777 | .name = "query-balloon", | |
3778 | .args_type = "", | |
96637bcd | 3779 | }, |
b4b12c62 | 3780 | |
fb5458cd SH |
3781 | { |
3782 | .name = "query-block-jobs", | |
3783 | .args_type = "", | |
fb5458cd SH |
3784 | }, |
3785 | ||
b4b12c62 AL |
3786 | { |
3787 | .name = "qom-list", | |
3788 | .args_type = "path:s", | |
b4b12c62 | 3789 | }, |
eb6e8ea5 AL |
3790 | |
3791 | { | |
3792 | .name = "qom-set", | |
b9f8978c | 3793 | .args_type = "path:s,property:s,value:q", |
eb6e8ea5 AL |
3794 | }, |
3795 | ||
3796 | { | |
3797 | .name = "qom-get", | |
3798 | .args_type = "path:s,property:s", | |
eb6e8ea5 | 3799 | }, |
270b243f | 3800 | |
6dd844db PB |
3801 | { |
3802 | .name = "nbd-server-start", | |
ddffee39 | 3803 | .args_type = "addr:q,tls-creds:s?", |
6dd844db PB |
3804 | }, |
3805 | { | |
3806 | .name = "nbd-server-add", | |
3807 | .args_type = "device:B,writable:b?", | |
6dd844db PB |
3808 | }, |
3809 | { | |
3810 | .name = "nbd-server-stop", | |
3811 | .args_type = "", | |
6dd844db PB |
3812 | }, |
3813 | ||
270b243f LC |
3814 | { |
3815 | .name = "change-vnc-password", | |
3816 | .args_type = "password:s", | |
270b243f | 3817 | }, |
5eeee3fa AL |
3818 | { |
3819 | .name = "qom-list-types", | |
3820 | .args_type = "implements:s?,abstract:b?", | |
5eeee3fa | 3821 | }, |
1daa31b9 AL |
3822 | |
3823 | { | |
3824 | .name = "device-list-properties", | |
3825 | .args_type = "typename:s", | |
1daa31b9 AL |
3826 | }, |
3827 | ||
01d3c80d AL |
3828 | { |
3829 | .name = "query-machines", | |
3830 | .args_type = "", | |
01d3c80d AL |
3831 | }, |
3832 | ||
e4e31c63 AL |
3833 | { |
3834 | .name = "query-cpu-definitions", | |
3835 | .args_type = "", | |
e4e31c63 AL |
3836 | }, |
3837 | ||
e09484ef DH |
3838 | { |
3839 | .name = "query-cpu-model-expansion", | |
3840 | .args_type = "type:s,model:q", | |
e09484ef DH |
3841 | }, |
3842 | ||
0031e0d6 DH |
3843 | { |
3844 | .name = "query-cpu-model-comparison", | |
3845 | .args_type = "modela:q,modelb:q", | |
0031e0d6 DH |
3846 | }, |
3847 | ||
b18b6043 DH |
3848 | { |
3849 | .name = "query-cpu-model-baseline", | |
3850 | .args_type = "modela:q,modelb:q", | |
b18b6043 DH |
3851 | }, |
3852 | ||
99afc91d DB |
3853 | { |
3854 | .name = "query-target", | |
3855 | .args_type = "", | |
99afc91d | 3856 | }, |
f1a1a356 | 3857 | |
d1a0cf73 SB |
3858 | { |
3859 | .name = "query-tpm", | |
3860 | .args_type = "", | |
d1a0cf73 SB |
3861 | }, |
3862 | ||
28c4fa32 CB |
3863 | SQMP |
3864 | query-tpm | |
3865 | --------- | |
3866 | ||
3867 | Return information about the TPM device. | |
3868 | ||
3869 | Arguments: None | |
3870 | ||
3871 | Example: | |
3872 | ||
3873 | -> { "execute": "query-tpm" } | |
3874 | <- { "return": | |
3875 | [ | |
3876 | { "model": "tpm-tis", | |
3877 | "options": | |
3878 | { "type": "passthrough", | |
3879 | "data": | |
3880 | { "cancel-path": "/sys/class/misc/tpm0/device/cancel", | |
3881 | "path": "/dev/tpm0" | |
3882 | } | |
3883 | }, | |
3884 | "id": "tpm0" | |
3885 | } | |
3886 | ] | |
3887 | } | |
3888 | ||
3889 | EQMP | |
3890 | ||
d1a0cf73 SB |
3891 | { |
3892 | .name = "query-tpm-models", | |
3893 | .args_type = "", | |
d1a0cf73 SB |
3894 | }, |
3895 | ||
28c4fa32 CB |
3896 | SQMP |
3897 | query-tpm-models | |
3898 | ---------------- | |
3899 | ||
3900 | Return a list of supported TPM models. | |
3901 | ||
3902 | Arguments: None | |
3903 | ||
3904 | Example: | |
3905 | ||
3906 | -> { "execute": "query-tpm-models" } | |
3907 | <- { "return": [ "tpm-tis" ] } | |
3908 | ||
3909 | EQMP | |
3910 | ||
d1a0cf73 SB |
3911 | { |
3912 | .name = "query-tpm-types", | |
3913 | .args_type = "", | |
d1a0cf73 SB |
3914 | }, |
3915 | ||
28c4fa32 CB |
3916 | SQMP |
3917 | query-tpm-types | |
3918 | --------------- | |
3919 | ||
3920 | Return a list of supported TPM types. | |
3921 | ||
3922 | Arguments: None | |
3923 | ||
3924 | Example: | |
3925 | ||
3926 | -> { "execute": "query-tpm-types" } | |
3927 | <- { "return": [ "passthrough" ] } | |
3928 | ||
3929 | EQMP | |
3930 | ||
f1a1a356 GH |
3931 | { |
3932 | .name = "chardev-add", | |
3933 | .args_type = "id:s,backend:q", | |
f1a1a356 GH |
3934 | }, |
3935 | ||
3936 | SQMP | |
3937 | chardev-add | |
3938 | ---------------- | |
3939 | ||
3940 | Add a chardev. | |
3941 | ||
3942 | Arguments: | |
3943 | ||
3944 | - "id": the chardev's ID, must be unique (json-string) | |
3945 | - "backend": chardev backend type + parameters | |
3946 | ||
ffbdbe59 | 3947 | Examples: |
f1a1a356 GH |
3948 | |
3949 | -> { "execute" : "chardev-add", | |
3950 | "arguments" : { "id" : "foo", | |
3951 | "backend" : { "type" : "null", "data" : {} } } } | |
3952 | <- { "return": {} } | |
3953 | ||
ffbdbe59 GH |
3954 | -> { "execute" : "chardev-add", |
3955 | "arguments" : { "id" : "bar", | |
3956 | "backend" : { "type" : "file", | |
3957 | "data" : { "out" : "/tmp/bar.log" } } } } | |
3958 | <- { "return": {} } | |
3959 | ||
0a1a7fab GH |
3960 | -> { "execute" : "chardev-add", |
3961 | "arguments" : { "id" : "baz", | |
3962 | "backend" : { "type" : "pty", "data" : {} } } } | |
3963 | <- { "return": { "pty" : "/dev/pty/42" } } | |
3964 | ||
f1a1a356 GH |
3965 | EQMP |
3966 | ||
3967 | { | |
3968 | .name = "chardev-remove", | |
3969 | .args_type = "id:s", | |
f1a1a356 GH |
3970 | }, |
3971 | ||
3972 | ||
3973 | SQMP | |
3974 | chardev-remove | |
3975 | -------------- | |
3976 | ||
3977 | Remove a chardev. | |
3978 | ||
3979 | Arguments: | |
3980 | ||
3981 | - "id": the chardev's ID, must exist and not be in use (json-string) | |
3982 | ||
3983 | Example: | |
3984 | ||
3985 | -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } } | |
3986 | <- { "return": {} } | |
3987 | ||
b1be4280 AK |
3988 | EQMP |
3989 | { | |
3990 | .name = "query-rx-filter", | |
3991 | .args_type = "name:s?", | |
b1be4280 AK |
3992 | }, |
3993 | ||
3994 | SQMP | |
3995 | query-rx-filter | |
3996 | --------------- | |
3997 | ||
3998 | Show rx-filter information. | |
3999 | ||
4000 | Returns a json-array of rx-filter information for all NICs (or for the | |
4001 | given NIC), returning an error if the given NIC doesn't exist, or | |
4002 | given NIC doesn't support rx-filter querying, or given net client | |
4003 | isn't a NIC. | |
4004 | ||
4005 | The query will clear the event notification flag of each NIC, then qemu | |
4006 | will start to emit event to QMP monitor. | |
4007 | ||
4008 | Each array entry contains the following: | |
4009 | ||
4010 | - "name": net client name (json-string) | |
4011 | - "promiscuous": promiscuous mode is enabled (json-bool) | |
4012 | - "multicast": multicast receive state (one of 'normal', 'none', 'all') | |
4013 | - "unicast": unicast receive state (one of 'normal', 'none', 'all') | |
f7bc8ef8 | 4014 | - "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0) |
b1be4280 AK |
4015 | - "broadcast-allowed": allow to receive broadcast (json-bool) |
4016 | - "multicast-overflow": multicast table is overflowed (json-bool) | |
4017 | - "unicast-overflow": unicast table is overflowed (json-bool) | |
4018 | - "main-mac": main macaddr string (json-string) | |
4019 | - "vlan-table": a json-array of active vlan id | |
4020 | - "unicast-table": a json-array of unicast macaddr string | |
4021 | - "multicast-table": a json-array of multicast macaddr string | |
4022 | ||
4023 | Example: | |
4024 | ||
4025 | -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } } | |
4026 | <- { "return": [ | |
4027 | { | |
4028 | "promiscuous": true, | |
4029 | "name": "vnet0", | |
4030 | "main-mac": "52:54:00:12:34:56", | |
4031 | "unicast": "normal", | |
f7bc8ef8 | 4032 | "vlan": "normal", |
b1be4280 AK |
4033 | "vlan-table": [ |
4034 | 4, | |
4035 | 0 | |
4036 | ], | |
4037 | "unicast-table": [ | |
4038 | ], | |
4039 | "multicast": "normal", | |
4040 | "multicast-overflow": false, | |
4041 | "unicast-overflow": false, | |
4042 | "multicast-table": [ | |
4043 | "01:00:5e:00:00:01", | |
4044 | "33:33:00:00:00:01", | |
4045 | "33:33:ff:12:34:56" | |
4046 | ], | |
4047 | "broadcast-allowed": false | |
4048 | } | |
4049 | ] | |
4050 | } | |
4051 | ||
d26c9a15 KW |
4052 | EQMP |
4053 | ||
4054 | { | |
4055 | .name = "blockdev-add", | |
4056 | .args_type = "options:q", | |
d26c9a15 KW |
4057 | }, |
4058 | ||
4059 | SQMP | |
4060 | blockdev-add | |
4061 | ------------ | |
4062 | ||
4063 | Add a block device. | |
4064 | ||
da2cf4e8 | 4065 | This command is still a work in progress. It doesn't support all |
81b936ae AG |
4066 | block drivers among other things. Stay away from it unless you want |
4067 | to help with its development. | |
da2cf4e8 | 4068 | |
d26c9a15 KW |
4069 | Arguments: |
4070 | ||
4071 | - "options": block driver options | |
4072 | ||
4073 | Example (1): | |
4074 | ||
4075 | -> { "execute": "blockdev-add", | |
4076 | "arguments": { "options" : { "driver": "qcow2", | |
4077 | "file": { "driver": "file", | |
4078 | "filename": "test.qcow2" } } } } | |
4079 | <- { "return": {} } | |
4080 | ||
4081 | Example (2): | |
4082 | ||
4083 | -> { "execute": "blockdev-add", | |
4084 | "arguments": { | |
4085 | "options": { | |
4086 | "driver": "qcow2", | |
4087 | "id": "my_disk", | |
4088 | "discard": "unmap", | |
4089 | "cache": { | |
4090 | "direct": true, | |
4091 | "writeback": true | |
4092 | }, | |
4093 | "file": { | |
4094 | "driver": "file", | |
4095 | "filename": "/tmp/test.qcow2" | |
4096 | }, | |
4097 | "backing": { | |
4098 | "driver": "raw", | |
4099 | "file": { | |
4100 | "driver": "file", | |
4101 | "filename": "/dev/fdset/4" | |
4102 | } | |
4103 | } | |
4104 | } | |
4105 | } | |
4106 | } | |
4107 | ||
4108 | <- { "return": {} } | |
4109 | ||
81b936ae AG |
4110 | EQMP |
4111 | ||
4112 | { | |
4113 | .name = "x-blockdev-del", | |
4114 | .args_type = "id:s?,node-name:s?", | |
81b936ae AG |
4115 | }, |
4116 | ||
4117 | SQMP | |
4118 | x-blockdev-del | |
4119 | ------------ | |
4120 | Since 2.5 | |
4121 | ||
4122 | Deletes a block device thas has been added using blockdev-add. | |
4123 | The selected device can be either a block backend or a graph node. | |
4124 | ||
4125 | In the former case the backend will be destroyed, along with its | |
4126 | inserted medium if there's any. The command will fail if the backend | |
4127 | or its medium are in use. | |
4128 | ||
4129 | In the latter case the node will be destroyed. The command will fail | |
4130 | if the node is attached to a block backend or is otherwise being | |
4131 | used. | |
4132 | ||
4133 | One of "id" or "node-name" must be specified, but not both. | |
4134 | ||
4135 | This command is still a work in progress and is considered | |
4136 | experimental. Stay away from it unless you want to help with its | |
4137 | development. | |
4138 | ||
4139 | Arguments: | |
4140 | ||
4141 | - "id": Name of the block backend device to delete (json-string, optional) | |
4142 | - "node-name": Name of the graph node to delete (json-string, optional) | |
4143 | ||
4144 | Example: | |
4145 | ||
4146 | -> { "execute": "blockdev-add", | |
4147 | "arguments": { | |
4148 | "options": { | |
4149 | "driver": "qcow2", | |
4150 | "id": "drive0", | |
4151 | "file": { | |
4152 | "driver": "file", | |
4153 | "filename": "test.qcow2" | |
4154 | } | |
4155 | } | |
4156 | } | |
4157 | } | |
4158 | ||
4159 | <- { "return": {} } | |
4160 | ||
4161 | -> { "execute": "x-blockdev-del", | |
4162 | "arguments": { "id": "drive0" } | |
4163 | } | |
4164 | <- { "return": {} } | |
4165 | ||
7d8a9f71 HR |
4166 | EQMP |
4167 | ||
4168 | { | |
4169 | .name = "blockdev-open-tray", | |
4170 | .args_type = "device:s,force:b?", | |
7d8a9f71 HR |
4171 | }, |
4172 | ||
4173 | SQMP | |
4174 | blockdev-open-tray | |
4175 | ------------------ | |
4176 | ||
4177 | Opens a block device's tray. If there is a block driver state tree inserted as a | |
4178 | medium, it will become inaccessible to the guest (but it will remain associated | |
4179 | to the block device, so closing the tray will make it accessible again). | |
4180 | ||
4181 | If the tray was already open before, this will be a no-op. | |
4182 | ||
4183 | Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in | |
4184 | which no such event will be generated, these include: | |
4185 | - if the guest has locked the tray, @force is false and the guest does not | |
4186 | respond to the eject request | |
4187 | - if the BlockBackend denoted by @device does not have a guest device attached | |
4188 | to it | |
4189 | - if the guest device does not have an actual tray and is empty, for instance | |
4190 | for floppy disk drives | |
4191 | ||
4192 | Arguments: | |
4193 | ||
4194 | - "device": block device name (json-string) | |
4195 | - "force": if false (the default), an eject request will be sent to the guest if | |
4196 | it has locked the tray (and the tray will not be opened immediately); | |
4197 | if true, the tray will be opened regardless of whether it is locked | |
4198 | (json-bool, optional) | |
4199 | ||
4200 | Example: | |
4201 | ||
4202 | -> { "execute": "blockdev-open-tray", | |
4203 | "arguments": { "device": "ide1-cd0" } } | |
4204 | ||
4205 | <- { "timestamp": { "seconds": 1418751016, | |
4206 | "microseconds": 716996 }, | |
4207 | "event": "DEVICE_TRAY_MOVED", | |
4208 | "data": { "device": "ide1-cd0", | |
4209 | "tray-open": true } } | |
4210 | ||
4211 | <- { "return": {} } | |
4212 | ||
abaaf59d HR |
4213 | EQMP |
4214 | ||
4215 | { | |
4216 | .name = "blockdev-close-tray", | |
4217 | .args_type = "device:s", | |
abaaf59d HR |
4218 | }, |
4219 | ||
4220 | SQMP | |
4221 | blockdev-close-tray | |
4222 | ------------------- | |
4223 | ||
4224 | Closes a block device's tray. If there is a block driver state tree associated | |
4225 | with the block device (which is currently ejected), that tree will be loaded as | |
4226 | the medium. | |
4227 | ||
4228 | If the tray was already closed before, this will be a no-op. | |
4229 | ||
4230 | Arguments: | |
4231 | ||
4232 | - "device": block device name (json-string) | |
4233 | ||
4234 | Example: | |
4235 | ||
4236 | -> { "execute": "blockdev-close-tray", | |
4237 | "arguments": { "device": "ide1-cd0" } } | |
4238 | ||
4239 | <- { "timestamp": { "seconds": 1418751345, | |
4240 | "microseconds": 272147 }, | |
4241 | "event": "DEVICE_TRAY_MOVED", | |
4242 | "data": { "device": "ide1-cd0", | |
4243 | "tray-open": false } } | |
4244 | ||
4245 | <- { "return": {} } | |
4246 | ||
2814f672 HR |
4247 | EQMP |
4248 | ||
4249 | { | |
6e0abc25 | 4250 | .name = "x-blockdev-remove-medium", |
2814f672 | 4251 | .args_type = "device:s", |
2814f672 HR |
4252 | }, |
4253 | ||
4254 | SQMP | |
6e0abc25 HR |
4255 | x-blockdev-remove-medium |
4256 | ------------------------ | |
2814f672 HR |
4257 | |
4258 | Removes a medium (a block driver state tree) from a block device. That block | |
4259 | device's tray must currently be open (unless there is no attached guest device). | |
4260 | ||
4261 | If the tray is open and there is no medium inserted, this will be a no-op. | |
4262 | ||
6e0abc25 HR |
4263 | This command is still a work in progress and is considered experimental. |
4264 | Stay away from it unless you want to help with its development. | |
4265 | ||
2814f672 HR |
4266 | Arguments: |
4267 | ||
4268 | - "device": block device name (json-string) | |
4269 | ||
4270 | Example: | |
4271 | ||
6e0abc25 | 4272 | -> { "execute": "x-blockdev-remove-medium", |
2814f672 HR |
4273 | "arguments": { "device": "ide1-cd0" } } |
4274 | ||
4275 | <- { "error": { "class": "GenericError", | |
4276 | "desc": "Tray of device 'ide1-cd0' is not open" } } | |
4277 | ||
4278 | -> { "execute": "blockdev-open-tray", | |
4279 | "arguments": { "device": "ide1-cd0" } } | |
4280 | ||
4281 | <- { "timestamp": { "seconds": 1418751627, | |
4282 | "microseconds": 549958 }, | |
4283 | "event": "DEVICE_TRAY_MOVED", | |
4284 | "data": { "device": "ide1-cd0", | |
4285 | "tray-open": true } } | |
4286 | ||
4287 | <- { "return": {} } | |
4288 | ||
6e0abc25 | 4289 | -> { "execute": "x-blockdev-remove-medium", |
2814f672 HR |
4290 | "arguments": { "device": "ide1-cd0" } } |
4291 | ||
4292 | <- { "return": {} } | |
4293 | ||
d1299882 HR |
4294 | EQMP |
4295 | ||
4296 | { | |
6e0abc25 | 4297 | .name = "x-blockdev-insert-medium", |
d1299882 | 4298 | .args_type = "device:s,node-name:s", |
d1299882 HR |
4299 | }, |
4300 | ||
4301 | SQMP | |
6e0abc25 HR |
4302 | x-blockdev-insert-medium |
4303 | ------------------------ | |
d1299882 HR |
4304 | |
4305 | Inserts a medium (a block driver state tree) into a block device. That block | |
4306 | device's tray must currently be open (unless there is no attached guest device) | |
4307 | and there must be no medium inserted already. | |
4308 | ||
6e0abc25 HR |
4309 | This command is still a work in progress and is considered experimental. |
4310 | Stay away from it unless you want to help with its development. | |
4311 | ||
d1299882 HR |
4312 | Arguments: |
4313 | ||
4314 | - "device": block device name (json-string) | |
4315 | - "node-name": root node of the BDS tree to insert into the block device | |
4316 | ||
4317 | Example: | |
4318 | ||
4319 | -> { "execute": "blockdev-add", | |
4320 | "arguments": { "options": { "node-name": "node0", | |
4321 | "driver": "raw", | |
4322 | "file": { "driver": "file", | |
4323 | "filename": "fedora.iso" } } } } | |
4324 | ||
4325 | <- { "return": {} } | |
4326 | ||
6e0abc25 | 4327 | -> { "execute": "x-blockdev-insert-medium", |
d1299882 HR |
4328 | "arguments": { "device": "ide1-cd0", |
4329 | "node-name": "node0" } } | |
4330 | ||
4331 | <- { "return": {} } | |
4332 | ||
7f821597 WC |
4333 | EQMP |
4334 | ||
4335 | { | |
4336 | .name = "x-blockdev-change", | |
4337 | .args_type = "parent:B,child:B?,node:B?", | |
7f821597 WC |
4338 | }, |
4339 | ||
4340 | SQMP | |
4341 | x-blockdev-change | |
4342 | ----------------- | |
4343 | ||
4344 | Dynamically reconfigure the block driver state graph. It can be used | |
4345 | to add, remove, insert or replace a graph node. Currently only the | |
4346 | Quorum driver implements this feature to add or remove its child. This | |
4347 | is useful to fix a broken quorum child. | |
4348 | ||
4349 | If @node is specified, it will be inserted under @parent. @child | |
4350 | may not be specified in this case. If both @parent and @child are | |
4351 | specified but @node is not, @child will be detached from @parent. | |
4352 | ||
4353 | Arguments: | |
4354 | - "parent": the id or name of the parent node (json-string) | |
4355 | - "child": the name of a child under the given parent node (json-string, optional) | |
4356 | - "node": the name of the node that will be added (json-string, optional) | |
4357 | ||
4358 | Note: this command is experimental, and not a stable API. It doesn't | |
4359 | support all kinds of operations, all kinds of children, nor all block | |
4360 | drivers. | |
4361 | ||
4362 | Warning: The data in a new quorum child MUST be consistent with that of | |
4363 | the rest of the array. | |
4364 | ||
4365 | Example: | |
4366 | ||
4367 | Add a new node to a quorum | |
4368 | -> { "execute": "blockdev-add", | |
4369 | "arguments": { "options": { "driver": "raw", | |
4370 | "node-name": "new_node", | |
4371 | "file": { "driver": "file", | |
4372 | "filename": "test.raw" } } } } | |
4373 | <- { "return": {} } | |
4374 | -> { "execute": "x-blockdev-change", | |
4375 | "arguments": { "parent": "disk1", | |
4376 | "node": "new_node" } } | |
4377 | <- { "return": {} } | |
4378 | ||
4379 | Delete a quorum's node | |
4380 | -> { "execute": "x-blockdev-change", | |
4381 | "arguments": { "parent": "disk1", | |
4382 | "child": "children.1" } } | |
4383 | <- { "return": {} } | |
4384 | ||
c13163fb BC |
4385 | EQMP |
4386 | ||
4387 | { | |
4388 | .name = "query-named-block-nodes", | |
4389 | .args_type = "", | |
c13163fb BC |
4390 | }, |
4391 | ||
4392 | SQMP | |
bdf05133 MAL |
4393 | query-named-block-nodes |
4394 | ----------------------- | |
c13163fb BC |
4395 | |
4396 | Return a list of BlockDeviceInfo for all the named block driver nodes | |
4397 | ||
4398 | Example: | |
4399 | ||
4400 | -> { "execute": "query-named-block-nodes" } | |
4401 | <- { "return": [ { "ro":false, | |
4402 | "drv":"qcow2", | |
4403 | "encrypted":false, | |
4404 | "file":"disks/test.qcow2", | |
4405 | "node-name": "my-node", | |
4406 | "backing_file_depth":1, | |
4407 | "bps":1000000, | |
4408 | "bps_rd":0, | |
4409 | "bps_wr":0, | |
4410 | "iops":1000000, | |
4411 | "iops_rd":0, | |
4412 | "iops_wr":0, | |
4413 | "bps_max": 8000000, | |
4414 | "bps_rd_max": 0, | |
4415 | "bps_wr_max": 0, | |
4416 | "iops_max": 0, | |
4417 | "iops_rd_max": 0, | |
4418 | "iops_wr_max": 0, | |
4419 | "iops_size": 0, | |
e2462113 | 4420 | "write_threshold": 0, |
c13163fb BC |
4421 | "image":{ |
4422 | "filename":"disks/test.qcow2", | |
4423 | "format":"qcow2", | |
4424 | "virtual-size":2048000, | |
4425 | "backing_file":"base.qcow2", | |
4426 | "full-backing-filename":"disks/base.qcow2", | |
5403432f | 4427 | "backing-filename-format":"qcow2", |
c13163fb BC |
4428 | "snapshots":[ |
4429 | { | |
4430 | "id": "1", | |
4431 | "name": "snapshot1", | |
4432 | "vm-state-size": 0, | |
4433 | "date-sec": 10000200, | |
4434 | "date-nsec": 12, | |
4435 | "vm-clock-sec": 206, | |
4436 | "vm-clock-nsec": 30 | |
4437 | } | |
4438 | ], | |
4439 | "backing-image":{ | |
4440 | "filename":"disks/base.qcow2", | |
4441 | "format":"qcow2", | |
4442 | "virtual-size":2048000 | |
4443 | } | |
c059451c | 4444 | } } ] } |
c13163fb | 4445 | |
24fb4133 HR |
4446 | EQMP |
4447 | ||
4448 | { | |
4449 | .name = "blockdev-change-medium", | |
39ff43d9 | 4450 | .args_type = "device:B,filename:F,format:s?,read-only-mode:s?", |
24fb4133 HR |
4451 | }, |
4452 | ||
4453 | SQMP | |
4454 | blockdev-change-medium | |
4455 | ---------------------- | |
4456 | ||
4457 | Changes the medium inserted into a block device by ejecting the current medium | |
4458 | and loading a new image file which is inserted as the new medium. | |
4459 | ||
4460 | Arguments: | |
4461 | ||
4462 | - "device": device name (json-string) | |
4463 | - "filename": filename of the new image (json-string) | |
4464 | - "format": format of the new image (json-string, optional) | |
39ff43d9 HR |
4465 | - "read-only-mode": new read-only mode (json-string, optional) |
4466 | - Possible values: "retain" (default), "read-only", "read-write" | |
24fb4133 HR |
4467 | |
4468 | Examples: | |
4469 | ||
4470 | 1. Change a removable medium | |
4471 | ||
4472 | -> { "execute": "blockdev-change-medium", | |
4473 | "arguments": { "device": "ide1-cd0", | |
4474 | "filename": "/srv/images/Fedora-12-x86_64-DVD.iso", | |
4475 | "format": "raw" } } | |
4476 | <- { "return": {} } | |
4477 | ||
39ff43d9 HR |
4478 | 2. Load a read-only medium into a writable drive |
4479 | ||
4480 | -> { "execute": "blockdev-change-medium", | |
4481 | "arguments": { "device": "isa-fd0", | |
4482 | "filename": "/srv/images/ro.img", | |
4483 | "format": "raw", | |
4484 | "read-only-mode": "retain" } } | |
4485 | ||
4486 | <- { "error": | |
4487 | { "class": "GenericError", | |
4488 | "desc": "Could not open '/srv/images/ro.img': Permission denied" } } | |
4489 | ||
4490 | -> { "execute": "blockdev-change-medium", | |
4491 | "arguments": { "device": "isa-fd0", | |
4492 | "filename": "/srv/images/ro.img", | |
4493 | "format": "raw", | |
4494 | "read-only-mode": "read-only" } } | |
4495 | ||
4496 | <- { "return": {} } | |
4497 | ||
76b5d850 HT |
4498 | EQMP |
4499 | ||
4500 | { | |
4501 | .name = "query-memdev", | |
4502 | .args_type = "", | |
76b5d850 HT |
4503 | }, |
4504 | ||
4505 | SQMP | |
4506 | query-memdev | |
4507 | ------------ | |
4508 | ||
4509 | Show memory devices information. | |
4510 | ||
4511 | ||
4512 | Example (1): | |
4513 | ||
4514 | -> { "execute": "query-memdev" } | |
4515 | <- { "return": [ | |
4516 | { | |
4517 | "size": 536870912, | |
4518 | "merge": false, | |
4519 | "dump": true, | |
4520 | "prealloc": false, | |
4521 | "host-nodes": [0, 1], | |
4522 | "policy": "bind" | |
4523 | }, | |
4524 | { | |
4525 | "size": 536870912, | |
4526 | "merge": false, | |
4527 | "dump": true, | |
4528 | "prealloc": true, | |
4529 | "host-nodes": [2, 3], | |
4530 | "policy": "preferred" | |
4531 | } | |
4532 | ] | |
4533 | } | |
4534 | ||
6f2e2730 IM |
4535 | EQMP |
4536 | ||
4537 | { | |
4538 | .name = "query-memory-devices", | |
4539 | .args_type = "", | |
6f2e2730 IM |
4540 | }, |
4541 | ||
4542 | SQMP | |
bdf05133 | 4543 | query-memory-devices |
6f2e2730 IM |
4544 | -------------------- |
4545 | ||
4546 | Return a list of memory devices. | |
4547 | ||
4548 | Example: | |
4549 | -> { "execute": "query-memory-devices" } | |
4550 | <- { "return": [ { "data": | |
4551 | { "addr": 5368709120, | |
4552 | "hotpluggable": true, | |
4553 | "hotplugged": true, | |
4554 | "id": "d1", | |
4555 | "memdev": "/objects/memX", | |
4556 | "node": 0, | |
4557 | "size": 1073741824, | |
4558 | "slot": 0}, | |
4559 | "type": "dimm" | |
4560 | } ] } | |
bdf05133 | 4561 | |
f1a1a356 | 4562 | EQMP |
02419bcb IM |
4563 | |
4564 | { | |
4565 | .name = "query-acpi-ospm-status", | |
4566 | .args_type = "", | |
02419bcb IM |
4567 | }, |
4568 | ||
4569 | SQMP | |
bdf05133 MAL |
4570 | query-acpi-ospm-status |
4571 | ---------------------- | |
02419bcb IM |
4572 | |
4573 | Return list of ACPIOSTInfo for devices that support status reporting | |
4574 | via ACPI _OST method. | |
4575 | ||
4576 | Example: | |
4577 | -> { "execute": "query-acpi-ospm-status" } | |
4578 | <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0}, | |
4579 | { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0}, | |
4580 | { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0}, | |
4581 | { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0} | |
4582 | ]} | |
bdf05133 | 4583 | |
02419bcb | 4584 | EQMP |
f2ae8abf MT |
4585 | |
4586 | #if defined TARGET_I386 | |
4587 | { | |
4588 | .name = "rtc-reset-reinjection", | |
4589 | .args_type = "", | |
f2ae8abf MT |
4590 | }, |
4591 | #endif | |
4592 | ||
4593 | SQMP | |
4594 | rtc-reset-reinjection | |
4595 | --------------------- | |
4596 | ||
4597 | Reset the RTC interrupt reinjection backlog. | |
4598 | ||
4599 | Arguments: None. | |
4600 | ||
4601 | Example: | |
4602 | ||
4603 | -> { "execute": "rtc-reset-reinjection" } | |
4604 | <- { "return": {} } | |
bdf05133 | 4605 | |
1dde0f48 LV |
4606 | EQMP |
4607 | ||
4608 | { | |
4609 | .name = "trace-event-get-state", | |
77e2b172 | 4610 | .args_type = "name:s,vcpu:i?", |
1dde0f48 LV |
4611 | }, |
4612 | ||
4613 | SQMP | |
4614 | trace-event-get-state | |
4615 | --------------------- | |
4616 | ||
4617 | Query the state of events. | |
4618 | ||
77e2b172 LV |
4619 | Arguments: |
4620 | ||
4621 | - "name": Event name pattern (json-string). | |
4622 | - "vcpu": The vCPU to query, any vCPU by default (json-int, optional). | |
4623 | ||
4624 | An event is returned if: | |
4625 | - its name matches the "name" pattern, and | |
4626 | - if "vcpu" is given, the event has the "vcpu" property. | |
4627 | ||
4628 | Therefore, if "vcpu" is given, the operation will only match per-vCPU events, | |
4629 | returning their state on the specified vCPU. Special case: if "name" is an exact | |
4630 | match, "vcpu" is given and the event does not have the "vcpu" property, an error | |
4631 | is returned. | |
4632 | ||
1dde0f48 LV |
4633 | Example: |
4634 | ||
4635 | -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } } | |
4636 | <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] } | |
bdf05133 | 4637 | |
1dde0f48 LV |
4638 | EQMP |
4639 | ||
4640 | { | |
4641 | .name = "trace-event-set-state", | |
77e2b172 | 4642 | .args_type = "name:s,enable:b,ignore-unavailable:b?,vcpu:i?", |
1dde0f48 | 4643 | }, |
f2ae8abf | 4644 | |
1dde0f48 LV |
4645 | SQMP |
4646 | trace-event-set-state | |
4647 | --------------------- | |
4648 | ||
4649 | Set the state of events. | |
4650 | ||
77e2b172 LV |
4651 | Arguments: |
4652 | ||
4653 | - "name": Event name pattern (json-string). | |
4654 | - "enable": Whether to enable or disable the event (json-bool). | |
4655 | - "ignore-unavailable": Whether to ignore errors for events that cannot be | |
4656 | changed (json-bool, optional). | |
4657 | - "vcpu": The vCPU to act upon, all vCPUs by default (json-int, optional). | |
4658 | ||
4659 | An event's state is modified if: | |
4660 | - its name matches the "name" pattern, and | |
4661 | - if "vcpu" is given, the event has the "vcpu" property. | |
4662 | ||
4663 | Therefore, if "vcpu" is given, the operation will only match per-vCPU events, | |
4664 | setting their state on the specified vCPU. Special case: if "name" is an exact | |
4665 | match, "vcpu" is given and the event does not have the "vcpu" property, an error | |
4666 | is returned. | |
4667 | ||
1dde0f48 LV |
4668 | Example: |
4669 | ||
4670 | -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } } | |
4671 | <- { "return": {} } | |
bdf05133 | 4672 | |
50c6617f MT |
4673 | EQMP |
4674 | ||
4675 | { | |
6575ccdd | 4676 | .name = "input-send-event", |
51fc4476 | 4677 | .args_type = "console:i?,events:q", |
50c6617f MT |
4678 | }, |
4679 | ||
4680 | SQMP | |
bdf05133 MAL |
4681 | input-send-event |
4682 | ---------------- | |
50c6617f MT |
4683 | |
4684 | Send input event to guest. | |
4685 | ||
4686 | Arguments: | |
4687 | ||
b98d26e3 GH |
4688 | - "device": display device (json-string, optional) |
4689 | - "head": display head (json-int, optional) | |
4690 | - "events": list of input events | |
50c6617f MT |
4691 | |
4692 | The consoles are visible in the qom tree, under | |
4693 | /backend/console[$index]. They have a device link and head property, so | |
4694 | it is possible to map which console belongs to which device and display. | |
4695 | ||
4696 | Example (1): | |
4697 | ||
4698 | Press left mouse button. | |
4699 | ||
6575ccdd | 4700 | -> { "execute": "input-send-event", |
b98d26e3 | 4701 | "arguments": { "device": "video0", |
50c6617f | 4702 | "events": [ { "type": "btn", |
f22d0af0 | 4703 | "data" : { "down": true, "button": "left" } } ] } } |
50c6617f MT |
4704 | <- { "return": {} } |
4705 | ||
6575ccdd | 4706 | -> { "execute": "input-send-event", |
b98d26e3 | 4707 | "arguments": { "device": "video0", |
50c6617f | 4708 | "events": [ { "type": "btn", |
f22d0af0 | 4709 | "data" : { "down": false, "button": "left" } } ] } } |
50c6617f MT |
4710 | <- { "return": {} } |
4711 | ||
4712 | Example (2): | |
4713 | ||
4714 | Press ctrl-alt-del. | |
4715 | ||
6575ccdd | 4716 | -> { "execute": "input-send-event", |
b98d26e3 | 4717 | "arguments": { "events": [ |
50c6617f MT |
4718 | { "type": "key", "data" : { "down": true, |
4719 | "key": {"type": "qcode", "data": "ctrl" } } }, | |
4720 | { "type": "key", "data" : { "down": true, | |
4721 | "key": {"type": "qcode", "data": "alt" } } }, | |
4722 | { "type": "key", "data" : { "down": true, | |
4723 | "key": {"type": "qcode", "data": "delete" } } } ] } } | |
4724 | <- { "return": {} } | |
4725 | ||
4726 | Example (3): | |
4727 | ||
4728 | Move mouse pointer to absolute coordinates (20000, 400). | |
4729 | ||
6575ccdd | 4730 | -> { "execute": "input-send-event" , |
b98d26e3 | 4731 | "arguments": { "events": [ |
01df5143 GH |
4732 | { "type": "abs", "data" : { "axis": "x", "value" : 20000 } }, |
4733 | { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } } | |
50c6617f MT |
4734 | <- { "return": {} } |
4735 | ||
e2462113 FR |
4736 | EQMP |
4737 | ||
4738 | { | |
4739 | .name = "block-set-write-threshold", | |
4740 | .args_type = "node-name:s,write-threshold:l", | |
e2462113 FR |
4741 | }, |
4742 | ||
4743 | SQMP | |
4744 | block-set-write-threshold | |
4745 | ------------ | |
4746 | ||
4747 | Change the write threshold for a block drive. The threshold is an offset, | |
4748 | thus must be non-negative. Default is no write threshold. | |
4749 | Setting the threshold to zero disables it. | |
4750 | ||
4751 | Arguments: | |
4752 | ||
4753 | - "node-name": the node name in the block driver state graph (json-string) | |
4754 | - "write-threshold": the write threshold in bytes (json-int) | |
4755 | ||
4756 | Example: | |
4757 | ||
4758 | -> { "execute": "block-set-write-threshold", | |
4759 | "arguments": { "node-name": "mydev", | |
4760 | "write-threshold": 17179869184 } } | |
4761 | <- { "return": {} } | |
4762 | ||
f2ae8abf | 4763 | EQMP |
fafa4d50 SF |
4764 | |
4765 | { | |
4766 | .name = "query-rocker", | |
4767 | .args_type = "name:s", | |
fafa4d50 SF |
4768 | }, |
4769 | ||
4770 | SQMP | |
4771 | Show rocker switch | |
4772 | ------------------ | |
4773 | ||
4774 | Arguments: | |
4775 | ||
4776 | - "name": switch name | |
4777 | ||
4778 | Example: | |
4779 | ||
4780 | -> { "execute": "query-rocker", "arguments": { "name": "sw1" } } | |
4781 | <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}} | |
4782 | ||
4783 | EQMP | |
4784 | ||
4785 | { | |
4786 | .name = "query-rocker-ports", | |
4787 | .args_type = "name:s", | |
fafa4d50 SF |
4788 | }, |
4789 | ||
4790 | SQMP | |
4791 | Show rocker switch ports | |
4792 | ------------------------ | |
4793 | ||
4794 | Arguments: | |
4795 | ||
4796 | - "name": switch name | |
4797 | ||
4798 | Example: | |
4799 | ||
4800 | -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } } | |
4801 | <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1", | |
4802 | "autoneg": "off", "link-up": true, "speed": 10000}, | |
4803 | {"duplex": "full", "enabled": true, "name": "sw1.2", | |
4804 | "autoneg": "off", "link-up": true, "speed": 10000} | |
4805 | ]} | |
4806 | ||
4807 | EQMP | |
4808 | ||
4809 | { | |
4810 | .name = "query-rocker-of-dpa-flows", | |
4811 | .args_type = "name:s,tbl-id:i?", | |
fafa4d50 SF |
4812 | }, |
4813 | ||
4814 | SQMP | |
4815 | Show rocker switch OF-DPA flow tables | |
4816 | ------------------------------------- | |
4817 | ||
4818 | Arguments: | |
4819 | ||
4820 | - "name": switch name | |
4821 | - "tbl-id": (optional) flow table ID | |
4822 | ||
4823 | Example: | |
4824 | ||
4825 | -> { "execute": "query-rocker-of-dpa-flows", "arguments": { "name": "sw1" } } | |
4826 | <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0}, | |
4827 | "hits": 138, | |
4828 | "cookie": 0, | |
4829 | "action": {"goto-tbl": 10}, | |
4830 | "mask": {"in-pport": 4294901760} | |
4831 | }, | |
4832 | {...more...}, | |
4833 | ]} | |
4834 | ||
4835 | EQMP | |
4836 | ||
4837 | { | |
4838 | .name = "query-rocker-of-dpa-groups", | |
4839 | .args_type = "name:s,type:i?", | |
fafa4d50 SF |
4840 | }, |
4841 | ||
4842 | SQMP | |
4843 | Show rocker OF-DPA group tables | |
4844 | ------------------------------- | |
4845 | ||
4846 | Arguments: | |
4847 | ||
4848 | - "name": switch name | |
4849 | - "type": (optional) group type | |
4850 | ||
4851 | Example: | |
4852 | ||
4853 | -> { "execute": "query-rocker-of-dpa-groups", "arguments": { "name": "sw1" } } | |
4854 | <- { "return": [ {"type": 0, "out-pport": 2, "pport": 2, "vlan-id": 3841, | |
4855 | "pop-vlan": 1, "id": 251723778}, | |
4856 | {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3841, | |
4857 | "pop-vlan": 1, "id": 251723776}, | |
4858 | {"type": 0, "out-pport": 1, "pport": 1, "vlan-id": 3840, | |
4859 | "pop-vlan": 1, "id": 251658241}, | |
4860 | {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840, | |
4861 | "pop-vlan": 1, "id": 251658240} | |
4862 | ]} | |
ae50a770 PX |
4863 | |
4864 | EQMP | |
4865 | ||
4866 | #if defined TARGET_ARM | |
4867 | { | |
4868 | .name = "query-gic-capabilities", | |
4869 | .args_type = "", | |
ae50a770 PX |
4870 | }, |
4871 | #endif | |
4872 | ||
4873 | SQMP | |
4874 | query-gic-capabilities | |
4875 | --------------- | |
4876 | ||
4877 | Return a list of GICCapability objects, describing supported GIC | |
4878 | (Generic Interrupt Controller) versions. | |
4879 | ||
4880 | Arguments: None | |
4881 | ||
4882 | Example: | |
4883 | ||
4884 | -> { "execute": "query-gic-capabilities" } | |
4885 | <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, | |
4886 | { "version": 3, "emulated": false, "kernel": true } ] } | |
4887 | ||
4888 | EQMP | |
d4633541 IM |
4889 | |
4890 | { | |
4891 | .name = "query-hotpluggable-cpus", | |
4892 | .args_type = "", | |
d4633541 IM |
4893 | }, |
4894 | ||
4895 | SQMP | |
4896 | Show existing/possible CPUs | |
4897 | --------------------------- | |
4898 | ||
4899 | Arguments: None. | |
4900 | ||
4901 | Example for pseries machine type started with | |
4902 | -smp 2,cores=2,maxcpus=4 -cpu POWER8: | |
4903 | ||
4904 | -> { "execute": "query-hotpluggable-cpus" } | |
4905 | <- {"return": [ | |
13f5e800 | 4906 | { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core", |
d4633541 | 4907 | "vcpus-count": 1 }, |
13f5e800 | 4908 | { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core", |
d4633541 IM |
4909 | "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} |
4910 | ]}' | |
4d952914 IM |
4911 | |
4912 | Example for pc machine type started with | |
4913 | -smp 1,maxcpus=2: | |
4914 | -> { "execute": "query-hotpluggable-cpus" } | |
4915 | <- {"return": [ | |
4916 | { | |
4917 | "type": "qemu64-x86_64-cpu", "vcpus-count": 1, | |
4918 | "props": {"core-id": 0, "socket-id": 1, "thread-id": 0} | |
4919 | }, | |
4920 | { | |
4921 | "qom-path": "/machine/unattached/device[0]", | |
4922 | "type": "qemu64-x86_64-cpu", "vcpus-count": 1, | |
4923 | "props": {"core-id": 0, "socket-id": 0, "thread-id": 0} | |
4924 | } | |
4925 | ]} |