]> git.proxmox.com Git - mirror_qemu.git/blob - qmp-commands.hx
crypto: introduce new base module for TLS credentials
[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_input_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_input_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_input_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_input_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_input_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_input_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_input_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_input_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_input_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_input_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 (json-string)
325
326 Example:
327
328 -> { "execute": "device_del", "arguments": { "id": "net1" } }
329 <- { "return": {} }
330
331 EQMP
332
333 {
334 .name = "send-key",
335 .args_type = "keys:q,hold-time:i?",
336 .mhandler.cmd_new = qmp_marshal_input_send_key,
337 },
338
339 SQMP
340 send-key
341 ----------
342
343 Send keys to VM.
344
345 Arguments:
346
347 keys array:
348 - "key": key sequence (a json-array of key union values,
349 union can be number or qcode enum)
350
351 - hold-time: time to delay key up events, milliseconds. Defaults to 100
352 (json-int, optional)
353
354 Example:
355
356 -> { "execute": "send-key",
357 "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
358 { "type": "qcode", "data": "alt" },
359 { "type": "qcode", "data": "delete" } ] } }
360 <- { "return": {} }
361
362 EQMP
363
364 {
365 .name = "cpu",
366 .args_type = "index:i",
367 .mhandler.cmd_new = qmp_marshal_input_cpu,
368 },
369
370 SQMP
371 cpu
372 ---
373
374 Set the default CPU.
375
376 Arguments:
377
378 - "index": the CPU's index (json-int)
379
380 Example:
381
382 -> { "execute": "cpu", "arguments": { "index": 0 } }
383 <- { "return": {} }
384
385 Note: CPUs' indexes are obtained with the 'query-cpus' command.
386
387 EQMP
388
389 {
390 .name = "cpu-add",
391 .args_type = "id:i",
392 .mhandler.cmd_new = qmp_marshal_input_cpu_add,
393 },
394
395 SQMP
396 cpu-add
397 -------
398
399 Adds virtual cpu
400
401 Arguments:
402
403 - "id": cpu id (json-int)
404
405 Example:
406
407 -> { "execute": "cpu-add", "arguments": { "id": 2 } }
408 <- { "return": {} }
409
410 EQMP
411
412 {
413 .name = "memsave",
414 .args_type = "val:l,size:i,filename:s,cpu:i?",
415 .mhandler.cmd_new = qmp_marshal_input_memsave,
416 },
417
418 SQMP
419 memsave
420 -------
421
422 Save to disk virtual memory dump starting at 'val' of size 'size'.
423
424 Arguments:
425
426 - "val": the starting address (json-int)
427 - "size": the memory size, in bytes (json-int)
428 - "filename": file path (json-string)
429 - "cpu": virtual CPU index (json-int, optional)
430
431 Example:
432
433 -> { "execute": "memsave",
434 "arguments": { "val": 10,
435 "size": 100,
436 "filename": "/tmp/virtual-mem-dump" } }
437 <- { "return": {} }
438
439 EQMP
440
441 {
442 .name = "pmemsave",
443 .args_type = "val:l,size:i,filename:s",
444 .mhandler.cmd_new = qmp_marshal_input_pmemsave,
445 },
446
447 SQMP
448 pmemsave
449 --------
450
451 Save to disk physical memory dump starting at 'val' of size 'size'.
452
453 Arguments:
454
455 - "val": the starting address (json-int)
456 - "size": the memory size, in bytes (json-int)
457 - "filename": file path (json-string)
458
459 Example:
460
461 -> { "execute": "pmemsave",
462 "arguments": { "val": 10,
463 "size": 100,
464 "filename": "/tmp/physical-mem-dump" } }
465 <- { "return": {} }
466
467 EQMP
468
469 {
470 .name = "inject-nmi",
471 .args_type = "",
472 .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
473 },
474
475 SQMP
476 inject-nmi
477 ----------
478
479 Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
480
481 Arguments: None.
482
483 Example:
484
485 -> { "execute": "inject-nmi" }
486 <- { "return": {} }
487
488 Note: inject-nmi fails when the guest doesn't support injecting.
489
490 EQMP
491
492 {
493 .name = "ringbuf-write",
494 .args_type = "device:s,data:s,format:s?",
495 .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
496 },
497
498 SQMP
499 ringbuf-write
500 -------------
501
502 Write to a ring buffer character device.
503
504 Arguments:
505
506 - "device": ring buffer character device name (json-string)
507 - "data": data to write (json-string)
508 - "format": data format (json-string, optional)
509 - Possible values: "utf8" (default), "base64"
510 Bug: invalid base64 is currently not rejected.
511 Whitespace *is* invalid.
512
513 Example:
514
515 -> { "execute": "ringbuf-write",
516 "arguments": { "device": "foo",
517 "data": "abcdefgh",
518 "format": "utf8" } }
519 <- { "return": {} }
520
521 EQMP
522
523 {
524 .name = "ringbuf-read",
525 .args_type = "device:s,size:i,format:s?",
526 .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
527 },
528
529 SQMP
530 ringbuf-read
531 -------------
532
533 Read from a ring buffer character device.
534
535 Arguments:
536
537 - "device": ring buffer character device name (json-string)
538 - "size": how many bytes to read at most (json-int)
539 - Number of data bytes, not number of characters in encoded data
540 - "format": data format (json-string, optional)
541 - Possible values: "utf8" (default), "base64"
542 - Naturally, format "utf8" works only when the ring buffer
543 contains valid UTF-8 text. Invalid UTF-8 sequences get
544 replaced. Bug: replacement doesn't work. Bug: can screw
545 up on encountering NUL characters, after the ring buffer
546 lost data, and when reading stops because the size limit
547 is reached.
548
549 Example:
550
551 -> { "execute": "ringbuf-read",
552 "arguments": { "device": "foo",
553 "size": 1000,
554 "format": "utf8" } }
555 <- {"return": "abcdefgh"}
556
557 EQMP
558
559 {
560 .name = "xen-save-devices-state",
561 .args_type = "filename:F",
562 .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
563 },
564
565 SQMP
566 xen-save-devices-state
567 -------
568
569 Save the state of all devices to file. The RAM and the block devices
570 of the VM are not saved by this command.
571
572 Arguments:
573
574 - "filename": the file to save the state of the devices to as binary
575 data. See xen-save-devices-state.txt for a description of the binary
576 format.
577
578 Example:
579
580 -> { "execute": "xen-save-devices-state",
581 "arguments": { "filename": "/tmp/save" } }
582 <- { "return": {} }
583
584 EQMP
585
586 {
587 .name = "xen-set-global-dirty-log",
588 .args_type = "enable:b",
589 .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
590 },
591
592 SQMP
593 xen-set-global-dirty-log
594 -------
595
596 Enable or disable the global dirty log mode.
597
598 Arguments:
599
600 - "enable": Enable it or disable it.
601
602 Example:
603
604 -> { "execute": "xen-set-global-dirty-log",
605 "arguments": { "enable": true } }
606 <- { "return": {} }
607
608 EQMP
609
610 {
611 .name = "migrate",
612 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
613 .mhandler.cmd_new = qmp_marshal_input_migrate,
614 },
615
616 SQMP
617 migrate
618 -------
619
620 Migrate to URI.
621
622 Arguments:
623
624 - "blk": block migration, full disk copy (json-bool, optional)
625 - "inc": incremental disk copy (json-bool, optional)
626 - "uri": Destination URI (json-string)
627
628 Example:
629
630 -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
631 <- { "return": {} }
632
633 Notes:
634
635 (1) The 'query-migrate' command should be used to check migration's progress
636 and final result (this information is provided by the 'status' member)
637 (2) All boolean arguments default to false
638 (3) The user Monitor's "detach" argument is invalid in QMP and should not
639 be used
640
641 EQMP
642
643 {
644 .name = "migrate_cancel",
645 .args_type = "",
646 .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
647 },
648
649 SQMP
650 migrate_cancel
651 --------------
652
653 Cancel the current migration.
654
655 Arguments: None.
656
657 Example:
658
659 -> { "execute": "migrate_cancel" }
660 <- { "return": {} }
661
662 EQMP
663
664 {
665 .name = "migrate-incoming",
666 .args_type = "uri:s",
667 .mhandler.cmd_new = qmp_marshal_input_migrate_incoming,
668 },
669
670 SQMP
671 migrate-incoming
672 ----------------
673
674 Continue an incoming migration
675
676 Arguments:
677
678 - "uri": Source/listening URI (json-string)
679
680 Example:
681
682 -> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } }
683 <- { "return": {} }
684
685 Notes:
686
687 (1) QEMU must be started with -incoming defer to allow migrate-incoming to
688 be used
689 (2) The uri format is the same as for -incoming
690
691 EQMP
692 {
693 .name = "migrate-set-cache-size",
694 .args_type = "value:o",
695 .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
696 },
697
698 SQMP
699 migrate-set-cache-size
700 ----------------------
701
702 Set cache size to be used by XBZRLE migration, the cache size will be rounded
703 down to the nearest power of 2
704
705 Arguments:
706
707 - "value": cache size in bytes (json-int)
708
709 Example:
710
711 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
712 <- { "return": {} }
713
714 EQMP
715 {
716 .name = "query-migrate-cache-size",
717 .args_type = "",
718 .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
719 },
720
721 SQMP
722 query-migrate-cache-size
723 ------------------------
724
725 Show cache size to be used by XBZRLE migration
726
727 returns a json-object with the following information:
728 - "size" : json-int
729
730 Example:
731
732 -> { "execute": "query-migrate-cache-size" }
733 <- { "return": 67108864 }
734
735 EQMP
736
737 {
738 .name = "migrate_set_speed",
739 .args_type = "value:o",
740 .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
741 },
742
743 SQMP
744 migrate_set_speed
745 -----------------
746
747 Set maximum speed for migrations.
748
749 Arguments:
750
751 - "value": maximum speed, in bytes per second (json-int)
752
753 Example:
754
755 -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
756 <- { "return": {} }
757
758 EQMP
759
760 {
761 .name = "migrate_set_downtime",
762 .args_type = "value:T",
763 .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
764 },
765
766 SQMP
767 migrate_set_downtime
768 --------------------
769
770 Set maximum tolerated downtime (in seconds) for migrations.
771
772 Arguments:
773
774 - "value": maximum downtime (json-number)
775
776 Example:
777
778 -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
779 <- { "return": {} }
780
781 EQMP
782
783 {
784 .name = "client_migrate_info",
785 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
786 .params = "protocol hostname port tls-port cert-subject",
787 .help = "set migration information for remote display",
788 .mhandler.cmd_new = qmp_marshal_input_client_migrate_info,
789 },
790
791 SQMP
792 client_migrate_info
793 -------------------
794
795 Set migration information for remote display. This makes the server
796 ask the client to automatically reconnect using the new parameters
797 once migration finished successfully. Only implemented for SPICE.
798
799 Arguments:
800
801 - "protocol": must be "spice" (json-string)
802 - "hostname": migration target hostname (json-string)
803 - "port": spice tcp port for plaintext channels (json-int, optional)
804 - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
805 - "cert-subject": server certificate subject (json-string, optional)
806
807 Example:
808
809 -> { "execute": "client_migrate_info",
810 "arguments": { "protocol": "spice",
811 "hostname": "virt42.lab.kraxel.org",
812 "port": 1234 } }
813 <- { "return": {} }
814
815 EQMP
816
817 {
818 .name = "dump-guest-memory",
819 .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
820 .params = "-p protocol [begin] [length] [format]",
821 .help = "dump guest memory to file",
822 .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
823 },
824
825 SQMP
826 dump
827
828
829 Dump guest memory to file. The file can be processed with crash or gdb.
830
831 Arguments:
832
833 - "paging": do paging to get guest's memory mapping (json-bool)
834 - "protocol": destination file(started with "file:") or destination file
835 descriptor (started with "fd:") (json-string)
836 - "begin": the starting physical address. It's optional, and should be specified
837 with length together (json-int)
838 - "length": the memory size, in bytes. It's optional, and should be specified
839 with begin together (json-int)
840 - "format": the format of guest memory dump. It's optional, and can be
841 elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
842 conflict with paging and filter, ie. begin and length (json-string)
843
844 Example:
845
846 -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
847 <- { "return": {} }
848
849 Notes:
850
851 (1) All boolean arguments default to false
852
853 EQMP
854
855 {
856 .name = "query-dump-guest-memory-capability",
857 .args_type = "",
858 .mhandler.cmd_new = qmp_marshal_input_query_dump_guest_memory_capability,
859 },
860
861 SQMP
862 query-dump-guest-memory-capability
863 ----------
864
865 Show available formats for 'dump-guest-memory'
866
867 Example:
868
869 -> { "execute": "query-dump-guest-memory-capability" }
870 <- { "return": { "formats":
871 ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
872
873 EQMP
874
875 #if defined TARGET_S390X
876 {
877 .name = "dump-skeys",
878 .args_type = "filename:F",
879 .mhandler.cmd_new = qmp_marshal_input_dump_skeys,
880 },
881 #endif
882
883 SQMP
884 dump-skeys
885 ----------
886
887 Save guest storage keys to file.
888
889 Arguments:
890
891 - "filename": file path (json-string)
892
893 Example:
894
895 -> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } }
896 <- { "return": {} }
897
898 EQMP
899
900 {
901 .name = "netdev_add",
902 .args_type = "netdev:O",
903 .mhandler.cmd_new = qmp_netdev_add,
904 },
905
906 SQMP
907 netdev_add
908 ----------
909
910 Add host network device.
911
912 Arguments:
913
914 - "type": the device type, "tap", "user", ... (json-string)
915 - "id": the device's ID, must be unique (json-string)
916 - device options
917
918 Example:
919
920 -> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
921 <- { "return": {} }
922
923 Note: The supported device options are the same ones supported by the '-netdev'
924 command-line argument, which are listed in the '-help' output or QEMU's
925 manual
926
927 EQMP
928
929 {
930 .name = "netdev_del",
931 .args_type = "id:s",
932 .mhandler.cmd_new = qmp_marshal_input_netdev_del,
933 },
934
935 SQMP
936 netdev_del
937 ----------
938
939 Remove host network device.
940
941 Arguments:
942
943 - "id": the device's ID, must be unique (json-string)
944
945 Example:
946
947 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
948 <- { "return": {} }
949
950
951 EQMP
952
953 {
954 .name = "object-add",
955 .args_type = "qom-type:s,id:s,props:q?",
956 .mhandler.cmd_new = qmp_object_add,
957 },
958
959 SQMP
960 object-add
961 ----------
962
963 Create QOM object.
964
965 Arguments:
966
967 - "qom-type": the object's QOM type, i.e. the class name (json-string)
968 - "id": the object's ID, must be unique (json-string)
969 - "props": a dictionary of object property values (optional, json-dict)
970
971 Example:
972
973 -> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
974 "props": { "filename": "/dev/hwrng" } } }
975 <- { "return": {} }
976
977 EQMP
978
979 {
980 .name = "object-del",
981 .args_type = "id:s",
982 .mhandler.cmd_new = qmp_marshal_input_object_del,
983 },
984
985 SQMP
986 object-del
987 ----------
988
989 Remove QOM object.
990
991 Arguments:
992
993 - "id": the object's ID (json-string)
994
995 Example:
996
997 -> { "execute": "object-del", "arguments": { "id": "rng1" } }
998 <- { "return": {} }
999
1000
1001 EQMP
1002
1003
1004 {
1005 .name = "block_resize",
1006 .args_type = "device:s?,node-name:s?,size:o",
1007 .mhandler.cmd_new = qmp_marshal_input_block_resize,
1008 },
1009
1010 SQMP
1011 block_resize
1012 ------------
1013
1014 Resize a block image while a guest is running.
1015
1016 Arguments:
1017
1018 - "device": the device's ID, must be unique (json-string)
1019 - "node-name": the node name in the block driver state graph (json-string)
1020 - "size": new size
1021
1022 Example:
1023
1024 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1025 <- { "return": {} }
1026
1027 EQMP
1028
1029 {
1030 .name = "block-stream",
1031 .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
1032 .mhandler.cmd_new = qmp_marshal_input_block_stream,
1033 },
1034
1035 SQMP
1036 block-stream
1037 ------------
1038
1039 Copy data from a backing file into a block device.
1040
1041 Arguments:
1042
1043 - "device": The device's ID, must be unique (json-string)
1044 - "base": The file name of the backing image above which copying starts
1045 (json-string, optional)
1046 - "backing-file": The backing file string to write into the active layer. This
1047 filename is not validated.
1048
1049 If a pathname string is such that it cannot be resolved by
1050 QEMU, that means that subsequent QMP or HMP commands must use
1051 node-names for the image in question, as filename lookup
1052 methods will fail.
1053
1054 If not specified, QEMU will automatically determine the
1055 backing file string to use, or error out if there is no
1056 obvious choice. Care should be taken when specifying the
1057 string, to specify a valid filename or protocol.
1058 (json-string, optional) (Since 2.1)
1059 - "speed": the maximum speed, in bytes per second (json-int, optional)
1060 - "on-error": the action to take on an error (default 'report'). 'stop' and
1061 'enospc' can only be used if the block device supports io-status.
1062 (json-string, optional) (Since 2.1)
1063
1064 Example:
1065
1066 -> { "execute": "block-stream", "arguments": { "device": "virtio0",
1067 "base": "/tmp/master.qcow2" } }
1068 <- { "return": {} }
1069
1070 EQMP
1071
1072 {
1073 .name = "block-commit",
1074 .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
1075 .mhandler.cmd_new = qmp_marshal_input_block_commit,
1076 },
1077
1078 SQMP
1079 block-commit
1080 ------------
1081
1082 Live commit of data from overlay image nodes into backing nodes - i.e., writes
1083 data between 'top' and 'base' into 'base'.
1084
1085 Arguments:
1086
1087 - "device": The device's ID, must be unique (json-string)
1088 - "base": The file name of the backing image to write data into.
1089 If not specified, this is the deepest backing image
1090 (json-string, optional)
1091 - "top": The file name of the backing image within the image chain,
1092 which contains the topmost data to be committed down. If
1093 not specified, this is the active layer. (json-string, optional)
1094
1095 - backing-file: The backing file string to write into the overlay
1096 image of 'top'. If 'top' is the active layer,
1097 specifying a backing file string is an error. This
1098 filename is not validated.
1099
1100 If a pathname string is such that it cannot be
1101 resolved by QEMU, that means that subsequent QMP or
1102 HMP commands must use node-names for the image in
1103 question, as filename lookup methods will fail.
1104
1105 If not specified, QEMU will automatically determine
1106 the backing file string to use, or error out if
1107 there is no obvious choice. Care should be taken
1108 when specifying the string, to specify a valid
1109 filename or protocol.
1110 (json-string, optional) (Since 2.1)
1111
1112 If top == base, that is an error.
1113 If top == active, the job will not be completed by itself,
1114 user needs to complete the job with the block-job-complete
1115 command after getting the ready event. (Since 2.0)
1116
1117 If the base image is smaller than top, then the base image
1118 will be resized to be the same size as top. If top is
1119 smaller than the base image, the base will not be
1120 truncated. If you want the base image size to match the
1121 size of the smaller top, you can safely truncate it
1122 yourself once the commit operation successfully completes.
1123 (json-string)
1124 - "speed": the maximum speed, in bytes per second (json-int, optional)
1125
1126
1127 Example:
1128
1129 -> { "execute": "block-commit", "arguments": { "device": "virtio0",
1130 "top": "/tmp/snap1.qcow2" } }
1131 <- { "return": {} }
1132
1133 EQMP
1134
1135 {
1136 .name = "drive-backup",
1137 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1138 "bitmap:s?,on-source-error:s?,on-target-error:s?",
1139 .mhandler.cmd_new = qmp_marshal_input_drive_backup,
1140 },
1141
1142 SQMP
1143 drive-backup
1144 ------------
1145
1146 Start a point-in-time copy of a block device to a new destination. The
1147 status of ongoing drive-backup operations can be checked with
1148 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1149 The operation can be stopped before it has completed using the
1150 block-job-cancel command.
1151
1152 Arguments:
1153
1154 - "device": the name of the device which should be copied.
1155 (json-string)
1156 - "target": the target of the new image. If the file exists, or if it is a
1157 device, the existing file/device will be used as the new
1158 destination. If it does not exist, a new file will be created.
1159 (json-string)
1160 - "format": the format of the new destination, default is to probe if 'mode' is
1161 'existing', else the format of the source
1162 (json-string, optional)
1163 - "sync": what parts of the disk image should be copied to the destination;
1164 possibilities include "full" for all the disk, "top" for only the sectors
1165 allocated in the topmost image, "incremental" for only the dirty sectors in
1166 the bitmap, or "none" to only replicate new I/O (MirrorSyncMode).
1167 - "bitmap": dirty bitmap name for sync==incremental. Must be present if sync
1168 is "incremental", must NOT be present otherwise.
1169 - "mode": whether and how QEMU should create a new image
1170 (NewImageMode, optional, default 'absolute-paths')
1171 - "speed": the maximum speed, in bytes per second (json-int, optional)
1172 - "on-source-error": the action to take on an error on the source, default
1173 'report'. 'stop' and 'enospc' can only be used
1174 if the block device supports io-status.
1175 (BlockdevOnError, optional)
1176 - "on-target-error": the action to take on an error on the target, default
1177 'report' (no limitations, since this applies to
1178 a different block device than device).
1179 (BlockdevOnError, optional)
1180
1181 Example:
1182 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
1183 "sync": "full",
1184 "target": "backup.img" } }
1185 <- { "return": {} }
1186
1187 EQMP
1188
1189 {
1190 .name = "blockdev-backup",
1191 .args_type = "sync:s,device:B,target:B,speed:i?,"
1192 "on-source-error:s?,on-target-error:s?",
1193 .mhandler.cmd_new = qmp_marshal_input_blockdev_backup,
1194 },
1195
1196 SQMP
1197 blockdev-backup
1198 ---------------
1199
1200 The device version of drive-backup: this command takes an existing named device
1201 as backup target.
1202
1203 Arguments:
1204
1205 - "device": the name of the device which should be copied.
1206 (json-string)
1207 - "target": the name of the backup target device. (json-string)
1208 - "sync": what parts of the disk image should be copied to the destination;
1209 possibilities include "full" for all the disk, "top" for only the
1210 sectors allocated in the topmost image, or "none" to only replicate
1211 new I/O (MirrorSyncMode).
1212 - "speed": the maximum speed, in bytes per second (json-int, optional)
1213 - "on-source-error": the action to take on an error on the source, default
1214 'report'. 'stop' and 'enospc' can only be used
1215 if the block device supports io-status.
1216 (BlockdevOnError, optional)
1217 - "on-target-error": the action to take on an error on the target, default
1218 'report' (no limitations, since this applies to
1219 a different block device than device).
1220 (BlockdevOnError, optional)
1221
1222 Example:
1223 -> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
1224 "sync": "full",
1225 "target": "tgt-id" } }
1226 <- { "return": {} }
1227
1228 EQMP
1229
1230 {
1231 .name = "block-job-set-speed",
1232 .args_type = "device:B,speed:o",
1233 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
1234 },
1235
1236 {
1237 .name = "block-job-cancel",
1238 .args_type = "device:B,force:b?",
1239 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
1240 },
1241 {
1242 .name = "block-job-pause",
1243 .args_type = "device:B",
1244 .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
1245 },
1246 {
1247 .name = "block-job-resume",
1248 .args_type = "device:B",
1249 .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
1250 },
1251 {
1252 .name = "block-job-complete",
1253 .args_type = "device:B",
1254 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
1255 },
1256 {
1257 .name = "transaction",
1258 .args_type = "actions:q",
1259 .mhandler.cmd_new = qmp_marshal_input_transaction,
1260 },
1261
1262 SQMP
1263 transaction
1264 -----------
1265
1266 Atomically operate on one or more block devices. The only supported operations
1267 for now are drive-backup, internal and external snapshotting. A list of
1268 dictionaries is accepted, that contains the actions to be performed.
1269 If there is any failure performing any of the operations, all operations
1270 for the group are abandoned.
1271
1272 For external snapshots, the dictionary contains the device, the file to use for
1273 the new snapshot, and the format. The default format, if not specified, is
1274 qcow2.
1275
1276 Each new snapshot defaults to being created by QEMU (wiping any
1277 contents if the file already exists), but it is also possible to reuse
1278 an externally-created file. In the latter case, you should ensure that
1279 the new image file has the same contents as the current one; QEMU cannot
1280 perform any meaningful check. Typically this is achieved by using the
1281 current image file as the backing file for the new image.
1282
1283 On failure, the original disks pre-snapshot attempt will be used.
1284
1285 For internal snapshots, the dictionary contains the device and the snapshot's
1286 name. If an internal snapshot matching name already exists, the request will
1287 be rejected. Only some image formats support it, for example, qcow2, rbd,
1288 and sheepdog.
1289
1290 On failure, qemu will try delete the newly created internal snapshot in the
1291 transaction. When an I/O error occurs during deletion, the user needs to fix
1292 it later with qemu-img or other command.
1293
1294 Arguments:
1295
1296 actions array:
1297 - "type": the operation to perform. The only supported
1298 value is "blockdev-snapshot-sync". (json-string)
1299 - "data": a dictionary. The contents depend on the value
1300 of "type". When "type" is "blockdev-snapshot-sync":
1301 - "device": device name to snapshot (json-string)
1302 - "node-name": graph node name to snapshot (json-string)
1303 - "snapshot-file": name of new image file (json-string)
1304 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1305 - "format": format of new image (json-string, optional)
1306 - "mode": whether and how QEMU should create the snapshot file
1307 (NewImageMode, optional, default "absolute-paths")
1308 When "type" is "blockdev-snapshot-internal-sync":
1309 - "device": device name to snapshot (json-string)
1310 - "name": name of the new snapshot (json-string)
1311
1312 Example:
1313
1314 -> { "execute": "transaction",
1315 "arguments": { "actions": [
1316 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
1317 "snapshot-file": "/some/place/my-image",
1318 "format": "qcow2" } },
1319 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
1320 "snapshot-file": "/some/place/my-image2",
1321 "snapshot-node-name": "node3432",
1322 "mode": "existing",
1323 "format": "qcow2" } },
1324 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
1325 "snapshot-file": "/some/place/my-image2",
1326 "mode": "existing",
1327 "format": "qcow2" } },
1328 { "type": "blockdev-snapshot-internal-sync", "data" : {
1329 "device": "ide-hd2",
1330 "name": "snapshot0" } } ] } }
1331 <- { "return": {} }
1332
1333 EQMP
1334
1335 {
1336 .name = "block-dirty-bitmap-add",
1337 .args_type = "node:B,name:s,granularity:i?",
1338 .mhandler.cmd_new = qmp_marshal_input_block_dirty_bitmap_add,
1339 },
1340
1341 SQMP
1342
1343 block-dirty-bitmap-add
1344 ----------------------
1345 Since 2.4
1346
1347 Create a dirty bitmap with a name on the device, and start tracking the writes.
1348
1349 Arguments:
1350
1351 - "node": device/node on which to create dirty bitmap (json-string)
1352 - "name": name of the new dirty bitmap (json-string)
1353 - "granularity": granularity to track writes with (int, optional)
1354
1355 Example:
1356
1357 -> { "execute": "block-dirty-bitmap-add", "arguments": { "node": "drive0",
1358 "name": "bitmap0" } }
1359 <- { "return": {} }
1360
1361 EQMP
1362
1363 {
1364 .name = "block-dirty-bitmap-remove",
1365 .args_type = "node:B,name:s",
1366 .mhandler.cmd_new = qmp_marshal_input_block_dirty_bitmap_remove,
1367 },
1368
1369 SQMP
1370
1371 block-dirty-bitmap-remove
1372 -------------------------
1373 Since 2.4
1374
1375 Stop write tracking and remove the dirty bitmap that was created with
1376 block-dirty-bitmap-add.
1377
1378 Arguments:
1379
1380 - "node": device/node on which to remove dirty bitmap (json-string)
1381 - "name": name of the dirty bitmap to remove (json-string)
1382
1383 Example:
1384
1385 -> { "execute": "block-dirty-bitmap-remove", "arguments": { "node": "drive0",
1386 "name": "bitmap0" } }
1387 <- { "return": {} }
1388
1389 EQMP
1390
1391 {
1392 .name = "block-dirty-bitmap-clear",
1393 .args_type = "node:B,name:s",
1394 .mhandler.cmd_new = qmp_marshal_input_block_dirty_bitmap_clear,
1395 },
1396
1397 SQMP
1398
1399 block-dirty-bitmap-clear
1400 ------------------------
1401 Since 2.4
1402
1403 Reset the dirty bitmap associated with a node so that an incremental backup
1404 from this point in time forward will only backup clusters modified after this
1405 clear operation.
1406
1407 Arguments:
1408
1409 - "node": device/node on which to remove dirty bitmap (json-string)
1410 - "name": name of the dirty bitmap to remove (json-string)
1411
1412 Example:
1413
1414 -> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0",
1415 "name": "bitmap0" } }
1416 <- { "return": {} }
1417
1418 EQMP
1419
1420 {
1421 .name = "blockdev-snapshot-sync",
1422 .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
1423 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
1424 },
1425
1426 SQMP
1427 blockdev-snapshot-sync
1428 ----------------------
1429
1430 Synchronous snapshot of a block device. snapshot-file specifies the
1431 target of the new image. If the file exists, or if it is a device, the
1432 snapshot will be created in the existing file/device. If does not
1433 exist, a new file will be created. format specifies the format of the
1434 snapshot image, default is qcow2.
1435
1436 Arguments:
1437
1438 - "device": device name to snapshot (json-string)
1439 - "node-name": graph node name to snapshot (json-string)
1440 - "snapshot-file": name of new image file (json-string)
1441 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1442 - "mode": whether and how QEMU should create the snapshot file
1443 (NewImageMode, optional, default "absolute-paths")
1444 - "format": format of new image (json-string, optional)
1445
1446 Example:
1447
1448 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1449 "snapshot-file":
1450 "/some/place/my-image",
1451 "format": "qcow2" } }
1452 <- { "return": {} }
1453
1454 EQMP
1455
1456 {
1457 .name = "blockdev-snapshot-internal-sync",
1458 .args_type = "device:B,name:s",
1459 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_internal_sync,
1460 },
1461
1462 SQMP
1463 blockdev-snapshot-internal-sync
1464 -------------------------------
1465
1466 Synchronously take an internal snapshot of a block device when the format of
1467 image used supports it. If the name is an empty string, or a snapshot with
1468 name already exists, the operation will fail.
1469
1470 Arguments:
1471
1472 - "device": device name to snapshot (json-string)
1473 - "name": name of the new snapshot (json-string)
1474
1475 Example:
1476
1477 -> { "execute": "blockdev-snapshot-internal-sync",
1478 "arguments": { "device": "ide-hd0",
1479 "name": "snapshot0" }
1480 }
1481 <- { "return": {} }
1482
1483 EQMP
1484
1485 {
1486 .name = "blockdev-snapshot-delete-internal-sync",
1487 .args_type = "device:B,id:s?,name:s?",
1488 .mhandler.cmd_new =
1489 qmp_marshal_input_blockdev_snapshot_delete_internal_sync,
1490 },
1491
1492 SQMP
1493 blockdev-snapshot-delete-internal-sync
1494 --------------------------------------
1495
1496 Synchronously delete an internal snapshot of a block device when the format of
1497 image used supports it. The snapshot is identified by name or id or both. One
1498 of name or id is required. If the snapshot is not found, the operation will
1499 fail.
1500
1501 Arguments:
1502
1503 - "device": device name (json-string)
1504 - "id": ID of the snapshot (json-string, optional)
1505 - "name": name of the snapshot (json-string, optional)
1506
1507 Example:
1508
1509 -> { "execute": "blockdev-snapshot-delete-internal-sync",
1510 "arguments": { "device": "ide-hd0",
1511 "name": "snapshot0" }
1512 }
1513 <- { "return": {
1514 "id": "1",
1515 "name": "snapshot0",
1516 "vm-state-size": 0,
1517 "date-sec": 1000012,
1518 "date-nsec": 10,
1519 "vm-clock-sec": 100,
1520 "vm-clock-nsec": 20
1521 }
1522 }
1523
1524 EQMP
1525
1526 {
1527 .name = "drive-mirror",
1528 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1529 "node-name:s?,replaces:s?,"
1530 "on-source-error:s?,on-target-error:s?,"
1531 "unmap:b?,"
1532 "granularity:i?,buf-size:i?",
1533 .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
1534 },
1535
1536 SQMP
1537 drive-mirror
1538 ------------
1539
1540 Start mirroring a block device's writes to a new destination. target
1541 specifies the target of the new image. If the file exists, or if it is
1542 a device, it will be used as the new destination for writes. If it does not
1543 exist, a new file will be created. format specifies the format of the
1544 mirror image, default is to probe if mode='existing', else the format
1545 of the source.
1546
1547 Arguments:
1548
1549 - "device": device name to operate on (json-string)
1550 - "target": name of new image file (json-string)
1551 - "format": format of new image (json-string, optional)
1552 - "node-name": the name of the new block driver state in the node graph
1553 (json-string, optional)
1554 - "replaces": the block driver node name to replace when finished
1555 (json-string, optional)
1556 - "mode": how an image file should be created into the target
1557 file/device (NewImageMode, optional, default 'absolute-paths')
1558 - "speed": maximum speed of the streaming job, in bytes per second
1559 (json-int)
1560 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1561 - "buf_size": maximum amount of data in flight from source to target, in bytes
1562 (json-int, default 10M)
1563 - "sync": what parts of the disk image should be copied to the destination;
1564 possibilities include "full" for all the disk, "top" for only the sectors
1565 allocated in the topmost image, or "none" to only replicate new I/O
1566 (MirrorSyncMode).
1567 - "on-source-error": the action to take on an error on the source
1568 (BlockdevOnError, default 'report')
1569 - "on-target-error": the action to take on an error on the target
1570 (BlockdevOnError, default 'report')
1571 - "unmap": whether the target sectors should be discarded where source has only
1572 zeroes. (json-bool, optional, default true)
1573
1574 The default value of the granularity is the image cluster size clamped
1575 between 4096 and 65536, if the image format defines one. If the format
1576 does not define a cluster size, the default value of the granularity
1577 is 65536.
1578
1579
1580 Example:
1581
1582 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1583 "target": "/some/place/my-image",
1584 "sync": "full",
1585 "format": "qcow2" } }
1586 <- { "return": {} }
1587
1588 EQMP
1589
1590 {
1591 .name = "change-backing-file",
1592 .args_type = "device:s,image-node-name:s,backing-file:s",
1593 .mhandler.cmd_new = qmp_marshal_input_change_backing_file,
1594 },
1595
1596 SQMP
1597 change-backing-file
1598 -------------------
1599 Since: 2.1
1600
1601 Change the backing file in the image file metadata. This does not cause
1602 QEMU to reopen the image file to reparse the backing filename (it may,
1603 however, perform a reopen to change permissions from r/o -> r/w -> r/o,
1604 if needed). The new backing file string is written into the image file
1605 metadata, and the QEMU internal strings are updated.
1606
1607 Arguments:
1608
1609 - "image-node-name": The name of the block driver state node of the
1610 image to modify. The "device" is argument is used to
1611 verify "image-node-name" is in the chain described by
1612 "device".
1613 (json-string, optional)
1614
1615 - "device": The name of the device.
1616 (json-string)
1617
1618 - "backing-file": The string to write as the backing file. This string is
1619 not validated, so care should be taken when specifying
1620 the string or the image chain may not be able to be
1621 reopened again.
1622 (json-string)
1623
1624 Returns: Nothing on success
1625 If "device" does not exist or cannot be determined, DeviceNotFound
1626
1627 EQMP
1628
1629 {
1630 .name = "balloon",
1631 .args_type = "value:M",
1632 .mhandler.cmd_new = qmp_marshal_input_balloon,
1633 },
1634
1635 SQMP
1636 balloon
1637 -------
1638
1639 Request VM to change its memory allocation (in bytes).
1640
1641 Arguments:
1642
1643 - "value": New memory allocation (json-int)
1644
1645 Example:
1646
1647 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1648 <- { "return": {} }
1649
1650 EQMP
1651
1652 {
1653 .name = "set_link",
1654 .args_type = "name:s,up:b",
1655 .mhandler.cmd_new = qmp_marshal_input_set_link,
1656 },
1657
1658 SQMP
1659 set_link
1660 --------
1661
1662 Change the link status of a network adapter.
1663
1664 Arguments:
1665
1666 - "name": network device name (json-string)
1667 - "up": status is up (json-bool)
1668
1669 Example:
1670
1671 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1672 <- { "return": {} }
1673
1674 EQMP
1675
1676 {
1677 .name = "getfd",
1678 .args_type = "fdname:s",
1679 .params = "getfd name",
1680 .help = "receive a file descriptor via SCM rights and assign it a name",
1681 .mhandler.cmd_new = qmp_marshal_input_getfd,
1682 },
1683
1684 SQMP
1685 getfd
1686 -----
1687
1688 Receive a file descriptor via SCM rights and assign it a name.
1689
1690 Arguments:
1691
1692 - "fdname": file descriptor name (json-string)
1693
1694 Example:
1695
1696 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1697 <- { "return": {} }
1698
1699 Notes:
1700
1701 (1) If the name specified by the "fdname" argument already exists,
1702 the file descriptor assigned to it will be closed and replaced
1703 by the received file descriptor.
1704 (2) The 'closefd' command can be used to explicitly close the file
1705 descriptor when it is no longer needed.
1706
1707 EQMP
1708
1709 {
1710 .name = "closefd",
1711 .args_type = "fdname:s",
1712 .params = "closefd name",
1713 .help = "close a file descriptor previously passed via SCM rights",
1714 .mhandler.cmd_new = qmp_marshal_input_closefd,
1715 },
1716
1717 SQMP
1718 closefd
1719 -------
1720
1721 Close a file descriptor previously passed via SCM rights.
1722
1723 Arguments:
1724
1725 - "fdname": file descriptor name (json-string)
1726
1727 Example:
1728
1729 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1730 <- { "return": {} }
1731
1732 EQMP
1733
1734 {
1735 .name = "add-fd",
1736 .args_type = "fdset-id:i?,opaque:s?",
1737 .params = "add-fd fdset-id opaque",
1738 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1739 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1740 },
1741
1742 SQMP
1743 add-fd
1744 -------
1745
1746 Add a file descriptor, that was passed via SCM rights, to an fd set.
1747
1748 Arguments:
1749
1750 - "fdset-id": The ID of the fd set to add the file descriptor to.
1751 (json-int, optional)
1752 - "opaque": A free-form string that can be used to describe the fd.
1753 (json-string, optional)
1754
1755 Return a json-object with the following information:
1756
1757 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1758 - "fd": The file descriptor that was received via SCM rights and added to the
1759 fd set. (json-int)
1760
1761 Example:
1762
1763 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1764 <- { "return": { "fdset-id": 1, "fd": 3 } }
1765
1766 Notes:
1767
1768 (1) The list of fd sets is shared by all monitor connections.
1769 (2) If "fdset-id" is not specified, a new fd set will be created.
1770
1771 EQMP
1772
1773 {
1774 .name = "remove-fd",
1775 .args_type = "fdset-id:i,fd:i?",
1776 .params = "remove-fd fdset-id fd",
1777 .help = "Remove a file descriptor from an fd set",
1778 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1779 },
1780
1781 SQMP
1782 remove-fd
1783 ---------
1784
1785 Remove a file descriptor from an fd set.
1786
1787 Arguments:
1788
1789 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1790 (json-int)
1791 - "fd": The file descriptor that is to be removed. (json-int, optional)
1792
1793 Example:
1794
1795 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1796 <- { "return": {} }
1797
1798 Notes:
1799
1800 (1) The list of fd sets is shared by all monitor connections.
1801 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1802 removed.
1803
1804 EQMP
1805
1806 {
1807 .name = "query-fdsets",
1808 .args_type = "",
1809 .help = "Return information describing all fd sets",
1810 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1811 },
1812
1813 SQMP
1814 query-fdsets
1815 -------------
1816
1817 Return information describing all fd sets.
1818
1819 Arguments: None
1820
1821 Example:
1822
1823 -> { "execute": "query-fdsets" }
1824 <- { "return": [
1825 {
1826 "fds": [
1827 {
1828 "fd": 30,
1829 "opaque": "rdonly:/path/to/file"
1830 },
1831 {
1832 "fd": 24,
1833 "opaque": "rdwr:/path/to/file"
1834 }
1835 ],
1836 "fdset-id": 1
1837 },
1838 {
1839 "fds": [
1840 {
1841 "fd": 28
1842 },
1843 {
1844 "fd": 29
1845 }
1846 ],
1847 "fdset-id": 0
1848 }
1849 ]
1850 }
1851
1852 Note: The list of fd sets is shared by all monitor connections.
1853
1854 EQMP
1855
1856 {
1857 .name = "block_passwd",
1858 .args_type = "device:s?,node-name:s?,password:s",
1859 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
1860 },
1861
1862 SQMP
1863 block_passwd
1864 ------------
1865
1866 Set the password of encrypted block devices.
1867
1868 Arguments:
1869
1870 - "device": device name (json-string)
1871 - "node-name": name in the block driver state graph (json-string)
1872 - "password": password (json-string)
1873
1874 Example:
1875
1876 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1877 "password": "12345" } }
1878 <- { "return": {} }
1879
1880 EQMP
1881
1882 {
1883 .name = "block_set_io_throttle",
1884 .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?,iops_size:l?,group:s?",
1885 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
1886 },
1887
1888 SQMP
1889 block_set_io_throttle
1890 ------------
1891
1892 Change I/O throttle limits for a block drive.
1893
1894 Arguments:
1895
1896 - "device": device name (json-string)
1897 - "bps": total throughput limit in bytes per second (json-int)
1898 - "bps_rd": read throughput limit in bytes per second (json-int)
1899 - "bps_wr": write throughput limit in bytes per second (json-int)
1900 - "iops": total I/O operations per second (json-int)
1901 - "iops_rd": read I/O operations per second (json-int)
1902 - "iops_wr": write I/O operations per second (json-int)
1903 - "bps_max": total max in bytes (json-int)
1904 - "bps_rd_max": read max in bytes (json-int)
1905 - "bps_wr_max": write max in bytes (json-int)
1906 - "iops_max": total I/O operations max (json-int)
1907 - "iops_rd_max": read I/O operations max (json-int)
1908 - "iops_wr_max": write I/O operations max (json-int)
1909 - "iops_size": I/O size in bytes when limiting (json-int)
1910 - "group": throttle group name (json-string)
1911
1912 Example:
1913
1914 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1915 "bps": 1000000,
1916 "bps_rd": 0,
1917 "bps_wr": 0,
1918 "iops": 0,
1919 "iops_rd": 0,
1920 "iops_wr": 0,
1921 "bps_max": 8000000,
1922 "bps_rd_max": 0,
1923 "bps_wr_max": 0,
1924 "iops_max": 0,
1925 "iops_rd_max": 0,
1926 "iops_wr_max": 0,
1927 "iops_size": 0 } }
1928 <- { "return": {} }
1929
1930 EQMP
1931
1932 {
1933 .name = "set_password",
1934 .args_type = "protocol:s,password:s,connected:s?",
1935 .mhandler.cmd_new = qmp_marshal_input_set_password,
1936 },
1937
1938 SQMP
1939 set_password
1940 ------------
1941
1942 Set the password for vnc/spice protocols.
1943
1944 Arguments:
1945
1946 - "protocol": protocol name (json-string)
1947 - "password": password (json-string)
1948 - "connected": [ keep | disconnect | fail ] (json-string, optional)
1949
1950 Example:
1951
1952 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
1953 "password": "secret" } }
1954 <- { "return": {} }
1955
1956 EQMP
1957
1958 {
1959 .name = "expire_password",
1960 .args_type = "protocol:s,time:s",
1961 .mhandler.cmd_new = qmp_marshal_input_expire_password,
1962 },
1963
1964 SQMP
1965 expire_password
1966 ---------------
1967
1968 Set the password expire time for vnc/spice protocols.
1969
1970 Arguments:
1971
1972 - "protocol": protocol name (json-string)
1973 - "time": [ now | never | +secs | secs ] (json-string)
1974
1975 Example:
1976
1977 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1978 "time": "+60" } }
1979 <- { "return": {} }
1980
1981 EQMP
1982
1983 {
1984 .name = "add_client",
1985 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
1986 .mhandler.cmd_new = qmp_marshal_input_add_client,
1987 },
1988
1989 SQMP
1990 add_client
1991 ----------
1992
1993 Add a graphics client
1994
1995 Arguments:
1996
1997 - "protocol": protocol name (json-string)
1998 - "fdname": file descriptor name (json-string)
1999 - "skipauth": whether to skip authentication (json-bool, optional)
2000 - "tls": whether to perform TLS (json-bool, optional)
2001
2002 Example:
2003
2004 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
2005 "fdname": "myclient" } }
2006 <- { "return": {} }
2007
2008 EQMP
2009 {
2010 .name = "qmp_capabilities",
2011 .args_type = "",
2012 .params = "",
2013 .help = "enable QMP capabilities",
2014 .mhandler.cmd_new = qmp_capabilities,
2015 },
2016
2017 SQMP
2018 qmp_capabilities
2019 ----------------
2020
2021 Enable QMP capabilities.
2022
2023 Arguments: None.
2024
2025 Example:
2026
2027 -> { "execute": "qmp_capabilities" }
2028 <- { "return": {} }
2029
2030 Note: This command must be issued before issuing any other command.
2031
2032 EQMP
2033
2034 {
2035 .name = "human-monitor-command",
2036 .args_type = "command-line:s,cpu-index:i?",
2037 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
2038 },
2039
2040 SQMP
2041 human-monitor-command
2042 ---------------------
2043
2044 Execute a Human Monitor command.
2045
2046 Arguments:
2047
2048 - command-line: the command name and its arguments, just like the
2049 Human Monitor's shell (json-string)
2050 - cpu-index: select the CPU number to be used by commands which access CPU
2051 data, like 'info registers'. The Monitor selects CPU 0 if this
2052 argument is not provided (json-int, optional)
2053
2054 Example:
2055
2056 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
2057 <- { "return": "kvm support: enabled\r\n" }
2058
2059 Notes:
2060
2061 (1) The Human Monitor is NOT an stable interface, this means that command
2062 names, arguments and responses can change or be removed at ANY time.
2063 Applications that rely on long term stability guarantees should NOT
2064 use this command
2065
2066 (2) Limitations:
2067
2068 o This command is stateless, this means that commands that depend
2069 on state information (such as getfd) might not work
2070
2071 o Commands that prompt the user for data (eg. 'cont' when the block
2072 device is encrypted) don't currently work
2073
2074 3. Query Commands
2075 =================
2076
2077 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
2078 HXCOMM this! We will possibly move query commands definitions inside those
2079 HXCOMM sections, just like regular commands.
2080
2081 EQMP
2082
2083 SQMP
2084 query-version
2085 -------------
2086
2087 Show QEMU version.
2088
2089 Return a json-object with the following information:
2090
2091 - "qemu": A json-object containing three integer values:
2092 - "major": QEMU's major version (json-int)
2093 - "minor": QEMU's minor version (json-int)
2094 - "micro": QEMU's micro version (json-int)
2095 - "package": package's version (json-string)
2096
2097 Example:
2098
2099 -> { "execute": "query-version" }
2100 <- {
2101 "return":{
2102 "qemu":{
2103 "major":0,
2104 "minor":11,
2105 "micro":5
2106 },
2107 "package":""
2108 }
2109 }
2110
2111 EQMP
2112
2113 {
2114 .name = "query-version",
2115 .args_type = "",
2116 .mhandler.cmd_new = qmp_marshal_input_query_version,
2117 },
2118
2119 SQMP
2120 query-commands
2121 --------------
2122
2123 List QMP available commands.
2124
2125 Each command is represented by a json-object, the returned value is a json-array
2126 of all commands.
2127
2128 Each json-object contain:
2129
2130 - "name": command's name (json-string)
2131
2132 Example:
2133
2134 -> { "execute": "query-commands" }
2135 <- {
2136 "return":[
2137 {
2138 "name":"query-balloon"
2139 },
2140 {
2141 "name":"system_powerdown"
2142 }
2143 ]
2144 }
2145
2146 Note: This example has been shortened as the real response is too long.
2147
2148 EQMP
2149
2150 {
2151 .name = "query-commands",
2152 .args_type = "",
2153 .mhandler.cmd_new = qmp_marshal_input_query_commands,
2154 },
2155
2156 SQMP
2157 query-events
2158 --------------
2159
2160 List QMP available events.
2161
2162 Each event is represented by a json-object, the returned value is a json-array
2163 of all events.
2164
2165 Each json-object contains:
2166
2167 - "name": event's name (json-string)
2168
2169 Example:
2170
2171 -> { "execute": "query-events" }
2172 <- {
2173 "return":[
2174 {
2175 "name":"SHUTDOWN"
2176 },
2177 {
2178 "name":"RESET"
2179 }
2180 ]
2181 }
2182
2183 Note: This example has been shortened as the real response is too long.
2184
2185 EQMP
2186
2187 {
2188 .name = "query-events",
2189 .args_type = "",
2190 .mhandler.cmd_new = qmp_marshal_input_query_events,
2191 },
2192
2193 SQMP
2194 query-chardev
2195 -------------
2196
2197 Each device is represented by a json-object. The returned value is a json-array
2198 of all devices.
2199
2200 Each json-object contain the following:
2201
2202 - "label": device's label (json-string)
2203 - "filename": device's file (json-string)
2204 - "frontend-open": open/closed state of the frontend device attached to this
2205 backend (json-bool)
2206
2207 Example:
2208
2209 -> { "execute": "query-chardev" }
2210 <- {
2211 "return": [
2212 {
2213 "label": "charchannel0",
2214 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2215 "frontend-open": false
2216 },
2217 {
2218 "label": "charmonitor",
2219 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2220 "frontend-open": true
2221 },
2222 {
2223 "label": "charserial0",
2224 "filename": "pty:/dev/pts/2",
2225 "frontend-open": true
2226 }
2227 ]
2228 }
2229
2230 EQMP
2231
2232 {
2233 .name = "query-chardev",
2234 .args_type = "",
2235 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
2236 },
2237
2238 SQMP
2239 query-chardev-backends
2240 -------------
2241
2242 List available character device backends.
2243
2244 Each backend is represented by a json-object, the returned value is a json-array
2245 of all backends.
2246
2247 Each json-object contains:
2248
2249 - "name": backend name (json-string)
2250
2251 Example:
2252
2253 -> { "execute": "query-chardev-backends" }
2254 <- {
2255 "return":[
2256 {
2257 "name":"udp"
2258 },
2259 {
2260 "name":"tcp"
2261 },
2262 {
2263 "name":"unix"
2264 },
2265 {
2266 "name":"spiceport"
2267 }
2268 ]
2269 }
2270
2271 EQMP
2272
2273 {
2274 .name = "query-chardev-backends",
2275 .args_type = "",
2276 .mhandler.cmd_new = qmp_marshal_input_query_chardev_backends,
2277 },
2278
2279 SQMP
2280 query-block
2281 -----------
2282
2283 Show the block devices.
2284
2285 Each block device information is stored in a json-object and the returned value
2286 is a json-array of all devices.
2287
2288 Each json-object contain the following:
2289
2290 - "device": device name (json-string)
2291 - "type": device type (json-string)
2292 - deprecated, retained for backward compatibility
2293 - Possible values: "unknown"
2294 - "removable": true if the device is removable, false otherwise (json-bool)
2295 - "locked": true if the device is locked, false otherwise (json-bool)
2296 - "tray_open": only present if removable, true if the device has a tray,
2297 and it is open (json-bool)
2298 - "inserted": only present if the device is inserted, it is a json-object
2299 containing the following:
2300 - "file": device file name (json-string)
2301 - "ro": true if read-only, false otherwise (json-bool)
2302 - "drv": driver format name (json-string)
2303 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
2304 "file", "file", "ftp", "ftps", "host_cdrom",
2305 "host_device", "http", "https",
2306 "nbd", "parallels", "qcow", "qcow2", "raw",
2307 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2308 - "backing_file": backing file name (json-string, optional)
2309 - "backing_file_depth": number of files in the backing file chain (json-int)
2310 - "encrypted": true if encrypted, false otherwise (json-bool)
2311 - "bps": limit total bytes per second (json-int)
2312 - "bps_rd": limit read bytes per second (json-int)
2313 - "bps_wr": limit write bytes per second (json-int)
2314 - "iops": limit total I/O operations per second (json-int)
2315 - "iops_rd": limit read operations per second (json-int)
2316 - "iops_wr": limit write operations per second (json-int)
2317 - "bps_max": total max in bytes (json-int)
2318 - "bps_rd_max": read max in bytes (json-int)
2319 - "bps_wr_max": write max in bytes (json-int)
2320 - "iops_max": total I/O operations max (json-int)
2321 - "iops_rd_max": read I/O operations max (json-int)
2322 - "iops_wr_max": write I/O operations max (json-int)
2323 - "iops_size": I/O size when limiting by iops (json-int)
2324 - "detect_zeroes": detect and optimize zero writing (json-string)
2325 - Possible values: "off", "on", "unmap"
2326 - "write_threshold": write offset threshold in bytes, a event will be
2327 emitted if crossed. Zero if disabled (json-int)
2328 - "image": the detail of the image, it is a json-object containing
2329 the following:
2330 - "filename": image file name (json-string)
2331 - "format": image format (json-string)
2332 - "virtual-size": image capacity in bytes (json-int)
2333 - "dirty-flag": true if image is not cleanly closed, not present
2334 means clean (json-bool, optional)
2335 - "actual-size": actual size on disk in bytes of the image, not
2336 present when image does not support thin
2337 provision (json-int, optional)
2338 - "cluster-size": size of a cluster in bytes, not present if image
2339 format does not support it (json-int, optional)
2340 - "encrypted": true if the image is encrypted, not present means
2341 false or the image format does not support
2342 encryption (json-bool, optional)
2343 - "backing_file": backing file name, not present means no backing
2344 file is used or the image format does not
2345 support backing file chain
2346 (json-string, optional)
2347 - "full-backing-filename": full path of the backing file, not
2348 present if it equals backing_file or no
2349 backing file is used
2350 (json-string, optional)
2351 - "backing-filename-format": the format of the backing file, not
2352 present means unknown or no backing
2353 file (json-string, optional)
2354 - "snapshots": the internal snapshot info, it is an optional list
2355 of json-object containing the following:
2356 - "id": unique snapshot id (json-string)
2357 - "name": snapshot name (json-string)
2358 - "vm-state-size": size of the VM state in bytes (json-int)
2359 - "date-sec": UTC date of the snapshot in seconds (json-int)
2360 - "date-nsec": fractional part in nanoseconds to be used with
2361 date-sec (json-int)
2362 - "vm-clock-sec": VM clock relative to boot in seconds
2363 (json-int)
2364 - "vm-clock-nsec": fractional part in nanoseconds to be used
2365 with vm-clock-sec (json-int)
2366 - "backing-image": the detail of the backing image, it is an
2367 optional json-object only present when a
2368 backing image present for this image
2369
2370 - "io-status": I/O operation status, only present if the device supports it
2371 and the VM is configured to stop on errors. It's always reset
2372 to "ok" when the "cont" command is issued (json_string, optional)
2373 - Possible values: "ok", "failed", "nospace"
2374
2375 Example:
2376
2377 -> { "execute": "query-block" }
2378 <- {
2379 "return":[
2380 {
2381 "io-status": "ok",
2382 "device":"ide0-hd0",
2383 "locked":false,
2384 "removable":false,
2385 "inserted":{
2386 "ro":false,
2387 "drv":"qcow2",
2388 "encrypted":false,
2389 "file":"disks/test.qcow2",
2390 "backing_file_depth":1,
2391 "bps":1000000,
2392 "bps_rd":0,
2393 "bps_wr":0,
2394 "iops":1000000,
2395 "iops_rd":0,
2396 "iops_wr":0,
2397 "bps_max": 8000000,
2398 "bps_rd_max": 0,
2399 "bps_wr_max": 0,
2400 "iops_max": 0,
2401 "iops_rd_max": 0,
2402 "iops_wr_max": 0,
2403 "iops_size": 0,
2404 "detect_zeroes": "on",
2405 "write_threshold": 0,
2406 "image":{
2407 "filename":"disks/test.qcow2",
2408 "format":"qcow2",
2409 "virtual-size":2048000,
2410 "backing_file":"base.qcow2",
2411 "full-backing-filename":"disks/base.qcow2",
2412 "backing-filename-format":"qcow2",
2413 "snapshots":[
2414 {
2415 "id": "1",
2416 "name": "snapshot1",
2417 "vm-state-size": 0,
2418 "date-sec": 10000200,
2419 "date-nsec": 12,
2420 "vm-clock-sec": 206,
2421 "vm-clock-nsec": 30
2422 }
2423 ],
2424 "backing-image":{
2425 "filename":"disks/base.qcow2",
2426 "format":"qcow2",
2427 "virtual-size":2048000
2428 }
2429 }
2430 },
2431 "type":"unknown"
2432 },
2433 {
2434 "io-status": "ok",
2435 "device":"ide1-cd0",
2436 "locked":false,
2437 "removable":true,
2438 "type":"unknown"
2439 },
2440 {
2441 "device":"floppy0",
2442 "locked":false,
2443 "removable":true,
2444 "type":"unknown"
2445 },
2446 {
2447 "device":"sd0",
2448 "locked":false,
2449 "removable":true,
2450 "type":"unknown"
2451 }
2452 ]
2453 }
2454
2455 EQMP
2456
2457 {
2458 .name = "query-block",
2459 .args_type = "",
2460 .mhandler.cmd_new = qmp_marshal_input_query_block,
2461 },
2462
2463 SQMP
2464 query-blockstats
2465 ----------------
2466
2467 Show block device statistics.
2468
2469 Each device statistic information is stored in a json-object and the returned
2470 value is a json-array of all devices.
2471
2472 Each json-object contain the following:
2473
2474 - "device": device name (json-string)
2475 - "stats": A json-object with the statistics information, it contains:
2476 - "rd_bytes": bytes read (json-int)
2477 - "wr_bytes": bytes written (json-int)
2478 - "rd_operations": read operations (json-int)
2479 - "wr_operations": write operations (json-int)
2480 - "flush_operations": cache flush operations (json-int)
2481 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
2482 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
2483 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
2484 - "wr_highest_offset": Highest offset of a sector written since the
2485 BlockDriverState has been opened (json-int)
2486 - "rd_merged": number of read requests that have been merged into
2487 another request (json-int)
2488 - "wr_merged": number of write requests that have been merged into
2489 another request (json-int)
2490 - "parent": Contains recursively the statistics of the underlying
2491 protocol (e.g. the host file for a qcow2 image). If there is
2492 no underlying protocol, this field is omitted
2493 (json-object, optional)
2494
2495 Example:
2496
2497 -> { "execute": "query-blockstats" }
2498 <- {
2499 "return":[
2500 {
2501 "device":"ide0-hd0",
2502 "parent":{
2503 "stats":{
2504 "wr_highest_offset":3686448128,
2505 "wr_bytes":9786368,
2506 "wr_operations":751,
2507 "rd_bytes":122567168,
2508 "rd_operations":36772
2509 "wr_total_times_ns":313253456
2510 "rd_total_times_ns":3465673657
2511 "flush_total_times_ns":49653
2512 "flush_operations":61,
2513 "rd_merged":0,
2514 "wr_merged":0
2515 }
2516 },
2517 "stats":{
2518 "wr_highest_offset":2821110784,
2519 "wr_bytes":9786368,
2520 "wr_operations":692,
2521 "rd_bytes":122739200,
2522 "rd_operations":36604
2523 "flush_operations":51,
2524 "wr_total_times_ns":313253456
2525 "rd_total_times_ns":3465673657
2526 "flush_total_times_ns":49653,
2527 "rd_merged":0,
2528 "wr_merged":0
2529 }
2530 },
2531 {
2532 "device":"ide1-cd0",
2533 "stats":{
2534 "wr_highest_offset":0,
2535 "wr_bytes":0,
2536 "wr_operations":0,
2537 "rd_bytes":0,
2538 "rd_operations":0
2539 "flush_operations":0,
2540 "wr_total_times_ns":0
2541 "rd_total_times_ns":0
2542 "flush_total_times_ns":0,
2543 "rd_merged":0,
2544 "wr_merged":0
2545 }
2546 },
2547 {
2548 "device":"floppy0",
2549 "stats":{
2550 "wr_highest_offset":0,
2551 "wr_bytes":0,
2552 "wr_operations":0,
2553 "rd_bytes":0,
2554 "rd_operations":0
2555 "flush_operations":0,
2556 "wr_total_times_ns":0
2557 "rd_total_times_ns":0
2558 "flush_total_times_ns":0,
2559 "rd_merged":0,
2560 "wr_merged":0
2561 }
2562 },
2563 {
2564 "device":"sd0",
2565 "stats":{
2566 "wr_highest_offset":0,
2567 "wr_bytes":0,
2568 "wr_operations":0,
2569 "rd_bytes":0,
2570 "rd_operations":0
2571 "flush_operations":0,
2572 "wr_total_times_ns":0
2573 "rd_total_times_ns":0
2574 "flush_total_times_ns":0,
2575 "rd_merged":0,
2576 "wr_merged":0
2577 }
2578 }
2579 ]
2580 }
2581
2582 EQMP
2583
2584 {
2585 .name = "query-blockstats",
2586 .args_type = "query-nodes:b?",
2587 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
2588 },
2589
2590 SQMP
2591 query-cpus
2592 ----------
2593
2594 Show CPU information.
2595
2596 Return a json-array. Each CPU is represented by a json-object, which contains:
2597
2598 - "CPU": CPU index (json-int)
2599 - "current": true if this is the current CPU, false otherwise (json-bool)
2600 - "halted": true if the cpu is halted, false otherwise (json-bool)
2601 - "qom_path": path to the CPU object in the QOM tree (json-str)
2602 - Current program counter. The key's name depends on the architecture:
2603 "pc": i386/x86_64 (json-int)
2604 "nip": PPC (json-int)
2605 "pc" and "npc": sparc (json-int)
2606 "PC": mips (json-int)
2607 - "thread_id": ID of the underlying host thread (json-int)
2608
2609 Example:
2610
2611 -> { "execute": "query-cpus" }
2612 <- {
2613 "return":[
2614 {
2615 "CPU":0,
2616 "current":true,
2617 "halted":false,
2618 "qom_path":"/machine/unattached/device[0]",
2619 "pc":3227107138,
2620 "thread_id":3134
2621 },
2622 {
2623 "CPU":1,
2624 "current":false,
2625 "halted":true,
2626 "qom_path":"/machine/unattached/device[2]",
2627 "pc":7108165,
2628 "thread_id":3135
2629 }
2630 ]
2631 }
2632
2633 EQMP
2634
2635 {
2636 .name = "query-cpus",
2637 .args_type = "",
2638 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
2639 },
2640
2641 SQMP
2642 query-iothreads
2643 ---------------
2644
2645 Returns a list of information about each iothread.
2646
2647 Note this list excludes the QEMU main loop thread, which is not declared
2648 using the -object iothread command-line option. It is always the main thread
2649 of the process.
2650
2651 Return a json-array. Each iothread is represented by a json-object, which contains:
2652
2653 - "id": name of iothread (json-str)
2654 - "thread-id": ID of the underlying host thread (json-int)
2655
2656 Example:
2657
2658 -> { "execute": "query-iothreads" }
2659 <- {
2660 "return":[
2661 {
2662 "id":"iothread0",
2663 "thread-id":3134
2664 },
2665 {
2666 "id":"iothread1",
2667 "thread-id":3135
2668 }
2669 ]
2670 }
2671
2672 EQMP
2673
2674 {
2675 .name = "query-iothreads",
2676 .args_type = "",
2677 .mhandler.cmd_new = qmp_marshal_input_query_iothreads,
2678 },
2679
2680 SQMP
2681 query-pci
2682 ---------
2683
2684 PCI buses and devices information.
2685
2686 The returned value is a json-array of all buses. Each bus is represented by
2687 a json-object, which has a key with a json-array of all PCI devices attached
2688 to it. Each device is represented by a json-object.
2689
2690 The bus json-object contains the following:
2691
2692 - "bus": bus number (json-int)
2693 - "devices": a json-array of json-objects, each json-object represents a
2694 PCI device
2695
2696 The PCI device json-object contains the following:
2697
2698 - "bus": identical to the parent's bus number (json-int)
2699 - "slot": slot number (json-int)
2700 - "function": function number (json-int)
2701 - "class_info": a json-object containing:
2702 - "desc": device class description (json-string, optional)
2703 - "class": device class number (json-int)
2704 - "id": a json-object containing:
2705 - "device": device ID (json-int)
2706 - "vendor": vendor ID (json-int)
2707 - "irq": device's IRQ if assigned (json-int, optional)
2708 - "qdev_id": qdev id string (json-string)
2709 - "pci_bridge": It's a json-object, only present if this device is a
2710 PCI bridge, contains:
2711 - "bus": bus number (json-int)
2712 - "secondary": secondary bus number (json-int)
2713 - "subordinate": subordinate bus number (json-int)
2714 - "io_range": I/O memory range information, a json-object with the
2715 following members:
2716 - "base": base address, in bytes (json-int)
2717 - "limit": limit address, in bytes (json-int)
2718 - "memory_range": memory range information, a json-object with the
2719 following members:
2720 - "base": base address, in bytes (json-int)
2721 - "limit": limit address, in bytes (json-int)
2722 - "prefetchable_range": Prefetchable memory range information, a
2723 json-object with the following members:
2724 - "base": base address, in bytes (json-int)
2725 - "limit": limit address, in bytes (json-int)
2726 - "devices": a json-array of PCI devices if there's any attached, each
2727 each element is represented by a json-object, which contains
2728 the same members of the 'PCI device json-object' described
2729 above (optional)
2730 - "regions": a json-array of json-objects, each json-object represents a
2731 memory region of this device
2732
2733 The memory range json-object contains the following:
2734
2735 - "base": base memory address (json-int)
2736 - "limit": limit value (json-int)
2737
2738 The region json-object can be an I/O region or a memory region, an I/O region
2739 json-object contains the following:
2740
2741 - "type": "io" (json-string, fixed)
2742 - "bar": BAR number (json-int)
2743 - "address": memory address (json-int)
2744 - "size": memory size (json-int)
2745
2746 A memory region json-object contains the following:
2747
2748 - "type": "memory" (json-string, fixed)
2749 - "bar": BAR number (json-int)
2750 - "address": memory address (json-int)
2751 - "size": memory size (json-int)
2752 - "mem_type_64": true or false (json-bool)
2753 - "prefetch": true or false (json-bool)
2754
2755 Example:
2756
2757 -> { "execute": "query-pci" }
2758 <- {
2759 "return":[
2760 {
2761 "bus":0,
2762 "devices":[
2763 {
2764 "bus":0,
2765 "qdev_id":"",
2766 "slot":0,
2767 "class_info":{
2768 "class":1536,
2769 "desc":"Host bridge"
2770 },
2771 "id":{
2772 "device":32902,
2773 "vendor":4663
2774 },
2775 "function":0,
2776 "regions":[
2777
2778 ]
2779 },
2780 {
2781 "bus":0,
2782 "qdev_id":"",
2783 "slot":1,
2784 "class_info":{
2785 "class":1537,
2786 "desc":"ISA bridge"
2787 },
2788 "id":{
2789 "device":32902,
2790 "vendor":28672
2791 },
2792 "function":0,
2793 "regions":[
2794
2795 ]
2796 },
2797 {
2798 "bus":0,
2799 "qdev_id":"",
2800 "slot":1,
2801 "class_info":{
2802 "class":257,
2803 "desc":"IDE controller"
2804 },
2805 "id":{
2806 "device":32902,
2807 "vendor":28688
2808 },
2809 "function":1,
2810 "regions":[
2811 {
2812 "bar":4,
2813 "size":16,
2814 "address":49152,
2815 "type":"io"
2816 }
2817 ]
2818 },
2819 {
2820 "bus":0,
2821 "qdev_id":"",
2822 "slot":2,
2823 "class_info":{
2824 "class":768,
2825 "desc":"VGA controller"
2826 },
2827 "id":{
2828 "device":4115,
2829 "vendor":184
2830 },
2831 "function":0,
2832 "regions":[
2833 {
2834 "prefetch":true,
2835 "mem_type_64":false,
2836 "bar":0,
2837 "size":33554432,
2838 "address":4026531840,
2839 "type":"memory"
2840 },
2841 {
2842 "prefetch":false,
2843 "mem_type_64":false,
2844 "bar":1,
2845 "size":4096,
2846 "address":4060086272,
2847 "type":"memory"
2848 },
2849 {
2850 "prefetch":false,
2851 "mem_type_64":false,
2852 "bar":6,
2853 "size":65536,
2854 "address":-1,
2855 "type":"memory"
2856 }
2857 ]
2858 },
2859 {
2860 "bus":0,
2861 "qdev_id":"",
2862 "irq":11,
2863 "slot":4,
2864 "class_info":{
2865 "class":1280,
2866 "desc":"RAM controller"
2867 },
2868 "id":{
2869 "device":6900,
2870 "vendor":4098
2871 },
2872 "function":0,
2873 "regions":[
2874 {
2875 "bar":0,
2876 "size":32,
2877 "address":49280,
2878 "type":"io"
2879 }
2880 ]
2881 }
2882 ]
2883 }
2884 ]
2885 }
2886
2887 Note: This example has been shortened as the real response is too long.
2888
2889 EQMP
2890
2891 {
2892 .name = "query-pci",
2893 .args_type = "",
2894 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2895 },
2896
2897 SQMP
2898 query-kvm
2899 ---------
2900
2901 Show KVM information.
2902
2903 Return a json-object with the following information:
2904
2905 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
2906 - "present": true if QEMU has KVM support, false otherwise (json-bool)
2907
2908 Example:
2909
2910 -> { "execute": "query-kvm" }
2911 <- { "return": { "enabled": true, "present": true } }
2912
2913 EQMP
2914
2915 {
2916 .name = "query-kvm",
2917 .args_type = "",
2918 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2919 },
2920
2921 SQMP
2922 query-status
2923 ------------
2924
2925 Return a json-object with the following information:
2926
2927 - "running": true if the VM is running, or false if it is paused (json-bool)
2928 - "singlestep": true if the VM is in single step mode,
2929 false otherwise (json-bool)
2930 - "status": one of the following values (json-string)
2931 "debug" - QEMU is running on a debugger
2932 "inmigrate" - guest is paused waiting for an incoming migration
2933 "internal-error" - An internal error that prevents further guest
2934 execution has occurred
2935 "io-error" - the last IOP has failed and the device is configured
2936 to pause on I/O errors
2937 "paused" - guest has been paused via the 'stop' command
2938 "postmigrate" - guest is paused following a successful 'migrate'
2939 "prelaunch" - QEMU was started with -S and guest has not started
2940 "finish-migrate" - guest is paused to finish the migration process
2941 "restore-vm" - guest is paused to restore VM state
2942 "running" - guest is actively running
2943 "save-vm" - guest is paused to save the VM state
2944 "shutdown" - guest is shut down (and -no-shutdown is in use)
2945 "watchdog" - the watchdog action is configured to pause and
2946 has been triggered
2947
2948 Example:
2949
2950 -> { "execute": "query-status" }
2951 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
2952
2953 EQMP
2954
2955 {
2956 .name = "query-status",
2957 .args_type = "",
2958 .mhandler.cmd_new = qmp_marshal_input_query_status,
2959 },
2960
2961 SQMP
2962 query-mice
2963 ----------
2964
2965 Show VM mice information.
2966
2967 Each mouse is represented by a json-object, the returned value is a json-array
2968 of all mice.
2969
2970 The mouse json-object contains the following:
2971
2972 - "name": mouse's name (json-string)
2973 - "index": mouse's index (json-int)
2974 - "current": true if this mouse is receiving events, false otherwise (json-bool)
2975 - "absolute": true if the mouse generates absolute input events (json-bool)
2976
2977 Example:
2978
2979 -> { "execute": "query-mice" }
2980 <- {
2981 "return":[
2982 {
2983 "name":"QEMU Microsoft Mouse",
2984 "index":0,
2985 "current":false,
2986 "absolute":false
2987 },
2988 {
2989 "name":"QEMU PS/2 Mouse",
2990 "index":1,
2991 "current":true,
2992 "absolute":true
2993 }
2994 ]
2995 }
2996
2997 EQMP
2998
2999 {
3000 .name = "query-mice",
3001 .args_type = "",
3002 .mhandler.cmd_new = qmp_marshal_input_query_mice,
3003 },
3004
3005 SQMP
3006 query-vnc
3007 ---------
3008
3009 Show VNC server information.
3010
3011 Return a json-object with server information. Connected clients are returned
3012 as a json-array of json-objects.
3013
3014 The main json-object contains the following:
3015
3016 - "enabled": true or false (json-bool)
3017 - "host": server's IP address (json-string)
3018 - "family": address family (json-string)
3019 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3020 - "service": server's port number (json-string)
3021 - "auth": authentication method (json-string)
3022 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
3023 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
3024 "vencrypt+plain", "vencrypt+tls+none",
3025 "vencrypt+tls+plain", "vencrypt+tls+sasl",
3026 "vencrypt+tls+vnc", "vencrypt+x509+none",
3027 "vencrypt+x509+plain", "vencrypt+x509+sasl",
3028 "vencrypt+x509+vnc", "vnc"
3029 - "clients": a json-array of all connected clients
3030
3031 Clients are described by a json-object, each one contain the following:
3032
3033 - "host": client's IP address (json-string)
3034 - "family": address family (json-string)
3035 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3036 - "service": client's port number (json-string)
3037 - "x509_dname": TLS dname (json-string, optional)
3038 - "sasl_username": SASL username (json-string, optional)
3039
3040 Example:
3041
3042 -> { "execute": "query-vnc" }
3043 <- {
3044 "return":{
3045 "enabled":true,
3046 "host":"0.0.0.0",
3047 "service":"50402",
3048 "auth":"vnc",
3049 "family":"ipv4",
3050 "clients":[
3051 {
3052 "host":"127.0.0.1",
3053 "service":"50401",
3054 "family":"ipv4"
3055 }
3056 ]
3057 }
3058 }
3059
3060 EQMP
3061
3062 {
3063 .name = "query-vnc",
3064 .args_type = "",
3065 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
3066 },
3067 {
3068 .name = "query-vnc-servers",
3069 .args_type = "",
3070 .mhandler.cmd_new = qmp_marshal_input_query_vnc_servers,
3071 },
3072
3073 SQMP
3074 query-spice
3075 -----------
3076
3077 Show SPICE server information.
3078
3079 Return a json-object with server information. Connected clients are returned
3080 as a json-array of json-objects.
3081
3082 The main json-object contains the following:
3083
3084 - "enabled": true or false (json-bool)
3085 - "host": server's IP address (json-string)
3086 - "port": server's port number (json-int, optional)
3087 - "tls-port": server's port number (json-int, optional)
3088 - "auth": authentication method (json-string)
3089 - Possible values: "none", "spice"
3090 - "channels": a json-array of all active channels clients
3091
3092 Channels are described by a json-object, each one contain the following:
3093
3094 - "host": client's IP address (json-string)
3095 - "family": address family (json-string)
3096 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3097 - "port": client's port number (json-string)
3098 - "connection-id": spice connection id. All channels with the same id
3099 belong to the same spice session (json-int)
3100 - "channel-type": channel type. "1" is the main control channel, filter for
3101 this one if you want track spice sessions only (json-int)
3102 - "channel-id": channel id. Usually "0", might be different needed when
3103 multiple channels of the same type exist, such as multiple
3104 display channels in a multihead setup (json-int)
3105 - "tls": whether the channel is encrypted (json-bool)
3106
3107 Example:
3108
3109 -> { "execute": "query-spice" }
3110 <- {
3111 "return": {
3112 "enabled": true,
3113 "auth": "spice",
3114 "port": 5920,
3115 "tls-port": 5921,
3116 "host": "0.0.0.0",
3117 "channels": [
3118 {
3119 "port": "54924",
3120 "family": "ipv4",
3121 "channel-type": 1,
3122 "connection-id": 1804289383,
3123 "host": "127.0.0.1",
3124 "channel-id": 0,
3125 "tls": true
3126 },
3127 {
3128 "port": "36710",
3129 "family": "ipv4",
3130 "channel-type": 4,
3131 "connection-id": 1804289383,
3132 "host": "127.0.0.1",
3133 "channel-id": 0,
3134 "tls": false
3135 },
3136 [ ... more channels follow ... ]
3137 ]
3138 }
3139 }
3140
3141 EQMP
3142
3143 #if defined(CONFIG_SPICE)
3144 {
3145 .name = "query-spice",
3146 .args_type = "",
3147 .mhandler.cmd_new = qmp_marshal_input_query_spice,
3148 },
3149 #endif
3150
3151 SQMP
3152 query-name
3153 ----------
3154
3155 Show VM name.
3156
3157 Return a json-object with the following information:
3158
3159 - "name": VM's name (json-string, optional)
3160
3161 Example:
3162
3163 -> { "execute": "query-name" }
3164 <- { "return": { "name": "qemu-name" } }
3165
3166 EQMP
3167
3168 {
3169 .name = "query-name",
3170 .args_type = "",
3171 .mhandler.cmd_new = qmp_marshal_input_query_name,
3172 },
3173
3174 SQMP
3175 query-uuid
3176 ----------
3177
3178 Show VM UUID.
3179
3180 Return a json-object with the following information:
3181
3182 - "UUID": Universally Unique Identifier (json-string)
3183
3184 Example:
3185
3186 -> { "execute": "query-uuid" }
3187 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
3188
3189 EQMP
3190
3191 {
3192 .name = "query-uuid",
3193 .args_type = "",
3194 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
3195 },
3196
3197 SQMP
3198 query-command-line-options
3199 --------------------------
3200
3201 Show command line option schema.
3202
3203 Return a json-array of command line option schema for all options (or for
3204 the given option), returning an error if the given option doesn't exist.
3205
3206 Each array entry contains the following:
3207
3208 - "option": option name (json-string)
3209 - "parameters": a json-array describes all parameters of the option:
3210 - "name": parameter name (json-string)
3211 - "type": parameter type (one of 'string', 'boolean', 'number',
3212 or 'size')
3213 - "help": human readable description of the parameter
3214 (json-string, optional)
3215 - "default": default value string for the parameter
3216 (json-string, optional)
3217
3218 Example:
3219
3220 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
3221 <- { "return": [
3222 {
3223 "parameters": [
3224 {
3225 "name": "romfile",
3226 "type": "string"
3227 },
3228 {
3229 "name": "bootindex",
3230 "type": "number"
3231 }
3232 ],
3233 "option": "option-rom"
3234 }
3235 ]
3236 }
3237
3238 EQMP
3239
3240 {
3241 .name = "query-command-line-options",
3242 .args_type = "option:s?",
3243 .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
3244 },
3245
3246 SQMP
3247 query-migrate
3248 -------------
3249
3250 Migration status.
3251
3252 Return a json-object. If migration is active there will be another json-object
3253 with RAM migration status and if block migration is active another one with
3254 block migration status.
3255
3256 The main json-object contains the following:
3257
3258 - "status": migration status (json-string)
3259 - Possible values: "setup", "active", "completed", "failed", "cancelled"
3260 - "total-time": total amount of ms since migration started. If
3261 migration has ended, it returns the total migration
3262 time (json-int)
3263 - "setup-time" amount of setup time in milliseconds _before_ the
3264 iterations begin but _after_ the QMP command is issued.
3265 This is designed to provide an accounting of any activities
3266 (such as RDMA pinning) which may be expensive, but do not
3267 actually occur during the iterative migration rounds
3268 themselves. (json-int)
3269 - "downtime": only present when migration has finished correctly
3270 total amount in ms for downtime that happened (json-int)
3271 - "expected-downtime": only present while migration is active
3272 total amount in ms for downtime that was calculated on
3273 the last bitmap round (json-int)
3274 - "ram": only present if "status" is "active", it is a json-object with the
3275 following RAM information:
3276 - "transferred": amount transferred in bytes (json-int)
3277 - "remaining": amount remaining to transfer in bytes (json-int)
3278 - "total": total amount of memory in bytes (json-int)
3279 - "duplicate": number of pages filled entirely with the same
3280 byte (json-int)
3281 These are sent over the wire much more efficiently.
3282 - "skipped": number of skipped zero pages (json-int)
3283 - "normal" : number of whole pages transferred. I.e. they
3284 were not sent as duplicate or xbzrle pages (json-int)
3285 - "normal-bytes" : number of bytes transferred in whole
3286 pages. This is just normal pages times size of one page,
3287 but this way upper levels don't need to care about page
3288 size (json-int)
3289 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
3290 - "disk": only present if "status" is "active" and it is a block migration,
3291 it is a json-object with the following disk information:
3292 - "transferred": amount transferred in bytes (json-int)
3293 - "remaining": amount remaining to transfer in bytes json-int)
3294 - "total": total disk size in bytes (json-int)
3295 - "xbzrle-cache": only present if XBZRLE is active.
3296 It is a json-object with the following XBZRLE information:
3297 - "cache-size": XBZRLE cache size in bytes
3298 - "bytes": number of bytes transferred for XBZRLE compressed pages
3299 - "pages": number of XBZRLE compressed pages
3300 - "cache-miss": number of XBRZRLE page cache misses
3301 - "cache-miss-rate": rate of XBRZRLE page cache misses
3302 - "overflow": number of times XBZRLE overflows. This means
3303 that the XBZRLE encoding was bigger than just sent the
3304 whole page, and then we sent the whole page instead (as as
3305 normal page).
3306
3307 Examples:
3308
3309 1. Before the first migration
3310
3311 -> { "execute": "query-migrate" }
3312 <- { "return": {} }
3313
3314 2. Migration is done and has succeeded
3315
3316 -> { "execute": "query-migrate" }
3317 <- { "return": {
3318 "status": "completed",
3319 "ram":{
3320 "transferred":123,
3321 "remaining":123,
3322 "total":246,
3323 "total-time":12345,
3324 "setup-time":12345,
3325 "downtime":12345,
3326 "duplicate":123,
3327 "normal":123,
3328 "normal-bytes":123456,
3329 "dirty-sync-count":15
3330 }
3331 }
3332 }
3333
3334 3. Migration is done and has failed
3335
3336 -> { "execute": "query-migrate" }
3337 <- { "return": { "status": "failed" } }
3338
3339 4. Migration is being performed and is not a block migration:
3340
3341 -> { "execute": "query-migrate" }
3342 <- {
3343 "return":{
3344 "status":"active",
3345 "ram":{
3346 "transferred":123,
3347 "remaining":123,
3348 "total":246,
3349 "total-time":12345,
3350 "setup-time":12345,
3351 "expected-downtime":12345,
3352 "duplicate":123,
3353 "normal":123,
3354 "normal-bytes":123456,
3355 "dirty-sync-count":15
3356 }
3357 }
3358 }
3359
3360 5. Migration is being performed and is a block migration:
3361
3362 -> { "execute": "query-migrate" }
3363 <- {
3364 "return":{
3365 "status":"active",
3366 "ram":{
3367 "total":1057024,
3368 "remaining":1053304,
3369 "transferred":3720,
3370 "total-time":12345,
3371 "setup-time":12345,
3372 "expected-downtime":12345,
3373 "duplicate":123,
3374 "normal":123,
3375 "normal-bytes":123456,
3376 "dirty-sync-count":15
3377 },
3378 "disk":{
3379 "total":20971520,
3380 "remaining":20880384,
3381 "transferred":91136
3382 }
3383 }
3384 }
3385
3386 6. Migration is being performed and XBZRLE is active:
3387
3388 -> { "execute": "query-migrate" }
3389 <- {
3390 "return":{
3391 "status":"active",
3392 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
3393 "ram":{
3394 "total":1057024,
3395 "remaining":1053304,
3396 "transferred":3720,
3397 "total-time":12345,
3398 "setup-time":12345,
3399 "expected-downtime":12345,
3400 "duplicate":10,
3401 "normal":3333,
3402 "normal-bytes":3412992,
3403 "dirty-sync-count":15
3404 },
3405 "xbzrle-cache":{
3406 "cache-size":67108864,
3407 "bytes":20971520,
3408 "pages":2444343,
3409 "cache-miss":2244,
3410 "cache-miss-rate":0.123,
3411 "overflow":34434
3412 }
3413 }
3414 }
3415
3416 EQMP
3417
3418 {
3419 .name = "query-migrate",
3420 .args_type = "",
3421 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
3422 },
3423
3424 SQMP
3425 migrate-set-capabilities
3426 ------------------------
3427
3428 Enable/Disable migration capabilities
3429
3430 - "xbzrle": XBZRLE support
3431 - "rdma-pin-all": pin all pages when using RDMA during migration
3432 - "auto-converge": throttle down guest to help convergence of migration
3433 - "zero-blocks": compress zero blocks during block migration
3434 - "events": generate events for each migration state change
3435
3436 Arguments:
3437
3438 Example:
3439
3440 -> { "execute": "migrate-set-capabilities" , "arguments":
3441 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
3442
3443 EQMP
3444
3445 {
3446 .name = "migrate-set-capabilities",
3447 .args_type = "capabilities:q",
3448 .params = "capability:s,state:b",
3449 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
3450 },
3451 SQMP
3452 query-migrate-capabilities
3453 --------------------------
3454
3455 Query current migration capabilities
3456
3457 - "capabilities": migration capabilities state
3458 - "xbzrle" : XBZRLE state (json-bool)
3459 - "rdma-pin-all" : RDMA Pin Page state (json-bool)
3460 - "auto-converge" : Auto Converge state (json-bool)
3461 - "zero-blocks" : Zero Blocks state (json-bool)
3462
3463 Arguments:
3464
3465 Example:
3466
3467 -> { "execute": "query-migrate-capabilities" }
3468 <- { "return": [ { "state": false, "capability": "xbzrle" } ] }
3469
3470 EQMP
3471
3472 {
3473 .name = "query-migrate-capabilities",
3474 .args_type = "",
3475 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
3476 },
3477
3478 SQMP
3479 migrate-set-parameters
3480 ----------------------
3481
3482 Set migration parameters
3483
3484 - "compress-level": set compression level during migration (json-int)
3485 - "compress-threads": set compression thread count for migration (json-int)
3486 - "decompress-threads": set decompression thread count for migration (json-int)
3487
3488 Arguments:
3489
3490 Example:
3491
3492 -> { "execute": "migrate-set-parameters" , "arguments":
3493 { "compress-level": 1 } }
3494
3495 EQMP
3496
3497 {
3498 .name = "migrate-set-parameters",
3499 .args_type =
3500 "compress-level:i?,compress-threads:i?,decompress-threads:i?",
3501 .mhandler.cmd_new = qmp_marshal_input_migrate_set_parameters,
3502 },
3503 SQMP
3504 query-migrate-parameters
3505 ------------------------
3506
3507 Query current migration parameters
3508
3509 - "parameters": migration parameters value
3510 - "compress-level" : compression level value (json-int)
3511 - "compress-threads" : compression thread count value (json-int)
3512 - "decompress-threads" : decompression thread count value (json-int)
3513
3514 Arguments:
3515
3516 Example:
3517
3518 -> { "execute": "query-migrate-parameters" }
3519 <- {
3520 "return": {
3521 "decompress-threads", 2,
3522 "compress-threads", 8,
3523 "compress-level", 1
3524 }
3525 }
3526
3527 EQMP
3528
3529 {
3530 .name = "query-migrate-parameters",
3531 .args_type = "",
3532 .mhandler.cmd_new = qmp_marshal_input_query_migrate_parameters,
3533 },
3534
3535 SQMP
3536 query-balloon
3537 -------------
3538
3539 Show balloon information.
3540
3541 Make an asynchronous request for balloon info. When the request completes a
3542 json-object will be returned containing the following data:
3543
3544 - "actual": current balloon value in bytes (json-int)
3545
3546 Example:
3547
3548 -> { "execute": "query-balloon" }
3549 <- {
3550 "return":{
3551 "actual":1073741824,
3552 }
3553 }
3554
3555 EQMP
3556
3557 {
3558 .name = "query-balloon",
3559 .args_type = "",
3560 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
3561 },
3562
3563 {
3564 .name = "query-block-jobs",
3565 .args_type = "",
3566 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
3567 },
3568
3569 {
3570 .name = "qom-list",
3571 .args_type = "path:s",
3572 .mhandler.cmd_new = qmp_marshal_input_qom_list,
3573 },
3574
3575 {
3576 .name = "qom-set",
3577 .args_type = "path:s,property:s,value:q",
3578 .mhandler.cmd_new = qmp_qom_set,
3579 },
3580
3581 {
3582 .name = "qom-get",
3583 .args_type = "path:s,property:s",
3584 .mhandler.cmd_new = qmp_qom_get,
3585 },
3586
3587 {
3588 .name = "nbd-server-start",
3589 .args_type = "addr:q",
3590 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
3591 },
3592 {
3593 .name = "nbd-server-add",
3594 .args_type = "device:B,writable:b?",
3595 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
3596 },
3597 {
3598 .name = "nbd-server-stop",
3599 .args_type = "",
3600 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
3601 },
3602
3603 {
3604 .name = "change-vnc-password",
3605 .args_type = "password:s",
3606 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
3607 },
3608 {
3609 .name = "qom-list-types",
3610 .args_type = "implements:s?,abstract:b?",
3611 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
3612 },
3613
3614 {
3615 .name = "device-list-properties",
3616 .args_type = "typename:s",
3617 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
3618 },
3619
3620 {
3621 .name = "query-machines",
3622 .args_type = "",
3623 .mhandler.cmd_new = qmp_marshal_input_query_machines,
3624 },
3625
3626 {
3627 .name = "query-cpu-definitions",
3628 .args_type = "",
3629 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
3630 },
3631
3632 {
3633 .name = "query-target",
3634 .args_type = "",
3635 .mhandler.cmd_new = qmp_marshal_input_query_target,
3636 },
3637
3638 {
3639 .name = "query-tpm",
3640 .args_type = "",
3641 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
3642 },
3643
3644 SQMP
3645 query-tpm
3646 ---------
3647
3648 Return information about the TPM device.
3649
3650 Arguments: None
3651
3652 Example:
3653
3654 -> { "execute": "query-tpm" }
3655 <- { "return":
3656 [
3657 { "model": "tpm-tis",
3658 "options":
3659 { "type": "passthrough",
3660 "data":
3661 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3662 "path": "/dev/tpm0"
3663 }
3664 },
3665 "id": "tpm0"
3666 }
3667 ]
3668 }
3669
3670 EQMP
3671
3672 {
3673 .name = "query-tpm-models",
3674 .args_type = "",
3675 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
3676 },
3677
3678 SQMP
3679 query-tpm-models
3680 ----------------
3681
3682 Return a list of supported TPM models.
3683
3684 Arguments: None
3685
3686 Example:
3687
3688 -> { "execute": "query-tpm-models" }
3689 <- { "return": [ "tpm-tis" ] }
3690
3691 EQMP
3692
3693 {
3694 .name = "query-tpm-types",
3695 .args_type = "",
3696 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
3697 },
3698
3699 SQMP
3700 query-tpm-types
3701 ---------------
3702
3703 Return a list of supported TPM types.
3704
3705 Arguments: None
3706
3707 Example:
3708
3709 -> { "execute": "query-tpm-types" }
3710 <- { "return": [ "passthrough" ] }
3711
3712 EQMP
3713
3714 {
3715 .name = "chardev-add",
3716 .args_type = "id:s,backend:q",
3717 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
3718 },
3719
3720 SQMP
3721 chardev-add
3722 ----------------
3723
3724 Add a chardev.
3725
3726 Arguments:
3727
3728 - "id": the chardev's ID, must be unique (json-string)
3729 - "backend": chardev backend type + parameters
3730
3731 Examples:
3732
3733 -> { "execute" : "chardev-add",
3734 "arguments" : { "id" : "foo",
3735 "backend" : { "type" : "null", "data" : {} } } }
3736 <- { "return": {} }
3737
3738 -> { "execute" : "chardev-add",
3739 "arguments" : { "id" : "bar",
3740 "backend" : { "type" : "file",
3741 "data" : { "out" : "/tmp/bar.log" } } } }
3742 <- { "return": {} }
3743
3744 -> { "execute" : "chardev-add",
3745 "arguments" : { "id" : "baz",
3746 "backend" : { "type" : "pty", "data" : {} } } }
3747 <- { "return": { "pty" : "/dev/pty/42" } }
3748
3749 EQMP
3750
3751 {
3752 .name = "chardev-remove",
3753 .args_type = "id:s",
3754 .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
3755 },
3756
3757
3758 SQMP
3759 chardev-remove
3760 --------------
3761
3762 Remove a chardev.
3763
3764 Arguments:
3765
3766 - "id": the chardev's ID, must exist and not be in use (json-string)
3767
3768 Example:
3769
3770 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3771 <- { "return": {} }
3772
3773 EQMP
3774 {
3775 .name = "query-rx-filter",
3776 .args_type = "name:s?",
3777 .mhandler.cmd_new = qmp_marshal_input_query_rx_filter,
3778 },
3779
3780 SQMP
3781 query-rx-filter
3782 ---------------
3783
3784 Show rx-filter information.
3785
3786 Returns a json-array of rx-filter information for all NICs (or for the
3787 given NIC), returning an error if the given NIC doesn't exist, or
3788 given NIC doesn't support rx-filter querying, or given net client
3789 isn't a NIC.
3790
3791 The query will clear the event notification flag of each NIC, then qemu
3792 will start to emit event to QMP monitor.
3793
3794 Each array entry contains the following:
3795
3796 - "name": net client name (json-string)
3797 - "promiscuous": promiscuous mode is enabled (json-bool)
3798 - "multicast": multicast receive state (one of 'normal', 'none', 'all')
3799 - "unicast": unicast receive state (one of 'normal', 'none', 'all')
3800 - "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
3801 - "broadcast-allowed": allow to receive broadcast (json-bool)
3802 - "multicast-overflow": multicast table is overflowed (json-bool)
3803 - "unicast-overflow": unicast table is overflowed (json-bool)
3804 - "main-mac": main macaddr string (json-string)
3805 - "vlan-table": a json-array of active vlan id
3806 - "unicast-table": a json-array of unicast macaddr string
3807 - "multicast-table": a json-array of multicast macaddr string
3808
3809 Example:
3810
3811 -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
3812 <- { "return": [
3813 {
3814 "promiscuous": true,
3815 "name": "vnet0",
3816 "main-mac": "52:54:00:12:34:56",
3817 "unicast": "normal",
3818 "vlan": "normal",
3819 "vlan-table": [
3820 4,
3821 0
3822 ],
3823 "unicast-table": [
3824 ],
3825 "multicast": "normal",
3826 "multicast-overflow": false,
3827 "unicast-overflow": false,
3828 "multicast-table": [
3829 "01:00:5e:00:00:01",
3830 "33:33:00:00:00:01",
3831 "33:33:ff:12:34:56"
3832 ],
3833 "broadcast-allowed": false
3834 }
3835 ]
3836 }
3837
3838 EQMP
3839
3840 {
3841 .name = "blockdev-add",
3842 .args_type = "options:q",
3843 .mhandler.cmd_new = qmp_marshal_input_blockdev_add,
3844 },
3845
3846 SQMP
3847 blockdev-add
3848 ------------
3849
3850 Add a block device.
3851
3852 This command is still a work in progress. It doesn't support all
3853 block drivers, it lacks a matching blockdev-del, and more. Stay away
3854 from it unless you want to help with its development.
3855
3856 Arguments:
3857
3858 - "options": block driver options
3859
3860 Example (1):
3861
3862 -> { "execute": "blockdev-add",
3863 "arguments": { "options" : { "driver": "qcow2",
3864 "file": { "driver": "file",
3865 "filename": "test.qcow2" } } } }
3866 <- { "return": {} }
3867
3868 Example (2):
3869
3870 -> { "execute": "blockdev-add",
3871 "arguments": {
3872 "options": {
3873 "driver": "qcow2",
3874 "id": "my_disk",
3875 "discard": "unmap",
3876 "cache": {
3877 "direct": true,
3878 "writeback": true
3879 },
3880 "file": {
3881 "driver": "file",
3882 "filename": "/tmp/test.qcow2"
3883 },
3884 "backing": {
3885 "driver": "raw",
3886 "file": {
3887 "driver": "file",
3888 "filename": "/dev/fdset/4"
3889 }
3890 }
3891 }
3892 }
3893 }
3894
3895 <- { "return": {} }
3896
3897 EQMP
3898
3899 {
3900 .name = "query-named-block-nodes",
3901 .args_type = "",
3902 .mhandler.cmd_new = qmp_marshal_input_query_named_block_nodes,
3903 },
3904
3905 SQMP
3906 @query-named-block-nodes
3907 ------------------------
3908
3909 Return a list of BlockDeviceInfo for all the named block driver nodes
3910
3911 Example:
3912
3913 -> { "execute": "query-named-block-nodes" }
3914 <- { "return": [ { "ro":false,
3915 "drv":"qcow2",
3916 "encrypted":false,
3917 "file":"disks/test.qcow2",
3918 "node-name": "my-node",
3919 "backing_file_depth":1,
3920 "bps":1000000,
3921 "bps_rd":0,
3922 "bps_wr":0,
3923 "iops":1000000,
3924 "iops_rd":0,
3925 "iops_wr":0,
3926 "bps_max": 8000000,
3927 "bps_rd_max": 0,
3928 "bps_wr_max": 0,
3929 "iops_max": 0,
3930 "iops_rd_max": 0,
3931 "iops_wr_max": 0,
3932 "iops_size": 0,
3933 "write_threshold": 0,
3934 "image":{
3935 "filename":"disks/test.qcow2",
3936 "format":"qcow2",
3937 "virtual-size":2048000,
3938 "backing_file":"base.qcow2",
3939 "full-backing-filename":"disks/base.qcow2",
3940 "backing-filename-format":"qcow2",
3941 "snapshots":[
3942 {
3943 "id": "1",
3944 "name": "snapshot1",
3945 "vm-state-size": 0,
3946 "date-sec": 10000200,
3947 "date-nsec": 12,
3948 "vm-clock-sec": 206,
3949 "vm-clock-nsec": 30
3950 }
3951 ],
3952 "backing-image":{
3953 "filename":"disks/base.qcow2",
3954 "format":"qcow2",
3955 "virtual-size":2048000
3956 }
3957 } } ] }
3958
3959 EQMP
3960
3961 {
3962 .name = "query-memdev",
3963 .args_type = "",
3964 .mhandler.cmd_new = qmp_marshal_input_query_memdev,
3965 },
3966
3967 SQMP
3968 query-memdev
3969 ------------
3970
3971 Show memory devices information.
3972
3973
3974 Example (1):
3975
3976 -> { "execute": "query-memdev" }
3977 <- { "return": [
3978 {
3979 "size": 536870912,
3980 "merge": false,
3981 "dump": true,
3982 "prealloc": false,
3983 "host-nodes": [0, 1],
3984 "policy": "bind"
3985 },
3986 {
3987 "size": 536870912,
3988 "merge": false,
3989 "dump": true,
3990 "prealloc": true,
3991 "host-nodes": [2, 3],
3992 "policy": "preferred"
3993 }
3994 ]
3995 }
3996
3997 EQMP
3998
3999 {
4000 .name = "query-memory-devices",
4001 .args_type = "",
4002 .mhandler.cmd_new = qmp_marshal_input_query_memory_devices,
4003 },
4004
4005 SQMP
4006 @query-memory-devices
4007 --------------------
4008
4009 Return a list of memory devices.
4010
4011 Example:
4012 -> { "execute": "query-memory-devices" }
4013 <- { "return": [ { "data":
4014 { "addr": 5368709120,
4015 "hotpluggable": true,
4016 "hotplugged": true,
4017 "id": "d1",
4018 "memdev": "/objects/memX",
4019 "node": 0,
4020 "size": 1073741824,
4021 "slot": 0},
4022 "type": "dimm"
4023 } ] }
4024 EQMP
4025
4026 {
4027 .name = "query-acpi-ospm-status",
4028 .args_type = "",
4029 .mhandler.cmd_new = qmp_marshal_input_query_acpi_ospm_status,
4030 },
4031
4032 SQMP
4033 @query-acpi-ospm-status
4034 --------------------
4035
4036 Return list of ACPIOSTInfo for devices that support status reporting
4037 via ACPI _OST method.
4038
4039 Example:
4040 -> { "execute": "query-acpi-ospm-status" }
4041 <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
4042 { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
4043 { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
4044 { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
4045 ]}
4046 EQMP
4047
4048 #if defined TARGET_I386
4049 {
4050 .name = "rtc-reset-reinjection",
4051 .args_type = "",
4052 .mhandler.cmd_new = qmp_marshal_input_rtc_reset_reinjection,
4053 },
4054 #endif
4055
4056 SQMP
4057 rtc-reset-reinjection
4058 ---------------------
4059
4060 Reset the RTC interrupt reinjection backlog.
4061
4062 Arguments: None.
4063
4064 Example:
4065
4066 -> { "execute": "rtc-reset-reinjection" }
4067 <- { "return": {} }
4068 EQMP
4069
4070 {
4071 .name = "trace-event-get-state",
4072 .args_type = "name:s",
4073 .mhandler.cmd_new = qmp_marshal_input_trace_event_get_state,
4074 },
4075
4076 SQMP
4077 trace-event-get-state
4078 ---------------------
4079
4080 Query the state of events.
4081
4082 Example:
4083
4084 -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
4085 <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
4086 EQMP
4087
4088 {
4089 .name = "trace-event-set-state",
4090 .args_type = "name:s,enable:b,ignore-unavailable:b?",
4091 .mhandler.cmd_new = qmp_marshal_input_trace_event_set_state,
4092 },
4093
4094 SQMP
4095 trace-event-set-state
4096 ---------------------
4097
4098 Set the state of events.
4099
4100 Example:
4101
4102 -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
4103 <- { "return": {} }
4104 EQMP
4105
4106 {
4107 .name = "x-input-send-event",
4108 .args_type = "console:i?,events:q",
4109 .mhandler.cmd_new = qmp_marshal_input_x_input_send_event,
4110 },
4111
4112 SQMP
4113 @x-input-send-event
4114 -----------------
4115
4116 Send input event to guest.
4117
4118 Arguments:
4119
4120 - "console": console index. (json-int, optional)
4121 - "events": list of input events.
4122
4123 The consoles are visible in the qom tree, under
4124 /backend/console[$index]. They have a device link and head property, so
4125 it is possible to map which console belongs to which device and display.
4126
4127 Note: this command is experimental, and not a stable API.
4128
4129 Example (1):
4130
4131 Press left mouse button.
4132
4133 -> { "execute": "x-input-send-event",
4134 "arguments": { "console": 0,
4135 "events": [ { "type": "btn",
4136 "data" : { "down": true, "button": "Left" } } ] } }
4137 <- { "return": {} }
4138
4139 -> { "execute": "x-input-send-event",
4140 "arguments": { "console": 0,
4141 "events": [ { "type": "btn",
4142 "data" : { "down": false, "button": "Left" } } ] } }
4143 <- { "return": {} }
4144
4145 Example (2):
4146
4147 Press ctrl-alt-del.
4148
4149 -> { "execute": "x-input-send-event",
4150 "arguments": { "console": 0, "events": [
4151 { "type": "key", "data" : { "down": true,
4152 "key": {"type": "qcode", "data": "ctrl" } } },
4153 { "type": "key", "data" : { "down": true,
4154 "key": {"type": "qcode", "data": "alt" } } },
4155 { "type": "key", "data" : { "down": true,
4156 "key": {"type": "qcode", "data": "delete" } } } ] } }
4157 <- { "return": {} }
4158
4159 Example (3):
4160
4161 Move mouse pointer to absolute coordinates (20000, 400).
4162
4163 -> { "execute": "x-input-send-event" ,
4164 "arguments": { "console": 0, "events": [
4165 { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
4166 { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
4167 <- { "return": {} }
4168
4169 EQMP
4170
4171 {
4172 .name = "block-set-write-threshold",
4173 .args_type = "node-name:s,write-threshold:l",
4174 .mhandler.cmd_new = qmp_marshal_input_block_set_write_threshold,
4175 },
4176
4177 SQMP
4178 block-set-write-threshold
4179 ------------
4180
4181 Change the write threshold for a block drive. The threshold is an offset,
4182 thus must be non-negative. Default is no write threshold.
4183 Setting the threshold to zero disables it.
4184
4185 Arguments:
4186
4187 - "node-name": the node name in the block driver state graph (json-string)
4188 - "write-threshold": the write threshold in bytes (json-int)
4189
4190 Example:
4191
4192 -> { "execute": "block-set-write-threshold",
4193 "arguments": { "node-name": "mydev",
4194 "write-threshold": 17179869184 } }
4195 <- { "return": {} }
4196
4197 EQMP
4198
4199 {
4200 .name = "query-rocker",
4201 .args_type = "name:s",
4202 .mhandler.cmd_new = qmp_marshal_input_query_rocker,
4203 },
4204
4205 SQMP
4206 Show rocker switch
4207 ------------------
4208
4209 Arguments:
4210
4211 - "name": switch name
4212
4213 Example:
4214
4215 -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
4216 <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
4217
4218 EQMP
4219
4220 {
4221 .name = "query-rocker-ports",
4222 .args_type = "name:s",
4223 .mhandler.cmd_new = qmp_marshal_input_query_rocker_ports,
4224 },
4225
4226 SQMP
4227 Show rocker switch ports
4228 ------------------------
4229
4230 Arguments:
4231
4232 - "name": switch name
4233
4234 Example:
4235
4236 -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
4237 <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
4238 "autoneg": "off", "link-up": true, "speed": 10000},
4239 {"duplex": "full", "enabled": true, "name": "sw1.2",
4240 "autoneg": "off", "link-up": true, "speed": 10000}
4241 ]}
4242
4243 EQMP
4244
4245 {
4246 .name = "query-rocker-of-dpa-flows",
4247 .args_type = "name:s,tbl-id:i?",
4248 .mhandler.cmd_new = qmp_marshal_input_query_rocker_of_dpa_flows,
4249 },
4250
4251 SQMP
4252 Show rocker switch OF-DPA flow tables
4253 -------------------------------------
4254
4255 Arguments:
4256
4257 - "name": switch name
4258 - "tbl-id": (optional) flow table ID
4259
4260 Example:
4261
4262 -> { "execute": "query-rocker-of-dpa-flows", "arguments": { "name": "sw1" } }
4263 <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
4264 "hits": 138,
4265 "cookie": 0,
4266 "action": {"goto-tbl": 10},
4267 "mask": {"in-pport": 4294901760}
4268 },
4269 {...more...},
4270 ]}
4271
4272 EQMP
4273
4274 {
4275 .name = "query-rocker-of-dpa-groups",
4276 .args_type = "name:s,type:i?",
4277 .mhandler.cmd_new = qmp_marshal_input_query_rocker_of_dpa_groups,
4278 },
4279
4280 SQMP
4281 Show rocker OF-DPA group tables
4282 -------------------------------
4283
4284 Arguments:
4285
4286 - "name": switch name
4287 - "type": (optional) group type
4288
4289 Example:
4290
4291 -> { "execute": "query-rocker-of-dpa-groups", "arguments": { "name": "sw1" } }
4292 <- { "return": [ {"type": 0, "out-pport": 2, "pport": 2, "vlan-id": 3841,
4293 "pop-vlan": 1, "id": 251723778},
4294 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3841,
4295 "pop-vlan": 1, "id": 251723776},
4296 {"type": 0, "out-pport": 1, "pport": 1, "vlan-id": 3840,
4297 "pop-vlan": 1, "id": 251658241},
4298 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840,
4299 "pop-vlan": 1, "id": 251658240}
4300 ]}