monitor: use qmp_find_command() (using generated qapi code)
[qemu/ar7.git] / qmp-commands.hx
blob734f3d734228b39eedbbdeee231a2b35e77db167
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.
5 SQMP
6 QMP Supported Commands
7 ----------------------
9 This document describes all commands currently supported by QMP.
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.
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.
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.
23 Also, the following notation is used to denote data flow:
25 -> data issued by the Client
26 <- Server data response
28 Please, refer to the QMP specification (QMP/qmp-spec.txt) for detailed
29 information on the Server command and response formats.
31 NOTE: This document is temporary and will be replaced soon.
33 1. Stability Considerations
34 ===========================
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.
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.
43 If you're planning to adopt QMP, please observe the following:
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
49 2. DO NOT rely on anything which is not explicit documented
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)
55 2. Regular Commands
56 ===================
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.
61 EQMP
64 .name = "quit",
65 .args_type = "",
68 SQMP
69 quit
70 ----
72 Quit the emulator.
74 Arguments: None.
76 Example:
78 -> { "execute": "quit" }
79 <- { "return": {} }
81 EQMP
84 .name = "eject",
85 .args_type = "force:-f,device:B",
88 SQMP
89 eject
90 -----
92 Eject a removable medium.
94 Arguments:
96 - force: force ejection (json-bool, optional)
97 - device: device name (json-string)
99 Example:
101 -> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
102 <- { "return": {} }
104 Note: The "force" argument defaults to false.
106 EQMP
109 .name = "change",
110 .args_type = "device:B,target:F,arg:s?",
113 SQMP
114 change
115 ------
117 Change a removable medium or VNC configuration.
119 Arguments:
121 - "device": device name (json-string)
122 - "target": filename or item (json-string)
123 - "arg": additional argument (json-string, optional)
125 Examples:
127 1. Change a removable medium
129 -> { "execute": "change",
130 "arguments": { "device": "ide1-cd0",
131 "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
132 <- { "return": {} }
134 2. Change VNC password
136 -> { "execute": "change",
137 "arguments": { "device": "vnc", "target": "password",
138 "arg": "foobar1" } }
139 <- { "return": {} }
141 EQMP
144 .name = "screendump",
145 .args_type = "filename:F",
148 SQMP
149 screendump
150 ----------
152 Save screen into PPM image.
154 Arguments:
156 - "filename": file path (json-string)
158 Example:
160 -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
161 <- { "return": {} }
163 EQMP
166 .name = "stop",
167 .args_type = "",
170 SQMP
171 stop
172 ----
174 Stop the emulator.
176 Arguments: None.
178 Example:
180 -> { "execute": "stop" }
181 <- { "return": {} }
183 EQMP
186 .name = "cont",
187 .args_type = "",
190 SQMP
191 cont
192 ----
194 Resume emulation.
196 Arguments: None.
198 Example:
200 -> { "execute": "cont" }
201 <- { "return": {} }
203 EQMP
206 .name = "system_wakeup",
207 .args_type = "",
210 SQMP
211 system_wakeup
212 -------------
214 Wakeup guest from suspend.
216 Arguments: None.
218 Example:
220 -> { "execute": "system_wakeup" }
221 <- { "return": {} }
223 EQMP
226 .name = "system_reset",
227 .args_type = "",
230 SQMP
231 system_reset
232 ------------
234 Reset the system.
236 Arguments: None.
238 Example:
240 -> { "execute": "system_reset" }
241 <- { "return": {} }
243 EQMP
246 .name = "system_powerdown",
247 .args_type = "",
250 SQMP
251 system_powerdown
252 ----------------
254 Send system power down event.
256 Arguments: None.
258 Example:
260 -> { "execute": "system_powerdown" }
261 <- { "return": {} }
263 EQMP
266 .name = "device_add",
267 .args_type = "device:O",
268 .params = "driver[,prop=value][,...]",
269 .help = "add device, like -device on the command line",
272 SQMP
273 device_add
274 ----------
276 Add a device.
278 Arguments:
280 - "driver": the name of the new device's driver (json-string)
281 - "bus": the device's parent bus (device tree path, json-string, optional)
282 - "id": the device's ID, must be unique (json-string)
283 - device properties
285 Example:
287 -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
288 <- { "return": {} }
290 Notes:
292 (1) For detailed information about this command, please refer to the
293 'docs/qdev-device-use.txt' file.
295 (2) It's possible to list device properties by running QEMU with the
296 "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
298 EQMP
301 .name = "device_del",
302 .args_type = "id:s",
305 SQMP
306 device_del
307 ----------
309 Remove a device.
311 Arguments:
313 - "id": the device's ID or QOM path (json-string)
315 Example:
317 -> { "execute": "device_del", "arguments": { "id": "net1" } }
318 <- { "return": {} }
320 Example:
322 -> { "execute": "device_del", "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
323 <- { "return": {} }
325 EQMP
328 .name = "send-key",
329 .args_type = "keys:q,hold-time:i?",
332 SQMP
333 send-key
334 ----------
336 Send keys to VM.
338 Arguments:
340 keys array:
341 - "key": key sequence (a json-array of key union values,
342 union can be number or qcode enum)
344 - hold-time: time to delay key up events, milliseconds. Defaults to 100
345 (json-int, optional)
347 Example:
349 -> { "execute": "send-key",
350 "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
351 { "type": "qcode", "data": "alt" },
352 { "type": "qcode", "data": "delete" } ] } }
353 <- { "return": {} }
355 EQMP
358 .name = "cpu",
359 .args_type = "index:i",
362 SQMP
366 Set the default CPU.
368 Arguments:
370 - "index": the CPU's index (json-int)
372 Example:
374 -> { "execute": "cpu", "arguments": { "index": 0 } }
375 <- { "return": {} }
377 Note: CPUs' indexes are obtained with the 'query-cpus' command.
379 EQMP
382 .name = "cpu-add",
383 .args_type = "id:i",
386 SQMP
387 cpu-add
388 -------
390 Adds virtual cpu
392 Arguments:
394 - "id": cpu id (json-int)
396 Example:
398 -> { "execute": "cpu-add", "arguments": { "id": 2 } }
399 <- { "return": {} }
401 EQMP
404 .name = "memsave",
405 .args_type = "val:l,size:i,filename:s,cpu:i?",
408 SQMP
409 memsave
410 -------
412 Save to disk virtual memory dump starting at 'val' of size 'size'.
414 Arguments:
416 - "val": the starting address (json-int)
417 - "size": the memory size, in bytes (json-int)
418 - "filename": file path (json-string)
419 - "cpu": virtual CPU index (json-int, optional)
421 Example:
423 -> { "execute": "memsave",
424 "arguments": { "val": 10,
425 "size": 100,
426 "filename": "/tmp/virtual-mem-dump" } }
427 <- { "return": {} }
429 EQMP
432 .name = "pmemsave",
433 .args_type = "val:l,size:i,filename:s",
436 SQMP
437 pmemsave
438 --------
440 Save to disk physical memory dump starting at 'val' of size 'size'.
442 Arguments:
444 - "val": the starting address (json-int)
445 - "size": the memory size, in bytes (json-int)
446 - "filename": file path (json-string)
448 Example:
450 -> { "execute": "pmemsave",
451 "arguments": { "val": 10,
452 "size": 100,
453 "filename": "/tmp/physical-mem-dump" } }
454 <- { "return": {} }
456 EQMP
459 .name = "inject-nmi",
460 .args_type = "",
463 SQMP
464 inject-nmi
465 ----------
467 Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
469 Arguments: None.
471 Example:
473 -> { "execute": "inject-nmi" }
474 <- { "return": {} }
476 Note: inject-nmi fails when the guest doesn't support injecting.
478 EQMP
481 .name = "ringbuf-write",
482 .args_type = "device:s,data:s,format:s?",
485 SQMP
486 ringbuf-write
487 -------------
489 Write to a ring buffer character device.
491 Arguments:
493 - "device": ring buffer character device name (json-string)
494 - "data": data to write (json-string)
495 - "format": data format (json-string, optional)
496 - Possible values: "utf8" (default), "base64"
498 Example:
500 -> { "execute": "ringbuf-write",
501 "arguments": { "device": "foo",
502 "data": "abcdefgh",
503 "format": "utf8" } }
504 <- { "return": {} }
506 EQMP
509 .name = "ringbuf-read",
510 .args_type = "device:s,size:i,format:s?",
513 SQMP
514 ringbuf-read
515 -------------
517 Read from a ring buffer character device.
519 Arguments:
521 - "device": ring buffer character device name (json-string)
522 - "size": how many bytes to read at most (json-int)
523 - Number of data bytes, not number of characters in encoded data
524 - "format": data format (json-string, optional)
525 - Possible values: "utf8" (default), "base64"
526 - Naturally, format "utf8" works only when the ring buffer
527 contains valid UTF-8 text. Invalid UTF-8 sequences get
528 replaced. Bug: replacement doesn't work. Bug: can screw
529 up on encountering NUL characters, after the ring buffer
530 lost data, and when reading stops because the size limit
531 is reached.
533 Example:
535 -> { "execute": "ringbuf-read",
536 "arguments": { "device": "foo",
537 "size": 1000,
538 "format": "utf8" } }
539 <- {"return": "abcdefgh"}
541 EQMP
544 .name = "xen-save-devices-state",
545 .args_type = "filename:F",
548 SQMP
549 xen-save-devices-state
550 -------
552 Save the state of all devices to file. The RAM and the block devices
553 of the VM are not saved by this command.
555 Arguments:
557 - "filename": the file to save the state of the devices to as binary
558 data. See xen-save-devices-state.txt for a description of the binary
559 format.
561 Example:
563 -> { "execute": "xen-save-devices-state",
564 "arguments": { "filename": "/tmp/save" } }
565 <- { "return": {} }
567 EQMP
570 .name = "xen-load-devices-state",
571 .args_type = "filename:F",
574 SQMP
575 xen-load-devices-state
576 ----------------------
578 Load the state of all devices from file. The RAM and the block devices
579 of the VM are not loaded by this command.
581 Arguments:
583 - "filename": the file to load the state of the devices from as binary
584 data. See xen-save-devices-state.txt for a description of the binary
585 format.
587 Example:
589 -> { "execute": "xen-load-devices-state",
590 "arguments": { "filename": "/tmp/resume" } }
591 <- { "return": {} }
593 EQMP
596 .name = "xen-set-global-dirty-log",
597 .args_type = "enable:b",
600 SQMP
601 xen-set-global-dirty-log
602 -------
604 Enable or disable the global dirty log mode.
606 Arguments:
608 - "enable": Enable it or disable it.
610 Example:
612 -> { "execute": "xen-set-global-dirty-log",
613 "arguments": { "enable": true } }
614 <- { "return": {} }
616 EQMP
619 .name = "migrate",
620 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
623 SQMP
624 migrate
625 -------
627 Migrate to URI.
629 Arguments:
631 - "blk": block migration, full disk copy (json-bool, optional)
632 - "inc": incremental disk copy (json-bool, optional)
633 - "uri": Destination URI (json-string)
635 Example:
637 -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
638 <- { "return": {} }
640 Notes:
642 (1) The 'query-migrate' command should be used to check migration's progress
643 and final result (this information is provided by the 'status' member)
644 (2) All boolean arguments default to false
645 (3) The user Monitor's "detach" argument is invalid in QMP and should not
646 be used
648 EQMP
651 .name = "migrate_cancel",
652 .args_type = "",
655 SQMP
656 migrate_cancel
657 --------------
659 Cancel the current migration.
661 Arguments: None.
663 Example:
665 -> { "execute": "migrate_cancel" }
666 <- { "return": {} }
668 EQMP
671 .name = "migrate-incoming",
672 .args_type = "uri:s",
675 SQMP
676 migrate-incoming
677 ----------------
679 Continue an incoming migration
681 Arguments:
683 - "uri": Source/listening URI (json-string)
685 Example:
687 -> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } }
688 <- { "return": {} }
690 Notes:
692 (1) QEMU must be started with -incoming defer to allow migrate-incoming to
693 be used
694 (2) The uri format is the same as for -incoming
696 EQMP
698 .name = "migrate-set-cache-size",
699 .args_type = "value:o",
702 SQMP
703 migrate-set-cache-size
704 ----------------------
706 Set cache size to be used by XBZRLE migration, the cache size will be rounded
707 down to the nearest power of 2
709 Arguments:
711 - "value": cache size in bytes (json-int)
713 Example:
715 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
716 <- { "return": {} }
718 EQMP
720 .name = "migrate-start-postcopy",
721 .args_type = "",
724 SQMP
725 migrate-start-postcopy
726 ----------------------
728 Switch an in-progress migration to postcopy mode. Ignored after the end of
729 migration (or once already in postcopy).
731 Example:
732 -> { "execute": "migrate-start-postcopy" }
733 <- { "return": {} }
735 EQMP
738 .name = "query-migrate-cache-size",
739 .args_type = "",
742 SQMP
743 query-migrate-cache-size
744 ------------------------
746 Show cache size to be used by XBZRLE migration
748 returns a json-object with the following information:
749 - "size" : json-int
751 Example:
753 -> { "execute": "query-migrate-cache-size" }
754 <- { "return": 67108864 }
756 EQMP
759 .name = "migrate_set_speed",
760 .args_type = "value:o",
763 SQMP
764 migrate_set_speed
765 -----------------
767 Set maximum speed for migrations.
769 Arguments:
771 - "value": maximum speed, in bytes per second (json-int)
773 Example:
775 -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
776 <- { "return": {} }
778 EQMP
781 .name = "migrate_set_downtime",
782 .args_type = "value:T",
785 SQMP
786 migrate_set_downtime
787 --------------------
789 Set maximum tolerated downtime (in seconds) for migrations.
791 Arguments:
793 - "value": maximum downtime (json-number)
795 Example:
797 -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
798 <- { "return": {} }
800 EQMP
803 .name = "client_migrate_info",
804 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
805 .params = "protocol hostname port tls-port cert-subject",
806 .help = "set migration information for remote display",
809 SQMP
810 client_migrate_info
811 -------------------
813 Set migration information for remote display. This makes the server
814 ask the client to automatically reconnect using the new parameters
815 once migration finished successfully. Only implemented for SPICE.
817 Arguments:
819 - "protocol": must be "spice" (json-string)
820 - "hostname": migration target hostname (json-string)
821 - "port": spice tcp port for plaintext channels (json-int, optional)
822 - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
823 - "cert-subject": server certificate subject (json-string, optional)
825 Example:
827 -> { "execute": "client_migrate_info",
828 "arguments": { "protocol": "spice",
829 "hostname": "virt42.lab.kraxel.org",
830 "port": 1234 } }
831 <- { "return": {} }
833 EQMP
836 .name = "dump-guest-memory",
837 .args_type = "paging:b,protocol:s,detach:b?,begin:i?,end:i?,format:s?",
838 .params = "-p protocol [-d] [begin] [length] [format]",
839 .help = "dump guest memory to file",
842 SQMP
843 dump
846 Dump guest memory to file. The file can be processed with crash or gdb.
848 Arguments:
850 - "paging": do paging to get guest's memory mapping (json-bool)
851 - "protocol": destination file(started with "file:") or destination file
852 descriptor (started with "fd:") (json-string)
853 - "detach": if specified, command will return immediately, without waiting
854 for the dump to finish. The user can track progress using
855 "query-dump". (json-bool)
856 - "begin": the starting physical address. It's optional, and should be specified
857 with length together (json-int)
858 - "length": the memory size, in bytes. It's optional, and should be specified
859 with begin together (json-int)
860 - "format": the format of guest memory dump. It's optional, and can be
861 elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
862 conflict with paging and filter, ie. begin and length (json-string)
864 Example:
866 -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
867 <- { "return": {} }
869 Notes:
871 (1) All boolean arguments default to false
873 EQMP
876 .name = "query-dump-guest-memory-capability",
877 .args_type = "",
880 SQMP
881 query-dump-guest-memory-capability
882 ----------
884 Show available formats for 'dump-guest-memory'
886 Example:
888 -> { "execute": "query-dump-guest-memory-capability" }
889 <- { "return": { "formats":
890 ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
892 EQMP
895 .name = "query-dump",
896 .args_type = "",
897 .params = "",
898 .help = "query background dump status",
901 SQMP
902 query-dump
903 ----------
905 Query background dump status.
907 Arguments: None.
909 Example:
911 -> { "execute": "query-dump" }
912 <- { "return": { "status": "active", "completed": 1024000,
913 "total": 2048000 } }
915 EQMP
917 #if defined TARGET_S390X
919 .name = "dump-skeys",
920 .args_type = "filename:F",
922 #endif
924 SQMP
925 dump-skeys
926 ----------
928 Save guest storage keys to file.
930 Arguments:
932 - "filename": file path (json-string)
934 Example:
936 -> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } }
937 <- { "return": {} }
939 EQMP
942 .name = "netdev_add",
943 .args_type = "netdev:O",
946 SQMP
947 netdev_add
948 ----------
950 Add host network device.
952 Arguments:
954 - "type": the device type, "tap", "user", ... (json-string)
955 - "id": the device's ID, must be unique (json-string)
956 - device options
958 Example:
960 -> { "execute": "netdev_add",
961 "arguments": { "type": "user", "id": "netdev1",
962 "dnssearch": "example.org" } }
963 <- { "return": {} }
965 Note: The supported device options are the same ones supported by the '-netdev'
966 command-line argument, which are listed in the '-help' output or QEMU's
967 manual
969 EQMP
972 .name = "netdev_del",
973 .args_type = "id:s",
976 SQMP
977 netdev_del
978 ----------
980 Remove host network device.
982 Arguments:
984 - "id": the device's ID, must be unique (json-string)
986 Example:
988 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
989 <- { "return": {} }
992 EQMP
995 .name = "object-add",
996 .args_type = "qom-type:s,id:s,props:q?",
999 SQMP
1000 object-add
1001 ----------
1003 Create QOM object.
1005 Arguments:
1007 - "qom-type": the object's QOM type, i.e. the class name (json-string)
1008 - "id": the object's ID, must be unique (json-string)
1009 - "props": a dictionary of object property values (optional, json-dict)
1011 Example:
1013 -> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
1014 "props": { "filename": "/dev/hwrng" } } }
1015 <- { "return": {} }
1017 EQMP
1020 .name = "object-del",
1021 .args_type = "id:s",
1024 SQMP
1025 object-del
1026 ----------
1028 Remove QOM object.
1030 Arguments:
1032 - "id": the object's ID (json-string)
1034 Example:
1036 -> { "execute": "object-del", "arguments": { "id": "rng1" } }
1037 <- { "return": {} }
1040 EQMP
1044 .name = "block_resize",
1045 .args_type = "device:s?,node-name:s?,size:o",
1048 SQMP
1049 block_resize
1050 ------------
1052 Resize a block image while a guest is running.
1054 Arguments:
1056 - "device": the device's ID, must be unique (json-string)
1057 - "node-name": the node name in the block driver state graph (json-string)
1058 - "size": new size
1060 Example:
1062 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1063 <- { "return": {} }
1065 EQMP
1068 .name = "block-stream",
1069 .args_type = "job-id:s?,device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
1072 SQMP
1073 block-stream
1074 ------------
1076 Copy data from a backing file into a block device.
1078 Arguments:
1080 - "job-id": Identifier for the newly-created block job. If omitted,
1081 the device name will be used. (json-string, optional)
1082 - "device": The device name or node-name of a root node (json-string)
1083 - "base": The file name of the backing image above which copying starts
1084 (json-string, optional)
1085 - "backing-file": The backing file string to write into the active layer. This
1086 filename is not validated.
1088 If a pathname string is such that it cannot be resolved by
1089 QEMU, that means that subsequent QMP or HMP commands must use
1090 node-names for the image in question, as filename lookup
1091 methods will fail.
1093 If not specified, QEMU will automatically determine the
1094 backing file string to use, or error out if there is no
1095 obvious choice. Care should be taken when specifying the
1096 string, to specify a valid filename or protocol.
1097 (json-string, optional) (Since 2.1)
1098 - "speed": the maximum speed, in bytes per second (json-int, optional)
1099 - "on-error": the action to take on an error (default 'report'). 'stop' and
1100 'enospc' can only be used if the block device supports io-status.
1101 (json-string, optional) (Since 2.1)
1103 Example:
1105 -> { "execute": "block-stream", "arguments": { "device": "virtio0",
1106 "base": "/tmp/master.qcow2" } }
1107 <- { "return": {} }
1109 EQMP
1112 .name = "block-commit",
1113 .args_type = "job-id:s?,device:B,base:s?,top:s?,backing-file:s?,speed:o?",
1116 SQMP
1117 block-commit
1118 ------------
1120 Live commit of data from overlay image nodes into backing nodes - i.e., writes
1121 data between 'top' and 'base' into 'base'.
1123 Arguments:
1125 - "job-id": Identifier for the newly-created block job. If omitted,
1126 the device name will be used. (json-string, optional)
1127 - "device": The device name or node-name of a root node (json-string)
1128 - "base": The file name of the backing image to write data into.
1129 If not specified, this is the deepest backing image
1130 (json-string, optional)
1131 - "top": The file name of the backing image within the image chain,
1132 which contains the topmost data to be committed down. If
1133 not specified, this is the active layer. (json-string, optional)
1135 - backing-file: The backing file string to write into the overlay
1136 image of 'top'. If 'top' is the active layer,
1137 specifying a backing file string is an error. This
1138 filename is not validated.
1140 If a pathname string is such that it cannot be
1141 resolved by QEMU, that means that subsequent QMP or
1142 HMP commands must use node-names for the image in
1143 question, as filename lookup methods will fail.
1145 If not specified, QEMU will automatically determine
1146 the backing file string to use, or error out if
1147 there is no obvious choice. Care should be taken
1148 when specifying the string, to specify a valid
1149 filename or protocol.
1150 (json-string, optional) (Since 2.1)
1152 If top == base, that is an error.
1153 If top == active, the job will not be completed by itself,
1154 user needs to complete the job with the block-job-complete
1155 command after getting the ready event. (Since 2.0)
1157 If the base image is smaller than top, then the base image
1158 will be resized to be the same size as top. If top is
1159 smaller than the base image, the base will not be
1160 truncated. If you want the base image size to match the
1161 size of the smaller top, you can safely truncate it
1162 yourself once the commit operation successfully completes.
1163 (json-string)
1164 - "speed": the maximum speed, in bytes per second (json-int, optional)
1167 Example:
1169 -> { "execute": "block-commit", "arguments": { "device": "virtio0",
1170 "top": "/tmp/snap1.qcow2" } }
1171 <- { "return": {} }
1173 EQMP
1176 .name = "drive-backup",
1177 .args_type = "job-id:s?,sync:s,device:B,target:s,speed:i?,mode:s?,"
1178 "format:s?,bitmap:s?,compress:b?,"
1179 "on-source-error:s?,on-target-error:s?",
1182 SQMP
1183 drive-backup
1184 ------------
1186 Start a point-in-time copy of a block device to a new destination. The
1187 status of ongoing drive-backup operations can be checked with
1188 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1189 The operation can be stopped before it has completed using the
1190 block-job-cancel command.
1192 Arguments:
1194 - "job-id": Identifier for the newly-created block job. If omitted,
1195 the device name will be used. (json-string, optional)
1196 - "device": the device name or node-name of a root node which should be copied.
1197 (json-string)
1198 - "target": the target of the new image. If the file exists, or if it is a
1199 device, the existing file/device will be used as the new
1200 destination. If it does not exist, a new file will be created.
1201 (json-string)
1202 - "format": the format of the new destination, default is to probe if 'mode' is
1203 'existing', else the format of the source
1204 (json-string, optional)
1205 - "sync": what parts of the disk image should be copied to the destination;
1206 possibilities include "full" for all the disk, "top" for only the sectors
1207 allocated in the topmost image, "incremental" for only the dirty sectors in
1208 the bitmap, or "none" to only replicate new I/O (MirrorSyncMode).
1209 - "bitmap": dirty bitmap name for sync==incremental. Must be present if sync
1210 is "incremental", must NOT be present otherwise.
1211 - "mode": whether and how QEMU should create a new image
1212 (NewImageMode, optional, default 'absolute-paths')
1213 - "speed": the maximum speed, in bytes per second (json-int, optional)
1214 - "compress": true to compress data, if the target format supports it.
1215 (json-bool, optional, default false)
1216 - "on-source-error": the action to take on an error on the source, default
1217 'report'. 'stop' and 'enospc' can only be used
1218 if the block device supports io-status.
1219 (BlockdevOnError, optional)
1220 - "on-target-error": the action to take on an error on the target, default
1221 'report' (no limitations, since this applies to
1222 a different block device than device).
1223 (BlockdevOnError, optional)
1225 Example:
1226 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
1227 "sync": "full",
1228 "target": "backup.img" } }
1229 <- { "return": {} }
1231 EQMP
1234 .name = "blockdev-backup",
1235 .args_type = "job-id:s?,sync:s,device:B,target:B,speed:i?,compress:b?,"
1236 "on-source-error:s?,on-target-error:s?",
1239 SQMP
1240 blockdev-backup
1241 ---------------
1243 The device version of drive-backup: this command takes an existing named device
1244 as backup target.
1246 Arguments:
1248 - "job-id": Identifier for the newly-created block job. If omitted,
1249 the device name will be used. (json-string, optional)
1250 - "device": the device name or node-name of a root node which should be copied.
1251 (json-string)
1252 - "target": the name of the backup target device. (json-string)
1253 - "sync": what parts of the disk image should be copied to the destination;
1254 possibilities include "full" for all the disk, "top" for only the
1255 sectors allocated in the topmost image, or "none" to only replicate
1256 new I/O (MirrorSyncMode).
1257 - "speed": the maximum speed, in bytes per second (json-int, optional)
1258 - "compress": true to compress data, if the target format supports it.
1259 (json-bool, optional, default false)
1260 - "on-source-error": the action to take on an error on the source, default
1261 'report'. 'stop' and 'enospc' can only be used
1262 if the block device supports io-status.
1263 (BlockdevOnError, optional)
1264 - "on-target-error": the action to take on an error on the target, default
1265 'report' (no limitations, since this applies to
1266 a different block device than device).
1267 (BlockdevOnError, optional)
1269 Example:
1270 -> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
1271 "sync": "full",
1272 "target": "tgt-id" } }
1273 <- { "return": {} }
1275 EQMP
1278 .name = "block-job-set-speed",
1279 .args_type = "device:B,speed:o",
1283 .name = "block-job-cancel",
1284 .args_type = "device:B,force:b?",
1287 .name = "block-job-pause",
1288 .args_type = "device:B",
1291 .name = "block-job-resume",
1292 .args_type = "device:B",
1295 .name = "block-job-complete",
1296 .args_type = "device:B",
1299 .name = "transaction",
1300 .args_type = "actions:q,properties:q?",
1303 SQMP
1304 transaction
1305 -----------
1307 Atomically operate on one or more block devices. Operations that are
1308 currently supported:
1310 - drive-backup
1311 - blockdev-backup
1312 - blockdev-snapshot-sync
1313 - blockdev-snapshot-internal-sync
1314 - abort
1315 - block-dirty-bitmap-add
1316 - block-dirty-bitmap-clear
1318 Refer to the qemu/qapi-schema.json file for minimum required QEMU
1319 versions for these operations. A list of dictionaries is accepted,
1320 that contains the actions to be performed. If there is any failure
1321 performing any of the operations, all operations for the group are
1322 abandoned.
1324 For external snapshots, the dictionary contains the device, the file to use for
1325 the new snapshot, and the format. The default format, if not specified, is
1326 qcow2.
1328 Each new snapshot defaults to being created by QEMU (wiping any
1329 contents if the file already exists), but it is also possible to reuse
1330 an externally-created file. In the latter case, you should ensure that
1331 the new image file has the same contents as the current one; QEMU cannot
1332 perform any meaningful check. Typically this is achieved by using the
1333 current image file as the backing file for the new image.
1335 On failure, the original disks pre-snapshot attempt will be used.
1337 For internal snapshots, the dictionary contains the device and the snapshot's
1338 name. If an internal snapshot matching name already exists, the request will
1339 be rejected. Only some image formats support it, for example, qcow2, rbd,
1340 and sheepdog.
1342 On failure, qemu will try delete the newly created internal snapshot in the
1343 transaction. When an I/O error occurs during deletion, the user needs to fix
1344 it later with qemu-img or other command.
1346 Arguments:
1348 actions array:
1349 - "type": the operation to perform (json-string). Possible
1350 values: "drive-backup", "blockdev-backup",
1351 "blockdev-snapshot-sync",
1352 "blockdev-snapshot-internal-sync",
1353 "abort", "block-dirty-bitmap-add",
1354 "block-dirty-bitmap-clear"
1355 - "data": a dictionary. The contents depend on the value
1356 of "type". When "type" is "blockdev-snapshot-sync":
1357 - "device": device name to snapshot (json-string)
1358 - "node-name": graph node name to snapshot (json-string)
1359 - "snapshot-file": name of new image file (json-string)
1360 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1361 - "format": format of new image (json-string, optional)
1362 - "mode": whether and how QEMU should create the snapshot file
1363 (NewImageMode, optional, default "absolute-paths")
1364 When "type" is "blockdev-snapshot-internal-sync":
1365 - "device": the device name or node-name of a root node to snapshot
1366 (json-string)
1367 - "name": name of the new snapshot (json-string)
1369 Example:
1371 -> { "execute": "transaction",
1372 "arguments": { "actions": [
1373 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
1374 "snapshot-file": "/some/place/my-image",
1375 "format": "qcow2" } },
1376 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
1377 "snapshot-file": "/some/place/my-image2",
1378 "snapshot-node-name": "node3432",
1379 "mode": "existing",
1380 "format": "qcow2" } },
1381 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
1382 "snapshot-file": "/some/place/my-image2",
1383 "mode": "existing",
1384 "format": "qcow2" } },
1385 { "type": "blockdev-snapshot-internal-sync", "data" : {
1386 "device": "ide-hd2",
1387 "name": "snapshot0" } } ] } }
1388 <- { "return": {} }
1390 EQMP
1393 .name = "block-dirty-bitmap-add",
1394 .args_type = "node:B,name:s,granularity:i?",
1397 SQMP
1399 block-dirty-bitmap-add
1400 ----------------------
1401 Since 2.4
1403 Create a dirty bitmap with a name on the device, and start tracking the writes.
1405 Arguments:
1407 - "node": device/node on which to create dirty bitmap (json-string)
1408 - "name": name of the new dirty bitmap (json-string)
1409 - "granularity": granularity to track writes with (int, optional)
1411 Example:
1413 -> { "execute": "block-dirty-bitmap-add", "arguments": { "node": "drive0",
1414 "name": "bitmap0" } }
1415 <- { "return": {} }
1417 EQMP
1420 .name = "block-dirty-bitmap-remove",
1421 .args_type = "node:B,name:s",
1424 SQMP
1426 block-dirty-bitmap-remove
1427 -------------------------
1428 Since 2.4
1430 Stop write tracking and remove the dirty bitmap that was created with
1431 block-dirty-bitmap-add.
1433 Arguments:
1435 - "node": device/node on which to remove dirty bitmap (json-string)
1436 - "name": name of the dirty bitmap to remove (json-string)
1438 Example:
1440 -> { "execute": "block-dirty-bitmap-remove", "arguments": { "node": "drive0",
1441 "name": "bitmap0" } }
1442 <- { "return": {} }
1444 EQMP
1447 .name = "block-dirty-bitmap-clear",
1448 .args_type = "node:B,name:s",
1451 SQMP
1453 block-dirty-bitmap-clear
1454 ------------------------
1455 Since 2.4
1457 Reset the dirty bitmap associated with a node so that an incremental backup
1458 from this point in time forward will only backup clusters modified after this
1459 clear operation.
1461 Arguments:
1463 - "node": device/node on which to remove dirty bitmap (json-string)
1464 - "name": name of the dirty bitmap to remove (json-string)
1466 Example:
1468 -> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0",
1469 "name": "bitmap0" } }
1470 <- { "return": {} }
1472 EQMP
1475 .name = "blockdev-snapshot-sync",
1476 .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
1479 SQMP
1480 blockdev-snapshot-sync
1481 ----------------------
1483 Synchronous snapshot of a block device. snapshot-file specifies the
1484 target of the new image. If the file exists, or if it is a device, the
1485 snapshot will be created in the existing file/device. If does not
1486 exist, a new file will be created. format specifies the format of the
1487 snapshot image, default is qcow2.
1489 Arguments:
1491 - "device": device name to snapshot (json-string)
1492 - "node-name": graph node name to snapshot (json-string)
1493 - "snapshot-file": name of new image file (json-string)
1494 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1495 - "mode": whether and how QEMU should create the snapshot file
1496 (NewImageMode, optional, default "absolute-paths")
1497 - "format": format of new image (json-string, optional)
1499 Example:
1501 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1502 "snapshot-file":
1503 "/some/place/my-image",
1504 "format": "qcow2" } }
1505 <- { "return": {} }
1507 EQMP
1510 .name = "blockdev-snapshot",
1511 .args_type = "node:s,overlay:s",
1514 SQMP
1515 blockdev-snapshot
1516 -----------------
1517 Since 2.5
1519 Create a snapshot, by installing 'node' as the backing image of
1520 'overlay'. Additionally, if 'node' is associated with a block
1521 device, the block device changes to using 'overlay' as its new active
1522 image.
1524 Arguments:
1526 - "node": device that will have a snapshot created (json-string)
1527 - "overlay": device that will have 'node' as its backing image (json-string)
1529 Example:
1531 -> { "execute": "blockdev-add",
1532 "arguments": { "options": { "driver": "qcow2",
1533 "node-name": "node1534",
1534 "file": { "driver": "file",
1535 "filename": "hd1.qcow2" },
1536 "backing": "" } } }
1538 <- { "return": {} }
1540 -> { "execute": "blockdev-snapshot", "arguments": { "node": "ide-hd0",
1541 "overlay": "node1534" } }
1542 <- { "return": {} }
1544 EQMP
1547 .name = "blockdev-snapshot-internal-sync",
1548 .args_type = "device:B,name:s",
1551 SQMP
1552 blockdev-snapshot-internal-sync
1553 -------------------------------
1555 Synchronously take an internal snapshot of a block device when the format of
1556 image used supports it. If the name is an empty string, or a snapshot with
1557 name already exists, the operation will fail.
1559 Arguments:
1561 - "device": the device name or node-name of a root node to snapshot
1562 (json-string)
1563 - "name": name of the new snapshot (json-string)
1565 Example:
1567 -> { "execute": "blockdev-snapshot-internal-sync",
1568 "arguments": { "device": "ide-hd0",
1569 "name": "snapshot0" }
1571 <- { "return": {} }
1573 EQMP
1576 .name = "blockdev-snapshot-delete-internal-sync",
1577 .args_type = "device:B,id:s?,name:s?",
1580 SQMP
1581 blockdev-snapshot-delete-internal-sync
1582 --------------------------------------
1584 Synchronously delete an internal snapshot of a block device when the format of
1585 image used supports it. The snapshot is identified by name or id or both. One
1586 of name or id is required. If the snapshot is not found, the operation will
1587 fail.
1589 Arguments:
1591 - "device": the device name or node-name of a root node (json-string)
1592 - "id": ID of the snapshot (json-string, optional)
1593 - "name": name of the snapshot (json-string, optional)
1595 Example:
1597 -> { "execute": "blockdev-snapshot-delete-internal-sync",
1598 "arguments": { "device": "ide-hd0",
1599 "name": "snapshot0" }
1601 <- { "return": {
1602 "id": "1",
1603 "name": "snapshot0",
1604 "vm-state-size": 0,
1605 "date-sec": 1000012,
1606 "date-nsec": 10,
1607 "vm-clock-sec": 100,
1608 "vm-clock-nsec": 20
1612 EQMP
1615 .name = "drive-mirror",
1616 .args_type = "job-id:s?,sync:s,device:B,target:s,speed:i?,mode:s?,"
1617 "format:s?,node-name:s?,replaces:s?,"
1618 "on-source-error:s?,on-target-error:s?,"
1619 "unmap:b?,"
1620 "granularity:i?,buf-size:i?",
1623 SQMP
1624 drive-mirror
1625 ------------
1627 Start mirroring a block device's writes to a new destination. target
1628 specifies the target of the new image. If the file exists, or if it is
1629 a device, it will be used as the new destination for writes. If it does not
1630 exist, a new file will be created. format specifies the format of the
1631 mirror image, default is to probe if mode='existing', else the format
1632 of the source.
1634 Arguments:
1636 - "job-id": Identifier for the newly-created block job. If omitted,
1637 the device name will be used. (json-string, optional)
1638 - "device": the device name or node-name of a root node whose writes should be
1639 mirrored. (json-string)
1640 - "target": name of new image file (json-string)
1641 - "format": format of new image (json-string, optional)
1642 - "node-name": the name of the new block driver state in the node graph
1643 (json-string, optional)
1644 - "replaces": the block driver node name to replace when finished
1645 (json-string, optional)
1646 - "mode": how an image file should be created into the target
1647 file/device (NewImageMode, optional, default 'absolute-paths')
1648 - "speed": maximum speed of the streaming job, in bytes per second
1649 (json-int)
1650 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1651 - "buf-size": maximum amount of data in flight from source to target, in bytes
1652 (json-int, default 10M)
1653 - "sync": what parts of the disk image should be copied to the destination;
1654 possibilities include "full" for all the disk, "top" for only the sectors
1655 allocated in the topmost image, or "none" to only replicate new I/O
1656 (MirrorSyncMode).
1657 - "on-source-error": the action to take on an error on the source
1658 (BlockdevOnError, default 'report')
1659 - "on-target-error": the action to take on an error on the target
1660 (BlockdevOnError, default 'report')
1661 - "unmap": whether the target sectors should be discarded where source has only
1662 zeroes. (json-bool, optional, default true)
1664 The default value of the granularity is the image cluster size clamped
1665 between 4096 and 65536, if the image format defines one. If the format
1666 does not define a cluster size, the default value of the granularity
1667 is 65536.
1670 Example:
1672 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1673 "target": "/some/place/my-image",
1674 "sync": "full",
1675 "format": "qcow2" } }
1676 <- { "return": {} }
1678 EQMP
1681 .name = "blockdev-mirror",
1682 .args_type = "job-id:s?,sync:s,device:B,target:B,replaces:s?,speed:i?,"
1683 "on-source-error:s?,on-target-error:s?,"
1684 "granularity:i?,buf-size:i?",
1687 SQMP
1688 blockdev-mirror
1689 ------------
1691 Start mirroring a block device's writes to another block device. target
1692 specifies the target of mirror operation.
1694 Arguments:
1696 - "job-id": Identifier for the newly-created block job. If omitted,
1697 the device name will be used. (json-string, optional)
1698 - "device": The device name or node-name of a root node whose writes should be
1699 mirrored (json-string)
1700 - "target": device name to mirror to (json-string)
1701 - "replaces": the block driver node name to replace when finished
1702 (json-string, optional)
1703 - "speed": maximum speed of the streaming job, in bytes per second
1704 (json-int)
1705 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1706 - "buf_size": maximum amount of data in flight from source to target, in bytes
1707 (json-int, default 10M)
1708 - "sync": what parts of the disk image should be copied to the destination;
1709 possibilities include "full" for all the disk, "top" for only the sectors
1710 allocated in the topmost image, or "none" to only replicate new I/O
1711 (MirrorSyncMode).
1712 - "on-source-error": the action to take on an error on the source
1713 (BlockdevOnError, default 'report')
1714 - "on-target-error": the action to take on an error on the target
1715 (BlockdevOnError, default 'report')
1717 The default value of the granularity is the image cluster size clamped
1718 between 4096 and 65536, if the image format defines one. If the format
1719 does not define a cluster size, the default value of the granularity
1720 is 65536.
1722 Example:
1724 -> { "execute": "blockdev-mirror", "arguments": { "device": "ide-hd0",
1725 "target": "target0",
1726 "sync": "full" } }
1727 <- { "return": {} }
1729 EQMP
1731 .name = "change-backing-file",
1732 .args_type = "device:s,image-node-name:s,backing-file:s",
1735 SQMP
1736 change-backing-file
1737 -------------------
1738 Since: 2.1
1740 Change the backing file in the image file metadata. This does not cause
1741 QEMU to reopen the image file to reparse the backing filename (it may,
1742 however, perform a reopen to change permissions from r/o -> r/w -> r/o,
1743 if needed). The new backing file string is written into the image file
1744 metadata, and the QEMU internal strings are updated.
1746 Arguments:
1748 - "image-node-name": The name of the block driver state node of the
1749 image to modify. The "device" is argument is used to
1750 verify "image-node-name" is in the chain described by
1751 "device".
1752 (json-string, optional)
1754 - "device": The device name or node-name of the root node that owns
1755 image-node-name.
1756 (json-string)
1758 - "backing-file": The string to write as the backing file. This string is
1759 not validated, so care should be taken when specifying
1760 the string or the image chain may not be able to be
1761 reopened again.
1762 (json-string)
1764 Returns: Nothing on success
1765 If "device" does not exist or cannot be determined, DeviceNotFound
1767 EQMP
1770 .name = "balloon",
1771 .args_type = "value:M",
1774 SQMP
1775 balloon
1776 -------
1778 Request VM to change its memory allocation (in bytes).
1780 Arguments:
1782 - "value": New memory allocation (json-int)
1784 Example:
1786 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1787 <- { "return": {} }
1789 EQMP
1792 .name = "set_link",
1793 .args_type = "name:s,up:b",
1796 SQMP
1797 set_link
1798 --------
1800 Change the link status of a network adapter.
1802 Arguments:
1804 - "name": network device name (json-string)
1805 - "up": status is up (json-bool)
1807 Example:
1809 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1810 <- { "return": {} }
1812 EQMP
1815 .name = "getfd",
1816 .args_type = "fdname:s",
1817 .params = "getfd name",
1818 .help = "receive a file descriptor via SCM rights and assign it a name",
1821 SQMP
1822 getfd
1823 -----
1825 Receive a file descriptor via SCM rights and assign it a name.
1827 Arguments:
1829 - "fdname": file descriptor name (json-string)
1831 Example:
1833 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1834 <- { "return": {} }
1836 Notes:
1838 (1) If the name specified by the "fdname" argument already exists,
1839 the file descriptor assigned to it will be closed and replaced
1840 by the received file descriptor.
1841 (2) The 'closefd' command can be used to explicitly close the file
1842 descriptor when it is no longer needed.
1844 EQMP
1847 .name = "closefd",
1848 .args_type = "fdname:s",
1849 .params = "closefd name",
1850 .help = "close a file descriptor previously passed via SCM rights",
1853 SQMP
1854 closefd
1855 -------
1857 Close a file descriptor previously passed via SCM rights.
1859 Arguments:
1861 - "fdname": file descriptor name (json-string)
1863 Example:
1865 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1866 <- { "return": {} }
1868 EQMP
1871 .name = "add-fd",
1872 .args_type = "fdset-id:i?,opaque:s?",
1873 .params = "add-fd fdset-id opaque",
1874 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1877 SQMP
1878 add-fd
1879 -------
1881 Add a file descriptor, that was passed via SCM rights, to an fd set.
1883 Arguments:
1885 - "fdset-id": The ID of the fd set to add the file descriptor to.
1886 (json-int, optional)
1887 - "opaque": A free-form string that can be used to describe the fd.
1888 (json-string, optional)
1890 Return a json-object with the following information:
1892 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1893 - "fd": The file descriptor that was received via SCM rights and added to the
1894 fd set. (json-int)
1896 Example:
1898 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1899 <- { "return": { "fdset-id": 1, "fd": 3 } }
1901 Notes:
1903 (1) The list of fd sets is shared by all monitor connections.
1904 (2) If "fdset-id" is not specified, a new fd set will be created.
1906 EQMP
1909 .name = "remove-fd",
1910 .args_type = "fdset-id:i,fd:i?",
1911 .params = "remove-fd fdset-id fd",
1912 .help = "Remove a file descriptor from an fd set",
1915 SQMP
1916 remove-fd
1917 ---------
1919 Remove a file descriptor from an fd set.
1921 Arguments:
1923 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1924 (json-int)
1925 - "fd": The file descriptor that is to be removed. (json-int, optional)
1927 Example:
1929 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1930 <- { "return": {} }
1932 Notes:
1934 (1) The list of fd sets is shared by all monitor connections.
1935 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1936 removed.
1938 EQMP
1941 .name = "query-fdsets",
1942 .args_type = "",
1943 .help = "Return information describing all fd sets",
1946 SQMP
1947 query-fdsets
1948 -------------
1950 Return information describing all fd sets.
1952 Arguments: None
1954 Example:
1956 -> { "execute": "query-fdsets" }
1957 <- { "return": [
1959 "fds": [
1961 "fd": 30,
1962 "opaque": "rdonly:/path/to/file"
1965 "fd": 24,
1966 "opaque": "rdwr:/path/to/file"
1969 "fdset-id": 1
1972 "fds": [
1974 "fd": 28
1977 "fd": 29
1980 "fdset-id": 0
1985 Note: The list of fd sets is shared by all monitor connections.
1987 EQMP
1990 .name = "block_passwd",
1991 .args_type = "device:s?,node-name:s?,password:s",
1994 SQMP
1995 block_passwd
1996 ------------
1998 Set the password of encrypted block devices.
2000 Arguments:
2002 - "device": device name (json-string)
2003 - "node-name": name in the block driver state graph (json-string)
2004 - "password": password (json-string)
2006 Example:
2008 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
2009 "password": "12345" } }
2010 <- { "return": {} }
2012 EQMP
2015 .name = "block_set_io_throttle",
2016 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,bps_max_length:l?,bps_rd_max_length:l?,bps_wr_max_length:l?,iops_max_length:l?,iops_rd_max_length:l?,iops_wr_max_length:l?,iops_size:l?,group:s?",
2019 SQMP
2020 block_set_io_throttle
2021 ------------
2023 Change I/O throttle limits for a block drive.
2025 Arguments:
2027 - "device": device name (json-string)
2028 - "bps": total throughput limit in bytes per second (json-int)
2029 - "bps_rd": read throughput limit in bytes per second (json-int)
2030 - "bps_wr": write throughput limit in bytes per second (json-int)
2031 - "iops": total I/O operations per second (json-int)
2032 - "iops_rd": read I/O operations per second (json-int)
2033 - "iops_wr": write I/O operations per second (json-int)
2034 - "bps_max": total throughput limit during bursts, in bytes (json-int, optional)
2035 - "bps_rd_max": read throughput limit during bursts, in bytes (json-int, optional)
2036 - "bps_wr_max": write throughput limit during bursts, in bytes (json-int, optional)
2037 - "iops_max": total I/O operations per second during bursts (json-int, optional)
2038 - "iops_rd_max": read I/O operations per second during bursts (json-int, optional)
2039 - "iops_wr_max": write I/O operations per second during bursts (json-int, optional)
2040 - "bps_max_length": maximum length of the @bps_max burst period, in seconds (json-int, optional)
2041 - "bps_rd_max_length": maximum length of the @bps_rd_max burst period, in seconds (json-int, optional)
2042 - "bps_wr_max_length": maximum length of the @bps_wr_max burst period, in seconds (json-int, optional)
2043 - "iops_max_length": maximum length of the @iops_max burst period, in seconds (json-int, optional)
2044 - "iops_rd_max_length": maximum length of the @iops_rd_max burst period, in seconds (json-int, optional)
2045 - "iops_wr_max_length": maximum length of the @iops_wr_max burst period, in seconds (json-int, optional)
2046 - "iops_size": I/O size in bytes when limiting (json-int, optional)
2047 - "group": throttle group name (json-string, optional)
2049 Example:
2051 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
2052 "bps": 1000000,
2053 "bps_rd": 0,
2054 "bps_wr": 0,
2055 "iops": 0,
2056 "iops_rd": 0,
2057 "iops_wr": 0,
2058 "bps_max": 8000000,
2059 "bps_rd_max": 0,
2060 "bps_wr_max": 0,
2061 "iops_max": 0,
2062 "iops_rd_max": 0,
2063 "iops_wr_max": 0,
2064 "bps_max_length": 60,
2065 "iops_size": 0 } }
2066 <- { "return": {} }
2068 EQMP
2071 .name = "set_password",
2072 .args_type = "protocol:s,password:s,connected:s?",
2075 SQMP
2076 set_password
2077 ------------
2079 Set the password for vnc/spice protocols.
2081 Arguments:
2083 - "protocol": protocol name (json-string)
2084 - "password": password (json-string)
2085 - "connected": [ keep | disconnect | fail ] (json-string, optional)
2087 Example:
2089 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
2090 "password": "secret" } }
2091 <- { "return": {} }
2093 EQMP
2096 .name = "expire_password",
2097 .args_type = "protocol:s,time:s",
2100 SQMP
2101 expire_password
2102 ---------------
2104 Set the password expire time for vnc/spice protocols.
2106 Arguments:
2108 - "protocol": protocol name (json-string)
2109 - "time": [ now | never | +secs | secs ] (json-string)
2111 Example:
2113 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2114 "time": "+60" } }
2115 <- { "return": {} }
2117 EQMP
2120 .name = "add_client",
2121 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
2124 SQMP
2125 add_client
2126 ----------
2128 Add a graphics client
2130 Arguments:
2132 - "protocol": protocol name (json-string)
2133 - "fdname": file descriptor name (json-string)
2134 - "skipauth": whether to skip authentication (json-bool, optional)
2135 - "tls": whether to perform TLS (json-bool, optional)
2137 Example:
2139 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
2140 "fdname": "myclient" } }
2141 <- { "return": {} }
2143 EQMP
2145 .name = "qmp_capabilities",
2146 .args_type = "",
2147 .params = "",
2148 .help = "enable QMP capabilities",
2151 SQMP
2152 qmp_capabilities
2153 ----------------
2155 Enable QMP capabilities.
2157 Arguments: None.
2159 Example:
2161 -> { "execute": "qmp_capabilities" }
2162 <- { "return": {} }
2164 Note: This command must be issued before issuing any other command.
2166 EQMP
2169 .name = "human-monitor-command",
2170 .args_type = "command-line:s,cpu-index:i?",
2173 SQMP
2174 human-monitor-command
2175 ---------------------
2177 Execute a Human Monitor command.
2179 Arguments:
2181 - command-line: the command name and its arguments, just like the
2182 Human Monitor's shell (json-string)
2183 - cpu-index: select the CPU number to be used by commands which access CPU
2184 data, like 'info registers'. The Monitor selects CPU 0 if this
2185 argument is not provided (json-int, optional)
2187 Example:
2189 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
2190 <- { "return": "kvm support: enabled\r\n" }
2192 Notes:
2194 (1) The Human Monitor is NOT an stable interface, this means that command
2195 names, arguments and responses can change or be removed at ANY time.
2196 Applications that rely on long term stability guarantees should NOT
2197 use this command
2199 (2) Limitations:
2201 o This command is stateless, this means that commands that depend
2202 on state information (such as getfd) might not work
2204 o Commands that prompt the user for data (eg. 'cont' when the block
2205 device is encrypted) don't currently work
2207 3. Query Commands
2208 =================
2210 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
2211 HXCOMM this! We will possibly move query commands definitions inside those
2212 HXCOMM sections, just like regular commands.
2214 EQMP
2216 SQMP
2217 query-version
2218 -------------
2220 Show QEMU version.
2222 Return a json-object with the following information:
2224 - "qemu": A json-object containing three integer values:
2225 - "major": QEMU's major version (json-int)
2226 - "minor": QEMU's minor version (json-int)
2227 - "micro": QEMU's micro version (json-int)
2228 - "package": package's version (json-string)
2230 Example:
2232 -> { "execute": "query-version" }
2233 <- {
2234 "return":{
2235 "qemu":{
2236 "major":0,
2237 "minor":11,
2238 "micro":5
2240 "package":""
2244 EQMP
2247 .name = "query-version",
2248 .args_type = "",
2251 SQMP
2252 query-commands
2253 --------------
2255 List QMP available commands.
2257 Each command is represented by a json-object, the returned value is a json-array
2258 of all commands.
2260 Each json-object contain:
2262 - "name": command's name (json-string)
2264 Example:
2266 -> { "execute": "query-commands" }
2267 <- {
2268 "return":[
2270 "name":"query-balloon"
2273 "name":"system_powerdown"
2278 Note: This example has been shortened as the real response is too long.
2280 EQMP
2283 .name = "query-commands",
2284 .args_type = "",
2287 SQMP
2288 query-events
2289 --------------
2291 List QMP available events.
2293 Each event is represented by a json-object, the returned value is a json-array
2294 of all events.
2296 Each json-object contains:
2298 - "name": event's name (json-string)
2300 Example:
2302 -> { "execute": "query-events" }
2303 <- {
2304 "return":[
2306 "name":"SHUTDOWN"
2309 "name":"RESET"
2314 Note: This example has been shortened as the real response is too long.
2316 EQMP
2319 .name = "query-events",
2320 .args_type = "",
2323 SQMP
2324 query-qmp-schema
2325 ----------------
2327 Return the QMP wire schema. The returned value is a json-array of
2328 named schema entities. Entities are commands, events and various
2329 types. See docs/qapi-code-gen.txt for information on their structure
2330 and intended use.
2332 EQMP
2335 .name = "query-qmp-schema",
2336 .args_type = "",
2339 SQMP
2340 query-chardev
2341 -------------
2343 Each device is represented by a json-object. The returned value is a json-array
2344 of all devices.
2346 Each json-object contain the following:
2348 - "label": device's label (json-string)
2349 - "filename": device's file (json-string)
2350 - "frontend-open": open/closed state of the frontend device attached to this
2351 backend (json-bool)
2353 Example:
2355 -> { "execute": "query-chardev" }
2356 <- {
2357 "return": [
2359 "label": "charchannel0",
2360 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2361 "frontend-open": false
2364 "label": "charmonitor",
2365 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2366 "frontend-open": true
2369 "label": "charserial0",
2370 "filename": "pty:/dev/pts/2",
2371 "frontend-open": true
2376 EQMP
2379 .name = "query-chardev",
2380 .args_type = "",
2383 SQMP
2384 query-chardev-backends
2385 -------------
2387 List available character device backends.
2389 Each backend is represented by a json-object, the returned value is a json-array
2390 of all backends.
2392 Each json-object contains:
2394 - "name": backend name (json-string)
2396 Example:
2398 -> { "execute": "query-chardev-backends" }
2399 <- {
2400 "return":[
2402 "name":"udp"
2405 "name":"tcp"
2408 "name":"unix"
2411 "name":"spiceport"
2416 EQMP
2419 .name = "query-chardev-backends",
2420 .args_type = "",
2423 SQMP
2424 query-block
2425 -----------
2427 Show the block devices.
2429 Each block device information is stored in a json-object and the returned value
2430 is a json-array of all devices.
2432 Each json-object contain the following:
2434 - "device": device name (json-string)
2435 - "type": device type (json-string)
2436 - deprecated, retained for backward compatibility
2437 - Possible values: "unknown"
2438 - "removable": true if the device is removable, false otherwise (json-bool)
2439 - "locked": true if the device is locked, false otherwise (json-bool)
2440 - "tray_open": only present if removable, true if the device has a tray,
2441 and it is open (json-bool)
2442 - "inserted": only present if the device is inserted, it is a json-object
2443 containing the following:
2444 - "file": device file name (json-string)
2445 - "ro": true if read-only, false otherwise (json-bool)
2446 - "drv": driver format name (json-string)
2447 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
2448 "file", "file", "ftp", "ftps", "host_cdrom",
2449 "host_device", "http", "https",
2450 "nbd", "parallels", "qcow", "qcow2", "raw",
2451 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2452 - "backing_file": backing file name (json-string, optional)
2453 - "backing_file_depth": number of files in the backing file chain (json-int)
2454 - "encrypted": true if encrypted, false otherwise (json-bool)
2455 - "bps": limit total bytes per second (json-int)
2456 - "bps_rd": limit read bytes per second (json-int)
2457 - "bps_wr": limit write bytes per second (json-int)
2458 - "iops": limit total I/O operations per second (json-int)
2459 - "iops_rd": limit read operations per second (json-int)
2460 - "iops_wr": limit write operations per second (json-int)
2461 - "bps_max": total max in bytes (json-int)
2462 - "bps_rd_max": read max in bytes (json-int)
2463 - "bps_wr_max": write max in bytes (json-int)
2464 - "iops_max": total I/O operations max (json-int)
2465 - "iops_rd_max": read I/O operations max (json-int)
2466 - "iops_wr_max": write I/O operations max (json-int)
2467 - "iops_size": I/O size when limiting by iops (json-int)
2468 - "detect_zeroes": detect and optimize zero writing (json-string)
2469 - Possible values: "off", "on", "unmap"
2470 - "write_threshold": write offset threshold in bytes, a event will be
2471 emitted if crossed. Zero if disabled (json-int)
2472 - "image": the detail of the image, it is a json-object containing
2473 the following:
2474 - "filename": image file name (json-string)
2475 - "format": image format (json-string)
2476 - "virtual-size": image capacity in bytes (json-int)
2477 - "dirty-flag": true if image is not cleanly closed, not present
2478 means clean (json-bool, optional)
2479 - "actual-size": actual size on disk in bytes of the image, not
2480 present when image does not support thin
2481 provision (json-int, optional)
2482 - "cluster-size": size of a cluster in bytes, not present if image
2483 format does not support it (json-int, optional)
2484 - "encrypted": true if the image is encrypted, not present means
2485 false or the image format does not support
2486 encryption (json-bool, optional)
2487 - "backing_file": backing file name, not present means no backing
2488 file is used or the image format does not
2489 support backing file chain
2490 (json-string, optional)
2491 - "full-backing-filename": full path of the backing file, not
2492 present if it equals backing_file or no
2493 backing file is used
2494 (json-string, optional)
2495 - "backing-filename-format": the format of the backing file, not
2496 present means unknown or no backing
2497 file (json-string, optional)
2498 - "snapshots": the internal snapshot info, it is an optional list
2499 of json-object containing the following:
2500 - "id": unique snapshot id (json-string)
2501 - "name": snapshot name (json-string)
2502 - "vm-state-size": size of the VM state in bytes (json-int)
2503 - "date-sec": UTC date of the snapshot in seconds (json-int)
2504 - "date-nsec": fractional part in nanoseconds to be used with
2505 date-sec (json-int)
2506 - "vm-clock-sec": VM clock relative to boot in seconds
2507 (json-int)
2508 - "vm-clock-nsec": fractional part in nanoseconds to be used
2509 with vm-clock-sec (json-int)
2510 - "backing-image": the detail of the backing image, it is an
2511 optional json-object only present when a
2512 backing image present for this image
2514 - "io-status": I/O operation status, only present if the device supports it
2515 and the VM is configured to stop on errors. It's always reset
2516 to "ok" when the "cont" command is issued (json_string, optional)
2517 - Possible values: "ok", "failed", "nospace"
2519 Example:
2521 -> { "execute": "query-block" }
2522 <- {
2523 "return":[
2525 "io-status": "ok",
2526 "device":"ide0-hd0",
2527 "locked":false,
2528 "removable":false,
2529 "inserted":{
2530 "ro":false,
2531 "drv":"qcow2",
2532 "encrypted":false,
2533 "file":"disks/test.qcow2",
2534 "backing_file_depth":1,
2535 "bps":1000000,
2536 "bps_rd":0,
2537 "bps_wr":0,
2538 "iops":1000000,
2539 "iops_rd":0,
2540 "iops_wr":0,
2541 "bps_max": 8000000,
2542 "bps_rd_max": 0,
2543 "bps_wr_max": 0,
2544 "iops_max": 0,
2545 "iops_rd_max": 0,
2546 "iops_wr_max": 0,
2547 "iops_size": 0,
2548 "detect_zeroes": "on",
2549 "write_threshold": 0,
2550 "image":{
2551 "filename":"disks/test.qcow2",
2552 "format":"qcow2",
2553 "virtual-size":2048000,
2554 "backing_file":"base.qcow2",
2555 "full-backing-filename":"disks/base.qcow2",
2556 "backing-filename-format":"qcow2",
2557 "snapshots":[
2559 "id": "1",
2560 "name": "snapshot1",
2561 "vm-state-size": 0,
2562 "date-sec": 10000200,
2563 "date-nsec": 12,
2564 "vm-clock-sec": 206,
2565 "vm-clock-nsec": 30
2568 "backing-image":{
2569 "filename":"disks/base.qcow2",
2570 "format":"qcow2",
2571 "virtual-size":2048000
2575 "type":"unknown"
2578 "io-status": "ok",
2579 "device":"ide1-cd0",
2580 "locked":false,
2581 "removable":true,
2582 "type":"unknown"
2585 "device":"floppy0",
2586 "locked":false,
2587 "removable":true,
2588 "type":"unknown"
2591 "device":"sd0",
2592 "locked":false,
2593 "removable":true,
2594 "type":"unknown"
2599 EQMP
2602 .name = "query-block",
2603 .args_type = "",
2606 SQMP
2607 query-blockstats
2608 ----------------
2610 Show block device statistics.
2612 Each device statistic information is stored in a json-object and the returned
2613 value is a json-array of all devices.
2615 Each json-object contain the following:
2617 - "device": device name (json-string)
2618 - "stats": A json-object with the statistics information, it contains:
2619 - "rd_bytes": bytes read (json-int)
2620 - "wr_bytes": bytes written (json-int)
2621 - "rd_operations": read operations (json-int)
2622 - "wr_operations": write operations (json-int)
2623 - "flush_operations": cache flush operations (json-int)
2624 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
2625 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
2626 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
2627 - "wr_highest_offset": The offset after the greatest byte written to the
2628 BlockDriverState since it has been opened (json-int)
2629 - "rd_merged": number of read requests that have been merged into
2630 another request (json-int)
2631 - "wr_merged": number of write requests that have been merged into
2632 another request (json-int)
2633 - "idle_time_ns": time since the last I/O operation, in
2634 nanoseconds. If the field is absent it means
2635 that there haven't been any operations yet
2636 (json-int, optional)
2637 - "failed_rd_operations": number of failed read operations
2638 (json-int)
2639 - "failed_wr_operations": number of failed write operations
2640 (json-int)
2641 - "failed_flush_operations": number of failed flush operations
2642 (json-int)
2643 - "invalid_rd_operations": number of invalid read operations
2644 (json-int)
2645 - "invalid_wr_operations": number of invalid write operations
2646 (json-int)
2647 - "invalid_flush_operations": number of invalid flush operations
2648 (json-int)
2649 - "account_invalid": whether invalid operations are included in
2650 the last access statistics (json-bool)
2651 - "account_failed": whether failed operations are included in the
2652 latency and last access statistics
2653 (json-bool)
2654 - "timed_stats": A json-array containing statistics collected in
2655 specific intervals, with the following members:
2656 - "interval_length": interval used for calculating the
2657 statistics, in seconds (json-int)
2658 - "min_rd_latency_ns": minimum latency of read operations in
2659 the defined interval, in nanoseconds
2660 (json-int)
2661 - "min_wr_latency_ns": minimum latency of write operations in
2662 the defined interval, in nanoseconds
2663 (json-int)
2664 - "min_flush_latency_ns": minimum latency of flush operations
2665 in the defined interval, in
2666 nanoseconds (json-int)
2667 - "max_rd_latency_ns": maximum latency of read operations in
2668 the defined interval, in nanoseconds
2669 (json-int)
2670 - "max_wr_latency_ns": maximum latency of write operations in
2671 the defined interval, in nanoseconds
2672 (json-int)
2673 - "max_flush_latency_ns": maximum latency of flush operations
2674 in the defined interval, in
2675 nanoseconds (json-int)
2676 - "avg_rd_latency_ns": average latency of read operations in
2677 the defined interval, in nanoseconds
2678 (json-int)
2679 - "avg_wr_latency_ns": average latency of write operations in
2680 the defined interval, in nanoseconds
2681 (json-int)
2682 - "avg_flush_latency_ns": average latency of flush operations
2683 in the defined interval, in
2684 nanoseconds (json-int)
2685 - "avg_rd_queue_depth": average number of pending read
2686 operations in the defined interval
2687 (json-number)
2688 - "avg_wr_queue_depth": average number of pending write
2689 operations in the defined interval
2690 (json-number).
2691 - "parent": Contains recursively the statistics of the underlying
2692 protocol (e.g. the host file for a qcow2 image). If there is
2693 no underlying protocol, this field is omitted
2694 (json-object, optional)
2696 Example:
2698 -> { "execute": "query-blockstats" }
2699 <- {
2700 "return":[
2702 "device":"ide0-hd0",
2703 "parent":{
2704 "stats":{
2705 "wr_highest_offset":3686448128,
2706 "wr_bytes":9786368,
2707 "wr_operations":751,
2708 "rd_bytes":122567168,
2709 "rd_operations":36772
2710 "wr_total_times_ns":313253456
2711 "rd_total_times_ns":3465673657
2712 "flush_total_times_ns":49653
2713 "flush_operations":61,
2714 "rd_merged":0,
2715 "wr_merged":0,
2716 "idle_time_ns":2953431879,
2717 "account_invalid":true,
2718 "account_failed":false
2721 "stats":{
2722 "wr_highest_offset":2821110784,
2723 "wr_bytes":9786368,
2724 "wr_operations":692,
2725 "rd_bytes":122739200,
2726 "rd_operations":36604
2727 "flush_operations":51,
2728 "wr_total_times_ns":313253456
2729 "rd_total_times_ns":3465673657
2730 "flush_total_times_ns":49653,
2731 "rd_merged":0,
2732 "wr_merged":0,
2733 "idle_time_ns":2953431879,
2734 "account_invalid":true,
2735 "account_failed":false
2739 "device":"ide1-cd0",
2740 "stats":{
2741 "wr_highest_offset":0,
2742 "wr_bytes":0,
2743 "wr_operations":0,
2744 "rd_bytes":0,
2745 "rd_operations":0
2746 "flush_operations":0,
2747 "wr_total_times_ns":0
2748 "rd_total_times_ns":0
2749 "flush_total_times_ns":0,
2750 "rd_merged":0,
2751 "wr_merged":0,
2752 "account_invalid":false,
2753 "account_failed":false
2757 "device":"floppy0",
2758 "stats":{
2759 "wr_highest_offset":0,
2760 "wr_bytes":0,
2761 "wr_operations":0,
2762 "rd_bytes":0,
2763 "rd_operations":0
2764 "flush_operations":0,
2765 "wr_total_times_ns":0
2766 "rd_total_times_ns":0
2767 "flush_total_times_ns":0,
2768 "rd_merged":0,
2769 "wr_merged":0,
2770 "account_invalid":false,
2771 "account_failed":false
2775 "device":"sd0",
2776 "stats":{
2777 "wr_highest_offset":0,
2778 "wr_bytes":0,
2779 "wr_operations":0,
2780 "rd_bytes":0,
2781 "rd_operations":0
2782 "flush_operations":0,
2783 "wr_total_times_ns":0
2784 "rd_total_times_ns":0
2785 "flush_total_times_ns":0,
2786 "rd_merged":0,
2787 "wr_merged":0,
2788 "account_invalid":false,
2789 "account_failed":false
2795 EQMP
2798 .name = "query-blockstats",
2799 .args_type = "query-nodes:b?",
2802 SQMP
2803 query-cpus
2804 ----------
2806 Show CPU information.
2808 Return a json-array. Each CPU is represented by a json-object, which contains:
2810 - "CPU": CPU index (json-int)
2811 - "current": true if this is the current CPU, false otherwise (json-bool)
2812 - "halted": true if the cpu is halted, false otherwise (json-bool)
2813 - "qom_path": path to the CPU object in the QOM tree (json-str)
2814 - "arch": architecture of the cpu, which determines what additional
2815 keys will be present (json-str)
2816 - Current program counter. The key's name depends on the architecture:
2817 "pc": i386/x86_64 (json-int)
2818 "nip": PPC (json-int)
2819 "pc" and "npc": sparc (json-int)
2820 "PC": mips (json-int)
2821 - "thread_id": ID of the underlying host thread (json-int)
2823 Example:
2825 -> { "execute": "query-cpus" }
2826 <- {
2827 "return":[
2829 "CPU":0,
2830 "current":true,
2831 "halted":false,
2832 "qom_path":"/machine/unattached/device[0]",
2833 "arch":"x86",
2834 "pc":3227107138,
2835 "thread_id":3134
2838 "CPU":1,
2839 "current":false,
2840 "halted":true,
2841 "qom_path":"/machine/unattached/device[2]",
2842 "arch":"x86",
2843 "pc":7108165,
2844 "thread_id":3135
2849 EQMP
2852 .name = "query-cpus",
2853 .args_type = "",
2856 SQMP
2857 query-iothreads
2858 ---------------
2860 Returns a list of information about each iothread.
2862 Note this list excludes the QEMU main loop thread, which is not declared
2863 using the -object iothread command-line option. It is always the main thread
2864 of the process.
2866 Return a json-array. Each iothread is represented by a json-object, which contains:
2868 - "id": name of iothread (json-str)
2869 - "thread-id": ID of the underlying host thread (json-int)
2871 Example:
2873 -> { "execute": "query-iothreads" }
2874 <- {
2875 "return":[
2877 "id":"iothread0",
2878 "thread-id":3134
2881 "id":"iothread1",
2882 "thread-id":3135
2887 EQMP
2890 .name = "query-iothreads",
2891 .args_type = "",
2894 SQMP
2895 query-pci
2896 ---------
2898 PCI buses and devices information.
2900 The returned value is a json-array of all buses. Each bus is represented by
2901 a json-object, which has a key with a json-array of all PCI devices attached
2902 to it. Each device is represented by a json-object.
2904 The bus json-object contains the following:
2906 - "bus": bus number (json-int)
2907 - "devices": a json-array of json-objects, each json-object represents a
2908 PCI device
2910 The PCI device json-object contains the following:
2912 - "bus": identical to the parent's bus number (json-int)
2913 - "slot": slot number (json-int)
2914 - "function": function number (json-int)
2915 - "class_info": a json-object containing:
2916 - "desc": device class description (json-string, optional)
2917 - "class": device class number (json-int)
2918 - "id": a json-object containing:
2919 - "device": device ID (json-int)
2920 - "vendor": vendor ID (json-int)
2921 - "irq": device's IRQ if assigned (json-int, optional)
2922 - "qdev_id": qdev id string (json-string)
2923 - "pci_bridge": It's a json-object, only present if this device is a
2924 PCI bridge, contains:
2925 - "bus": bus number (json-int)
2926 - "secondary": secondary bus number (json-int)
2927 - "subordinate": subordinate bus number (json-int)
2928 - "io_range": I/O memory range information, a json-object with the
2929 following members:
2930 - "base": base address, in bytes (json-int)
2931 - "limit": limit address, in bytes (json-int)
2932 - "memory_range": memory range information, a json-object with the
2933 following members:
2934 - "base": base address, in bytes (json-int)
2935 - "limit": limit address, in bytes (json-int)
2936 - "prefetchable_range": Prefetchable memory range information, a
2937 json-object with the following members:
2938 - "base": base address, in bytes (json-int)
2939 - "limit": limit address, in bytes (json-int)
2940 - "devices": a json-array of PCI devices if there's any attached, each
2941 each element is represented by a json-object, which contains
2942 the same members of the 'PCI device json-object' described
2943 above (optional)
2944 - "regions": a json-array of json-objects, each json-object represents a
2945 memory region of this device
2947 The memory range json-object contains the following:
2949 - "base": base memory address (json-int)
2950 - "limit": limit value (json-int)
2952 The region json-object can be an I/O region or a memory region, an I/O region
2953 json-object contains the following:
2955 - "type": "io" (json-string, fixed)
2956 - "bar": BAR number (json-int)
2957 - "address": memory address (json-int)
2958 - "size": memory size (json-int)
2960 A memory region json-object contains the following:
2962 - "type": "memory" (json-string, fixed)
2963 - "bar": BAR number (json-int)
2964 - "address": memory address (json-int)
2965 - "size": memory size (json-int)
2966 - "mem_type_64": true or false (json-bool)
2967 - "prefetch": true or false (json-bool)
2969 Example:
2971 -> { "execute": "query-pci" }
2972 <- {
2973 "return":[
2975 "bus":0,
2976 "devices":[
2978 "bus":0,
2979 "qdev_id":"",
2980 "slot":0,
2981 "class_info":{
2982 "class":1536,
2983 "desc":"Host bridge"
2985 "id":{
2986 "device":32902,
2987 "vendor":4663
2989 "function":0,
2990 "regions":[
2995 "bus":0,
2996 "qdev_id":"",
2997 "slot":1,
2998 "class_info":{
2999 "class":1537,
3000 "desc":"ISA bridge"
3002 "id":{
3003 "device":32902,
3004 "vendor":28672
3006 "function":0,
3007 "regions":[
3012 "bus":0,
3013 "qdev_id":"",
3014 "slot":1,
3015 "class_info":{
3016 "class":257,
3017 "desc":"IDE controller"
3019 "id":{
3020 "device":32902,
3021 "vendor":28688
3023 "function":1,
3024 "regions":[
3026 "bar":4,
3027 "size":16,
3028 "address":49152,
3029 "type":"io"
3034 "bus":0,
3035 "qdev_id":"",
3036 "slot":2,
3037 "class_info":{
3038 "class":768,
3039 "desc":"VGA controller"
3041 "id":{
3042 "device":4115,
3043 "vendor":184
3045 "function":0,
3046 "regions":[
3048 "prefetch":true,
3049 "mem_type_64":false,
3050 "bar":0,
3051 "size":33554432,
3052 "address":4026531840,
3053 "type":"memory"
3056 "prefetch":false,
3057 "mem_type_64":false,
3058 "bar":1,
3059 "size":4096,
3060 "address":4060086272,
3061 "type":"memory"
3064 "prefetch":false,
3065 "mem_type_64":false,
3066 "bar":6,
3067 "size":65536,
3068 "address":-1,
3069 "type":"memory"
3074 "bus":0,
3075 "qdev_id":"",
3076 "irq":11,
3077 "slot":4,
3078 "class_info":{
3079 "class":1280,
3080 "desc":"RAM controller"
3082 "id":{
3083 "device":6900,
3084 "vendor":4098
3086 "function":0,
3087 "regions":[
3089 "bar":0,
3090 "size":32,
3091 "address":49280,
3092 "type":"io"
3101 Note: This example has been shortened as the real response is too long.
3103 EQMP
3106 .name = "query-pci",
3107 .args_type = "",
3110 SQMP
3111 query-kvm
3112 ---------
3114 Show KVM information.
3116 Return a json-object with the following information:
3118 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
3119 - "present": true if QEMU has KVM support, false otherwise (json-bool)
3121 Example:
3123 -> { "execute": "query-kvm" }
3124 <- { "return": { "enabled": true, "present": true } }
3126 EQMP
3129 .name = "query-kvm",
3130 .args_type = "",
3133 SQMP
3134 query-status
3135 ------------
3137 Return a json-object with the following information:
3139 - "running": true if the VM is running, or false if it is paused (json-bool)
3140 - "singlestep": true if the VM is in single step mode,
3141 false otherwise (json-bool)
3142 - "status": one of the following values (json-string)
3143 "debug" - QEMU is running on a debugger
3144 "inmigrate" - guest is paused waiting for an incoming migration
3145 "internal-error" - An internal error that prevents further guest
3146 execution has occurred
3147 "io-error" - the last IOP has failed and the device is configured
3148 to pause on I/O errors
3149 "paused" - guest has been paused via the 'stop' command
3150 "postmigrate" - guest is paused following a successful 'migrate'
3151 "prelaunch" - QEMU was started with -S and guest has not started
3152 "finish-migrate" - guest is paused to finish the migration process
3153 "restore-vm" - guest is paused to restore VM state
3154 "running" - guest is actively running
3155 "save-vm" - guest is paused to save the VM state
3156 "shutdown" - guest is shut down (and -no-shutdown is in use)
3157 "watchdog" - the watchdog action is configured to pause and
3158 has been triggered
3160 Example:
3162 -> { "execute": "query-status" }
3163 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
3165 EQMP
3168 .name = "query-status",
3169 .args_type = "",
3172 SQMP
3173 query-mice
3174 ----------
3176 Show VM mice information.
3178 Each mouse is represented by a json-object, the returned value is a json-array
3179 of all mice.
3181 The mouse json-object contains the following:
3183 - "name": mouse's name (json-string)
3184 - "index": mouse's index (json-int)
3185 - "current": true if this mouse is receiving events, false otherwise (json-bool)
3186 - "absolute": true if the mouse generates absolute input events (json-bool)
3188 Example:
3190 -> { "execute": "query-mice" }
3191 <- {
3192 "return":[
3194 "name":"QEMU Microsoft Mouse",
3195 "index":0,
3196 "current":false,
3197 "absolute":false
3200 "name":"QEMU PS/2 Mouse",
3201 "index":1,
3202 "current":true,
3203 "absolute":true
3208 EQMP
3211 .name = "query-mice",
3212 .args_type = "",
3215 SQMP
3216 query-vnc
3217 ---------
3219 Show VNC server information.
3221 Return a json-object with server information. Connected clients are returned
3222 as a json-array of json-objects.
3224 The main json-object contains the following:
3226 - "enabled": true or false (json-bool)
3227 - "host": server's IP address (json-string)
3228 - "family": address family (json-string)
3229 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3230 - "service": server's port number (json-string)
3231 - "auth": authentication method (json-string)
3232 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
3233 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
3234 "vencrypt+plain", "vencrypt+tls+none",
3235 "vencrypt+tls+plain", "vencrypt+tls+sasl",
3236 "vencrypt+tls+vnc", "vencrypt+x509+none",
3237 "vencrypt+x509+plain", "vencrypt+x509+sasl",
3238 "vencrypt+x509+vnc", "vnc"
3239 - "clients": a json-array of all connected clients
3241 Clients are described by a json-object, each one contain the following:
3243 - "host": client's IP address (json-string)
3244 - "family": address family (json-string)
3245 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3246 - "service": client's port number (json-string)
3247 - "x509_dname": TLS dname (json-string, optional)
3248 - "sasl_username": SASL username (json-string, optional)
3250 Example:
3252 -> { "execute": "query-vnc" }
3253 <- {
3254 "return":{
3255 "enabled":true,
3256 "host":"0.0.0.0",
3257 "service":"50402",
3258 "auth":"vnc",
3259 "family":"ipv4",
3260 "clients":[
3262 "host":"127.0.0.1",
3263 "service":"50401",
3264 "family":"ipv4"
3270 EQMP
3273 .name = "query-vnc",
3274 .args_type = "",
3277 .name = "query-vnc-servers",
3278 .args_type = "",
3281 SQMP
3282 query-spice
3283 -----------
3285 Show SPICE server information.
3287 Return a json-object with server information. Connected clients are returned
3288 as a json-array of json-objects.
3290 The main json-object contains the following:
3292 - "enabled": true or false (json-bool)
3293 - "host": server's IP address (json-string)
3294 - "port": server's port number (json-int, optional)
3295 - "tls-port": server's port number (json-int, optional)
3296 - "auth": authentication method (json-string)
3297 - Possible values: "none", "spice"
3298 - "channels": a json-array of all active channels clients
3300 Channels are described by a json-object, each one contain the following:
3302 - "host": client's IP address (json-string)
3303 - "family": address family (json-string)
3304 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3305 - "port": client's port number (json-string)
3306 - "connection-id": spice connection id. All channels with the same id
3307 belong to the same spice session (json-int)
3308 - "channel-type": channel type. "1" is the main control channel, filter for
3309 this one if you want track spice sessions only (json-int)
3310 - "channel-id": channel id. Usually "0", might be different needed when
3311 multiple channels of the same type exist, such as multiple
3312 display channels in a multihead setup (json-int)
3313 - "tls": whether the channel is encrypted (json-bool)
3315 Example:
3317 -> { "execute": "query-spice" }
3318 <- {
3319 "return": {
3320 "enabled": true,
3321 "auth": "spice",
3322 "port": 5920,
3323 "tls-port": 5921,
3324 "host": "0.0.0.0",
3325 "channels": [
3327 "port": "54924",
3328 "family": "ipv4",
3329 "channel-type": 1,
3330 "connection-id": 1804289383,
3331 "host": "127.0.0.1",
3332 "channel-id": 0,
3333 "tls": true
3336 "port": "36710",
3337 "family": "ipv4",
3338 "channel-type": 4,
3339 "connection-id": 1804289383,
3340 "host": "127.0.0.1",
3341 "channel-id": 0,
3342 "tls": false
3344 [ ... more channels follow ... ]
3349 EQMP
3351 #if defined(CONFIG_SPICE)
3353 .name = "query-spice",
3354 .args_type = "",
3356 #endif
3358 SQMP
3359 query-name
3360 ----------
3362 Show VM name.
3364 Return a json-object with the following information:
3366 - "name": VM's name (json-string, optional)
3368 Example:
3370 -> { "execute": "query-name" }
3371 <- { "return": { "name": "qemu-name" } }
3373 EQMP
3376 .name = "query-name",
3377 .args_type = "",
3380 SQMP
3381 query-uuid
3382 ----------
3384 Show VM UUID.
3386 Return a json-object with the following information:
3388 - "UUID": Universally Unique Identifier (json-string)
3390 Example:
3392 -> { "execute": "query-uuid" }
3393 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
3395 EQMP
3398 .name = "query-uuid",
3399 .args_type = "",
3402 SQMP
3403 query-command-line-options
3404 --------------------------
3406 Show command line option schema.
3408 Return a json-array of command line option schema for all options (or for
3409 the given option), returning an error if the given option doesn't exist.
3411 Each array entry contains the following:
3413 - "option": option name (json-string)
3414 - "parameters": a json-array describes all parameters of the option:
3415 - "name": parameter name (json-string)
3416 - "type": parameter type (one of 'string', 'boolean', 'number',
3417 or 'size')
3418 - "help": human readable description of the parameter
3419 (json-string, optional)
3420 - "default": default value string for the parameter
3421 (json-string, optional)
3423 Example:
3425 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
3426 <- { "return": [
3428 "parameters": [
3430 "name": "romfile",
3431 "type": "string"
3434 "name": "bootindex",
3435 "type": "number"
3438 "option": "option-rom"
3443 EQMP
3446 .name = "query-command-line-options",
3447 .args_type = "option:s?",
3450 SQMP
3451 query-migrate
3452 -------------
3454 Migration status.
3456 Return a json-object. If migration is active there will be another json-object
3457 with RAM migration status and if block migration is active another one with
3458 block migration status.
3460 The main json-object contains the following:
3462 - "status": migration status (json-string)
3463 - Possible values: "setup", "active", "completed", "failed", "cancelled"
3464 - "total-time": total amount of ms since migration started. If
3465 migration has ended, it returns the total migration
3466 time (json-int)
3467 - "setup-time" amount of setup time in milliseconds _before_ the
3468 iterations begin but _after_ the QMP command is issued.
3469 This is designed to provide an accounting of any activities
3470 (such as RDMA pinning) which may be expensive, but do not
3471 actually occur during the iterative migration rounds
3472 themselves. (json-int)
3473 - "downtime": only present when migration has finished correctly
3474 total amount in ms for downtime that happened (json-int)
3475 - "expected-downtime": only present while migration is active
3476 total amount in ms for downtime that was calculated on
3477 the last bitmap round (json-int)
3478 - "ram": only present if "status" is "active", it is a json-object with the
3479 following RAM information:
3480 - "transferred": amount transferred in bytes (json-int)
3481 - "remaining": amount remaining to transfer in bytes (json-int)
3482 - "total": total amount of memory in bytes (json-int)
3483 - "duplicate": number of pages filled entirely with the same
3484 byte (json-int)
3485 These are sent over the wire much more efficiently.
3486 - "skipped": number of skipped zero pages (json-int)
3487 - "normal" : number of whole pages transferred. I.e. they
3488 were not sent as duplicate or xbzrle pages (json-int)
3489 - "normal-bytes" : number of bytes transferred in whole
3490 pages. This is just normal pages times size of one page,
3491 but this way upper levels don't need to care about page
3492 size (json-int)
3493 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
3494 - "disk": only present if "status" is "active" and it is a block migration,
3495 it is a json-object with the following disk information:
3496 - "transferred": amount transferred in bytes (json-int)
3497 - "remaining": amount remaining to transfer in bytes json-int)
3498 - "total": total disk size in bytes (json-int)
3499 - "xbzrle-cache": only present if XBZRLE is active.
3500 It is a json-object with the following XBZRLE information:
3501 - "cache-size": XBZRLE cache size in bytes
3502 - "bytes": number of bytes transferred for XBZRLE compressed pages
3503 - "pages": number of XBZRLE compressed pages
3504 - "cache-miss": number of XBRZRLE page cache misses
3505 - "cache-miss-rate": rate of XBRZRLE page cache misses
3506 - "overflow": number of times XBZRLE overflows. This means
3507 that the XBZRLE encoding was bigger than just sent the
3508 whole page, and then we sent the whole page instead (as as
3509 normal page).
3511 Examples:
3513 1. Before the first migration
3515 -> { "execute": "query-migrate" }
3516 <- { "return": {} }
3518 2. Migration is done and has succeeded
3520 -> { "execute": "query-migrate" }
3521 <- { "return": {
3522 "status": "completed",
3523 "ram":{
3524 "transferred":123,
3525 "remaining":123,
3526 "total":246,
3527 "total-time":12345,
3528 "setup-time":12345,
3529 "downtime":12345,
3530 "duplicate":123,
3531 "normal":123,
3532 "normal-bytes":123456,
3533 "dirty-sync-count":15
3538 3. Migration is done and has failed
3540 -> { "execute": "query-migrate" }
3541 <- { "return": { "status": "failed" } }
3543 4. Migration is being performed and is not a block migration:
3545 -> { "execute": "query-migrate" }
3546 <- {
3547 "return":{
3548 "status":"active",
3549 "ram":{
3550 "transferred":123,
3551 "remaining":123,
3552 "total":246,
3553 "total-time":12345,
3554 "setup-time":12345,
3555 "expected-downtime":12345,
3556 "duplicate":123,
3557 "normal":123,
3558 "normal-bytes":123456,
3559 "dirty-sync-count":15
3564 5. Migration is being performed and is a block migration:
3566 -> { "execute": "query-migrate" }
3567 <- {
3568 "return":{
3569 "status":"active",
3570 "ram":{
3571 "total":1057024,
3572 "remaining":1053304,
3573 "transferred":3720,
3574 "total-time":12345,
3575 "setup-time":12345,
3576 "expected-downtime":12345,
3577 "duplicate":123,
3578 "normal":123,
3579 "normal-bytes":123456,
3580 "dirty-sync-count":15
3582 "disk":{
3583 "total":20971520,
3584 "remaining":20880384,
3585 "transferred":91136
3590 6. Migration is being performed and XBZRLE is active:
3592 -> { "execute": "query-migrate" }
3593 <- {
3594 "return":{
3595 "status":"active",
3596 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
3597 "ram":{
3598 "total":1057024,
3599 "remaining":1053304,
3600 "transferred":3720,
3601 "total-time":12345,
3602 "setup-time":12345,
3603 "expected-downtime":12345,
3604 "duplicate":10,
3605 "normal":3333,
3606 "normal-bytes":3412992,
3607 "dirty-sync-count":15
3609 "xbzrle-cache":{
3610 "cache-size":67108864,
3611 "bytes":20971520,
3612 "pages":2444343,
3613 "cache-miss":2244,
3614 "cache-miss-rate":0.123,
3615 "overflow":34434
3620 EQMP
3623 .name = "query-migrate",
3624 .args_type = "",
3627 SQMP
3628 migrate-set-capabilities
3629 ------------------------
3631 Enable/Disable migration capabilities
3633 - "xbzrle": XBZRLE support
3634 - "rdma-pin-all": pin all pages when using RDMA during migration
3635 - "auto-converge": throttle down guest to help convergence of migration
3636 - "zero-blocks": compress zero blocks during block migration
3637 - "compress": use multiple compression threads to accelerate live migration
3638 - "events": generate events for each migration state change
3639 - "postcopy-ram": postcopy mode for live migration
3641 Arguments:
3643 Example:
3645 -> { "execute": "migrate-set-capabilities" , "arguments":
3646 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
3648 EQMP
3651 .name = "migrate-set-capabilities",
3652 .args_type = "capabilities:q",
3653 .params = "capability:s,state:b",
3655 SQMP
3656 query-migrate-capabilities
3657 --------------------------
3659 Query current migration capabilities
3661 - "capabilities": migration capabilities state
3662 - "xbzrle" : XBZRLE state (json-bool)
3663 - "rdma-pin-all" : RDMA Pin Page state (json-bool)
3664 - "auto-converge" : Auto Converge state (json-bool)
3665 - "zero-blocks" : Zero Blocks state (json-bool)
3666 - "compress": Multiple compression threads state (json-bool)
3667 - "events": Migration state change event state (json-bool)
3668 - "postcopy-ram": postcopy ram state (json-bool)
3670 Arguments:
3672 Example:
3674 -> { "execute": "query-migrate-capabilities" }
3675 <- {"return": [
3676 {"state": false, "capability": "xbzrle"},
3677 {"state": false, "capability": "rdma-pin-all"},
3678 {"state": false, "capability": "auto-converge"},
3679 {"state": false, "capability": "zero-blocks"},
3680 {"state": false, "capability": "compress"},
3681 {"state": true, "capability": "events"},
3682 {"state": false, "capability": "postcopy-ram"}
3685 EQMP
3688 .name = "query-migrate-capabilities",
3689 .args_type = "",
3692 SQMP
3693 migrate-set-parameters
3694 ----------------------
3696 Set migration parameters
3698 - "compress-level": set compression level during migration (json-int)
3699 - "compress-threads": set compression thread count for migration (json-int)
3700 - "decompress-threads": set decompression thread count for migration (json-int)
3701 - "cpu-throttle-initial": set initial percentage of time guest cpus are
3702 throttled for auto-converge (json-int)
3703 - "cpu-throttle-increment": set throttle increasing percentage for
3704 auto-converge (json-int)
3706 Arguments:
3708 Example:
3710 -> { "execute": "migrate-set-parameters" , "arguments":
3711 { "compress-level": 1 } }
3713 EQMP
3716 .name = "migrate-set-parameters",
3717 .args_type =
3718 "compress-level:i?,compress-threads:i?,decompress-threads:i?,cpu-throttle-initial:i?,cpu-throttle-increment:i?",
3720 SQMP
3721 query-migrate-parameters
3722 ------------------------
3724 Query current migration parameters
3726 - "parameters": migration parameters value
3727 - "compress-level" : compression level value (json-int)
3728 - "compress-threads" : compression thread count value (json-int)
3729 - "decompress-threads" : decompression thread count value (json-int)
3730 - "cpu-throttle-initial" : initial percentage of time guest cpus are
3731 throttled (json-int)
3732 - "cpu-throttle-increment" : throttle increasing percentage for
3733 auto-converge (json-int)
3735 Arguments:
3737 Example:
3739 -> { "execute": "query-migrate-parameters" }
3740 <- {
3741 "return": {
3742 "decompress-threads": 2,
3743 "cpu-throttle-increment": 10,
3744 "compress-threads": 8,
3745 "compress-level": 1,
3746 "cpu-throttle-initial": 20
3750 EQMP
3753 .name = "query-migrate-parameters",
3754 .args_type = "",
3757 SQMP
3758 query-balloon
3759 -------------
3761 Show balloon information.
3763 Make an asynchronous request for balloon info. When the request completes a
3764 json-object will be returned containing the following data:
3766 - "actual": current balloon value in bytes (json-int)
3768 Example:
3770 -> { "execute": "query-balloon" }
3771 <- {
3772 "return":{
3773 "actual":1073741824,
3777 EQMP
3780 .name = "query-balloon",
3781 .args_type = "",
3785 .name = "query-block-jobs",
3786 .args_type = "",
3790 .name = "qom-list",
3791 .args_type = "path:s",
3795 .name = "qom-set",
3796 .args_type = "path:s,property:s,value:q",
3800 .name = "qom-get",
3801 .args_type = "path:s,property:s",
3805 .name = "nbd-server-start",
3806 .args_type = "addr:q,tls-creds:s?",
3809 .name = "nbd-server-add",
3810 .args_type = "device:B,writable:b?",
3813 .name = "nbd-server-stop",
3814 .args_type = "",
3818 .name = "change-vnc-password",
3819 .args_type = "password:s",
3822 .name = "qom-list-types",
3823 .args_type = "implements:s?,abstract:b?",
3827 .name = "device-list-properties",
3828 .args_type = "typename:s",
3832 .name = "query-machines",
3833 .args_type = "",
3837 .name = "query-cpu-definitions",
3838 .args_type = "",
3842 .name = "query-cpu-model-expansion",
3843 .args_type = "type:s,model:q",
3847 .name = "query-cpu-model-comparison",
3848 .args_type = "modela:q,modelb:q",
3852 .name = "query-cpu-model-baseline",
3853 .args_type = "modela:q,modelb:q",
3857 .name = "query-target",
3858 .args_type = "",
3862 .name = "query-tpm",
3863 .args_type = "",
3866 SQMP
3867 query-tpm
3868 ---------
3870 Return information about the TPM device.
3872 Arguments: None
3874 Example:
3876 -> { "execute": "query-tpm" }
3877 <- { "return":
3879 { "model": "tpm-tis",
3880 "options":
3881 { "type": "passthrough",
3882 "data":
3883 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3884 "path": "/dev/tpm0"
3887 "id": "tpm0"
3892 EQMP
3895 .name = "query-tpm-models",
3896 .args_type = "",
3899 SQMP
3900 query-tpm-models
3901 ----------------
3903 Return a list of supported TPM models.
3905 Arguments: None
3907 Example:
3909 -> { "execute": "query-tpm-models" }
3910 <- { "return": [ "tpm-tis" ] }
3912 EQMP
3915 .name = "query-tpm-types",
3916 .args_type = "",
3919 SQMP
3920 query-tpm-types
3921 ---------------
3923 Return a list of supported TPM types.
3925 Arguments: None
3927 Example:
3929 -> { "execute": "query-tpm-types" }
3930 <- { "return": [ "passthrough" ] }
3932 EQMP
3935 .name = "chardev-add",
3936 .args_type = "id:s,backend:q",
3939 SQMP
3940 chardev-add
3941 ----------------
3943 Add a chardev.
3945 Arguments:
3947 - "id": the chardev's ID, must be unique (json-string)
3948 - "backend": chardev backend type + parameters
3950 Examples:
3952 -> { "execute" : "chardev-add",
3953 "arguments" : { "id" : "foo",
3954 "backend" : { "type" : "null", "data" : {} } } }
3955 <- { "return": {} }
3957 -> { "execute" : "chardev-add",
3958 "arguments" : { "id" : "bar",
3959 "backend" : { "type" : "file",
3960 "data" : { "out" : "/tmp/bar.log" } } } }
3961 <- { "return": {} }
3963 -> { "execute" : "chardev-add",
3964 "arguments" : { "id" : "baz",
3965 "backend" : { "type" : "pty", "data" : {} } } }
3966 <- { "return": { "pty" : "/dev/pty/42" } }
3968 EQMP
3971 .name = "chardev-remove",
3972 .args_type = "id:s",
3976 SQMP
3977 chardev-remove
3978 --------------
3980 Remove a chardev.
3982 Arguments:
3984 - "id": the chardev's ID, must exist and not be in use (json-string)
3986 Example:
3988 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3989 <- { "return": {} }
3991 EQMP
3993 .name = "query-rx-filter",
3994 .args_type = "name:s?",
3997 SQMP
3998 query-rx-filter
3999 ---------------
4001 Show rx-filter information.
4003 Returns a json-array of rx-filter information for all NICs (or for the
4004 given NIC), returning an error if the given NIC doesn't exist, or
4005 given NIC doesn't support rx-filter querying, or given net client
4006 isn't a NIC.
4008 The query will clear the event notification flag of each NIC, then qemu
4009 will start to emit event to QMP monitor.
4011 Each array entry contains the following:
4013 - "name": net client name (json-string)
4014 - "promiscuous": promiscuous mode is enabled (json-bool)
4015 - "multicast": multicast receive state (one of 'normal', 'none', 'all')
4016 - "unicast": unicast receive state (one of 'normal', 'none', 'all')
4017 - "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
4018 - "broadcast-allowed": allow to receive broadcast (json-bool)
4019 - "multicast-overflow": multicast table is overflowed (json-bool)
4020 - "unicast-overflow": unicast table is overflowed (json-bool)
4021 - "main-mac": main macaddr string (json-string)
4022 - "vlan-table": a json-array of active vlan id
4023 - "unicast-table": a json-array of unicast macaddr string
4024 - "multicast-table": a json-array of multicast macaddr string
4026 Example:
4028 -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
4029 <- { "return": [
4031 "promiscuous": true,
4032 "name": "vnet0",
4033 "main-mac": "52:54:00:12:34:56",
4034 "unicast": "normal",
4035 "vlan": "normal",
4036 "vlan-table": [
4040 "unicast-table": [
4042 "multicast": "normal",
4043 "multicast-overflow": false,
4044 "unicast-overflow": false,
4045 "multicast-table": [
4046 "01:00:5e:00:00:01",
4047 "33:33:00:00:00:01",
4048 "33:33:ff:12:34:56"
4050 "broadcast-allowed": false
4055 EQMP
4058 .name = "blockdev-add",
4059 .args_type = "options:q",
4062 SQMP
4063 blockdev-add
4064 ------------
4066 Add a block device.
4068 This command is still a work in progress. It doesn't support all
4069 block drivers among other things. Stay away from it unless you want
4070 to help with its development.
4072 Arguments:
4074 - "options": block driver options
4076 Example (1):
4078 -> { "execute": "blockdev-add",
4079 "arguments": { "options" : { "driver": "qcow2",
4080 "file": { "driver": "file",
4081 "filename": "test.qcow2" } } } }
4082 <- { "return": {} }
4084 Example (2):
4086 -> { "execute": "blockdev-add",
4087 "arguments": {
4088 "options": {
4089 "driver": "qcow2",
4090 "id": "my_disk",
4091 "discard": "unmap",
4092 "cache": {
4093 "direct": true,
4094 "writeback": true
4096 "file": {
4097 "driver": "file",
4098 "filename": "/tmp/test.qcow2"
4100 "backing": {
4101 "driver": "raw",
4102 "file": {
4103 "driver": "file",
4104 "filename": "/dev/fdset/4"
4111 <- { "return": {} }
4113 EQMP
4116 .name = "x-blockdev-del",
4117 .args_type = "id:s?,node-name:s?",
4120 SQMP
4121 x-blockdev-del
4122 ------------
4123 Since 2.5
4125 Deletes a block device thas has been added using blockdev-add.
4126 The selected device can be either a block backend or a graph node.
4128 In the former case the backend will be destroyed, along with its
4129 inserted medium if there's any. The command will fail if the backend
4130 or its medium are in use.
4132 In the latter case the node will be destroyed. The command will fail
4133 if the node is attached to a block backend or is otherwise being
4134 used.
4136 One of "id" or "node-name" must be specified, but not both.
4138 This command is still a work in progress and is considered
4139 experimental. Stay away from it unless you want to help with its
4140 development.
4142 Arguments:
4144 - "id": Name of the block backend device to delete (json-string, optional)
4145 - "node-name": Name of the graph node to delete (json-string, optional)
4147 Example:
4149 -> { "execute": "blockdev-add",
4150 "arguments": {
4151 "options": {
4152 "driver": "qcow2",
4153 "id": "drive0",
4154 "file": {
4155 "driver": "file",
4156 "filename": "test.qcow2"
4162 <- { "return": {} }
4164 -> { "execute": "x-blockdev-del",
4165 "arguments": { "id": "drive0" }
4167 <- { "return": {} }
4169 EQMP
4172 .name = "blockdev-open-tray",
4173 .args_type = "device:s,force:b?",
4176 SQMP
4177 blockdev-open-tray
4178 ------------------
4180 Opens a block device's tray. If there is a block driver state tree inserted as a
4181 medium, it will become inaccessible to the guest (but it will remain associated
4182 to the block device, so closing the tray will make it accessible again).
4184 If the tray was already open before, this will be a no-op.
4186 Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in
4187 which no such event will be generated, these include:
4188 - if the guest has locked the tray, @force is false and the guest does not
4189 respond to the eject request
4190 - if the BlockBackend denoted by @device does not have a guest device attached
4191 to it
4192 - if the guest device does not have an actual tray and is empty, for instance
4193 for floppy disk drives
4195 Arguments:
4197 - "device": block device name (json-string)
4198 - "force": if false (the default), an eject request will be sent to the guest if
4199 it has locked the tray (and the tray will not be opened immediately);
4200 if true, the tray will be opened regardless of whether it is locked
4201 (json-bool, optional)
4203 Example:
4205 -> { "execute": "blockdev-open-tray",
4206 "arguments": { "device": "ide1-cd0" } }
4208 <- { "timestamp": { "seconds": 1418751016,
4209 "microseconds": 716996 },
4210 "event": "DEVICE_TRAY_MOVED",
4211 "data": { "device": "ide1-cd0",
4212 "tray-open": true } }
4214 <- { "return": {} }
4216 EQMP
4219 .name = "blockdev-close-tray",
4220 .args_type = "device:s",
4223 SQMP
4224 blockdev-close-tray
4225 -------------------
4227 Closes a block device's tray. If there is a block driver state tree associated
4228 with the block device (which is currently ejected), that tree will be loaded as
4229 the medium.
4231 If the tray was already closed before, this will be a no-op.
4233 Arguments:
4235 - "device": block device name (json-string)
4237 Example:
4239 -> { "execute": "blockdev-close-tray",
4240 "arguments": { "device": "ide1-cd0" } }
4242 <- { "timestamp": { "seconds": 1418751345,
4243 "microseconds": 272147 },
4244 "event": "DEVICE_TRAY_MOVED",
4245 "data": { "device": "ide1-cd0",
4246 "tray-open": false } }
4248 <- { "return": {} }
4250 EQMP
4253 .name = "x-blockdev-remove-medium",
4254 .args_type = "device:s",
4257 SQMP
4258 x-blockdev-remove-medium
4259 ------------------------
4261 Removes a medium (a block driver state tree) from a block device. That block
4262 device's tray must currently be open (unless there is no attached guest device).
4264 If the tray is open and there is no medium inserted, this will be a no-op.
4266 This command is still a work in progress and is considered experimental.
4267 Stay away from it unless you want to help with its development.
4269 Arguments:
4271 - "device": block device name (json-string)
4273 Example:
4275 -> { "execute": "x-blockdev-remove-medium",
4276 "arguments": { "device": "ide1-cd0" } }
4278 <- { "error": { "class": "GenericError",
4279 "desc": "Tray of device 'ide1-cd0' is not open" } }
4281 -> { "execute": "blockdev-open-tray",
4282 "arguments": { "device": "ide1-cd0" } }
4284 <- { "timestamp": { "seconds": 1418751627,
4285 "microseconds": 549958 },
4286 "event": "DEVICE_TRAY_MOVED",
4287 "data": { "device": "ide1-cd0",
4288 "tray-open": true } }
4290 <- { "return": {} }
4292 -> { "execute": "x-blockdev-remove-medium",
4293 "arguments": { "device": "ide1-cd0" } }
4295 <- { "return": {} }
4297 EQMP
4300 .name = "x-blockdev-insert-medium",
4301 .args_type = "device:s,node-name:s",
4304 SQMP
4305 x-blockdev-insert-medium
4306 ------------------------
4308 Inserts a medium (a block driver state tree) into a block device. That block
4309 device's tray must currently be open (unless there is no attached guest device)
4310 and there must be no medium inserted already.
4312 This command is still a work in progress and is considered experimental.
4313 Stay away from it unless you want to help with its development.
4315 Arguments:
4317 - "device": block device name (json-string)
4318 - "node-name": root node of the BDS tree to insert into the block device
4320 Example:
4322 -> { "execute": "blockdev-add",
4323 "arguments": { "options": { "node-name": "node0",
4324 "driver": "raw",
4325 "file": { "driver": "file",
4326 "filename": "fedora.iso" } } } }
4328 <- { "return": {} }
4330 -> { "execute": "x-blockdev-insert-medium",
4331 "arguments": { "device": "ide1-cd0",
4332 "node-name": "node0" } }
4334 <- { "return": {} }
4336 EQMP
4339 .name = "x-blockdev-change",
4340 .args_type = "parent:B,child:B?,node:B?",
4343 SQMP
4344 x-blockdev-change
4345 -----------------
4347 Dynamically reconfigure the block driver state graph. It can be used
4348 to add, remove, insert or replace a graph node. Currently only the
4349 Quorum driver implements this feature to add or remove its child. This
4350 is useful to fix a broken quorum child.
4352 If @node is specified, it will be inserted under @parent. @child
4353 may not be specified in this case. If both @parent and @child are
4354 specified but @node is not, @child will be detached from @parent.
4356 Arguments:
4357 - "parent": the id or name of the parent node (json-string)
4358 - "child": the name of a child under the given parent node (json-string, optional)
4359 - "node": the name of the node that will be added (json-string, optional)
4361 Note: this command is experimental, and not a stable API. It doesn't
4362 support all kinds of operations, all kinds of children, nor all block
4363 drivers.
4365 Warning: The data in a new quorum child MUST be consistent with that of
4366 the rest of the array.
4368 Example:
4370 Add a new node to a quorum
4371 -> { "execute": "blockdev-add",
4372 "arguments": { "options": { "driver": "raw",
4373 "node-name": "new_node",
4374 "file": { "driver": "file",
4375 "filename": "test.raw" } } } }
4376 <- { "return": {} }
4377 -> { "execute": "x-blockdev-change",
4378 "arguments": { "parent": "disk1",
4379 "node": "new_node" } }
4380 <- { "return": {} }
4382 Delete a quorum's node
4383 -> { "execute": "x-blockdev-change",
4384 "arguments": { "parent": "disk1",
4385 "child": "children.1" } }
4386 <- { "return": {} }
4388 EQMP
4391 .name = "query-named-block-nodes",
4392 .args_type = "",
4395 SQMP
4396 @query-named-block-nodes
4397 ------------------------
4399 Return a list of BlockDeviceInfo for all the named block driver nodes
4401 Example:
4403 -> { "execute": "query-named-block-nodes" }
4404 <- { "return": [ { "ro":false,
4405 "drv":"qcow2",
4406 "encrypted":false,
4407 "file":"disks/test.qcow2",
4408 "node-name": "my-node",
4409 "backing_file_depth":1,
4410 "bps":1000000,
4411 "bps_rd":0,
4412 "bps_wr":0,
4413 "iops":1000000,
4414 "iops_rd":0,
4415 "iops_wr":0,
4416 "bps_max": 8000000,
4417 "bps_rd_max": 0,
4418 "bps_wr_max": 0,
4419 "iops_max": 0,
4420 "iops_rd_max": 0,
4421 "iops_wr_max": 0,
4422 "iops_size": 0,
4423 "write_threshold": 0,
4424 "image":{
4425 "filename":"disks/test.qcow2",
4426 "format":"qcow2",
4427 "virtual-size":2048000,
4428 "backing_file":"base.qcow2",
4429 "full-backing-filename":"disks/base.qcow2",
4430 "backing-filename-format":"qcow2",
4431 "snapshots":[
4433 "id": "1",
4434 "name": "snapshot1",
4435 "vm-state-size": 0,
4436 "date-sec": 10000200,
4437 "date-nsec": 12,
4438 "vm-clock-sec": 206,
4439 "vm-clock-nsec": 30
4442 "backing-image":{
4443 "filename":"disks/base.qcow2",
4444 "format":"qcow2",
4445 "virtual-size":2048000
4447 } } ] }
4449 EQMP
4452 .name = "blockdev-change-medium",
4453 .args_type = "device:B,filename:F,format:s?,read-only-mode:s?",
4456 SQMP
4457 blockdev-change-medium
4458 ----------------------
4460 Changes the medium inserted into a block device by ejecting the current medium
4461 and loading a new image file which is inserted as the new medium.
4463 Arguments:
4465 - "device": device name (json-string)
4466 - "filename": filename of the new image (json-string)
4467 - "format": format of the new image (json-string, optional)
4468 - "read-only-mode": new read-only mode (json-string, optional)
4469 - Possible values: "retain" (default), "read-only", "read-write"
4471 Examples:
4473 1. Change a removable medium
4475 -> { "execute": "blockdev-change-medium",
4476 "arguments": { "device": "ide1-cd0",
4477 "filename": "/srv/images/Fedora-12-x86_64-DVD.iso",
4478 "format": "raw" } }
4479 <- { "return": {} }
4481 2. Load a read-only medium into a writable drive
4483 -> { "execute": "blockdev-change-medium",
4484 "arguments": { "device": "isa-fd0",
4485 "filename": "/srv/images/ro.img",
4486 "format": "raw",
4487 "read-only-mode": "retain" } }
4489 <- { "error":
4490 { "class": "GenericError",
4491 "desc": "Could not open '/srv/images/ro.img': Permission denied" } }
4493 -> { "execute": "blockdev-change-medium",
4494 "arguments": { "device": "isa-fd0",
4495 "filename": "/srv/images/ro.img",
4496 "format": "raw",
4497 "read-only-mode": "read-only" } }
4499 <- { "return": {} }
4501 EQMP
4504 .name = "query-memdev",
4505 .args_type = "",
4508 SQMP
4509 query-memdev
4510 ------------
4512 Show memory devices information.
4515 Example (1):
4517 -> { "execute": "query-memdev" }
4518 <- { "return": [
4520 "size": 536870912,
4521 "merge": false,
4522 "dump": true,
4523 "prealloc": false,
4524 "host-nodes": [0, 1],
4525 "policy": "bind"
4528 "size": 536870912,
4529 "merge": false,
4530 "dump": true,
4531 "prealloc": true,
4532 "host-nodes": [2, 3],
4533 "policy": "preferred"
4538 EQMP
4541 .name = "query-memory-devices",
4542 .args_type = "",
4545 SQMP
4546 @query-memory-devices
4547 --------------------
4549 Return a list of memory devices.
4551 Example:
4552 -> { "execute": "query-memory-devices" }
4553 <- { "return": [ { "data":
4554 { "addr": 5368709120,
4555 "hotpluggable": true,
4556 "hotplugged": true,
4557 "id": "d1",
4558 "memdev": "/objects/memX",
4559 "node": 0,
4560 "size": 1073741824,
4561 "slot": 0},
4562 "type": "dimm"
4563 } ] }
4564 EQMP
4567 .name = "query-acpi-ospm-status",
4568 .args_type = "",
4571 SQMP
4572 @query-acpi-ospm-status
4573 --------------------
4575 Return list of ACPIOSTInfo for devices that support status reporting
4576 via ACPI _OST method.
4578 Example:
4579 -> { "execute": "query-acpi-ospm-status" }
4580 <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
4581 { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
4582 { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
4583 { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
4585 EQMP
4587 #if defined TARGET_I386
4589 .name = "rtc-reset-reinjection",
4590 .args_type = "",
4592 #endif
4594 SQMP
4595 rtc-reset-reinjection
4596 ---------------------
4598 Reset the RTC interrupt reinjection backlog.
4600 Arguments: None.
4602 Example:
4604 -> { "execute": "rtc-reset-reinjection" }
4605 <- { "return": {} }
4606 EQMP
4609 .name = "trace-event-get-state",
4610 .args_type = "name:s,vcpu:i?",
4613 SQMP
4614 trace-event-get-state
4615 ---------------------
4617 Query the state of events.
4619 Arguments:
4621 - "name": Event name pattern (json-string).
4622 - "vcpu": The vCPU to query, any vCPU by default (json-int, optional).
4624 An event is returned if:
4625 - its name matches the "name" pattern, and
4626 - if "vcpu" is given, the event has the "vcpu" property.
4628 Therefore, if "vcpu" is given, the operation will only match per-vCPU events,
4629 returning their state on the specified vCPU. Special case: if "name" is an exact
4630 match, "vcpu" is given and the event does not have the "vcpu" property, an error
4631 is returned.
4633 Example:
4635 -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
4636 <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
4637 EQMP
4640 .name = "trace-event-set-state",
4641 .args_type = "name:s,enable:b,ignore-unavailable:b?,vcpu:i?",
4644 SQMP
4645 trace-event-set-state
4646 ---------------------
4648 Set the state of events.
4650 Arguments:
4652 - "name": Event name pattern (json-string).
4653 - "enable": Whether to enable or disable the event (json-bool).
4654 - "ignore-unavailable": Whether to ignore errors for events that cannot be
4655 changed (json-bool, optional).
4656 - "vcpu": The vCPU to act upon, all vCPUs by default (json-int, optional).
4658 An event's state is modified if:
4659 - its name matches the "name" pattern, and
4660 - if "vcpu" is given, the event has the "vcpu" property.
4662 Therefore, if "vcpu" is given, the operation will only match per-vCPU events,
4663 setting their state on the specified vCPU. Special case: if "name" is an exact
4664 match, "vcpu" is given and the event does not have the "vcpu" property, an error
4665 is returned.
4667 Example:
4669 -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
4670 <- { "return": {} }
4671 EQMP
4674 .name = "input-send-event",
4675 .args_type = "console:i?,events:q",
4678 SQMP
4679 @input-send-event
4680 -----------------
4682 Send input event to guest.
4684 Arguments:
4686 - "device": display device (json-string, optional)
4687 - "head": display head (json-int, optional)
4688 - "events": list of input events
4690 The consoles are visible in the qom tree, under
4691 /backend/console[$index]. They have a device link and head property, so
4692 it is possible to map which console belongs to which device and display.
4694 Example (1):
4696 Press left mouse button.
4698 -> { "execute": "input-send-event",
4699 "arguments": { "device": "video0",
4700 "events": [ { "type": "btn",
4701 "data" : { "down": true, "button": "left" } } ] } }
4702 <- { "return": {} }
4704 -> { "execute": "input-send-event",
4705 "arguments": { "device": "video0",
4706 "events": [ { "type": "btn",
4707 "data" : { "down": false, "button": "left" } } ] } }
4708 <- { "return": {} }
4710 Example (2):
4712 Press ctrl-alt-del.
4714 -> { "execute": "input-send-event",
4715 "arguments": { "events": [
4716 { "type": "key", "data" : { "down": true,
4717 "key": {"type": "qcode", "data": "ctrl" } } },
4718 { "type": "key", "data" : { "down": true,
4719 "key": {"type": "qcode", "data": "alt" } } },
4720 { "type": "key", "data" : { "down": true,
4721 "key": {"type": "qcode", "data": "delete" } } } ] } }
4722 <- { "return": {} }
4724 Example (3):
4726 Move mouse pointer to absolute coordinates (20000, 400).
4728 -> { "execute": "input-send-event" ,
4729 "arguments": { "events": [
4730 { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
4731 { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
4732 <- { "return": {} }
4734 EQMP
4737 .name = "block-set-write-threshold",
4738 .args_type = "node-name:s,write-threshold:l",
4741 SQMP
4742 block-set-write-threshold
4743 ------------
4745 Change the write threshold for a block drive. The threshold is an offset,
4746 thus must be non-negative. Default is no write threshold.
4747 Setting the threshold to zero disables it.
4749 Arguments:
4751 - "node-name": the node name in the block driver state graph (json-string)
4752 - "write-threshold": the write threshold in bytes (json-int)
4754 Example:
4756 -> { "execute": "block-set-write-threshold",
4757 "arguments": { "node-name": "mydev",
4758 "write-threshold": 17179869184 } }
4759 <- { "return": {} }
4761 EQMP
4764 .name = "query-rocker",
4765 .args_type = "name:s",
4768 SQMP
4769 Show rocker switch
4770 ------------------
4772 Arguments:
4774 - "name": switch name
4776 Example:
4778 -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
4779 <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
4781 EQMP
4784 .name = "query-rocker-ports",
4785 .args_type = "name:s",
4788 SQMP
4789 Show rocker switch ports
4790 ------------------------
4792 Arguments:
4794 - "name": switch name
4796 Example:
4798 -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
4799 <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
4800 "autoneg": "off", "link-up": true, "speed": 10000},
4801 {"duplex": "full", "enabled": true, "name": "sw1.2",
4802 "autoneg": "off", "link-up": true, "speed": 10000}
4805 EQMP
4808 .name = "query-rocker-of-dpa-flows",
4809 .args_type = "name:s,tbl-id:i?",
4812 SQMP
4813 Show rocker switch OF-DPA flow tables
4814 -------------------------------------
4816 Arguments:
4818 - "name": switch name
4819 - "tbl-id": (optional) flow table ID
4821 Example:
4823 -> { "execute": "query-rocker-of-dpa-flows", "arguments": { "name": "sw1" } }
4824 <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
4825 "hits": 138,
4826 "cookie": 0,
4827 "action": {"goto-tbl": 10},
4828 "mask": {"in-pport": 4294901760}
4830 {...more...},
4833 EQMP
4836 .name = "query-rocker-of-dpa-groups",
4837 .args_type = "name:s,type:i?",
4840 SQMP
4841 Show rocker OF-DPA group tables
4842 -------------------------------
4844 Arguments:
4846 - "name": switch name
4847 - "type": (optional) group type
4849 Example:
4851 -> { "execute": "query-rocker-of-dpa-groups", "arguments": { "name": "sw1" } }
4852 <- { "return": [ {"type": 0, "out-pport": 2, "pport": 2, "vlan-id": 3841,
4853 "pop-vlan": 1, "id": 251723778},
4854 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3841,
4855 "pop-vlan": 1, "id": 251723776},
4856 {"type": 0, "out-pport": 1, "pport": 1, "vlan-id": 3840,
4857 "pop-vlan": 1, "id": 251658241},
4858 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840,
4859 "pop-vlan": 1, "id": 251658240}
4862 EQMP
4864 #if defined TARGET_ARM
4866 .name = "query-gic-capabilities",
4867 .args_type = "",
4869 #endif
4871 SQMP
4872 query-gic-capabilities
4873 ---------------
4875 Return a list of GICCapability objects, describing supported GIC
4876 (Generic Interrupt Controller) versions.
4878 Arguments: None
4880 Example:
4882 -> { "execute": "query-gic-capabilities" }
4883 <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
4884 { "version": 3, "emulated": false, "kernel": true } ] }
4886 EQMP
4889 .name = "query-hotpluggable-cpus",
4890 .args_type = "",
4893 SQMP
4894 Show existing/possible CPUs
4895 ---------------------------
4897 Arguments: None.
4899 Example for pseries machine type started with
4900 -smp 2,cores=2,maxcpus=4 -cpu POWER8:
4902 -> { "execute": "query-hotpluggable-cpus" }
4903 <- {"return": [
4904 { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
4905 "vcpus-count": 1 },
4906 { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
4907 "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
4910 Example for pc machine type started with
4911 -smp 1,maxcpus=2:
4912 -> { "execute": "query-hotpluggable-cpus" }
4913 <- {"return": [
4915 "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
4916 "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
4919 "qom-path": "/machine/unattached/device[0]",
4920 "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
4921 "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}