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