dump-guest-memory: add qmp event DUMP_COMPLETED
[qemu/ar7.git] / qmp-commands.hx
blobdaaafe5aefa65635629f460926cd55b0eebbacb1
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 = "",
66 .mhandler.cmd_new = qmp_marshal_quit,
69 SQMP
70 quit
71 ----
73 Quit the emulator.
75 Arguments: None.
77 Example:
79 -> { "execute": "quit" }
80 <- { "return": {} }
82 EQMP
85 .name = "eject",
86 .args_type = "force:-f,device:B",
87 .mhandler.cmd_new = qmp_marshal_eject,
90 SQMP
91 eject
92 -----
94 Eject a removable medium.
96 Arguments:
98 - force: force ejection (json-bool, optional)
99 - device: device name (json-string)
101 Example:
103 -> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
104 <- { "return": {} }
106 Note: The "force" argument defaults to false.
108 EQMP
111 .name = "change",
112 .args_type = "device:B,target:F,arg:s?",
113 .mhandler.cmd_new = qmp_marshal_change,
116 SQMP
117 change
118 ------
120 Change a removable medium or VNC configuration.
122 Arguments:
124 - "device": device name (json-string)
125 - "target": filename or item (json-string)
126 - "arg": additional argument (json-string, optional)
128 Examples:
130 1. Change a removable medium
132 -> { "execute": "change",
133 "arguments": { "device": "ide1-cd0",
134 "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
135 <- { "return": {} }
137 2. Change VNC password
139 -> { "execute": "change",
140 "arguments": { "device": "vnc", "target": "password",
141 "arg": "foobar1" } }
142 <- { "return": {} }
144 EQMP
147 .name = "screendump",
148 .args_type = "filename:F",
149 .mhandler.cmd_new = qmp_marshal_screendump,
152 SQMP
153 screendump
154 ----------
156 Save screen into PPM image.
158 Arguments:
160 - "filename": file path (json-string)
162 Example:
164 -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
165 <- { "return": {} }
167 EQMP
170 .name = "stop",
171 .args_type = "",
172 .mhandler.cmd_new = qmp_marshal_stop,
175 SQMP
176 stop
177 ----
179 Stop the emulator.
181 Arguments: None.
183 Example:
185 -> { "execute": "stop" }
186 <- { "return": {} }
188 EQMP
191 .name = "cont",
192 .args_type = "",
193 .mhandler.cmd_new = qmp_marshal_cont,
196 SQMP
197 cont
198 ----
200 Resume emulation.
202 Arguments: None.
204 Example:
206 -> { "execute": "cont" }
207 <- { "return": {} }
209 EQMP
212 .name = "system_wakeup",
213 .args_type = "",
214 .mhandler.cmd_new = qmp_marshal_system_wakeup,
217 SQMP
218 system_wakeup
219 -------------
221 Wakeup guest from suspend.
223 Arguments: None.
225 Example:
227 -> { "execute": "system_wakeup" }
228 <- { "return": {} }
230 EQMP
233 .name = "system_reset",
234 .args_type = "",
235 .mhandler.cmd_new = qmp_marshal_system_reset,
238 SQMP
239 system_reset
240 ------------
242 Reset the system.
244 Arguments: None.
246 Example:
248 -> { "execute": "system_reset" }
249 <- { "return": {} }
251 EQMP
254 .name = "system_powerdown",
255 .args_type = "",
256 .mhandler.cmd_new = qmp_marshal_system_powerdown,
259 SQMP
260 system_powerdown
261 ----------------
263 Send system power down event.
265 Arguments: None.
267 Example:
269 -> { "execute": "system_powerdown" }
270 <- { "return": {} }
272 EQMP
275 .name = "device_add",
276 .args_type = "device:O",
277 .params = "driver[,prop=value][,...]",
278 .help = "add device, like -device on the command line",
279 .mhandler.cmd_new = qmp_device_add,
282 SQMP
283 device_add
284 ----------
286 Add a device.
288 Arguments:
290 - "driver": the name of the new device's driver (json-string)
291 - "bus": the device's parent bus (device tree path, json-string, optional)
292 - "id": the device's ID, must be unique (json-string)
293 - device properties
295 Example:
297 -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
298 <- { "return": {} }
300 Notes:
302 (1) For detailed information about this command, please refer to the
303 'docs/qdev-device-use.txt' file.
305 (2) It's possible to list device properties by running QEMU with the
306 "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
308 EQMP
311 .name = "device_del",
312 .args_type = "id:s",
313 .mhandler.cmd_new = qmp_marshal_device_del,
316 SQMP
317 device_del
318 ----------
320 Remove a device.
322 Arguments:
324 - "id": the device's ID or QOM path (json-string)
326 Example:
328 -> { "execute": "device_del", "arguments": { "id": "net1" } }
329 <- { "return": {} }
331 Example:
333 -> { "execute": "device_del", "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
334 <- { "return": {} }
336 EQMP
339 .name = "send-key",
340 .args_type = "keys:q,hold-time:i?",
341 .mhandler.cmd_new = qmp_marshal_send_key,
344 SQMP
345 send-key
346 ----------
348 Send keys to VM.
350 Arguments:
352 keys array:
353 - "key": key sequence (a json-array of key union values,
354 union can be number or qcode enum)
356 - hold-time: time to delay key up events, milliseconds. Defaults to 100
357 (json-int, optional)
359 Example:
361 -> { "execute": "send-key",
362 "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
363 { "type": "qcode", "data": "alt" },
364 { "type": "qcode", "data": "delete" } ] } }
365 <- { "return": {} }
367 EQMP
370 .name = "cpu",
371 .args_type = "index:i",
372 .mhandler.cmd_new = qmp_marshal_cpu,
375 SQMP
379 Set the default CPU.
381 Arguments:
383 - "index": the CPU's index (json-int)
385 Example:
387 -> { "execute": "cpu", "arguments": { "index": 0 } }
388 <- { "return": {} }
390 Note: CPUs' indexes are obtained with the 'query-cpus' command.
392 EQMP
395 .name = "cpu-add",
396 .args_type = "id:i",
397 .mhandler.cmd_new = qmp_marshal_cpu_add,
400 SQMP
401 cpu-add
402 -------
404 Adds virtual cpu
406 Arguments:
408 - "id": cpu id (json-int)
410 Example:
412 -> { "execute": "cpu-add", "arguments": { "id": 2 } }
413 <- { "return": {} }
415 EQMP
418 .name = "memsave",
419 .args_type = "val:l,size:i,filename:s,cpu:i?",
420 .mhandler.cmd_new = qmp_marshal_memsave,
423 SQMP
424 memsave
425 -------
427 Save to disk virtual memory dump starting at 'val' of size 'size'.
429 Arguments:
431 - "val": the starting address (json-int)
432 - "size": the memory size, in bytes (json-int)
433 - "filename": file path (json-string)
434 - "cpu": virtual CPU index (json-int, optional)
436 Example:
438 -> { "execute": "memsave",
439 "arguments": { "val": 10,
440 "size": 100,
441 "filename": "/tmp/virtual-mem-dump" } }
442 <- { "return": {} }
444 EQMP
447 .name = "pmemsave",
448 .args_type = "val:l,size:i,filename:s",
449 .mhandler.cmd_new = qmp_marshal_pmemsave,
452 SQMP
453 pmemsave
454 --------
456 Save to disk physical memory dump starting at 'val' of size 'size'.
458 Arguments:
460 - "val": the starting address (json-int)
461 - "size": the memory size, in bytes (json-int)
462 - "filename": file path (json-string)
464 Example:
466 -> { "execute": "pmemsave",
467 "arguments": { "val": 10,
468 "size": 100,
469 "filename": "/tmp/physical-mem-dump" } }
470 <- { "return": {} }
472 EQMP
475 .name = "inject-nmi",
476 .args_type = "",
477 .mhandler.cmd_new = qmp_marshal_inject_nmi,
480 SQMP
481 inject-nmi
482 ----------
484 Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
486 Arguments: None.
488 Example:
490 -> { "execute": "inject-nmi" }
491 <- { "return": {} }
493 Note: inject-nmi fails when the guest doesn't support injecting.
495 EQMP
498 .name = "ringbuf-write",
499 .args_type = "device:s,data:s,format:s?",
500 .mhandler.cmd_new = qmp_marshal_ringbuf_write,
503 SQMP
504 ringbuf-write
505 -------------
507 Write to a ring buffer character device.
509 Arguments:
511 - "device": ring buffer character device name (json-string)
512 - "data": data to write (json-string)
513 - "format": data format (json-string, optional)
514 - Possible values: "utf8" (default), "base64"
516 Example:
518 -> { "execute": "ringbuf-write",
519 "arguments": { "device": "foo",
520 "data": "abcdefgh",
521 "format": "utf8" } }
522 <- { "return": {} }
524 EQMP
527 .name = "ringbuf-read",
528 .args_type = "device:s,size:i,format:s?",
529 .mhandler.cmd_new = qmp_marshal_ringbuf_read,
532 SQMP
533 ringbuf-read
534 -------------
536 Read from a ring buffer character device.
538 Arguments:
540 - "device": ring buffer character device name (json-string)
541 - "size": how many bytes to read at most (json-int)
542 - Number of data bytes, not number of characters in encoded data
543 - "format": data format (json-string, optional)
544 - Possible values: "utf8" (default), "base64"
545 - Naturally, format "utf8" works only when the ring buffer
546 contains valid UTF-8 text. Invalid UTF-8 sequences get
547 replaced. Bug: replacement doesn't work. Bug: can screw
548 up on encountering NUL characters, after the ring buffer
549 lost data, and when reading stops because the size limit
550 is reached.
552 Example:
554 -> { "execute": "ringbuf-read",
555 "arguments": { "device": "foo",
556 "size": 1000,
557 "format": "utf8" } }
558 <- {"return": "abcdefgh"}
560 EQMP
563 .name = "xen-save-devices-state",
564 .args_type = "filename:F",
565 .mhandler.cmd_new = qmp_marshal_xen_save_devices_state,
568 SQMP
569 xen-save-devices-state
570 -------
572 Save the state of all devices to file. The RAM and the block devices
573 of the VM are not saved by this command.
575 Arguments:
577 - "filename": the file to save the state of the devices to as binary
578 data. See xen-save-devices-state.txt for a description of the binary
579 format.
581 Example:
583 -> { "execute": "xen-save-devices-state",
584 "arguments": { "filename": "/tmp/save" } }
585 <- { "return": {} }
587 EQMP
590 .name = "xen-set-global-dirty-log",
591 .args_type = "enable:b",
592 .mhandler.cmd_new = qmp_marshal_xen_set_global_dirty_log,
595 SQMP
596 xen-set-global-dirty-log
597 -------
599 Enable or disable the global dirty log mode.
601 Arguments:
603 - "enable": Enable it or disable it.
605 Example:
607 -> { "execute": "xen-set-global-dirty-log",
608 "arguments": { "enable": true } }
609 <- { "return": {} }
611 EQMP
614 .name = "migrate",
615 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
616 .mhandler.cmd_new = qmp_marshal_migrate,
619 SQMP
620 migrate
621 -------
623 Migrate to URI.
625 Arguments:
627 - "blk": block migration, full disk copy (json-bool, optional)
628 - "inc": incremental disk copy (json-bool, optional)
629 - "uri": Destination URI (json-string)
631 Example:
633 -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
634 <- { "return": {} }
636 Notes:
638 (1) The 'query-migrate' command should be used to check migration's progress
639 and final result (this information is provided by the 'status' member)
640 (2) All boolean arguments default to false
641 (3) The user Monitor's "detach" argument is invalid in QMP and should not
642 be used
644 EQMP
647 .name = "migrate_cancel",
648 .args_type = "",
649 .mhandler.cmd_new = qmp_marshal_migrate_cancel,
652 SQMP
653 migrate_cancel
654 --------------
656 Cancel the current migration.
658 Arguments: None.
660 Example:
662 -> { "execute": "migrate_cancel" }
663 <- { "return": {} }
665 EQMP
668 .name = "migrate-incoming",
669 .args_type = "uri:s",
670 .mhandler.cmd_new = qmp_marshal_migrate_incoming,
673 SQMP
674 migrate-incoming
675 ----------------
677 Continue an incoming migration
679 Arguments:
681 - "uri": Source/listening URI (json-string)
683 Example:
685 -> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } }
686 <- { "return": {} }
688 Notes:
690 (1) QEMU must be started with -incoming defer to allow migrate-incoming to
691 be used
692 (2) The uri format is the same as for -incoming
694 EQMP
696 .name = "migrate-set-cache-size",
697 .args_type = "value:o",
698 .mhandler.cmd_new = qmp_marshal_migrate_set_cache_size,
701 SQMP
702 migrate-set-cache-size
703 ----------------------
705 Set cache size to be used by XBZRLE migration, the cache size will be rounded
706 down to the nearest power of 2
708 Arguments:
710 - "value": cache size in bytes (json-int)
712 Example:
714 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
715 <- { "return": {} }
717 EQMP
719 .name = "migrate-start-postcopy",
720 .args_type = "",
721 .mhandler.cmd_new = qmp_marshal_migrate_start_postcopy,
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 = "",
740 .mhandler.cmd_new = qmp_marshal_query_migrate_cache_size,
743 SQMP
744 query-migrate-cache-size
745 ------------------------
747 Show cache size to be used by XBZRLE migration
749 returns a json-object with the following information:
750 - "size" : json-int
752 Example:
754 -> { "execute": "query-migrate-cache-size" }
755 <- { "return": 67108864 }
757 EQMP
760 .name = "migrate_set_speed",
761 .args_type = "value:o",
762 .mhandler.cmd_new = qmp_marshal_migrate_set_speed,
765 SQMP
766 migrate_set_speed
767 -----------------
769 Set maximum speed for migrations.
771 Arguments:
773 - "value": maximum speed, in bytes per second (json-int)
775 Example:
777 -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
778 <- { "return": {} }
780 EQMP
783 .name = "migrate_set_downtime",
784 .args_type = "value:T",
785 .mhandler.cmd_new = qmp_marshal_migrate_set_downtime,
788 SQMP
789 migrate_set_downtime
790 --------------------
792 Set maximum tolerated downtime (in seconds) for migrations.
794 Arguments:
796 - "value": maximum downtime (json-number)
798 Example:
800 -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
801 <- { "return": {} }
803 EQMP
806 .name = "client_migrate_info",
807 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
808 .params = "protocol hostname port tls-port cert-subject",
809 .help = "set migration information for remote display",
810 .mhandler.cmd_new = qmp_marshal_client_migrate_info,
813 SQMP
814 client_migrate_info
815 -------------------
817 Set migration information for remote display. This makes the server
818 ask the client to automatically reconnect using the new parameters
819 once migration finished successfully. Only implemented for SPICE.
821 Arguments:
823 - "protocol": must be "spice" (json-string)
824 - "hostname": migration target hostname (json-string)
825 - "port": spice tcp port for plaintext channels (json-int, optional)
826 - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
827 - "cert-subject": server certificate subject (json-string, optional)
829 Example:
831 -> { "execute": "client_migrate_info",
832 "arguments": { "protocol": "spice",
833 "hostname": "virt42.lab.kraxel.org",
834 "port": 1234 } }
835 <- { "return": {} }
837 EQMP
840 .name = "dump-guest-memory",
841 .args_type = "paging:b,protocol:s,detach:b?,begin:i?,end:i?,format:s?",
842 .params = "-p protocol [-d] [begin] [length] [format]",
843 .help = "dump guest memory to file",
844 .mhandler.cmd_new = qmp_marshal_dump_guest_memory,
847 SQMP
848 dump
851 Dump guest memory to file. The file can be processed with crash or gdb.
853 Arguments:
855 - "paging": do paging to get guest's memory mapping (json-bool)
856 - "protocol": destination file(started with "file:") or destination file
857 descriptor (started with "fd:") (json-string)
858 - "detach": if specified, command will return immediately, without waiting
859 for the dump to finish. The user can track progress using
860 "query-dump". (json-bool)
861 - "begin": the starting physical address. It's optional, and should be specified
862 with length together (json-int)
863 - "length": the memory size, in bytes. It's optional, and should be specified
864 with begin together (json-int)
865 - "format": the format of guest memory dump. It's optional, and can be
866 elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
867 conflict with paging and filter, ie. begin and length (json-string)
869 Example:
871 -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
872 <- { "return": {} }
874 Notes:
876 (1) All boolean arguments default to false
878 EQMP
881 .name = "query-dump-guest-memory-capability",
882 .args_type = "",
883 .mhandler.cmd_new = qmp_marshal_query_dump_guest_memory_capability,
886 SQMP
887 query-dump-guest-memory-capability
888 ----------
890 Show available formats for 'dump-guest-memory'
892 Example:
894 -> { "execute": "query-dump-guest-memory-capability" }
895 <- { "return": { "formats":
896 ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
898 EQMP
901 .name = "query-dump",
902 .args_type = "",
903 .params = "",
904 .help = "query background dump status",
905 .mhandler.cmd_new = qmp_marshal_query_dump,
908 SQMP
909 query-dump
910 ----------
912 Query background dump status.
914 Arguments: None.
916 Example:
918 -> { "execute": "query-dump" }
919 <- { "return": { "status": "active", "completed": 1024000,
920 "total": 2048000 } }
922 EQMP
924 #if defined TARGET_S390X
926 .name = "dump-skeys",
927 .args_type = "filename:F",
928 .mhandler.cmd_new = qmp_marshal_dump_skeys,
930 #endif
932 SQMP
933 dump-skeys
934 ----------
936 Save guest storage keys to file.
938 Arguments:
940 - "filename": file path (json-string)
942 Example:
944 -> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } }
945 <- { "return": {} }
947 EQMP
950 .name = "netdev_add",
951 .args_type = "netdev:O",
952 .mhandler.cmd_new = qmp_netdev_add,
955 SQMP
956 netdev_add
957 ----------
959 Add host network device.
961 Arguments:
963 - "type": the device type, "tap", "user", ... (json-string)
964 - "id": the device's ID, must be unique (json-string)
965 - device options
967 Example:
969 -> { "execute": "netdev_add",
970 "arguments": { "type": "user", "id": "netdev1",
971 "dnssearch": "example.org" } }
972 <- { "return": {} }
974 Note: The supported device options are the same ones supported by the '-netdev'
975 command-line argument, which are listed in the '-help' output or QEMU's
976 manual
978 EQMP
981 .name = "netdev_del",
982 .args_type = "id:s",
983 .mhandler.cmd_new = qmp_marshal_netdev_del,
986 SQMP
987 netdev_del
988 ----------
990 Remove host network device.
992 Arguments:
994 - "id": the device's ID, must be unique (json-string)
996 Example:
998 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
999 <- { "return": {} }
1002 EQMP
1005 .name = "object-add",
1006 .args_type = "qom-type:s,id:s,props:q?",
1007 .mhandler.cmd_new = qmp_marshal_object_add,
1010 SQMP
1011 object-add
1012 ----------
1014 Create QOM object.
1016 Arguments:
1018 - "qom-type": the object's QOM type, i.e. the class name (json-string)
1019 - "id": the object's ID, must be unique (json-string)
1020 - "props": a dictionary of object property values (optional, json-dict)
1022 Example:
1024 -> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
1025 "props": { "filename": "/dev/hwrng" } } }
1026 <- { "return": {} }
1028 EQMP
1031 .name = "object-del",
1032 .args_type = "id:s",
1033 .mhandler.cmd_new = qmp_marshal_object_del,
1036 SQMP
1037 object-del
1038 ----------
1040 Remove QOM object.
1042 Arguments:
1044 - "id": the object's ID (json-string)
1046 Example:
1048 -> { "execute": "object-del", "arguments": { "id": "rng1" } }
1049 <- { "return": {} }
1052 EQMP
1056 .name = "block_resize",
1057 .args_type = "device:s?,node-name:s?,size:o",
1058 .mhandler.cmd_new = qmp_marshal_block_resize,
1061 SQMP
1062 block_resize
1063 ------------
1065 Resize a block image while a guest is running.
1067 Arguments:
1069 - "device": the device's ID, must be unique (json-string)
1070 - "node-name": the node name in the block driver state graph (json-string)
1071 - "size": new size
1073 Example:
1075 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1076 <- { "return": {} }
1078 EQMP
1081 .name = "block-stream",
1082 .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
1083 .mhandler.cmd_new = qmp_marshal_block_stream,
1086 SQMP
1087 block-stream
1088 ------------
1090 Copy data from a backing file into a block device.
1092 Arguments:
1094 - "device": The device's ID, must be unique (json-string)
1095 - "base": The file name of the backing image above which copying starts
1096 (json-string, optional)
1097 - "backing-file": The backing file string to write into the active layer. This
1098 filename is not validated.
1100 If a pathname string is such that it cannot be resolved by
1101 QEMU, that means that subsequent QMP or HMP commands must use
1102 node-names for the image in question, as filename lookup
1103 methods will fail.
1105 If not specified, QEMU will automatically determine the
1106 backing file string to use, or error out if there is no
1107 obvious choice. Care should be taken when specifying the
1108 string, to specify a valid filename or protocol.
1109 (json-string, optional) (Since 2.1)
1110 - "speed": the maximum speed, in bytes per second (json-int, optional)
1111 - "on-error": the action to take on an error (default 'report'). 'stop' and
1112 'enospc' can only be used if the block device supports io-status.
1113 (json-string, optional) (Since 2.1)
1115 Example:
1117 -> { "execute": "block-stream", "arguments": { "device": "virtio0",
1118 "base": "/tmp/master.qcow2" } }
1119 <- { "return": {} }
1121 EQMP
1124 .name = "block-commit",
1125 .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
1126 .mhandler.cmd_new = qmp_marshal_block_commit,
1129 SQMP
1130 block-commit
1131 ------------
1133 Live commit of data from overlay image nodes into backing nodes - i.e., writes
1134 data between 'top' and 'base' into 'base'.
1136 Arguments:
1138 - "device": The device's ID, must be unique (json-string)
1139 - "base": The file name of the backing image to write data into.
1140 If not specified, this is the deepest backing image
1141 (json-string, optional)
1142 - "top": The file name of the backing image within the image chain,
1143 which contains the topmost data to be committed down. If
1144 not specified, this is the active layer. (json-string, optional)
1146 - backing-file: The backing file string to write into the overlay
1147 image of 'top'. If 'top' is the active layer,
1148 specifying a backing file string is an error. This
1149 filename is not validated.
1151 If a pathname string is such that it cannot be
1152 resolved by QEMU, that means that subsequent QMP or
1153 HMP commands must use node-names for the image in
1154 question, as filename lookup methods will fail.
1156 If not specified, QEMU will automatically determine
1157 the backing file string to use, or error out if
1158 there is no obvious choice. Care should be taken
1159 when specifying the string, to specify a valid
1160 filename or protocol.
1161 (json-string, optional) (Since 2.1)
1163 If top == base, that is an error.
1164 If top == active, the job will not be completed by itself,
1165 user needs to complete the job with the block-job-complete
1166 command after getting the ready event. (Since 2.0)
1168 If the base image is smaller than top, then the base image
1169 will be resized to be the same size as top. If top is
1170 smaller than the base image, the base will not be
1171 truncated. If you want the base image size to match the
1172 size of the smaller top, you can safely truncate it
1173 yourself once the commit operation successfully completes.
1174 (json-string)
1175 - "speed": the maximum speed, in bytes per second (json-int, optional)
1178 Example:
1180 -> { "execute": "block-commit", "arguments": { "device": "virtio0",
1181 "top": "/tmp/snap1.qcow2" } }
1182 <- { "return": {} }
1184 EQMP
1187 .name = "drive-backup",
1188 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1189 "bitmap:s?,on-source-error:s?,on-target-error:s?",
1190 .mhandler.cmd_new = qmp_marshal_drive_backup,
1193 SQMP
1194 drive-backup
1195 ------------
1197 Start a point-in-time copy of a block device to a new destination. The
1198 status of ongoing drive-backup operations can be checked with
1199 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1200 The operation can be stopped before it has completed using the
1201 block-job-cancel command.
1203 Arguments:
1205 - "device": the name of the device which should be copied.
1206 (json-string)
1207 - "target": the target of the new image. If the file exists, or if it is a
1208 device, the existing file/device will be used as the new
1209 destination. If it does not exist, a new file will be created.
1210 (json-string)
1211 - "format": the format of the new destination, default is to probe if 'mode' is
1212 'existing', else the format of the source
1213 (json-string, optional)
1214 - "sync": what parts of the disk image should be copied to the destination;
1215 possibilities include "full" for all the disk, "top" for only the sectors
1216 allocated in the topmost image, "incremental" for only the dirty sectors in
1217 the bitmap, or "none" to only replicate new I/O (MirrorSyncMode).
1218 - "bitmap": dirty bitmap name for sync==incremental. Must be present if sync
1219 is "incremental", must NOT be present otherwise.
1220 - "mode": whether and how QEMU should create a new image
1221 (NewImageMode, optional, default 'absolute-paths')
1222 - "speed": the maximum speed, in bytes per second (json-int, optional)
1223 - "on-source-error": the action to take on an error on the source, default
1224 'report'. 'stop' and 'enospc' can only be used
1225 if the block device supports io-status.
1226 (BlockdevOnError, optional)
1227 - "on-target-error": the action to take on an error on the target, default
1228 'report' (no limitations, since this applies to
1229 a different block device than device).
1230 (BlockdevOnError, optional)
1232 Example:
1233 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
1234 "sync": "full",
1235 "target": "backup.img" } }
1236 <- { "return": {} }
1238 EQMP
1241 .name = "blockdev-backup",
1242 .args_type = "sync:s,device:B,target:B,speed:i?,"
1243 "on-source-error:s?,on-target-error:s?",
1244 .mhandler.cmd_new = qmp_marshal_blockdev_backup,
1247 SQMP
1248 blockdev-backup
1249 ---------------
1251 The device version of drive-backup: this command takes an existing named device
1252 as backup target.
1254 Arguments:
1256 - "device": the name of the device which should be copied.
1257 (json-string)
1258 - "target": the name of the backup target device. (json-string)
1259 - "sync": what parts of the disk image should be copied to the destination;
1260 possibilities include "full" for all the disk, "top" for only the
1261 sectors allocated in the topmost image, or "none" to only replicate
1262 new I/O (MirrorSyncMode).
1263 - "speed": the maximum speed, in bytes per second (json-int, optional)
1264 - "on-source-error": the action to take on an error on the source, default
1265 'report'. 'stop' and 'enospc' can only be used
1266 if the block device supports io-status.
1267 (BlockdevOnError, optional)
1268 - "on-target-error": the action to take on an error on the target, default
1269 'report' (no limitations, since this applies to
1270 a different block device than device).
1271 (BlockdevOnError, optional)
1273 Example:
1274 -> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
1275 "sync": "full",
1276 "target": "tgt-id" } }
1277 <- { "return": {} }
1279 EQMP
1282 .name = "block-job-set-speed",
1283 .args_type = "device:B,speed:o",
1284 .mhandler.cmd_new = qmp_marshal_block_job_set_speed,
1288 .name = "block-job-cancel",
1289 .args_type = "device:B,force:b?",
1290 .mhandler.cmd_new = qmp_marshal_block_job_cancel,
1293 .name = "block-job-pause",
1294 .args_type = "device:B",
1295 .mhandler.cmd_new = qmp_marshal_block_job_pause,
1298 .name = "block-job-resume",
1299 .args_type = "device:B",
1300 .mhandler.cmd_new = qmp_marshal_block_job_resume,
1303 .name = "block-job-complete",
1304 .args_type = "device:B",
1305 .mhandler.cmd_new = qmp_marshal_block_job_complete,
1308 .name = "transaction",
1309 .args_type = "actions:q,properties:q?",
1310 .mhandler.cmd_new = qmp_marshal_transaction,
1313 SQMP
1314 transaction
1315 -----------
1317 Atomically operate on one or more block devices. Operations that are
1318 currently supported:
1320 - drive-backup
1321 - blockdev-backup
1322 - blockdev-snapshot-sync
1323 - blockdev-snapshot-internal-sync
1324 - abort
1325 - block-dirty-bitmap-add
1326 - block-dirty-bitmap-clear
1328 Refer to the qemu/qapi-schema.json file for minimum required QEMU
1329 versions for these operations. A list of dictionaries is accepted,
1330 that contains the actions to be performed. If there is any failure
1331 performing any of the operations, all operations for the group are
1332 abandoned.
1334 For external snapshots, the dictionary contains the device, the file to use for
1335 the new snapshot, and the format. The default format, if not specified, is
1336 qcow2.
1338 Each new snapshot defaults to being created by QEMU (wiping any
1339 contents if the file already exists), but it is also possible to reuse
1340 an externally-created file. In the latter case, you should ensure that
1341 the new image file has the same contents as the current one; QEMU cannot
1342 perform any meaningful check. Typically this is achieved by using the
1343 current image file as the backing file for the new image.
1345 On failure, the original disks pre-snapshot attempt will be used.
1347 For internal snapshots, the dictionary contains the device and the snapshot's
1348 name. If an internal snapshot matching name already exists, the request will
1349 be rejected. Only some image formats support it, for example, qcow2, rbd,
1350 and sheepdog.
1352 On failure, qemu will try delete the newly created internal snapshot in the
1353 transaction. When an I/O error occurs during deletion, the user needs to fix
1354 it later with qemu-img or other command.
1356 Arguments:
1358 actions array:
1359 - "type": the operation to perform (json-string). Possible
1360 values: "drive-backup", "blockdev-backup",
1361 "blockdev-snapshot-sync",
1362 "blockdev-snapshot-internal-sync",
1363 "abort", "block-dirty-bitmap-add",
1364 "block-dirty-bitmap-clear"
1365 - "data": a dictionary. The contents depend on the value
1366 of "type". When "type" is "blockdev-snapshot-sync":
1367 - "device": device name to snapshot (json-string)
1368 - "node-name": graph node name to snapshot (json-string)
1369 - "snapshot-file": name of new image file (json-string)
1370 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1371 - "format": format of new image (json-string, optional)
1372 - "mode": whether and how QEMU should create the snapshot file
1373 (NewImageMode, optional, default "absolute-paths")
1374 When "type" is "blockdev-snapshot-internal-sync":
1375 - "device": device name to snapshot (json-string)
1376 - "name": name of the new snapshot (json-string)
1378 Example:
1380 -> { "execute": "transaction",
1381 "arguments": { "actions": [
1382 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
1383 "snapshot-file": "/some/place/my-image",
1384 "format": "qcow2" } },
1385 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
1386 "snapshot-file": "/some/place/my-image2",
1387 "snapshot-node-name": "node3432",
1388 "mode": "existing",
1389 "format": "qcow2" } },
1390 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
1391 "snapshot-file": "/some/place/my-image2",
1392 "mode": "existing",
1393 "format": "qcow2" } },
1394 { "type": "blockdev-snapshot-internal-sync", "data" : {
1395 "device": "ide-hd2",
1396 "name": "snapshot0" } } ] } }
1397 <- { "return": {} }
1399 EQMP
1402 .name = "block-dirty-bitmap-add",
1403 .args_type = "node:B,name:s,granularity:i?",
1404 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_add,
1407 SQMP
1409 block-dirty-bitmap-add
1410 ----------------------
1411 Since 2.4
1413 Create a dirty bitmap with a name on the device, and start tracking the writes.
1415 Arguments:
1417 - "node": device/node on which to create dirty bitmap (json-string)
1418 - "name": name of the new dirty bitmap (json-string)
1419 - "granularity": granularity to track writes with (int, optional)
1421 Example:
1423 -> { "execute": "block-dirty-bitmap-add", "arguments": { "node": "drive0",
1424 "name": "bitmap0" } }
1425 <- { "return": {} }
1427 EQMP
1430 .name = "block-dirty-bitmap-remove",
1431 .args_type = "node:B,name:s",
1432 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_remove,
1435 SQMP
1437 block-dirty-bitmap-remove
1438 -------------------------
1439 Since 2.4
1441 Stop write tracking and remove the dirty bitmap that was created with
1442 block-dirty-bitmap-add.
1444 Arguments:
1446 - "node": device/node on which to remove dirty bitmap (json-string)
1447 - "name": name of the dirty bitmap to remove (json-string)
1449 Example:
1451 -> { "execute": "block-dirty-bitmap-remove", "arguments": { "node": "drive0",
1452 "name": "bitmap0" } }
1453 <- { "return": {} }
1455 EQMP
1458 .name = "block-dirty-bitmap-clear",
1459 .args_type = "node:B,name:s",
1460 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_clear,
1463 SQMP
1465 block-dirty-bitmap-clear
1466 ------------------------
1467 Since 2.4
1469 Reset the dirty bitmap associated with a node so that an incremental backup
1470 from this point in time forward will only backup clusters modified after this
1471 clear operation.
1473 Arguments:
1475 - "node": device/node on which to remove dirty bitmap (json-string)
1476 - "name": name of the dirty bitmap to remove (json-string)
1478 Example:
1480 -> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0",
1481 "name": "bitmap0" } }
1482 <- { "return": {} }
1484 EQMP
1487 .name = "blockdev-snapshot-sync",
1488 .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
1489 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot_sync,
1492 SQMP
1493 blockdev-snapshot-sync
1494 ----------------------
1496 Synchronous snapshot of a block device. snapshot-file specifies the
1497 target of the new image. If the file exists, or if it is a device, the
1498 snapshot will be created in the existing file/device. If does not
1499 exist, a new file will be created. format specifies the format of the
1500 snapshot image, default is qcow2.
1502 Arguments:
1504 - "device": device name to snapshot (json-string)
1505 - "node-name": graph node name to snapshot (json-string)
1506 - "snapshot-file": name of new image file (json-string)
1507 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1508 - "mode": whether and how QEMU should create the snapshot file
1509 (NewImageMode, optional, default "absolute-paths")
1510 - "format": format of new image (json-string, optional)
1512 Example:
1514 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1515 "snapshot-file":
1516 "/some/place/my-image",
1517 "format": "qcow2" } }
1518 <- { "return": {} }
1520 EQMP
1523 .name = "blockdev-snapshot",
1524 .args_type = "node:s,overlay:s",
1525 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot,
1528 SQMP
1529 blockdev-snapshot
1530 -----------------
1531 Since 2.5
1533 Create a snapshot, by installing 'node' as the backing image of
1534 'overlay'. Additionally, if 'node' is associated with a block
1535 device, the block device changes to using 'overlay' as its new active
1536 image.
1538 Arguments:
1540 - "node": device that will have a snapshot created (json-string)
1541 - "overlay": device that will have 'node' as its backing image (json-string)
1543 Example:
1545 -> { "execute": "blockdev-add",
1546 "arguments": { "options": { "driver": "qcow2",
1547 "node-name": "node1534",
1548 "file": { "driver": "file",
1549 "filename": "hd1.qcow2" },
1550 "backing": "" } } }
1552 <- { "return": {} }
1554 -> { "execute": "blockdev-snapshot", "arguments": { "node": "ide-hd0",
1555 "overlay": "node1534" } }
1556 <- { "return": {} }
1558 EQMP
1561 .name = "blockdev-snapshot-internal-sync",
1562 .args_type = "device:B,name:s",
1563 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot_internal_sync,
1566 SQMP
1567 blockdev-snapshot-internal-sync
1568 -------------------------------
1570 Synchronously take an internal snapshot of a block device when the format of
1571 image used supports it. If the name is an empty string, or a snapshot with
1572 name already exists, the operation will fail.
1574 Arguments:
1576 - "device": device name to snapshot (json-string)
1577 - "name": name of the new snapshot (json-string)
1579 Example:
1581 -> { "execute": "blockdev-snapshot-internal-sync",
1582 "arguments": { "device": "ide-hd0",
1583 "name": "snapshot0" }
1585 <- { "return": {} }
1587 EQMP
1590 .name = "blockdev-snapshot-delete-internal-sync",
1591 .args_type = "device:B,id:s?,name:s?",
1592 .mhandler.cmd_new =
1593 qmp_marshal_blockdev_snapshot_delete_internal_sync,
1596 SQMP
1597 blockdev-snapshot-delete-internal-sync
1598 --------------------------------------
1600 Synchronously delete an internal snapshot of a block device when the format of
1601 image used supports it. The snapshot is identified by name or id or both. One
1602 of name or id is required. If the snapshot is not found, the operation will
1603 fail.
1605 Arguments:
1607 - "device": device name (json-string)
1608 - "id": ID of the snapshot (json-string, optional)
1609 - "name": name of the snapshot (json-string, optional)
1611 Example:
1613 -> { "execute": "blockdev-snapshot-delete-internal-sync",
1614 "arguments": { "device": "ide-hd0",
1615 "name": "snapshot0" }
1617 <- { "return": {
1618 "id": "1",
1619 "name": "snapshot0",
1620 "vm-state-size": 0,
1621 "date-sec": 1000012,
1622 "date-nsec": 10,
1623 "vm-clock-sec": 100,
1624 "vm-clock-nsec": 20
1628 EQMP
1631 .name = "drive-mirror",
1632 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1633 "node-name:s?,replaces:s?,"
1634 "on-source-error:s?,on-target-error:s?,"
1635 "unmap:b?,"
1636 "granularity:i?,buf-size:i?",
1637 .mhandler.cmd_new = qmp_marshal_drive_mirror,
1640 SQMP
1641 drive-mirror
1642 ------------
1644 Start mirroring a block device's writes to a new destination. target
1645 specifies the target of the new image. If the file exists, or if it is
1646 a device, it will be used as the new destination for writes. If it does not
1647 exist, a new file will be created. format specifies the format of the
1648 mirror image, default is to probe if mode='existing', else the format
1649 of the source.
1651 Arguments:
1653 - "device": device name to operate on (json-string)
1654 - "target": name of new image file (json-string)
1655 - "format": format of new image (json-string, optional)
1656 - "node-name": the name of the new block driver state in the node graph
1657 (json-string, optional)
1658 - "replaces": the block driver node name to replace when finished
1659 (json-string, optional)
1660 - "mode": how an image file should be created into the target
1661 file/device (NewImageMode, optional, default 'absolute-paths')
1662 - "speed": maximum speed of the streaming job, in bytes per second
1663 (json-int)
1664 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1665 - "buf-size": maximum amount of data in flight from source to target, in bytes
1666 (json-int, default 10M)
1667 - "sync": what parts of the disk image should be copied to the destination;
1668 possibilities include "full" for all the disk, "top" for only the sectors
1669 allocated in the topmost image, or "none" to only replicate new I/O
1670 (MirrorSyncMode).
1671 - "on-source-error": the action to take on an error on the source
1672 (BlockdevOnError, default 'report')
1673 - "on-target-error": the action to take on an error on the target
1674 (BlockdevOnError, default 'report')
1675 - "unmap": whether the target sectors should be discarded where source has only
1676 zeroes. (json-bool, optional, default true)
1678 The default value of the granularity is the image cluster size clamped
1679 between 4096 and 65536, if the image format defines one. If the format
1680 does not define a cluster size, the default value of the granularity
1681 is 65536.
1684 Example:
1686 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1687 "target": "/some/place/my-image",
1688 "sync": "full",
1689 "format": "qcow2" } }
1690 <- { "return": {} }
1692 EQMP
1695 .name = "blockdev-mirror",
1696 .args_type = "sync:s,device:B,target:B,replaces:s?,speed:i?,"
1697 "on-source-error:s?,on-target-error:s?,"
1698 "granularity:i?,buf-size:i?",
1699 .mhandler.cmd_new = qmp_marshal_blockdev_mirror,
1702 SQMP
1703 blockdev-mirror
1704 ------------
1706 Start mirroring a block device's writes to another block device. target
1707 specifies the target of mirror operation.
1709 Arguments:
1711 - "device": device name to operate on (json-string)
1712 - "target": device name to mirror to (json-string)
1713 - "replaces": the block driver node name to replace when finished
1714 (json-string, optional)
1715 - "speed": maximum speed of the streaming job, in bytes per second
1716 (json-int)
1717 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1718 - "buf_size": maximum amount of data in flight from source to target, in bytes
1719 (json-int, default 10M)
1720 - "sync": what parts of the disk image should be copied to the destination;
1721 possibilities include "full" for all the disk, "top" for only the sectors
1722 allocated in the topmost image, or "none" to only replicate new I/O
1723 (MirrorSyncMode).
1724 - "on-source-error": the action to take on an error on the source
1725 (BlockdevOnError, default 'report')
1726 - "on-target-error": the action to take on an error on the target
1727 (BlockdevOnError, default 'report')
1729 The default value of the granularity is the image cluster size clamped
1730 between 4096 and 65536, if the image format defines one. If the format
1731 does not define a cluster size, the default value of the granularity
1732 is 65536.
1734 Example:
1736 -> { "execute": "blockdev-mirror", "arguments": { "device": "ide-hd0",
1737 "target": "target0",
1738 "sync": "full" } }
1739 <- { "return": {} }
1741 EQMP
1743 .name = "change-backing-file",
1744 .args_type = "device:s,image-node-name:s,backing-file:s",
1745 .mhandler.cmd_new = qmp_marshal_change_backing_file,
1748 SQMP
1749 change-backing-file
1750 -------------------
1751 Since: 2.1
1753 Change the backing file in the image file metadata. This does not cause
1754 QEMU to reopen the image file to reparse the backing filename (it may,
1755 however, perform a reopen to change permissions from r/o -> r/w -> r/o,
1756 if needed). The new backing file string is written into the image file
1757 metadata, and the QEMU internal strings are updated.
1759 Arguments:
1761 - "image-node-name": The name of the block driver state node of the
1762 image to modify. The "device" is argument is used to
1763 verify "image-node-name" is in the chain described by
1764 "device".
1765 (json-string, optional)
1767 - "device": The name of the device.
1768 (json-string)
1770 - "backing-file": The string to write as the backing file. This string is
1771 not validated, so care should be taken when specifying
1772 the string or the image chain may not be able to be
1773 reopened again.
1774 (json-string)
1776 Returns: Nothing on success
1777 If "device" does not exist or cannot be determined, DeviceNotFound
1779 EQMP
1782 .name = "balloon",
1783 .args_type = "value:M",
1784 .mhandler.cmd_new = qmp_marshal_balloon,
1787 SQMP
1788 balloon
1789 -------
1791 Request VM to change its memory allocation (in bytes).
1793 Arguments:
1795 - "value": New memory allocation (json-int)
1797 Example:
1799 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1800 <- { "return": {} }
1802 EQMP
1805 .name = "set_link",
1806 .args_type = "name:s,up:b",
1807 .mhandler.cmd_new = qmp_marshal_set_link,
1810 SQMP
1811 set_link
1812 --------
1814 Change the link status of a network adapter.
1816 Arguments:
1818 - "name": network device name (json-string)
1819 - "up": status is up (json-bool)
1821 Example:
1823 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1824 <- { "return": {} }
1826 EQMP
1829 .name = "getfd",
1830 .args_type = "fdname:s",
1831 .params = "getfd name",
1832 .help = "receive a file descriptor via SCM rights and assign it a name",
1833 .mhandler.cmd_new = qmp_marshal_getfd,
1836 SQMP
1837 getfd
1838 -----
1840 Receive a file descriptor via SCM rights and assign it a name.
1842 Arguments:
1844 - "fdname": file descriptor name (json-string)
1846 Example:
1848 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1849 <- { "return": {} }
1851 Notes:
1853 (1) If the name specified by the "fdname" argument already exists,
1854 the file descriptor assigned to it will be closed and replaced
1855 by the received file descriptor.
1856 (2) The 'closefd' command can be used to explicitly close the file
1857 descriptor when it is no longer needed.
1859 EQMP
1862 .name = "closefd",
1863 .args_type = "fdname:s",
1864 .params = "closefd name",
1865 .help = "close a file descriptor previously passed via SCM rights",
1866 .mhandler.cmd_new = qmp_marshal_closefd,
1869 SQMP
1870 closefd
1871 -------
1873 Close a file descriptor previously passed via SCM rights.
1875 Arguments:
1877 - "fdname": file descriptor name (json-string)
1879 Example:
1881 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1882 <- { "return": {} }
1884 EQMP
1887 .name = "add-fd",
1888 .args_type = "fdset-id:i?,opaque:s?",
1889 .params = "add-fd fdset-id opaque",
1890 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1891 .mhandler.cmd_new = qmp_marshal_add_fd,
1894 SQMP
1895 add-fd
1896 -------
1898 Add a file descriptor, that was passed via SCM rights, to an fd set.
1900 Arguments:
1902 - "fdset-id": The ID of the fd set to add the file descriptor to.
1903 (json-int, optional)
1904 - "opaque": A free-form string that can be used to describe the fd.
1905 (json-string, optional)
1907 Return a json-object with the following information:
1909 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1910 - "fd": The file descriptor that was received via SCM rights and added to the
1911 fd set. (json-int)
1913 Example:
1915 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1916 <- { "return": { "fdset-id": 1, "fd": 3 } }
1918 Notes:
1920 (1) The list of fd sets is shared by all monitor connections.
1921 (2) If "fdset-id" is not specified, a new fd set will be created.
1923 EQMP
1926 .name = "remove-fd",
1927 .args_type = "fdset-id:i,fd:i?",
1928 .params = "remove-fd fdset-id fd",
1929 .help = "Remove a file descriptor from an fd set",
1930 .mhandler.cmd_new = qmp_marshal_remove_fd,
1933 SQMP
1934 remove-fd
1935 ---------
1937 Remove a file descriptor from an fd set.
1939 Arguments:
1941 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1942 (json-int)
1943 - "fd": The file descriptor that is to be removed. (json-int, optional)
1945 Example:
1947 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1948 <- { "return": {} }
1950 Notes:
1952 (1) The list of fd sets is shared by all monitor connections.
1953 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1954 removed.
1956 EQMP
1959 .name = "query-fdsets",
1960 .args_type = "",
1961 .help = "Return information describing all fd sets",
1962 .mhandler.cmd_new = qmp_marshal_query_fdsets,
1965 SQMP
1966 query-fdsets
1967 -------------
1969 Return information describing all fd sets.
1971 Arguments: None
1973 Example:
1975 -> { "execute": "query-fdsets" }
1976 <- { "return": [
1978 "fds": [
1980 "fd": 30,
1981 "opaque": "rdonly:/path/to/file"
1984 "fd": 24,
1985 "opaque": "rdwr:/path/to/file"
1988 "fdset-id": 1
1991 "fds": [
1993 "fd": 28
1996 "fd": 29
1999 "fdset-id": 0
2004 Note: The list of fd sets is shared by all monitor connections.
2006 EQMP
2009 .name = "block_passwd",
2010 .args_type = "device:s?,node-name:s?,password:s",
2011 .mhandler.cmd_new = qmp_marshal_block_passwd,
2014 SQMP
2015 block_passwd
2016 ------------
2018 Set the password of encrypted block devices.
2020 Arguments:
2022 - "device": device name (json-string)
2023 - "node-name": name in the block driver state graph (json-string)
2024 - "password": password (json-string)
2026 Example:
2028 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
2029 "password": "12345" } }
2030 <- { "return": {} }
2032 EQMP
2035 .name = "block_set_io_throttle",
2036 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,iops_size:l?,group:s?",
2037 .mhandler.cmd_new = qmp_marshal_block_set_io_throttle,
2040 SQMP
2041 block_set_io_throttle
2042 ------------
2044 Change I/O throttle limits for a block drive.
2046 Arguments:
2048 - "device": device name (json-string)
2049 - "bps": total throughput limit in bytes per second (json-int)
2050 - "bps_rd": read throughput limit in bytes per second (json-int)
2051 - "bps_wr": write throughput limit in bytes per second (json-int)
2052 - "iops": total I/O operations per second (json-int)
2053 - "iops_rd": read I/O operations per second (json-int)
2054 - "iops_wr": write I/O operations per second (json-int)
2055 - "bps_max": total max in bytes (json-int)
2056 - "bps_rd_max": read max in bytes (json-int)
2057 - "bps_wr_max": write max in bytes (json-int)
2058 - "iops_max": total I/O operations max (json-int)
2059 - "iops_rd_max": read I/O operations max (json-int)
2060 - "iops_wr_max": write I/O operations max (json-int)
2061 - "iops_size": I/O size in bytes when limiting (json-int)
2062 - "group": throttle group name (json-string)
2064 Example:
2066 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
2067 "bps": 1000000,
2068 "bps_rd": 0,
2069 "bps_wr": 0,
2070 "iops": 0,
2071 "iops_rd": 0,
2072 "iops_wr": 0,
2073 "bps_max": 8000000,
2074 "bps_rd_max": 0,
2075 "bps_wr_max": 0,
2076 "iops_max": 0,
2077 "iops_rd_max": 0,
2078 "iops_wr_max": 0,
2079 "iops_size": 0 } }
2080 <- { "return": {} }
2082 EQMP
2085 .name = "set_password",
2086 .args_type = "protocol:s,password:s,connected:s?",
2087 .mhandler.cmd_new = qmp_marshal_set_password,
2090 SQMP
2091 set_password
2092 ------------
2094 Set the password for vnc/spice protocols.
2096 Arguments:
2098 - "protocol": protocol name (json-string)
2099 - "password": password (json-string)
2100 - "connected": [ keep | disconnect | fail ] (json-string, optional)
2102 Example:
2104 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
2105 "password": "secret" } }
2106 <- { "return": {} }
2108 EQMP
2111 .name = "expire_password",
2112 .args_type = "protocol:s,time:s",
2113 .mhandler.cmd_new = qmp_marshal_expire_password,
2116 SQMP
2117 expire_password
2118 ---------------
2120 Set the password expire time for vnc/spice protocols.
2122 Arguments:
2124 - "protocol": protocol name (json-string)
2125 - "time": [ now | never | +secs | secs ] (json-string)
2127 Example:
2129 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2130 "time": "+60" } }
2131 <- { "return": {} }
2133 EQMP
2136 .name = "add_client",
2137 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
2138 .mhandler.cmd_new = qmp_marshal_add_client,
2141 SQMP
2142 add_client
2143 ----------
2145 Add a graphics client
2147 Arguments:
2149 - "protocol": protocol name (json-string)
2150 - "fdname": file descriptor name (json-string)
2151 - "skipauth": whether to skip authentication (json-bool, optional)
2152 - "tls": whether to perform TLS (json-bool, optional)
2154 Example:
2156 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
2157 "fdname": "myclient" } }
2158 <- { "return": {} }
2160 EQMP
2162 .name = "qmp_capabilities",
2163 .args_type = "",
2164 .params = "",
2165 .help = "enable QMP capabilities",
2166 .mhandler.cmd_new = qmp_capabilities,
2169 SQMP
2170 qmp_capabilities
2171 ----------------
2173 Enable QMP capabilities.
2175 Arguments: None.
2177 Example:
2179 -> { "execute": "qmp_capabilities" }
2180 <- { "return": {} }
2182 Note: This command must be issued before issuing any other command.
2184 EQMP
2187 .name = "human-monitor-command",
2188 .args_type = "command-line:s,cpu-index:i?",
2189 .mhandler.cmd_new = qmp_marshal_human_monitor_command,
2192 SQMP
2193 human-monitor-command
2194 ---------------------
2196 Execute a Human Monitor command.
2198 Arguments:
2200 - command-line: the command name and its arguments, just like the
2201 Human Monitor's shell (json-string)
2202 - cpu-index: select the CPU number to be used by commands which access CPU
2203 data, like 'info registers'. The Monitor selects CPU 0 if this
2204 argument is not provided (json-int, optional)
2206 Example:
2208 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
2209 <- { "return": "kvm support: enabled\r\n" }
2211 Notes:
2213 (1) The Human Monitor is NOT an stable interface, this means that command
2214 names, arguments and responses can change or be removed at ANY time.
2215 Applications that rely on long term stability guarantees should NOT
2216 use this command
2218 (2) Limitations:
2220 o This command is stateless, this means that commands that depend
2221 on state information (such as getfd) might not work
2223 o Commands that prompt the user for data (eg. 'cont' when the block
2224 device is encrypted) don't currently work
2226 3. Query Commands
2227 =================
2229 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
2230 HXCOMM this! We will possibly move query commands definitions inside those
2231 HXCOMM sections, just like regular commands.
2233 EQMP
2235 SQMP
2236 query-version
2237 -------------
2239 Show QEMU version.
2241 Return a json-object with the following information:
2243 - "qemu": A json-object containing three integer values:
2244 - "major": QEMU's major version (json-int)
2245 - "minor": QEMU's minor version (json-int)
2246 - "micro": QEMU's micro version (json-int)
2247 - "package": package's version (json-string)
2249 Example:
2251 -> { "execute": "query-version" }
2252 <- {
2253 "return":{
2254 "qemu":{
2255 "major":0,
2256 "minor":11,
2257 "micro":5
2259 "package":""
2263 EQMP
2266 .name = "query-version",
2267 .args_type = "",
2268 .mhandler.cmd_new = qmp_marshal_query_version,
2271 SQMP
2272 query-commands
2273 --------------
2275 List QMP available commands.
2277 Each command is represented by a json-object, the returned value is a json-array
2278 of all commands.
2280 Each json-object contain:
2282 - "name": command's name (json-string)
2284 Example:
2286 -> { "execute": "query-commands" }
2287 <- {
2288 "return":[
2290 "name":"query-balloon"
2293 "name":"system_powerdown"
2298 Note: This example has been shortened as the real response is too long.
2300 EQMP
2303 .name = "query-commands",
2304 .args_type = "",
2305 .mhandler.cmd_new = qmp_marshal_query_commands,
2308 SQMP
2309 query-events
2310 --------------
2312 List QMP available events.
2314 Each event is represented by a json-object, the returned value is a json-array
2315 of all events.
2317 Each json-object contains:
2319 - "name": event's name (json-string)
2321 Example:
2323 -> { "execute": "query-events" }
2324 <- {
2325 "return":[
2327 "name":"SHUTDOWN"
2330 "name":"RESET"
2335 Note: This example has been shortened as the real response is too long.
2337 EQMP
2340 .name = "query-events",
2341 .args_type = "",
2342 .mhandler.cmd_new = qmp_marshal_query_events,
2345 SQMP
2346 query-qmp-schema
2347 ----------------
2349 Return the QMP wire schema. The returned value is a json-array of
2350 named schema entities. Entities are commands, events and various
2351 types. See docs/qapi-code-gen.txt for information on their structure
2352 and intended use.
2354 EQMP
2357 .name = "query-qmp-schema",
2358 .args_type = "",
2359 .mhandler.cmd_new = qmp_query_qmp_schema,
2362 SQMP
2363 query-chardev
2364 -------------
2366 Each device is represented by a json-object. The returned value is a json-array
2367 of all devices.
2369 Each json-object contain the following:
2371 - "label": device's label (json-string)
2372 - "filename": device's file (json-string)
2373 - "frontend-open": open/closed state of the frontend device attached to this
2374 backend (json-bool)
2376 Example:
2378 -> { "execute": "query-chardev" }
2379 <- {
2380 "return": [
2382 "label": "charchannel0",
2383 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2384 "frontend-open": false
2387 "label": "charmonitor",
2388 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2389 "frontend-open": true
2392 "label": "charserial0",
2393 "filename": "pty:/dev/pts/2",
2394 "frontend-open": true
2399 EQMP
2402 .name = "query-chardev",
2403 .args_type = "",
2404 .mhandler.cmd_new = qmp_marshal_query_chardev,
2407 SQMP
2408 query-chardev-backends
2409 -------------
2411 List available character device backends.
2413 Each backend is represented by a json-object, the returned value is a json-array
2414 of all backends.
2416 Each json-object contains:
2418 - "name": backend name (json-string)
2420 Example:
2422 -> { "execute": "query-chardev-backends" }
2423 <- {
2424 "return":[
2426 "name":"udp"
2429 "name":"tcp"
2432 "name":"unix"
2435 "name":"spiceport"
2440 EQMP
2443 .name = "query-chardev-backends",
2444 .args_type = "",
2445 .mhandler.cmd_new = qmp_marshal_query_chardev_backends,
2448 SQMP
2449 query-block
2450 -----------
2452 Show the block devices.
2454 Each block device information is stored in a json-object and the returned value
2455 is a json-array of all devices.
2457 Each json-object contain the following:
2459 - "device": device name (json-string)
2460 - "type": device type (json-string)
2461 - deprecated, retained for backward compatibility
2462 - Possible values: "unknown"
2463 - "removable": true if the device is removable, false otherwise (json-bool)
2464 - "locked": true if the device is locked, false otherwise (json-bool)
2465 - "tray_open": only present if removable, true if the device has a tray,
2466 and it is open (json-bool)
2467 - "inserted": only present if the device is inserted, it is a json-object
2468 containing the following:
2469 - "file": device file name (json-string)
2470 - "ro": true if read-only, false otherwise (json-bool)
2471 - "drv": driver format name (json-string)
2472 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
2473 "file", "file", "ftp", "ftps", "host_cdrom",
2474 "host_device", "http", "https",
2475 "nbd", "parallels", "qcow", "qcow2", "raw",
2476 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2477 - "backing_file": backing file name (json-string, optional)
2478 - "backing_file_depth": number of files in the backing file chain (json-int)
2479 - "encrypted": true if encrypted, false otherwise (json-bool)
2480 - "bps": limit total bytes per second (json-int)
2481 - "bps_rd": limit read bytes per second (json-int)
2482 - "bps_wr": limit write bytes per second (json-int)
2483 - "iops": limit total I/O operations per second (json-int)
2484 - "iops_rd": limit read operations per second (json-int)
2485 - "iops_wr": limit write operations per second (json-int)
2486 - "bps_max": total max in bytes (json-int)
2487 - "bps_rd_max": read max in bytes (json-int)
2488 - "bps_wr_max": write max in bytes (json-int)
2489 - "iops_max": total I/O operations max (json-int)
2490 - "iops_rd_max": read I/O operations max (json-int)
2491 - "iops_wr_max": write I/O operations max (json-int)
2492 - "iops_size": I/O size when limiting by iops (json-int)
2493 - "detect_zeroes": detect and optimize zero writing (json-string)
2494 - Possible values: "off", "on", "unmap"
2495 - "write_threshold": write offset threshold in bytes, a event will be
2496 emitted if crossed. Zero if disabled (json-int)
2497 - "image": the detail of the image, it is a json-object containing
2498 the following:
2499 - "filename": image file name (json-string)
2500 - "format": image format (json-string)
2501 - "virtual-size": image capacity in bytes (json-int)
2502 - "dirty-flag": true if image is not cleanly closed, not present
2503 means clean (json-bool, optional)
2504 - "actual-size": actual size on disk in bytes of the image, not
2505 present when image does not support thin
2506 provision (json-int, optional)
2507 - "cluster-size": size of a cluster in bytes, not present if image
2508 format does not support it (json-int, optional)
2509 - "encrypted": true if the image is encrypted, not present means
2510 false or the image format does not support
2511 encryption (json-bool, optional)
2512 - "backing_file": backing file name, not present means no backing
2513 file is used or the image format does not
2514 support backing file chain
2515 (json-string, optional)
2516 - "full-backing-filename": full path of the backing file, not
2517 present if it equals backing_file or no
2518 backing file is used
2519 (json-string, optional)
2520 - "backing-filename-format": the format of the backing file, not
2521 present means unknown or no backing
2522 file (json-string, optional)
2523 - "snapshots": the internal snapshot info, it is an optional list
2524 of json-object containing the following:
2525 - "id": unique snapshot id (json-string)
2526 - "name": snapshot name (json-string)
2527 - "vm-state-size": size of the VM state in bytes (json-int)
2528 - "date-sec": UTC date of the snapshot in seconds (json-int)
2529 - "date-nsec": fractional part in nanoseconds to be used with
2530 date-sec (json-int)
2531 - "vm-clock-sec": VM clock relative to boot in seconds
2532 (json-int)
2533 - "vm-clock-nsec": fractional part in nanoseconds to be used
2534 with vm-clock-sec (json-int)
2535 - "backing-image": the detail of the backing image, it is an
2536 optional json-object only present when a
2537 backing image present for this image
2539 - "io-status": I/O operation status, only present if the device supports it
2540 and the VM is configured to stop on errors. It's always reset
2541 to "ok" when the "cont" command is issued (json_string, optional)
2542 - Possible values: "ok", "failed", "nospace"
2544 Example:
2546 -> { "execute": "query-block" }
2547 <- {
2548 "return":[
2550 "io-status": "ok",
2551 "device":"ide0-hd0",
2552 "locked":false,
2553 "removable":false,
2554 "inserted":{
2555 "ro":false,
2556 "drv":"qcow2",
2557 "encrypted":false,
2558 "file":"disks/test.qcow2",
2559 "backing_file_depth":1,
2560 "bps":1000000,
2561 "bps_rd":0,
2562 "bps_wr":0,
2563 "iops":1000000,
2564 "iops_rd":0,
2565 "iops_wr":0,
2566 "bps_max": 8000000,
2567 "bps_rd_max": 0,
2568 "bps_wr_max": 0,
2569 "iops_max": 0,
2570 "iops_rd_max": 0,
2571 "iops_wr_max": 0,
2572 "iops_size": 0,
2573 "detect_zeroes": "on",
2574 "write_threshold": 0,
2575 "image":{
2576 "filename":"disks/test.qcow2",
2577 "format":"qcow2",
2578 "virtual-size":2048000,
2579 "backing_file":"base.qcow2",
2580 "full-backing-filename":"disks/base.qcow2",
2581 "backing-filename-format":"qcow2",
2582 "snapshots":[
2584 "id": "1",
2585 "name": "snapshot1",
2586 "vm-state-size": 0,
2587 "date-sec": 10000200,
2588 "date-nsec": 12,
2589 "vm-clock-sec": 206,
2590 "vm-clock-nsec": 30
2593 "backing-image":{
2594 "filename":"disks/base.qcow2",
2595 "format":"qcow2",
2596 "virtual-size":2048000
2600 "type":"unknown"
2603 "io-status": "ok",
2604 "device":"ide1-cd0",
2605 "locked":false,
2606 "removable":true,
2607 "type":"unknown"
2610 "device":"floppy0",
2611 "locked":false,
2612 "removable":true,
2613 "type":"unknown"
2616 "device":"sd0",
2617 "locked":false,
2618 "removable":true,
2619 "type":"unknown"
2624 EQMP
2627 .name = "query-block",
2628 .args_type = "",
2629 .mhandler.cmd_new = qmp_marshal_query_block,
2632 SQMP
2633 query-blockstats
2634 ----------------
2636 Show block device statistics.
2638 Each device statistic information is stored in a json-object and the returned
2639 value is a json-array of all devices.
2641 Each json-object contain the following:
2643 - "device": device name (json-string)
2644 - "stats": A json-object with the statistics information, it contains:
2645 - "rd_bytes": bytes read (json-int)
2646 - "wr_bytes": bytes written (json-int)
2647 - "rd_operations": read operations (json-int)
2648 - "wr_operations": write operations (json-int)
2649 - "flush_operations": cache flush operations (json-int)
2650 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
2651 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
2652 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
2653 - "wr_highest_offset": The offset after the greatest byte written to the
2654 BlockDriverState since it has been opened (json-int)
2655 - "rd_merged": number of read requests that have been merged into
2656 another request (json-int)
2657 - "wr_merged": number of write requests that have been merged into
2658 another request (json-int)
2659 - "idle_time_ns": time since the last I/O operation, in
2660 nanoseconds. If the field is absent it means
2661 that there haven't been any operations yet
2662 (json-int, optional)
2663 - "failed_rd_operations": number of failed read operations
2664 (json-int)
2665 - "failed_wr_operations": number of failed write operations
2666 (json-int)
2667 - "failed_flush_operations": number of failed flush operations
2668 (json-int)
2669 - "invalid_rd_operations": number of invalid read operations
2670 (json-int)
2671 - "invalid_wr_operations": number of invalid write operations
2672 (json-int)
2673 - "invalid_flush_operations": number of invalid flush operations
2674 (json-int)
2675 - "account_invalid": whether invalid operations are included in
2676 the last access statistics (json-bool)
2677 - "account_failed": whether failed operations are included in the
2678 latency and last access statistics
2679 (json-bool)
2680 - "timed_stats": A json-array containing statistics collected in
2681 specific intervals, with the following members:
2682 - "interval_length": interval used for calculating the
2683 statistics, in seconds (json-int)
2684 - "min_rd_latency_ns": minimum latency of read operations in
2685 the defined interval, in nanoseconds
2686 (json-int)
2687 - "min_wr_latency_ns": minimum latency of write operations in
2688 the defined interval, in nanoseconds
2689 (json-int)
2690 - "min_flush_latency_ns": minimum latency of flush operations
2691 in the defined interval, in
2692 nanoseconds (json-int)
2693 - "max_rd_latency_ns": maximum latency of read operations in
2694 the defined interval, in nanoseconds
2695 (json-int)
2696 - "max_wr_latency_ns": maximum latency of write operations in
2697 the defined interval, in nanoseconds
2698 (json-int)
2699 - "max_flush_latency_ns": maximum latency of flush operations
2700 in the defined interval, in
2701 nanoseconds (json-int)
2702 - "avg_rd_latency_ns": average latency of read operations in
2703 the defined interval, in nanoseconds
2704 (json-int)
2705 - "avg_wr_latency_ns": average latency of write operations in
2706 the defined interval, in nanoseconds
2707 (json-int)
2708 - "avg_flush_latency_ns": average latency of flush operations
2709 in the defined interval, in
2710 nanoseconds (json-int)
2711 - "avg_rd_queue_depth": average number of pending read
2712 operations in the defined interval
2713 (json-number)
2714 - "avg_wr_queue_depth": average number of pending write
2715 operations in the defined interval
2716 (json-number).
2717 - "parent": Contains recursively the statistics of the underlying
2718 protocol (e.g. the host file for a qcow2 image). If there is
2719 no underlying protocol, this field is omitted
2720 (json-object, optional)
2722 Example:
2724 -> { "execute": "query-blockstats" }
2725 <- {
2726 "return":[
2728 "device":"ide0-hd0",
2729 "parent":{
2730 "stats":{
2731 "wr_highest_offset":3686448128,
2732 "wr_bytes":9786368,
2733 "wr_operations":751,
2734 "rd_bytes":122567168,
2735 "rd_operations":36772
2736 "wr_total_times_ns":313253456
2737 "rd_total_times_ns":3465673657
2738 "flush_total_times_ns":49653
2739 "flush_operations":61,
2740 "rd_merged":0,
2741 "wr_merged":0,
2742 "idle_time_ns":2953431879,
2743 "account_invalid":true,
2744 "account_failed":false
2747 "stats":{
2748 "wr_highest_offset":2821110784,
2749 "wr_bytes":9786368,
2750 "wr_operations":692,
2751 "rd_bytes":122739200,
2752 "rd_operations":36604
2753 "flush_operations":51,
2754 "wr_total_times_ns":313253456
2755 "rd_total_times_ns":3465673657
2756 "flush_total_times_ns":49653,
2757 "rd_merged":0,
2758 "wr_merged":0,
2759 "idle_time_ns":2953431879,
2760 "account_invalid":true,
2761 "account_failed":false
2765 "device":"ide1-cd0",
2766 "stats":{
2767 "wr_highest_offset":0,
2768 "wr_bytes":0,
2769 "wr_operations":0,
2770 "rd_bytes":0,
2771 "rd_operations":0
2772 "flush_operations":0,
2773 "wr_total_times_ns":0
2774 "rd_total_times_ns":0
2775 "flush_total_times_ns":0,
2776 "rd_merged":0,
2777 "wr_merged":0,
2778 "account_invalid":false,
2779 "account_failed":false
2783 "device":"floppy0",
2784 "stats":{
2785 "wr_highest_offset":0,
2786 "wr_bytes":0,
2787 "wr_operations":0,
2788 "rd_bytes":0,
2789 "rd_operations":0
2790 "flush_operations":0,
2791 "wr_total_times_ns":0
2792 "rd_total_times_ns":0
2793 "flush_total_times_ns":0,
2794 "rd_merged":0,
2795 "wr_merged":0,
2796 "account_invalid":false,
2797 "account_failed":false
2801 "device":"sd0",
2802 "stats":{
2803 "wr_highest_offset":0,
2804 "wr_bytes":0,
2805 "wr_operations":0,
2806 "rd_bytes":0,
2807 "rd_operations":0
2808 "flush_operations":0,
2809 "wr_total_times_ns":0
2810 "rd_total_times_ns":0
2811 "flush_total_times_ns":0,
2812 "rd_merged":0,
2813 "wr_merged":0,
2814 "account_invalid":false,
2815 "account_failed":false
2821 EQMP
2824 .name = "query-blockstats",
2825 .args_type = "query-nodes:b?",
2826 .mhandler.cmd_new = qmp_marshal_query_blockstats,
2829 SQMP
2830 query-cpus
2831 ----------
2833 Show CPU information.
2835 Return a json-array. Each CPU is represented by a json-object, which contains:
2837 - "CPU": CPU index (json-int)
2838 - "current": true if this is the current CPU, false otherwise (json-bool)
2839 - "halted": true if the cpu is halted, false otherwise (json-bool)
2840 - "qom_path": path to the CPU object in the QOM tree (json-str)
2841 - "arch": architecture of the cpu, which determines what additional
2842 keys will be present (json-str)
2843 - Current program counter. The key's name depends on the architecture:
2844 "pc": i386/x86_64 (json-int)
2845 "nip": PPC (json-int)
2846 "pc" and "npc": sparc (json-int)
2847 "PC": mips (json-int)
2848 - "thread_id": ID of the underlying host thread (json-int)
2850 Example:
2852 -> { "execute": "query-cpus" }
2853 <- {
2854 "return":[
2856 "CPU":0,
2857 "current":true,
2858 "halted":false,
2859 "qom_path":"/machine/unattached/device[0]",
2860 "arch":"x86",
2861 "pc":3227107138,
2862 "thread_id":3134
2865 "CPU":1,
2866 "current":false,
2867 "halted":true,
2868 "qom_path":"/machine/unattached/device[2]",
2869 "arch":"x86",
2870 "pc":7108165,
2871 "thread_id":3135
2876 EQMP
2879 .name = "query-cpus",
2880 .args_type = "",
2881 .mhandler.cmd_new = qmp_marshal_query_cpus,
2884 SQMP
2885 query-iothreads
2886 ---------------
2888 Returns a list of information about each iothread.
2890 Note this list excludes the QEMU main loop thread, which is not declared
2891 using the -object iothread command-line option. It is always the main thread
2892 of the process.
2894 Return a json-array. Each iothread is represented by a json-object, which contains:
2896 - "id": name of iothread (json-str)
2897 - "thread-id": ID of the underlying host thread (json-int)
2899 Example:
2901 -> { "execute": "query-iothreads" }
2902 <- {
2903 "return":[
2905 "id":"iothread0",
2906 "thread-id":3134
2909 "id":"iothread1",
2910 "thread-id":3135
2915 EQMP
2918 .name = "query-iothreads",
2919 .args_type = "",
2920 .mhandler.cmd_new = qmp_marshal_query_iothreads,
2923 SQMP
2924 query-pci
2925 ---------
2927 PCI buses and devices information.
2929 The returned value is a json-array of all buses. Each bus is represented by
2930 a json-object, which has a key with a json-array of all PCI devices attached
2931 to it. Each device is represented by a json-object.
2933 The bus json-object contains the following:
2935 - "bus": bus number (json-int)
2936 - "devices": a json-array of json-objects, each json-object represents a
2937 PCI device
2939 The PCI device json-object contains the following:
2941 - "bus": identical to the parent's bus number (json-int)
2942 - "slot": slot number (json-int)
2943 - "function": function number (json-int)
2944 - "class_info": a json-object containing:
2945 - "desc": device class description (json-string, optional)
2946 - "class": device class number (json-int)
2947 - "id": a json-object containing:
2948 - "device": device ID (json-int)
2949 - "vendor": vendor ID (json-int)
2950 - "irq": device's IRQ if assigned (json-int, optional)
2951 - "qdev_id": qdev id string (json-string)
2952 - "pci_bridge": It's a json-object, only present if this device is a
2953 PCI bridge, contains:
2954 - "bus": bus number (json-int)
2955 - "secondary": secondary bus number (json-int)
2956 - "subordinate": subordinate bus number (json-int)
2957 - "io_range": I/O memory range information, a json-object with the
2958 following members:
2959 - "base": base address, in bytes (json-int)
2960 - "limit": limit address, in bytes (json-int)
2961 - "memory_range": memory range information, a json-object with the
2962 following members:
2963 - "base": base address, in bytes (json-int)
2964 - "limit": limit address, in bytes (json-int)
2965 - "prefetchable_range": Prefetchable memory range information, a
2966 json-object with the following members:
2967 - "base": base address, in bytes (json-int)
2968 - "limit": limit address, in bytes (json-int)
2969 - "devices": a json-array of PCI devices if there's any attached, each
2970 each element is represented by a json-object, which contains
2971 the same members of the 'PCI device json-object' described
2972 above (optional)
2973 - "regions": a json-array of json-objects, each json-object represents a
2974 memory region of this device
2976 The memory range json-object contains the following:
2978 - "base": base memory address (json-int)
2979 - "limit": limit value (json-int)
2981 The region json-object can be an I/O region or a memory region, an I/O region
2982 json-object contains the following:
2984 - "type": "io" (json-string, fixed)
2985 - "bar": BAR number (json-int)
2986 - "address": memory address (json-int)
2987 - "size": memory size (json-int)
2989 A memory region json-object contains the following:
2991 - "type": "memory" (json-string, fixed)
2992 - "bar": BAR number (json-int)
2993 - "address": memory address (json-int)
2994 - "size": memory size (json-int)
2995 - "mem_type_64": true or false (json-bool)
2996 - "prefetch": true or false (json-bool)
2998 Example:
3000 -> { "execute": "query-pci" }
3001 <- {
3002 "return":[
3004 "bus":0,
3005 "devices":[
3007 "bus":0,
3008 "qdev_id":"",
3009 "slot":0,
3010 "class_info":{
3011 "class":1536,
3012 "desc":"Host bridge"
3014 "id":{
3015 "device":32902,
3016 "vendor":4663
3018 "function":0,
3019 "regions":[
3024 "bus":0,
3025 "qdev_id":"",
3026 "slot":1,
3027 "class_info":{
3028 "class":1537,
3029 "desc":"ISA bridge"
3031 "id":{
3032 "device":32902,
3033 "vendor":28672
3035 "function":0,
3036 "regions":[
3041 "bus":0,
3042 "qdev_id":"",
3043 "slot":1,
3044 "class_info":{
3045 "class":257,
3046 "desc":"IDE controller"
3048 "id":{
3049 "device":32902,
3050 "vendor":28688
3052 "function":1,
3053 "regions":[
3055 "bar":4,
3056 "size":16,
3057 "address":49152,
3058 "type":"io"
3063 "bus":0,
3064 "qdev_id":"",
3065 "slot":2,
3066 "class_info":{
3067 "class":768,
3068 "desc":"VGA controller"
3070 "id":{
3071 "device":4115,
3072 "vendor":184
3074 "function":0,
3075 "regions":[
3077 "prefetch":true,
3078 "mem_type_64":false,
3079 "bar":0,
3080 "size":33554432,
3081 "address":4026531840,
3082 "type":"memory"
3085 "prefetch":false,
3086 "mem_type_64":false,
3087 "bar":1,
3088 "size":4096,
3089 "address":4060086272,
3090 "type":"memory"
3093 "prefetch":false,
3094 "mem_type_64":false,
3095 "bar":6,
3096 "size":65536,
3097 "address":-1,
3098 "type":"memory"
3103 "bus":0,
3104 "qdev_id":"",
3105 "irq":11,
3106 "slot":4,
3107 "class_info":{
3108 "class":1280,
3109 "desc":"RAM controller"
3111 "id":{
3112 "device":6900,
3113 "vendor":4098
3115 "function":0,
3116 "regions":[
3118 "bar":0,
3119 "size":32,
3120 "address":49280,
3121 "type":"io"
3130 Note: This example has been shortened as the real response is too long.
3132 EQMP
3135 .name = "query-pci",
3136 .args_type = "",
3137 .mhandler.cmd_new = qmp_marshal_query_pci,
3140 SQMP
3141 query-kvm
3142 ---------
3144 Show KVM information.
3146 Return a json-object with the following information:
3148 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
3149 - "present": true if QEMU has KVM support, false otherwise (json-bool)
3151 Example:
3153 -> { "execute": "query-kvm" }
3154 <- { "return": { "enabled": true, "present": true } }
3156 EQMP
3159 .name = "query-kvm",
3160 .args_type = "",
3161 .mhandler.cmd_new = qmp_marshal_query_kvm,
3164 SQMP
3165 query-status
3166 ------------
3168 Return a json-object with the following information:
3170 - "running": true if the VM is running, or false if it is paused (json-bool)
3171 - "singlestep": true if the VM is in single step mode,
3172 false otherwise (json-bool)
3173 - "status": one of the following values (json-string)
3174 "debug" - QEMU is running on a debugger
3175 "inmigrate" - guest is paused waiting for an incoming migration
3176 "internal-error" - An internal error that prevents further guest
3177 execution has occurred
3178 "io-error" - the last IOP has failed and the device is configured
3179 to pause on I/O errors
3180 "paused" - guest has been paused via the 'stop' command
3181 "postmigrate" - guest is paused following a successful 'migrate'
3182 "prelaunch" - QEMU was started with -S and guest has not started
3183 "finish-migrate" - guest is paused to finish the migration process
3184 "restore-vm" - guest is paused to restore VM state
3185 "running" - guest is actively running
3186 "save-vm" - guest is paused to save the VM state
3187 "shutdown" - guest is shut down (and -no-shutdown is in use)
3188 "watchdog" - the watchdog action is configured to pause and
3189 has been triggered
3191 Example:
3193 -> { "execute": "query-status" }
3194 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
3196 EQMP
3199 .name = "query-status",
3200 .args_type = "",
3201 .mhandler.cmd_new = qmp_marshal_query_status,
3204 SQMP
3205 query-mice
3206 ----------
3208 Show VM mice information.
3210 Each mouse is represented by a json-object, the returned value is a json-array
3211 of all mice.
3213 The mouse json-object contains the following:
3215 - "name": mouse's name (json-string)
3216 - "index": mouse's index (json-int)
3217 - "current": true if this mouse is receiving events, false otherwise (json-bool)
3218 - "absolute": true if the mouse generates absolute input events (json-bool)
3220 Example:
3222 -> { "execute": "query-mice" }
3223 <- {
3224 "return":[
3226 "name":"QEMU Microsoft Mouse",
3227 "index":0,
3228 "current":false,
3229 "absolute":false
3232 "name":"QEMU PS/2 Mouse",
3233 "index":1,
3234 "current":true,
3235 "absolute":true
3240 EQMP
3243 .name = "query-mice",
3244 .args_type = "",
3245 .mhandler.cmd_new = qmp_marshal_query_mice,
3248 SQMP
3249 query-vnc
3250 ---------
3252 Show VNC server information.
3254 Return a json-object with server information. Connected clients are returned
3255 as a json-array of json-objects.
3257 The main json-object contains the following:
3259 - "enabled": true or false (json-bool)
3260 - "host": server's IP address (json-string)
3261 - "family": address family (json-string)
3262 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3263 - "service": server's port number (json-string)
3264 - "auth": authentication method (json-string)
3265 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
3266 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
3267 "vencrypt+plain", "vencrypt+tls+none",
3268 "vencrypt+tls+plain", "vencrypt+tls+sasl",
3269 "vencrypt+tls+vnc", "vencrypt+x509+none",
3270 "vencrypt+x509+plain", "vencrypt+x509+sasl",
3271 "vencrypt+x509+vnc", "vnc"
3272 - "clients": a json-array of all connected clients
3274 Clients are described by a json-object, each one contain the following:
3276 - "host": client's IP address (json-string)
3277 - "family": address family (json-string)
3278 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3279 - "service": client's port number (json-string)
3280 - "x509_dname": TLS dname (json-string, optional)
3281 - "sasl_username": SASL username (json-string, optional)
3283 Example:
3285 -> { "execute": "query-vnc" }
3286 <- {
3287 "return":{
3288 "enabled":true,
3289 "host":"0.0.0.0",
3290 "service":"50402",
3291 "auth":"vnc",
3292 "family":"ipv4",
3293 "clients":[
3295 "host":"127.0.0.1",
3296 "service":"50401",
3297 "family":"ipv4"
3303 EQMP
3306 .name = "query-vnc",
3307 .args_type = "",
3308 .mhandler.cmd_new = qmp_marshal_query_vnc,
3311 .name = "query-vnc-servers",
3312 .args_type = "",
3313 .mhandler.cmd_new = qmp_marshal_query_vnc_servers,
3316 SQMP
3317 query-spice
3318 -----------
3320 Show SPICE server information.
3322 Return a json-object with server information. Connected clients are returned
3323 as a json-array of json-objects.
3325 The main json-object contains the following:
3327 - "enabled": true or false (json-bool)
3328 - "host": server's IP address (json-string)
3329 - "port": server's port number (json-int, optional)
3330 - "tls-port": server's port number (json-int, optional)
3331 - "auth": authentication method (json-string)
3332 - Possible values: "none", "spice"
3333 - "channels": a json-array of all active channels clients
3335 Channels are described by a json-object, each one contain the following:
3337 - "host": client's IP address (json-string)
3338 - "family": address family (json-string)
3339 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3340 - "port": client's port number (json-string)
3341 - "connection-id": spice connection id. All channels with the same id
3342 belong to the same spice session (json-int)
3343 - "channel-type": channel type. "1" is the main control channel, filter for
3344 this one if you want track spice sessions only (json-int)
3345 - "channel-id": channel id. Usually "0", might be different needed when
3346 multiple channels of the same type exist, such as multiple
3347 display channels in a multihead setup (json-int)
3348 - "tls": whether the channel is encrypted (json-bool)
3350 Example:
3352 -> { "execute": "query-spice" }
3353 <- {
3354 "return": {
3355 "enabled": true,
3356 "auth": "spice",
3357 "port": 5920,
3358 "tls-port": 5921,
3359 "host": "0.0.0.0",
3360 "channels": [
3362 "port": "54924",
3363 "family": "ipv4",
3364 "channel-type": 1,
3365 "connection-id": 1804289383,
3366 "host": "127.0.0.1",
3367 "channel-id": 0,
3368 "tls": true
3371 "port": "36710",
3372 "family": "ipv4",
3373 "channel-type": 4,
3374 "connection-id": 1804289383,
3375 "host": "127.0.0.1",
3376 "channel-id": 0,
3377 "tls": false
3379 [ ... more channels follow ... ]
3384 EQMP
3386 #if defined(CONFIG_SPICE)
3388 .name = "query-spice",
3389 .args_type = "",
3390 .mhandler.cmd_new = qmp_marshal_query_spice,
3392 #endif
3394 SQMP
3395 query-name
3396 ----------
3398 Show VM name.
3400 Return a json-object with the following information:
3402 - "name": VM's name (json-string, optional)
3404 Example:
3406 -> { "execute": "query-name" }
3407 <- { "return": { "name": "qemu-name" } }
3409 EQMP
3412 .name = "query-name",
3413 .args_type = "",
3414 .mhandler.cmd_new = qmp_marshal_query_name,
3417 SQMP
3418 query-uuid
3419 ----------
3421 Show VM UUID.
3423 Return a json-object with the following information:
3425 - "UUID": Universally Unique Identifier (json-string)
3427 Example:
3429 -> { "execute": "query-uuid" }
3430 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
3432 EQMP
3435 .name = "query-uuid",
3436 .args_type = "",
3437 .mhandler.cmd_new = qmp_marshal_query_uuid,
3440 SQMP
3441 query-command-line-options
3442 --------------------------
3444 Show command line option schema.
3446 Return a json-array of command line option schema for all options (or for
3447 the given option), returning an error if the given option doesn't exist.
3449 Each array entry contains the following:
3451 - "option": option name (json-string)
3452 - "parameters": a json-array describes all parameters of the option:
3453 - "name": parameter name (json-string)
3454 - "type": parameter type (one of 'string', 'boolean', 'number',
3455 or 'size')
3456 - "help": human readable description of the parameter
3457 (json-string, optional)
3458 - "default": default value string for the parameter
3459 (json-string, optional)
3461 Example:
3463 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
3464 <- { "return": [
3466 "parameters": [
3468 "name": "romfile",
3469 "type": "string"
3472 "name": "bootindex",
3473 "type": "number"
3476 "option": "option-rom"
3481 EQMP
3484 .name = "query-command-line-options",
3485 .args_type = "option:s?",
3486 .mhandler.cmd_new = qmp_marshal_query_command_line_options,
3489 SQMP
3490 query-migrate
3491 -------------
3493 Migration status.
3495 Return a json-object. If migration is active there will be another json-object
3496 with RAM migration status and if block migration is active another one with
3497 block migration status.
3499 The main json-object contains the following:
3501 - "status": migration status (json-string)
3502 - Possible values: "setup", "active", "completed", "failed", "cancelled"
3503 - "total-time": total amount of ms since migration started. If
3504 migration has ended, it returns the total migration
3505 time (json-int)
3506 - "setup-time" amount of setup time in milliseconds _before_ the
3507 iterations begin but _after_ the QMP command is issued.
3508 This is designed to provide an accounting of any activities
3509 (such as RDMA pinning) which may be expensive, but do not
3510 actually occur during the iterative migration rounds
3511 themselves. (json-int)
3512 - "downtime": only present when migration has finished correctly
3513 total amount in ms for downtime that happened (json-int)
3514 - "expected-downtime": only present while migration is active
3515 total amount in ms for downtime that was calculated on
3516 the last bitmap round (json-int)
3517 - "ram": only present if "status" is "active", it is a json-object with the
3518 following RAM information:
3519 - "transferred": amount transferred in bytes (json-int)
3520 - "remaining": amount remaining to transfer in bytes (json-int)
3521 - "total": total amount of memory in bytes (json-int)
3522 - "duplicate": number of pages filled entirely with the same
3523 byte (json-int)
3524 These are sent over the wire much more efficiently.
3525 - "skipped": number of skipped zero pages (json-int)
3526 - "normal" : number of whole pages transferred. I.e. they
3527 were not sent as duplicate or xbzrle pages (json-int)
3528 - "normal-bytes" : number of bytes transferred in whole
3529 pages. This is just normal pages times size of one page,
3530 but this way upper levels don't need to care about page
3531 size (json-int)
3532 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
3533 - "disk": only present if "status" is "active" and it is a block migration,
3534 it is a json-object with the following disk information:
3535 - "transferred": amount transferred in bytes (json-int)
3536 - "remaining": amount remaining to transfer in bytes json-int)
3537 - "total": total disk size in bytes (json-int)
3538 - "xbzrle-cache": only present if XBZRLE is active.
3539 It is a json-object with the following XBZRLE information:
3540 - "cache-size": XBZRLE cache size in bytes
3541 - "bytes": number of bytes transferred for XBZRLE compressed pages
3542 - "pages": number of XBZRLE compressed pages
3543 - "cache-miss": number of XBRZRLE page cache misses
3544 - "cache-miss-rate": rate of XBRZRLE page cache misses
3545 - "overflow": number of times XBZRLE overflows. This means
3546 that the XBZRLE encoding was bigger than just sent the
3547 whole page, and then we sent the whole page instead (as as
3548 normal page).
3550 Examples:
3552 1. Before the first migration
3554 -> { "execute": "query-migrate" }
3555 <- { "return": {} }
3557 2. Migration is done and has succeeded
3559 -> { "execute": "query-migrate" }
3560 <- { "return": {
3561 "status": "completed",
3562 "ram":{
3563 "transferred":123,
3564 "remaining":123,
3565 "total":246,
3566 "total-time":12345,
3567 "setup-time":12345,
3568 "downtime":12345,
3569 "duplicate":123,
3570 "normal":123,
3571 "normal-bytes":123456,
3572 "dirty-sync-count":15
3577 3. Migration is done and has failed
3579 -> { "execute": "query-migrate" }
3580 <- { "return": { "status": "failed" } }
3582 4. Migration is being performed and is not a block migration:
3584 -> { "execute": "query-migrate" }
3585 <- {
3586 "return":{
3587 "status":"active",
3588 "ram":{
3589 "transferred":123,
3590 "remaining":123,
3591 "total":246,
3592 "total-time":12345,
3593 "setup-time":12345,
3594 "expected-downtime":12345,
3595 "duplicate":123,
3596 "normal":123,
3597 "normal-bytes":123456,
3598 "dirty-sync-count":15
3603 5. Migration is being performed and is a block migration:
3605 -> { "execute": "query-migrate" }
3606 <- {
3607 "return":{
3608 "status":"active",
3609 "ram":{
3610 "total":1057024,
3611 "remaining":1053304,
3612 "transferred":3720,
3613 "total-time":12345,
3614 "setup-time":12345,
3615 "expected-downtime":12345,
3616 "duplicate":123,
3617 "normal":123,
3618 "normal-bytes":123456,
3619 "dirty-sync-count":15
3621 "disk":{
3622 "total":20971520,
3623 "remaining":20880384,
3624 "transferred":91136
3629 6. Migration is being performed and XBZRLE is active:
3631 -> { "execute": "query-migrate" }
3632 <- {
3633 "return":{
3634 "status":"active",
3635 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
3636 "ram":{
3637 "total":1057024,
3638 "remaining":1053304,
3639 "transferred":3720,
3640 "total-time":12345,
3641 "setup-time":12345,
3642 "expected-downtime":12345,
3643 "duplicate":10,
3644 "normal":3333,
3645 "normal-bytes":3412992,
3646 "dirty-sync-count":15
3648 "xbzrle-cache":{
3649 "cache-size":67108864,
3650 "bytes":20971520,
3651 "pages":2444343,
3652 "cache-miss":2244,
3653 "cache-miss-rate":0.123,
3654 "overflow":34434
3659 EQMP
3662 .name = "query-migrate",
3663 .args_type = "",
3664 .mhandler.cmd_new = qmp_marshal_query_migrate,
3667 SQMP
3668 migrate-set-capabilities
3669 ------------------------
3671 Enable/Disable migration capabilities
3673 - "xbzrle": XBZRLE support
3674 - "rdma-pin-all": pin all pages when using RDMA during migration
3675 - "auto-converge": throttle down guest to help convergence of migration
3676 - "zero-blocks": compress zero blocks during block migration
3677 - "compress": use multiple compression threads to accelerate live migration
3678 - "events": generate events for each migration state change
3679 - "x-postcopy-ram": postcopy mode for live migration
3681 Arguments:
3683 Example:
3685 -> { "execute": "migrate-set-capabilities" , "arguments":
3686 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
3688 EQMP
3691 .name = "migrate-set-capabilities",
3692 .args_type = "capabilities:q",
3693 .params = "capability:s,state:b",
3694 .mhandler.cmd_new = qmp_marshal_migrate_set_capabilities,
3696 SQMP
3697 query-migrate-capabilities
3698 --------------------------
3700 Query current migration capabilities
3702 - "capabilities": migration capabilities state
3703 - "xbzrle" : XBZRLE state (json-bool)
3704 - "rdma-pin-all" : RDMA Pin Page state (json-bool)
3705 - "auto-converge" : Auto Converge state (json-bool)
3706 - "zero-blocks" : Zero Blocks state (json-bool)
3707 - "compress": Multiple compression threads state (json-bool)
3708 - "events": Migration state change event state (json-bool)
3709 - "x-postcopy-ram": postcopy ram state (json-bool)
3711 Arguments:
3713 Example:
3715 -> { "execute": "query-migrate-capabilities" }
3716 <- {"return": [
3717 {"state": false, "capability": "xbzrle"},
3718 {"state": false, "capability": "rdma-pin-all"},
3719 {"state": false, "capability": "auto-converge"},
3720 {"state": false, "capability": "zero-blocks"},
3721 {"state": false, "capability": "compress"},
3722 {"state": true, "capability": "events"},
3723 {"state": false, "capability": "x-postcopy-ram"}
3726 EQMP
3729 .name = "query-migrate-capabilities",
3730 .args_type = "",
3731 .mhandler.cmd_new = qmp_marshal_query_migrate_capabilities,
3734 SQMP
3735 migrate-set-parameters
3736 ----------------------
3738 Set migration parameters
3740 - "compress-level": set compression level during migration (json-int)
3741 - "compress-threads": set compression thread count for migration (json-int)
3742 - "decompress-threads": set decompression thread count for migration (json-int)
3743 - "x-cpu-throttle-initial": set initial percentage of time guest cpus are
3744 throttled for auto-converge (json-int)
3745 - "x-cpu-throttle-increment": set throttle increasing percentage for
3746 auto-converge (json-int)
3748 Arguments:
3750 Example:
3752 -> { "execute": "migrate-set-parameters" , "arguments":
3753 { "compress-level": 1 } }
3755 EQMP
3758 .name = "migrate-set-parameters",
3759 .args_type =
3760 "compress-level:i?,compress-threads:i?,decompress-threads:i?,x-cpu-throttle-initial:i?,x-cpu-throttle-increment:i?",
3761 .mhandler.cmd_new = qmp_marshal_migrate_set_parameters,
3763 SQMP
3764 query-migrate-parameters
3765 ------------------------
3767 Query current migration parameters
3769 - "parameters": migration parameters value
3770 - "compress-level" : compression level value (json-int)
3771 - "compress-threads" : compression thread count value (json-int)
3772 - "decompress-threads" : decompression thread count value (json-int)
3773 - "x-cpu-throttle-initial" : initial percentage of time guest cpus are
3774 throttled (json-int)
3775 - "x-cpu-throttle-increment" : throttle increasing percentage for
3776 auto-converge (json-int)
3778 Arguments:
3780 Example:
3782 -> { "execute": "query-migrate-parameters" }
3783 <- {
3784 "return": {
3785 "decompress-threads": 2,
3786 "x-cpu-throttle-increment": 10,
3787 "compress-threads": 8,
3788 "compress-level": 1,
3789 "x-cpu-throttle-initial": 20
3793 EQMP
3796 .name = "query-migrate-parameters",
3797 .args_type = "",
3798 .mhandler.cmd_new = qmp_marshal_query_migrate_parameters,
3801 SQMP
3802 query-balloon
3803 -------------
3805 Show balloon information.
3807 Make an asynchronous request for balloon info. When the request completes a
3808 json-object will be returned containing the following data:
3810 - "actual": current balloon value in bytes (json-int)
3812 Example:
3814 -> { "execute": "query-balloon" }
3815 <- {
3816 "return":{
3817 "actual":1073741824,
3821 EQMP
3824 .name = "query-balloon",
3825 .args_type = "",
3826 .mhandler.cmd_new = qmp_marshal_query_balloon,
3830 .name = "query-block-jobs",
3831 .args_type = "",
3832 .mhandler.cmd_new = qmp_marshal_query_block_jobs,
3836 .name = "qom-list",
3837 .args_type = "path:s",
3838 .mhandler.cmd_new = qmp_marshal_qom_list,
3842 .name = "qom-set",
3843 .args_type = "path:s,property:s,value:q",
3844 .mhandler.cmd_new = qmp_marshal_qom_set,
3848 .name = "qom-get",
3849 .args_type = "path:s,property:s",
3850 .mhandler.cmd_new = qmp_marshal_qom_get,
3854 .name = "nbd-server-start",
3855 .args_type = "addr:q,tls-creds:s?",
3856 .mhandler.cmd_new = qmp_marshal_nbd_server_start,
3859 .name = "nbd-server-add",
3860 .args_type = "device:B,writable:b?",
3861 .mhandler.cmd_new = qmp_marshal_nbd_server_add,
3864 .name = "nbd-server-stop",
3865 .args_type = "",
3866 .mhandler.cmd_new = qmp_marshal_nbd_server_stop,
3870 .name = "change-vnc-password",
3871 .args_type = "password:s",
3872 .mhandler.cmd_new = qmp_marshal_change_vnc_password,
3875 .name = "qom-list-types",
3876 .args_type = "implements:s?,abstract:b?",
3877 .mhandler.cmd_new = qmp_marshal_qom_list_types,
3881 .name = "device-list-properties",
3882 .args_type = "typename:s",
3883 .mhandler.cmd_new = qmp_marshal_device_list_properties,
3887 .name = "query-machines",
3888 .args_type = "",
3889 .mhandler.cmd_new = qmp_marshal_query_machines,
3893 .name = "query-cpu-definitions",
3894 .args_type = "",
3895 .mhandler.cmd_new = qmp_marshal_query_cpu_definitions,
3899 .name = "query-target",
3900 .args_type = "",
3901 .mhandler.cmd_new = qmp_marshal_query_target,
3905 .name = "query-tpm",
3906 .args_type = "",
3907 .mhandler.cmd_new = qmp_marshal_query_tpm,
3910 SQMP
3911 query-tpm
3912 ---------
3914 Return information about the TPM device.
3916 Arguments: None
3918 Example:
3920 -> { "execute": "query-tpm" }
3921 <- { "return":
3923 { "model": "tpm-tis",
3924 "options":
3925 { "type": "passthrough",
3926 "data":
3927 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3928 "path": "/dev/tpm0"
3931 "id": "tpm0"
3936 EQMP
3939 .name = "query-tpm-models",
3940 .args_type = "",
3941 .mhandler.cmd_new = qmp_marshal_query_tpm_models,
3944 SQMP
3945 query-tpm-models
3946 ----------------
3948 Return a list of supported TPM models.
3950 Arguments: None
3952 Example:
3954 -> { "execute": "query-tpm-models" }
3955 <- { "return": [ "tpm-tis" ] }
3957 EQMP
3960 .name = "query-tpm-types",
3961 .args_type = "",
3962 .mhandler.cmd_new = qmp_marshal_query_tpm_types,
3965 SQMP
3966 query-tpm-types
3967 ---------------
3969 Return a list of supported TPM types.
3971 Arguments: None
3973 Example:
3975 -> { "execute": "query-tpm-types" }
3976 <- { "return": [ "passthrough" ] }
3978 EQMP
3981 .name = "chardev-add",
3982 .args_type = "id:s,backend:q",
3983 .mhandler.cmd_new = qmp_marshal_chardev_add,
3986 SQMP
3987 chardev-add
3988 ----------------
3990 Add a chardev.
3992 Arguments:
3994 - "id": the chardev's ID, must be unique (json-string)
3995 - "backend": chardev backend type + parameters
3997 Examples:
3999 -> { "execute" : "chardev-add",
4000 "arguments" : { "id" : "foo",
4001 "backend" : { "type" : "null", "data" : {} } } }
4002 <- { "return": {} }
4004 -> { "execute" : "chardev-add",
4005 "arguments" : { "id" : "bar",
4006 "backend" : { "type" : "file",
4007 "data" : { "out" : "/tmp/bar.log" } } } }
4008 <- { "return": {} }
4010 -> { "execute" : "chardev-add",
4011 "arguments" : { "id" : "baz",
4012 "backend" : { "type" : "pty", "data" : {} } } }
4013 <- { "return": { "pty" : "/dev/pty/42" } }
4015 EQMP
4018 .name = "chardev-remove",
4019 .args_type = "id:s",
4020 .mhandler.cmd_new = qmp_marshal_chardev_remove,
4024 SQMP
4025 chardev-remove
4026 --------------
4028 Remove a chardev.
4030 Arguments:
4032 - "id": the chardev's ID, must exist and not be in use (json-string)
4034 Example:
4036 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
4037 <- { "return": {} }
4039 EQMP
4041 .name = "query-rx-filter",
4042 .args_type = "name:s?",
4043 .mhandler.cmd_new = qmp_marshal_query_rx_filter,
4046 SQMP
4047 query-rx-filter
4048 ---------------
4050 Show rx-filter information.
4052 Returns a json-array of rx-filter information for all NICs (or for the
4053 given NIC), returning an error if the given NIC doesn't exist, or
4054 given NIC doesn't support rx-filter querying, or given net client
4055 isn't a NIC.
4057 The query will clear the event notification flag of each NIC, then qemu
4058 will start to emit event to QMP monitor.
4060 Each array entry contains the following:
4062 - "name": net client name (json-string)
4063 - "promiscuous": promiscuous mode is enabled (json-bool)
4064 - "multicast": multicast receive state (one of 'normal', 'none', 'all')
4065 - "unicast": unicast receive state (one of 'normal', 'none', 'all')
4066 - "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
4067 - "broadcast-allowed": allow to receive broadcast (json-bool)
4068 - "multicast-overflow": multicast table is overflowed (json-bool)
4069 - "unicast-overflow": unicast table is overflowed (json-bool)
4070 - "main-mac": main macaddr string (json-string)
4071 - "vlan-table": a json-array of active vlan id
4072 - "unicast-table": a json-array of unicast macaddr string
4073 - "multicast-table": a json-array of multicast macaddr string
4075 Example:
4077 -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
4078 <- { "return": [
4080 "promiscuous": true,
4081 "name": "vnet0",
4082 "main-mac": "52:54:00:12:34:56",
4083 "unicast": "normal",
4084 "vlan": "normal",
4085 "vlan-table": [
4089 "unicast-table": [
4091 "multicast": "normal",
4092 "multicast-overflow": false,
4093 "unicast-overflow": false,
4094 "multicast-table": [
4095 "01:00:5e:00:00:01",
4096 "33:33:00:00:00:01",
4097 "33:33:ff:12:34:56"
4099 "broadcast-allowed": false
4104 EQMP
4107 .name = "blockdev-add",
4108 .args_type = "options:q",
4109 .mhandler.cmd_new = qmp_marshal_blockdev_add,
4112 SQMP
4113 blockdev-add
4114 ------------
4116 Add a block device.
4118 This command is still a work in progress. It doesn't support all
4119 block drivers among other things. Stay away from it unless you want
4120 to help with its development.
4122 Arguments:
4124 - "options": block driver options
4126 Example (1):
4128 -> { "execute": "blockdev-add",
4129 "arguments": { "options" : { "driver": "qcow2",
4130 "file": { "driver": "file",
4131 "filename": "test.qcow2" } } } }
4132 <- { "return": {} }
4134 Example (2):
4136 -> { "execute": "blockdev-add",
4137 "arguments": {
4138 "options": {
4139 "driver": "qcow2",
4140 "id": "my_disk",
4141 "discard": "unmap",
4142 "cache": {
4143 "direct": true,
4144 "writeback": true
4146 "file": {
4147 "driver": "file",
4148 "filename": "/tmp/test.qcow2"
4150 "backing": {
4151 "driver": "raw",
4152 "file": {
4153 "driver": "file",
4154 "filename": "/dev/fdset/4"
4161 <- { "return": {} }
4163 EQMP
4166 .name = "x-blockdev-del",
4167 .args_type = "id:s?,node-name:s?",
4168 .mhandler.cmd_new = qmp_marshal_x_blockdev_del,
4171 SQMP
4172 x-blockdev-del
4173 ------------
4174 Since 2.5
4176 Deletes a block device thas has been added using blockdev-add.
4177 The selected device can be either a block backend or a graph node.
4179 In the former case the backend will be destroyed, along with its
4180 inserted medium if there's any. The command will fail if the backend
4181 or its medium are in use.
4183 In the latter case the node will be destroyed. The command will fail
4184 if the node is attached to a block backend or is otherwise being
4185 used.
4187 One of "id" or "node-name" must be specified, but not both.
4189 This command is still a work in progress and is considered
4190 experimental. Stay away from it unless you want to help with its
4191 development.
4193 Arguments:
4195 - "id": Name of the block backend device to delete (json-string, optional)
4196 - "node-name": Name of the graph node to delete (json-string, optional)
4198 Example:
4200 -> { "execute": "blockdev-add",
4201 "arguments": {
4202 "options": {
4203 "driver": "qcow2",
4204 "id": "drive0",
4205 "file": {
4206 "driver": "file",
4207 "filename": "test.qcow2"
4213 <- { "return": {} }
4215 -> { "execute": "x-blockdev-del",
4216 "arguments": { "id": "drive0" }
4218 <- { "return": {} }
4220 EQMP
4223 .name = "blockdev-open-tray",
4224 .args_type = "device:s,force:b?",
4225 .mhandler.cmd_new = qmp_marshal_blockdev_open_tray,
4228 SQMP
4229 blockdev-open-tray
4230 ------------------
4232 Opens a block device's tray. If there is a block driver state tree inserted as a
4233 medium, it will become inaccessible to the guest (but it will remain associated
4234 to the block device, so closing the tray will make it accessible again).
4236 If the tray was already open before, this will be a no-op.
4238 Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in
4239 which no such event will be generated, these include:
4240 - if the guest has locked the tray, @force is false and the guest does not
4241 respond to the eject request
4242 - if the BlockBackend denoted by @device does not have a guest device attached
4243 to it
4244 - if the guest device does not have an actual tray and is empty, for instance
4245 for floppy disk drives
4247 Arguments:
4249 - "device": block device name (json-string)
4250 - "force": if false (the default), an eject request will be sent to the guest if
4251 it has locked the tray (and the tray will not be opened immediately);
4252 if true, the tray will be opened regardless of whether it is locked
4253 (json-bool, optional)
4255 Example:
4257 -> { "execute": "blockdev-open-tray",
4258 "arguments": { "device": "ide1-cd0" } }
4260 <- { "timestamp": { "seconds": 1418751016,
4261 "microseconds": 716996 },
4262 "event": "DEVICE_TRAY_MOVED",
4263 "data": { "device": "ide1-cd0",
4264 "tray-open": true } }
4266 <- { "return": {} }
4268 EQMP
4271 .name = "blockdev-close-tray",
4272 .args_type = "device:s",
4273 .mhandler.cmd_new = qmp_marshal_blockdev_close_tray,
4276 SQMP
4277 blockdev-close-tray
4278 -------------------
4280 Closes a block device's tray. If there is a block driver state tree associated
4281 with the block device (which is currently ejected), that tree will be loaded as
4282 the medium.
4284 If the tray was already closed before, this will be a no-op.
4286 Arguments:
4288 - "device": block device name (json-string)
4290 Example:
4292 -> { "execute": "blockdev-close-tray",
4293 "arguments": { "device": "ide1-cd0" } }
4295 <- { "timestamp": { "seconds": 1418751345,
4296 "microseconds": 272147 },
4297 "event": "DEVICE_TRAY_MOVED",
4298 "data": { "device": "ide1-cd0",
4299 "tray-open": false } }
4301 <- { "return": {} }
4303 EQMP
4306 .name = "x-blockdev-remove-medium",
4307 .args_type = "device:s",
4308 .mhandler.cmd_new = qmp_marshal_x_blockdev_remove_medium,
4311 SQMP
4312 x-blockdev-remove-medium
4313 ------------------------
4315 Removes a medium (a block driver state tree) from a block device. That block
4316 device's tray must currently be open (unless there is no attached guest device).
4318 If the tray is open and there is no medium inserted, this will be a no-op.
4320 This command is still a work in progress and is considered experimental.
4321 Stay away from it unless you want to help with its development.
4323 Arguments:
4325 - "device": block device name (json-string)
4327 Example:
4329 -> { "execute": "x-blockdev-remove-medium",
4330 "arguments": { "device": "ide1-cd0" } }
4332 <- { "error": { "class": "GenericError",
4333 "desc": "Tray of device 'ide1-cd0' is not open" } }
4335 -> { "execute": "blockdev-open-tray",
4336 "arguments": { "device": "ide1-cd0" } }
4338 <- { "timestamp": { "seconds": 1418751627,
4339 "microseconds": 549958 },
4340 "event": "DEVICE_TRAY_MOVED",
4341 "data": { "device": "ide1-cd0",
4342 "tray-open": true } }
4344 <- { "return": {} }
4346 -> { "execute": "x-blockdev-remove-medium",
4347 "arguments": { "device": "ide1-cd0" } }
4349 <- { "return": {} }
4351 EQMP
4354 .name = "x-blockdev-insert-medium",
4355 .args_type = "device:s,node-name:s",
4356 .mhandler.cmd_new = qmp_marshal_x_blockdev_insert_medium,
4359 SQMP
4360 x-blockdev-insert-medium
4361 ------------------------
4363 Inserts a medium (a block driver state tree) into a block device. That block
4364 device's tray must currently be open (unless there is no attached guest device)
4365 and there must be no medium inserted already.
4367 This command is still a work in progress and is considered experimental.
4368 Stay away from it unless you want to help with its development.
4370 Arguments:
4372 - "device": block device name (json-string)
4373 - "node-name": root node of the BDS tree to insert into the block device
4375 Example:
4377 -> { "execute": "blockdev-add",
4378 "arguments": { "options": { "node-name": "node0",
4379 "driver": "raw",
4380 "file": { "driver": "file",
4381 "filename": "fedora.iso" } } } }
4383 <- { "return": {} }
4385 -> { "execute": "x-blockdev-insert-medium",
4386 "arguments": { "device": "ide1-cd0",
4387 "node-name": "node0" } }
4389 <- { "return": {} }
4391 EQMP
4394 .name = "query-named-block-nodes",
4395 .args_type = "",
4396 .mhandler.cmd_new = qmp_marshal_query_named_block_nodes,
4399 SQMP
4400 @query-named-block-nodes
4401 ------------------------
4403 Return a list of BlockDeviceInfo for all the named block driver nodes
4405 Example:
4407 -> { "execute": "query-named-block-nodes" }
4408 <- { "return": [ { "ro":false,
4409 "drv":"qcow2",
4410 "encrypted":false,
4411 "file":"disks/test.qcow2",
4412 "node-name": "my-node",
4413 "backing_file_depth":1,
4414 "bps":1000000,
4415 "bps_rd":0,
4416 "bps_wr":0,
4417 "iops":1000000,
4418 "iops_rd":0,
4419 "iops_wr":0,
4420 "bps_max": 8000000,
4421 "bps_rd_max": 0,
4422 "bps_wr_max": 0,
4423 "iops_max": 0,
4424 "iops_rd_max": 0,
4425 "iops_wr_max": 0,
4426 "iops_size": 0,
4427 "write_threshold": 0,
4428 "image":{
4429 "filename":"disks/test.qcow2",
4430 "format":"qcow2",
4431 "virtual-size":2048000,
4432 "backing_file":"base.qcow2",
4433 "full-backing-filename":"disks/base.qcow2",
4434 "backing-filename-format":"qcow2",
4435 "snapshots":[
4437 "id": "1",
4438 "name": "snapshot1",
4439 "vm-state-size": 0,
4440 "date-sec": 10000200,
4441 "date-nsec": 12,
4442 "vm-clock-sec": 206,
4443 "vm-clock-nsec": 30
4446 "backing-image":{
4447 "filename":"disks/base.qcow2",
4448 "format":"qcow2",
4449 "virtual-size":2048000
4451 } } ] }
4453 EQMP
4456 .name = "blockdev-change-medium",
4457 .args_type = "device:B,filename:F,format:s?,read-only-mode:s?",
4458 .mhandler.cmd_new = qmp_marshal_blockdev_change_medium,
4461 SQMP
4462 blockdev-change-medium
4463 ----------------------
4465 Changes the medium inserted into a block device by ejecting the current medium
4466 and loading a new image file which is inserted as the new medium.
4468 Arguments:
4470 - "device": device name (json-string)
4471 - "filename": filename of the new image (json-string)
4472 - "format": format of the new image (json-string, optional)
4473 - "read-only-mode": new read-only mode (json-string, optional)
4474 - Possible values: "retain" (default), "read-only", "read-write"
4476 Examples:
4478 1. Change a removable medium
4480 -> { "execute": "blockdev-change-medium",
4481 "arguments": { "device": "ide1-cd0",
4482 "filename": "/srv/images/Fedora-12-x86_64-DVD.iso",
4483 "format": "raw" } }
4484 <- { "return": {} }
4486 2. Load a read-only medium into a writable drive
4488 -> { "execute": "blockdev-change-medium",
4489 "arguments": { "device": "isa-fd0",
4490 "filename": "/srv/images/ro.img",
4491 "format": "raw",
4492 "read-only-mode": "retain" } }
4494 <- { "error":
4495 { "class": "GenericError",
4496 "desc": "Could not open '/srv/images/ro.img': Permission denied" } }
4498 -> { "execute": "blockdev-change-medium",
4499 "arguments": { "device": "isa-fd0",
4500 "filename": "/srv/images/ro.img",
4501 "format": "raw",
4502 "read-only-mode": "read-only" } }
4504 <- { "return": {} }
4506 EQMP
4509 .name = "query-memdev",
4510 .args_type = "",
4511 .mhandler.cmd_new = qmp_marshal_query_memdev,
4514 SQMP
4515 query-memdev
4516 ------------
4518 Show memory devices information.
4521 Example (1):
4523 -> { "execute": "query-memdev" }
4524 <- { "return": [
4526 "size": 536870912,
4527 "merge": false,
4528 "dump": true,
4529 "prealloc": false,
4530 "host-nodes": [0, 1],
4531 "policy": "bind"
4534 "size": 536870912,
4535 "merge": false,
4536 "dump": true,
4537 "prealloc": true,
4538 "host-nodes": [2, 3],
4539 "policy": "preferred"
4544 EQMP
4547 .name = "query-memory-devices",
4548 .args_type = "",
4549 .mhandler.cmd_new = qmp_marshal_query_memory_devices,
4552 SQMP
4553 @query-memory-devices
4554 --------------------
4556 Return a list of memory devices.
4558 Example:
4559 -> { "execute": "query-memory-devices" }
4560 <- { "return": [ { "data":
4561 { "addr": 5368709120,
4562 "hotpluggable": true,
4563 "hotplugged": true,
4564 "id": "d1",
4565 "memdev": "/objects/memX",
4566 "node": 0,
4567 "size": 1073741824,
4568 "slot": 0},
4569 "type": "dimm"
4570 } ] }
4571 EQMP
4574 .name = "query-acpi-ospm-status",
4575 .args_type = "",
4576 .mhandler.cmd_new = qmp_marshal_query_acpi_ospm_status,
4579 SQMP
4580 @query-acpi-ospm-status
4581 --------------------
4583 Return list of ACPIOSTInfo for devices that support status reporting
4584 via ACPI _OST method.
4586 Example:
4587 -> { "execute": "query-acpi-ospm-status" }
4588 <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
4589 { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
4590 { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
4591 { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
4593 EQMP
4595 #if defined TARGET_I386
4597 .name = "rtc-reset-reinjection",
4598 .args_type = "",
4599 .mhandler.cmd_new = qmp_marshal_rtc_reset_reinjection,
4601 #endif
4603 SQMP
4604 rtc-reset-reinjection
4605 ---------------------
4607 Reset the RTC interrupt reinjection backlog.
4609 Arguments: None.
4611 Example:
4613 -> { "execute": "rtc-reset-reinjection" }
4614 <- { "return": {} }
4615 EQMP
4618 .name = "trace-event-get-state",
4619 .args_type = "name:s",
4620 .mhandler.cmd_new = qmp_marshal_trace_event_get_state,
4623 SQMP
4624 trace-event-get-state
4625 ---------------------
4627 Query the state of events.
4629 Example:
4631 -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
4632 <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
4633 EQMP
4636 .name = "trace-event-set-state",
4637 .args_type = "name:s,enable:b,ignore-unavailable:b?",
4638 .mhandler.cmd_new = qmp_marshal_trace_event_set_state,
4641 SQMP
4642 trace-event-set-state
4643 ---------------------
4645 Set the state of events.
4647 Example:
4649 -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
4650 <- { "return": {} }
4651 EQMP
4654 .name = "x-input-send-event",
4655 .args_type = "console:i?,events:q",
4656 .mhandler.cmd_new = qmp_marshal_x_input_send_event,
4659 SQMP
4660 @x-input-send-event
4661 -----------------
4663 Send input event to guest.
4665 Arguments:
4667 - "console": console index. (json-int, optional)
4668 - "events": list of input events.
4670 The consoles are visible in the qom tree, under
4671 /backend/console[$index]. They have a device link and head property, so
4672 it is possible to map which console belongs to which device and display.
4674 Note: this command is experimental, and not a stable API.
4676 Example (1):
4678 Press left mouse button.
4680 -> { "execute": "x-input-send-event",
4681 "arguments": { "console": 0,
4682 "events": [ { "type": "btn",
4683 "data" : { "down": true, "button": "Left" } } ] } }
4684 <- { "return": {} }
4686 -> { "execute": "x-input-send-event",
4687 "arguments": { "console": 0,
4688 "events": [ { "type": "btn",
4689 "data" : { "down": false, "button": "Left" } } ] } }
4690 <- { "return": {} }
4692 Example (2):
4694 Press ctrl-alt-del.
4696 -> { "execute": "x-input-send-event",
4697 "arguments": { "console": 0, "events": [
4698 { "type": "key", "data" : { "down": true,
4699 "key": {"type": "qcode", "data": "ctrl" } } },
4700 { "type": "key", "data" : { "down": true,
4701 "key": {"type": "qcode", "data": "alt" } } },
4702 { "type": "key", "data" : { "down": true,
4703 "key": {"type": "qcode", "data": "delete" } } } ] } }
4704 <- { "return": {} }
4706 Example (3):
4708 Move mouse pointer to absolute coordinates (20000, 400).
4710 -> { "execute": "x-input-send-event" ,
4711 "arguments": { "console": 0, "events": [
4712 { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
4713 { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
4714 <- { "return": {} }
4716 EQMP
4719 .name = "block-set-write-threshold",
4720 .args_type = "node-name:s,write-threshold:l",
4721 .mhandler.cmd_new = qmp_marshal_block_set_write_threshold,
4724 SQMP
4725 block-set-write-threshold
4726 ------------
4728 Change the write threshold for a block drive. The threshold is an offset,
4729 thus must be non-negative. Default is no write threshold.
4730 Setting the threshold to zero disables it.
4732 Arguments:
4734 - "node-name": the node name in the block driver state graph (json-string)
4735 - "write-threshold": the write threshold in bytes (json-int)
4737 Example:
4739 -> { "execute": "block-set-write-threshold",
4740 "arguments": { "node-name": "mydev",
4741 "write-threshold": 17179869184 } }
4742 <- { "return": {} }
4744 EQMP
4747 .name = "query-rocker",
4748 .args_type = "name:s",
4749 .mhandler.cmd_new = qmp_marshal_query_rocker,
4752 SQMP
4753 Show rocker switch
4754 ------------------
4756 Arguments:
4758 - "name": switch name
4760 Example:
4762 -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
4763 <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
4765 EQMP
4768 .name = "query-rocker-ports",
4769 .args_type = "name:s",
4770 .mhandler.cmd_new = qmp_marshal_query_rocker_ports,
4773 SQMP
4774 Show rocker switch ports
4775 ------------------------
4777 Arguments:
4779 - "name": switch name
4781 Example:
4783 -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
4784 <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
4785 "autoneg": "off", "link-up": true, "speed": 10000},
4786 {"duplex": "full", "enabled": true, "name": "sw1.2",
4787 "autoneg": "off", "link-up": true, "speed": 10000}
4790 EQMP
4793 .name = "query-rocker-of-dpa-flows",
4794 .args_type = "name:s,tbl-id:i?",
4795 .mhandler.cmd_new = qmp_marshal_query_rocker_of_dpa_flows,
4798 SQMP
4799 Show rocker switch OF-DPA flow tables
4800 -------------------------------------
4802 Arguments:
4804 - "name": switch name
4805 - "tbl-id": (optional) flow table ID
4807 Example:
4809 -> { "execute": "query-rocker-of-dpa-flows", "arguments": { "name": "sw1" } }
4810 <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
4811 "hits": 138,
4812 "cookie": 0,
4813 "action": {"goto-tbl": 10},
4814 "mask": {"in-pport": 4294901760}
4816 {...more...},
4819 EQMP
4822 .name = "query-rocker-of-dpa-groups",
4823 .args_type = "name:s,type:i?",
4824 .mhandler.cmd_new = qmp_marshal_query_rocker_of_dpa_groups,
4827 SQMP
4828 Show rocker OF-DPA group tables
4829 -------------------------------
4831 Arguments:
4833 - "name": switch name
4834 - "type": (optional) group type
4836 Example:
4838 -> { "execute": "query-rocker-of-dpa-groups", "arguments": { "name": "sw1" } }
4839 <- { "return": [ {"type": 0, "out-pport": 2, "pport": 2, "vlan-id": 3841,
4840 "pop-vlan": 1, "id": 251723778},
4841 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3841,
4842 "pop-vlan": 1, "id": 251723776},
4843 {"type": 0, "out-pport": 1, "pport": 1, "vlan-id": 3840,
4844 "pop-vlan": 1, "id": 251658241},
4845 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840,
4846 "pop-vlan": 1, "id": 251658240}