PPC: Allow Rc bit to be set on mtspr
[qemu/kevin.git] / qmp-commands.hx
blob02c0c5bc42830f7edfe61a3b53e884fc751650eb
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"
515 Bug: invalid base64 is currently not rejected.
516 Whitespace *is* invalid.
518 Example:
520 -> { "execute": "ringbuf-write",
521 "arguments": { "device": "foo",
522 "data": "abcdefgh",
523 "format": "utf8" } }
524 <- { "return": {} }
526 EQMP
529 .name = "ringbuf-read",
530 .args_type = "device:s,size:i,format:s?",
531 .mhandler.cmd_new = qmp_marshal_ringbuf_read,
534 SQMP
535 ringbuf-read
536 -------------
538 Read from a ring buffer character device.
540 Arguments:
542 - "device": ring buffer character device name (json-string)
543 - "size": how many bytes to read at most (json-int)
544 - Number of data bytes, not number of characters in encoded data
545 - "format": data format (json-string, optional)
546 - Possible values: "utf8" (default), "base64"
547 - Naturally, format "utf8" works only when the ring buffer
548 contains valid UTF-8 text. Invalid UTF-8 sequences get
549 replaced. Bug: replacement doesn't work. Bug: can screw
550 up on encountering NUL characters, after the ring buffer
551 lost data, and when reading stops because the size limit
552 is reached.
554 Example:
556 -> { "execute": "ringbuf-read",
557 "arguments": { "device": "foo",
558 "size": 1000,
559 "format": "utf8" } }
560 <- {"return": "abcdefgh"}
562 EQMP
565 .name = "xen-save-devices-state",
566 .args_type = "filename:F",
567 .mhandler.cmd_new = qmp_marshal_xen_save_devices_state,
570 SQMP
571 xen-save-devices-state
572 -------
574 Save the state of all devices to file. The RAM and the block devices
575 of the VM are not saved by this command.
577 Arguments:
579 - "filename": the file to save the state of the devices to as binary
580 data. See xen-save-devices-state.txt for a description of the binary
581 format.
583 Example:
585 -> { "execute": "xen-save-devices-state",
586 "arguments": { "filename": "/tmp/save" } }
587 <- { "return": {} }
589 EQMP
592 .name = "xen-set-global-dirty-log",
593 .args_type = "enable:b",
594 .mhandler.cmd_new = qmp_marshal_xen_set_global_dirty_log,
597 SQMP
598 xen-set-global-dirty-log
599 -------
601 Enable or disable the global dirty log mode.
603 Arguments:
605 - "enable": Enable it or disable it.
607 Example:
609 -> { "execute": "xen-set-global-dirty-log",
610 "arguments": { "enable": true } }
611 <- { "return": {} }
613 EQMP
616 .name = "migrate",
617 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
618 .mhandler.cmd_new = qmp_marshal_migrate,
621 SQMP
622 migrate
623 -------
625 Migrate to URI.
627 Arguments:
629 - "blk": block migration, full disk copy (json-bool, optional)
630 - "inc": incremental disk copy (json-bool, optional)
631 - "uri": Destination URI (json-string)
633 Example:
635 -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
636 <- { "return": {} }
638 Notes:
640 (1) The 'query-migrate' command should be used to check migration's progress
641 and final result (this information is provided by the 'status' member)
642 (2) All boolean arguments default to false
643 (3) The user Monitor's "detach" argument is invalid in QMP and should not
644 be used
646 EQMP
649 .name = "migrate_cancel",
650 .args_type = "",
651 .mhandler.cmd_new = qmp_marshal_migrate_cancel,
654 SQMP
655 migrate_cancel
656 --------------
658 Cancel the current migration.
660 Arguments: None.
662 Example:
664 -> { "execute": "migrate_cancel" }
665 <- { "return": {} }
667 EQMP
670 .name = "migrate-incoming",
671 .args_type = "uri:s",
672 .mhandler.cmd_new = qmp_marshal_migrate_incoming,
675 SQMP
676 migrate-incoming
677 ----------------
679 Continue an incoming migration
681 Arguments:
683 - "uri": Source/listening URI (json-string)
685 Example:
687 -> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } }
688 <- { "return": {} }
690 Notes:
692 (1) QEMU must be started with -incoming defer to allow migrate-incoming to
693 be used
694 (2) The uri format is the same as for -incoming
696 EQMP
698 .name = "migrate-set-cache-size",
699 .args_type = "value:o",
700 .mhandler.cmd_new = qmp_marshal_migrate_set_cache_size,
703 SQMP
704 migrate-set-cache-size
705 ----------------------
707 Set cache size to be used by XBZRLE migration, the cache size will be rounded
708 down to the nearest power of 2
710 Arguments:
712 - "value": cache size in bytes (json-int)
714 Example:
716 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
717 <- { "return": {} }
719 EQMP
721 .name = "migrate-start-postcopy",
722 .args_type = "",
723 .mhandler.cmd_new = qmp_marshal_migrate_start_postcopy,
726 SQMP
727 migrate-start-postcopy
728 ----------------------
730 Switch an in-progress migration to postcopy mode. Ignored after the end of
731 migration (or once already in postcopy).
733 Example:
734 -> { "execute": "migrate-start-postcopy" }
735 <- { "return": {} }
737 EQMP
740 .name = "query-migrate-cache-size",
741 .args_type = "",
742 .mhandler.cmd_new = qmp_marshal_query_migrate_cache_size,
745 SQMP
746 query-migrate-cache-size
747 ------------------------
749 Show cache size to be used by XBZRLE migration
751 returns a json-object with the following information:
752 - "size" : json-int
754 Example:
756 -> { "execute": "query-migrate-cache-size" }
757 <- { "return": 67108864 }
759 EQMP
762 .name = "migrate_set_speed",
763 .args_type = "value:o",
764 .mhandler.cmd_new = qmp_marshal_migrate_set_speed,
767 SQMP
768 migrate_set_speed
769 -----------------
771 Set maximum speed for migrations.
773 Arguments:
775 - "value": maximum speed, in bytes per second (json-int)
777 Example:
779 -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
780 <- { "return": {} }
782 EQMP
785 .name = "migrate_set_downtime",
786 .args_type = "value:T",
787 .mhandler.cmd_new = qmp_marshal_migrate_set_downtime,
790 SQMP
791 migrate_set_downtime
792 --------------------
794 Set maximum tolerated downtime (in seconds) for migrations.
796 Arguments:
798 - "value": maximum downtime (json-number)
800 Example:
802 -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
803 <- { "return": {} }
805 EQMP
808 .name = "client_migrate_info",
809 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
810 .params = "protocol hostname port tls-port cert-subject",
811 .help = "set migration information for remote display",
812 .mhandler.cmd_new = qmp_marshal_client_migrate_info,
815 SQMP
816 client_migrate_info
817 -------------------
819 Set migration information for remote display. This makes the server
820 ask the client to automatically reconnect using the new parameters
821 once migration finished successfully. Only implemented for SPICE.
823 Arguments:
825 - "protocol": must be "spice" (json-string)
826 - "hostname": migration target hostname (json-string)
827 - "port": spice tcp port for plaintext channels (json-int, optional)
828 - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
829 - "cert-subject": server certificate subject (json-string, optional)
831 Example:
833 -> { "execute": "client_migrate_info",
834 "arguments": { "protocol": "spice",
835 "hostname": "virt42.lab.kraxel.org",
836 "port": 1234 } }
837 <- { "return": {} }
839 EQMP
842 .name = "dump-guest-memory",
843 .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
844 .params = "-p protocol [begin] [length] [format]",
845 .help = "dump guest memory to file",
846 .mhandler.cmd_new = qmp_marshal_dump_guest_memory,
849 SQMP
850 dump
853 Dump guest memory to file. The file can be processed with crash or gdb.
855 Arguments:
857 - "paging": do paging to get guest's memory mapping (json-bool)
858 - "protocol": destination file(started with "file:") or destination file
859 descriptor (started with "fd:") (json-string)
860 - "begin": the starting physical address. It's optional, and should be specified
861 with length together (json-int)
862 - "length": the memory size, in bytes. It's optional, and should be specified
863 with begin together (json-int)
864 - "format": the format of guest memory dump. It's optional, and can be
865 elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
866 conflict with paging and filter, ie. begin and length (json-string)
868 Example:
870 -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
871 <- { "return": {} }
873 Notes:
875 (1) All boolean arguments default to false
877 EQMP
880 .name = "query-dump-guest-memory-capability",
881 .args_type = "",
882 .mhandler.cmd_new = qmp_marshal_query_dump_guest_memory_capability,
885 SQMP
886 query-dump-guest-memory-capability
887 ----------
889 Show available formats for 'dump-guest-memory'
891 Example:
893 -> { "execute": "query-dump-guest-memory-capability" }
894 <- { "return": { "formats":
895 ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
897 EQMP
899 #if defined TARGET_S390X
901 .name = "dump-skeys",
902 .args_type = "filename:F",
903 .mhandler.cmd_new = qmp_marshal_dump_skeys,
905 #endif
907 SQMP
908 dump-skeys
909 ----------
911 Save guest storage keys to file.
913 Arguments:
915 - "filename": file path (json-string)
917 Example:
919 -> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } }
920 <- { "return": {} }
922 EQMP
925 .name = "netdev_add",
926 .args_type = "netdev:O",
927 .mhandler.cmd_new = qmp_netdev_add,
930 SQMP
931 netdev_add
932 ----------
934 Add host network device.
936 Arguments:
938 - "type": the device type, "tap", "user", ... (json-string)
939 - "id": the device's ID, must be unique (json-string)
940 - device options
942 Example:
944 -> { "execute": "netdev_add",
945 "arguments": { "type": "user", "id": "netdev1",
946 "dnssearch": "example.org" } }
947 <- { "return": {} }
949 Note: The supported device options are the same ones supported by the '-netdev'
950 command-line argument, which are listed in the '-help' output or QEMU's
951 manual
953 EQMP
956 .name = "netdev_del",
957 .args_type = "id:s",
958 .mhandler.cmd_new = qmp_marshal_netdev_del,
961 SQMP
962 netdev_del
963 ----------
965 Remove host network device.
967 Arguments:
969 - "id": the device's ID, must be unique (json-string)
971 Example:
973 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
974 <- { "return": {} }
977 EQMP
980 .name = "object-add",
981 .args_type = "qom-type:s,id:s,props:q?",
982 .mhandler.cmd_new = qmp_marshal_object_add,
985 SQMP
986 object-add
987 ----------
989 Create QOM object.
991 Arguments:
993 - "qom-type": the object's QOM type, i.e. the class name (json-string)
994 - "id": the object's ID, must be unique (json-string)
995 - "props": a dictionary of object property values (optional, json-dict)
997 Example:
999 -> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
1000 "props": { "filename": "/dev/hwrng" } } }
1001 <- { "return": {} }
1003 EQMP
1006 .name = "object-del",
1007 .args_type = "id:s",
1008 .mhandler.cmd_new = qmp_marshal_object_del,
1011 SQMP
1012 object-del
1013 ----------
1015 Remove QOM object.
1017 Arguments:
1019 - "id": the object's ID (json-string)
1021 Example:
1023 -> { "execute": "object-del", "arguments": { "id": "rng1" } }
1024 <- { "return": {} }
1027 EQMP
1031 .name = "block_resize",
1032 .args_type = "device:s?,node-name:s?,size:o",
1033 .mhandler.cmd_new = qmp_marshal_block_resize,
1036 SQMP
1037 block_resize
1038 ------------
1040 Resize a block image while a guest is running.
1042 Arguments:
1044 - "device": the device's ID, must be unique (json-string)
1045 - "node-name": the node name in the block driver state graph (json-string)
1046 - "size": new size
1048 Example:
1050 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1051 <- { "return": {} }
1053 EQMP
1056 .name = "block-stream",
1057 .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
1058 .mhandler.cmd_new = qmp_marshal_block_stream,
1061 SQMP
1062 block-stream
1063 ------------
1065 Copy data from a backing file into a block device.
1067 Arguments:
1069 - "device": The device's ID, must be unique (json-string)
1070 - "base": The file name of the backing image above which copying starts
1071 (json-string, optional)
1072 - "backing-file": The backing file string to write into the active layer. This
1073 filename is not validated.
1075 If a pathname string is such that it cannot be resolved by
1076 QEMU, that means that subsequent QMP or HMP commands must use
1077 node-names for the image in question, as filename lookup
1078 methods will fail.
1080 If not specified, QEMU will automatically determine the
1081 backing file string to use, or error out if there is no
1082 obvious choice. Care should be taken when specifying the
1083 string, to specify a valid filename or protocol.
1084 (json-string, optional) (Since 2.1)
1085 - "speed": the maximum speed, in bytes per second (json-int, optional)
1086 - "on-error": the action to take on an error (default 'report'). 'stop' and
1087 'enospc' can only be used if the block device supports io-status.
1088 (json-string, optional) (Since 2.1)
1090 Example:
1092 -> { "execute": "block-stream", "arguments": { "device": "virtio0",
1093 "base": "/tmp/master.qcow2" } }
1094 <- { "return": {} }
1096 EQMP
1099 .name = "block-commit",
1100 .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
1101 .mhandler.cmd_new = qmp_marshal_block_commit,
1104 SQMP
1105 block-commit
1106 ------------
1108 Live commit of data from overlay image nodes into backing nodes - i.e., writes
1109 data between 'top' and 'base' into 'base'.
1111 Arguments:
1113 - "device": The device's ID, must be unique (json-string)
1114 - "base": The file name of the backing image to write data into.
1115 If not specified, this is the deepest backing image
1116 (json-string, optional)
1117 - "top": The file name of the backing image within the image chain,
1118 which contains the topmost data to be committed down. If
1119 not specified, this is the active layer. (json-string, optional)
1121 - backing-file: The backing file string to write into the overlay
1122 image of 'top'. If 'top' is the active layer,
1123 specifying a backing file string is an error. This
1124 filename is not validated.
1126 If a pathname string is such that it cannot be
1127 resolved by QEMU, that means that subsequent QMP or
1128 HMP commands must use node-names for the image in
1129 question, as filename lookup methods will fail.
1131 If not specified, QEMU will automatically determine
1132 the backing file string to use, or error out if
1133 there is no obvious choice. Care should be taken
1134 when specifying the string, to specify a valid
1135 filename or protocol.
1136 (json-string, optional) (Since 2.1)
1138 If top == base, that is an error.
1139 If top == active, the job will not be completed by itself,
1140 user needs to complete the job with the block-job-complete
1141 command after getting the ready event. (Since 2.0)
1143 If the base image is smaller than top, then the base image
1144 will be resized to be the same size as top. If top is
1145 smaller than the base image, the base will not be
1146 truncated. If you want the base image size to match the
1147 size of the smaller top, you can safely truncate it
1148 yourself once the commit operation successfully completes.
1149 (json-string)
1150 - "speed": the maximum speed, in bytes per second (json-int, optional)
1153 Example:
1155 -> { "execute": "block-commit", "arguments": { "device": "virtio0",
1156 "top": "/tmp/snap1.qcow2" } }
1157 <- { "return": {} }
1159 EQMP
1162 .name = "drive-backup",
1163 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1164 "bitmap:s?,on-source-error:s?,on-target-error:s?",
1165 .mhandler.cmd_new = qmp_marshal_drive_backup,
1168 SQMP
1169 drive-backup
1170 ------------
1172 Start a point-in-time copy of a block device to a new destination. The
1173 status of ongoing drive-backup operations can be checked with
1174 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1175 The operation can be stopped before it has completed using the
1176 block-job-cancel command.
1178 Arguments:
1180 - "device": the name of the device which should be copied.
1181 (json-string)
1182 - "target": the target of the new image. If the file exists, or if it is a
1183 device, the existing file/device will be used as the new
1184 destination. If it does not exist, a new file will be created.
1185 (json-string)
1186 - "format": the format of the new destination, default is to probe if 'mode' is
1187 'existing', else the format of the source
1188 (json-string, optional)
1189 - "sync": what parts of the disk image should be copied to the destination;
1190 possibilities include "full" for all the disk, "top" for only the sectors
1191 allocated in the topmost image, "incremental" for only the dirty sectors in
1192 the bitmap, or "none" to only replicate new I/O (MirrorSyncMode).
1193 - "bitmap": dirty bitmap name for sync==incremental. Must be present if sync
1194 is "incremental", must NOT be present otherwise.
1195 - "mode": whether and how QEMU should create a new image
1196 (NewImageMode, optional, default 'absolute-paths')
1197 - "speed": the maximum speed, in bytes per second (json-int, optional)
1198 - "on-source-error": the action to take on an error on the source, default
1199 'report'. 'stop' and 'enospc' can only be used
1200 if the block device supports io-status.
1201 (BlockdevOnError, optional)
1202 - "on-target-error": the action to take on an error on the target, default
1203 'report' (no limitations, since this applies to
1204 a different block device than device).
1205 (BlockdevOnError, optional)
1207 Example:
1208 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
1209 "sync": "full",
1210 "target": "backup.img" } }
1211 <- { "return": {} }
1213 EQMP
1216 .name = "blockdev-backup",
1217 .args_type = "sync:s,device:B,target:B,speed:i?,"
1218 "on-source-error:s?,on-target-error:s?",
1219 .mhandler.cmd_new = qmp_marshal_blockdev_backup,
1222 SQMP
1223 blockdev-backup
1224 ---------------
1226 The device version of drive-backup: this command takes an existing named device
1227 as backup target.
1229 Arguments:
1231 - "device": the name of the device which should be copied.
1232 (json-string)
1233 - "target": the name of the backup target device. (json-string)
1234 - "sync": what parts of the disk image should be copied to the destination;
1235 possibilities include "full" for all the disk, "top" for only the
1236 sectors allocated in the topmost image, or "none" to only replicate
1237 new I/O (MirrorSyncMode).
1238 - "speed": the maximum speed, in bytes per second (json-int, optional)
1239 - "on-source-error": the action to take on an error on the source, default
1240 'report'. 'stop' and 'enospc' can only be used
1241 if the block device supports io-status.
1242 (BlockdevOnError, optional)
1243 - "on-target-error": the action to take on an error on the target, default
1244 'report' (no limitations, since this applies to
1245 a different block device than device).
1246 (BlockdevOnError, optional)
1248 Example:
1249 -> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
1250 "sync": "full",
1251 "target": "tgt-id" } }
1252 <- { "return": {} }
1254 EQMP
1257 .name = "block-job-set-speed",
1258 .args_type = "device:B,speed:o",
1259 .mhandler.cmd_new = qmp_marshal_block_job_set_speed,
1263 .name = "block-job-cancel",
1264 .args_type = "device:B,force:b?",
1265 .mhandler.cmd_new = qmp_marshal_block_job_cancel,
1268 .name = "block-job-pause",
1269 .args_type = "device:B",
1270 .mhandler.cmd_new = qmp_marshal_block_job_pause,
1273 .name = "block-job-resume",
1274 .args_type = "device:B",
1275 .mhandler.cmd_new = qmp_marshal_block_job_resume,
1278 .name = "block-job-complete",
1279 .args_type = "device:B",
1280 .mhandler.cmd_new = qmp_marshal_block_job_complete,
1283 .name = "transaction",
1284 .args_type = "actions:q",
1285 .mhandler.cmd_new = qmp_marshal_transaction,
1288 SQMP
1289 transaction
1290 -----------
1292 Atomically operate on one or more block devices. Operations that are
1293 currently supported:
1295 - drive-backup
1296 - blockdev-backup
1297 - blockdev-snapshot-sync
1298 - blockdev-snapshot-internal-sync
1299 - abort
1300 - block-dirty-bitmap-add
1301 - block-dirty-bitmap-clear
1303 Refer to the qemu/qapi-schema.json file for minimum required QEMU
1304 versions for these operations. A list of dictionaries is accepted,
1305 that contains the actions to be performed. If there is any failure
1306 performing any of the operations, all operations for the group are
1307 abandoned.
1309 For external snapshots, the dictionary contains the device, the file to use for
1310 the new snapshot, and the format. The default format, if not specified, is
1311 qcow2.
1313 Each new snapshot defaults to being created by QEMU (wiping any
1314 contents if the file already exists), but it is also possible to reuse
1315 an externally-created file. In the latter case, you should ensure that
1316 the new image file has the same contents as the current one; QEMU cannot
1317 perform any meaningful check. Typically this is achieved by using the
1318 current image file as the backing file for the new image.
1320 On failure, the original disks pre-snapshot attempt will be used.
1322 For internal snapshots, the dictionary contains the device and the snapshot's
1323 name. If an internal snapshot matching name already exists, the request will
1324 be rejected. Only some image formats support it, for example, qcow2, rbd,
1325 and sheepdog.
1327 On failure, qemu will try delete the newly created internal snapshot in the
1328 transaction. When an I/O error occurs during deletion, the user needs to fix
1329 it later with qemu-img or other command.
1331 Arguments:
1333 actions array:
1334 - "type": the operation to perform (json-string). Possible
1335 values: "drive-backup", "blockdev-backup",
1336 "blockdev-snapshot-sync",
1337 "blockdev-snapshot-internal-sync",
1338 "abort", "block-dirty-bitmap-add",
1339 "block-dirty-bitmap-clear"
1340 - "data": a dictionary. The contents depend on the value
1341 of "type". When "type" is "blockdev-snapshot-sync":
1342 - "device": device name to snapshot (json-string)
1343 - "node-name": graph node name to snapshot (json-string)
1344 - "snapshot-file": name of new image file (json-string)
1345 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1346 - "format": format of new image (json-string, optional)
1347 - "mode": whether and how QEMU should create the snapshot file
1348 (NewImageMode, optional, default "absolute-paths")
1349 When "type" is "blockdev-snapshot-internal-sync":
1350 - "device": device name to snapshot (json-string)
1351 - "name": name of the new snapshot (json-string)
1353 Example:
1355 -> { "execute": "transaction",
1356 "arguments": { "actions": [
1357 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
1358 "snapshot-file": "/some/place/my-image",
1359 "format": "qcow2" } },
1360 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
1361 "snapshot-file": "/some/place/my-image2",
1362 "snapshot-node-name": "node3432",
1363 "mode": "existing",
1364 "format": "qcow2" } },
1365 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
1366 "snapshot-file": "/some/place/my-image2",
1367 "mode": "existing",
1368 "format": "qcow2" } },
1369 { "type": "blockdev-snapshot-internal-sync", "data" : {
1370 "device": "ide-hd2",
1371 "name": "snapshot0" } } ] } }
1372 <- { "return": {} }
1374 EQMP
1377 .name = "block-dirty-bitmap-add",
1378 .args_type = "node:B,name:s,granularity:i?",
1379 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_add,
1382 SQMP
1384 block-dirty-bitmap-add
1385 ----------------------
1386 Since 2.4
1388 Create a dirty bitmap with a name on the device, and start tracking the writes.
1390 Arguments:
1392 - "node": device/node on which to create dirty bitmap (json-string)
1393 - "name": name of the new dirty bitmap (json-string)
1394 - "granularity": granularity to track writes with (int, optional)
1396 Example:
1398 -> { "execute": "block-dirty-bitmap-add", "arguments": { "node": "drive0",
1399 "name": "bitmap0" } }
1400 <- { "return": {} }
1402 EQMP
1405 .name = "block-dirty-bitmap-remove",
1406 .args_type = "node:B,name:s",
1407 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_remove,
1410 SQMP
1412 block-dirty-bitmap-remove
1413 -------------------------
1414 Since 2.4
1416 Stop write tracking and remove the dirty bitmap that was created with
1417 block-dirty-bitmap-add.
1419 Arguments:
1421 - "node": device/node on which to remove dirty bitmap (json-string)
1422 - "name": name of the dirty bitmap to remove (json-string)
1424 Example:
1426 -> { "execute": "block-dirty-bitmap-remove", "arguments": { "node": "drive0",
1427 "name": "bitmap0" } }
1428 <- { "return": {} }
1430 EQMP
1433 .name = "block-dirty-bitmap-clear",
1434 .args_type = "node:B,name:s",
1435 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_clear,
1438 SQMP
1440 block-dirty-bitmap-clear
1441 ------------------------
1442 Since 2.4
1444 Reset the dirty bitmap associated with a node so that an incremental backup
1445 from this point in time forward will only backup clusters modified after this
1446 clear operation.
1448 Arguments:
1450 - "node": device/node on which to remove dirty bitmap (json-string)
1451 - "name": name of the dirty bitmap to remove (json-string)
1453 Example:
1455 -> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0",
1456 "name": "bitmap0" } }
1457 <- { "return": {} }
1459 EQMP
1462 .name = "blockdev-snapshot-sync",
1463 .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
1464 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot_sync,
1467 SQMP
1468 blockdev-snapshot-sync
1469 ----------------------
1471 Synchronous snapshot of a block device. snapshot-file specifies the
1472 target of the new image. If the file exists, or if it is a device, the
1473 snapshot will be created in the existing file/device. If does not
1474 exist, a new file will be created. format specifies the format of the
1475 snapshot image, default is qcow2.
1477 Arguments:
1479 - "device": device name to snapshot (json-string)
1480 - "node-name": graph node name to snapshot (json-string)
1481 - "snapshot-file": name of new image file (json-string)
1482 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1483 - "mode": whether and how QEMU should create the snapshot file
1484 (NewImageMode, optional, default "absolute-paths")
1485 - "format": format of new image (json-string, optional)
1487 Example:
1489 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1490 "snapshot-file":
1491 "/some/place/my-image",
1492 "format": "qcow2" } }
1493 <- { "return": {} }
1495 EQMP
1498 .name = "blockdev-snapshot",
1499 .args_type = "node:s,overlay:s",
1500 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot,
1503 SQMP
1504 blockdev-snapshot
1505 -----------------
1506 Since 2.5
1508 Create a snapshot, by installing 'node' as the backing image of
1509 'overlay'. Additionally, if 'node' is associated with a block
1510 device, the block device changes to using 'overlay' as its new active
1511 image.
1513 Arguments:
1515 - "node": device that will have a snapshot created (json-string)
1516 - "overlay": device that will have 'node' as its backing image (json-string)
1518 Example:
1520 -> { "execute": "blockdev-add",
1521 "arguments": { "options": { "driver": "qcow2",
1522 "node-name": "node1534",
1523 "file": { "driver": "file",
1524 "filename": "hd1.qcow2" },
1525 "backing": "" } } }
1527 <- { "return": {} }
1529 -> { "execute": "blockdev-snapshot", "arguments": { "node": "ide-hd0",
1530 "overlay": "node1534" } }
1531 <- { "return": {} }
1533 EQMP
1536 .name = "blockdev-snapshot-internal-sync",
1537 .args_type = "device:B,name:s",
1538 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot_internal_sync,
1541 SQMP
1542 blockdev-snapshot-internal-sync
1543 -------------------------------
1545 Synchronously take an internal snapshot of a block device when the format of
1546 image used supports it. If the name is an empty string, or a snapshot with
1547 name already exists, the operation will fail.
1549 Arguments:
1551 - "device": device name to snapshot (json-string)
1552 - "name": name of the new snapshot (json-string)
1554 Example:
1556 -> { "execute": "blockdev-snapshot-internal-sync",
1557 "arguments": { "device": "ide-hd0",
1558 "name": "snapshot0" }
1560 <- { "return": {} }
1562 EQMP
1565 .name = "blockdev-snapshot-delete-internal-sync",
1566 .args_type = "device:B,id:s?,name:s?",
1567 .mhandler.cmd_new =
1568 qmp_marshal_blockdev_snapshot_delete_internal_sync,
1571 SQMP
1572 blockdev-snapshot-delete-internal-sync
1573 --------------------------------------
1575 Synchronously delete an internal snapshot of a block device when the format of
1576 image used supports it. The snapshot is identified by name or id or both. One
1577 of name or id is required. If the snapshot is not found, the operation will
1578 fail.
1580 Arguments:
1582 - "device": device name (json-string)
1583 - "id": ID of the snapshot (json-string, optional)
1584 - "name": name of the snapshot (json-string, optional)
1586 Example:
1588 -> { "execute": "blockdev-snapshot-delete-internal-sync",
1589 "arguments": { "device": "ide-hd0",
1590 "name": "snapshot0" }
1592 <- { "return": {
1593 "id": "1",
1594 "name": "snapshot0",
1595 "vm-state-size": 0,
1596 "date-sec": 1000012,
1597 "date-nsec": 10,
1598 "vm-clock-sec": 100,
1599 "vm-clock-nsec": 20
1603 EQMP
1606 .name = "drive-mirror",
1607 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1608 "node-name:s?,replaces:s?,"
1609 "on-source-error:s?,on-target-error:s?,"
1610 "unmap:b?,"
1611 "granularity:i?,buf-size:i?",
1612 .mhandler.cmd_new = qmp_marshal_drive_mirror,
1615 SQMP
1616 drive-mirror
1617 ------------
1619 Start mirroring a block device's writes to a new destination. target
1620 specifies the target of the new image. If the file exists, or if it is
1621 a device, it will be used as the new destination for writes. If it does not
1622 exist, a new file will be created. format specifies the format of the
1623 mirror image, default is to probe if mode='existing', else the format
1624 of the source.
1626 Arguments:
1628 - "device": device name to operate on (json-string)
1629 - "target": name of new image file (json-string)
1630 - "format": format of new image (json-string, optional)
1631 - "node-name": the name of the new block driver state in the node graph
1632 (json-string, optional)
1633 - "replaces": the block driver node name to replace when finished
1634 (json-string, optional)
1635 - "mode": how an image file should be created into the target
1636 file/device (NewImageMode, optional, default 'absolute-paths')
1637 - "speed": maximum speed of the streaming job, in bytes per second
1638 (json-int)
1639 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1640 - "buf_size": maximum amount of data in flight from source to target, in bytes
1641 (json-int, default 10M)
1642 - "sync": what parts of the disk image should be copied to the destination;
1643 possibilities include "full" for all the disk, "top" for only the sectors
1644 allocated in the topmost image, or "none" to only replicate new I/O
1645 (MirrorSyncMode).
1646 - "on-source-error": the action to take on an error on the source
1647 (BlockdevOnError, default 'report')
1648 - "on-target-error": the action to take on an error on the target
1649 (BlockdevOnError, default 'report')
1650 - "unmap": whether the target sectors should be discarded where source has only
1651 zeroes. (json-bool, optional, default true)
1653 The default value of the granularity is the image cluster size clamped
1654 between 4096 and 65536, if the image format defines one. If the format
1655 does not define a cluster size, the default value of the granularity
1656 is 65536.
1659 Example:
1661 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1662 "target": "/some/place/my-image",
1663 "sync": "full",
1664 "format": "qcow2" } }
1665 <- { "return": {} }
1667 EQMP
1670 .name = "change-backing-file",
1671 .args_type = "device:s,image-node-name:s,backing-file:s",
1672 .mhandler.cmd_new = qmp_marshal_change_backing_file,
1675 SQMP
1676 change-backing-file
1677 -------------------
1678 Since: 2.1
1680 Change the backing file in the image file metadata. This does not cause
1681 QEMU to reopen the image file to reparse the backing filename (it may,
1682 however, perform a reopen to change permissions from r/o -> r/w -> r/o,
1683 if needed). The new backing file string is written into the image file
1684 metadata, and the QEMU internal strings are updated.
1686 Arguments:
1688 - "image-node-name": The name of the block driver state node of the
1689 image to modify. The "device" is argument is used to
1690 verify "image-node-name" is in the chain described by
1691 "device".
1692 (json-string, optional)
1694 - "device": The name of the device.
1695 (json-string)
1697 - "backing-file": The string to write as the backing file. This string is
1698 not validated, so care should be taken when specifying
1699 the string or the image chain may not be able to be
1700 reopened again.
1701 (json-string)
1703 Returns: Nothing on success
1704 If "device" does not exist or cannot be determined, DeviceNotFound
1706 EQMP
1709 .name = "balloon",
1710 .args_type = "value:M",
1711 .mhandler.cmd_new = qmp_marshal_balloon,
1714 SQMP
1715 balloon
1716 -------
1718 Request VM to change its memory allocation (in bytes).
1720 Arguments:
1722 - "value": New memory allocation (json-int)
1724 Example:
1726 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1727 <- { "return": {} }
1729 EQMP
1732 .name = "set_link",
1733 .args_type = "name:s,up:b",
1734 .mhandler.cmd_new = qmp_marshal_set_link,
1737 SQMP
1738 set_link
1739 --------
1741 Change the link status of a network adapter.
1743 Arguments:
1745 - "name": network device name (json-string)
1746 - "up": status is up (json-bool)
1748 Example:
1750 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1751 <- { "return": {} }
1753 EQMP
1756 .name = "getfd",
1757 .args_type = "fdname:s",
1758 .params = "getfd name",
1759 .help = "receive a file descriptor via SCM rights and assign it a name",
1760 .mhandler.cmd_new = qmp_marshal_getfd,
1763 SQMP
1764 getfd
1765 -----
1767 Receive a file descriptor via SCM rights and assign it a name.
1769 Arguments:
1771 - "fdname": file descriptor name (json-string)
1773 Example:
1775 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1776 <- { "return": {} }
1778 Notes:
1780 (1) If the name specified by the "fdname" argument already exists,
1781 the file descriptor assigned to it will be closed and replaced
1782 by the received file descriptor.
1783 (2) The 'closefd' command can be used to explicitly close the file
1784 descriptor when it is no longer needed.
1786 EQMP
1789 .name = "closefd",
1790 .args_type = "fdname:s",
1791 .params = "closefd name",
1792 .help = "close a file descriptor previously passed via SCM rights",
1793 .mhandler.cmd_new = qmp_marshal_closefd,
1796 SQMP
1797 closefd
1798 -------
1800 Close a file descriptor previously passed via SCM rights.
1802 Arguments:
1804 - "fdname": file descriptor name (json-string)
1806 Example:
1808 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1809 <- { "return": {} }
1811 EQMP
1814 .name = "add-fd",
1815 .args_type = "fdset-id:i?,opaque:s?",
1816 .params = "add-fd fdset-id opaque",
1817 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1818 .mhandler.cmd_new = qmp_marshal_add_fd,
1821 SQMP
1822 add-fd
1823 -------
1825 Add a file descriptor, that was passed via SCM rights, to an fd set.
1827 Arguments:
1829 - "fdset-id": The ID of the fd set to add the file descriptor to.
1830 (json-int, optional)
1831 - "opaque": A free-form string that can be used to describe the fd.
1832 (json-string, optional)
1834 Return a json-object with the following information:
1836 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1837 - "fd": The file descriptor that was received via SCM rights and added to the
1838 fd set. (json-int)
1840 Example:
1842 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1843 <- { "return": { "fdset-id": 1, "fd": 3 } }
1845 Notes:
1847 (1) The list of fd sets is shared by all monitor connections.
1848 (2) If "fdset-id" is not specified, a new fd set will be created.
1850 EQMP
1853 .name = "remove-fd",
1854 .args_type = "fdset-id:i,fd:i?",
1855 .params = "remove-fd fdset-id fd",
1856 .help = "Remove a file descriptor from an fd set",
1857 .mhandler.cmd_new = qmp_marshal_remove_fd,
1860 SQMP
1861 remove-fd
1862 ---------
1864 Remove a file descriptor from an fd set.
1866 Arguments:
1868 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1869 (json-int)
1870 - "fd": The file descriptor that is to be removed. (json-int, optional)
1872 Example:
1874 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1875 <- { "return": {} }
1877 Notes:
1879 (1) The list of fd sets is shared by all monitor connections.
1880 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1881 removed.
1883 EQMP
1886 .name = "query-fdsets",
1887 .args_type = "",
1888 .help = "Return information describing all fd sets",
1889 .mhandler.cmd_new = qmp_marshal_query_fdsets,
1892 SQMP
1893 query-fdsets
1894 -------------
1896 Return information describing all fd sets.
1898 Arguments: None
1900 Example:
1902 -> { "execute": "query-fdsets" }
1903 <- { "return": [
1905 "fds": [
1907 "fd": 30,
1908 "opaque": "rdonly:/path/to/file"
1911 "fd": 24,
1912 "opaque": "rdwr:/path/to/file"
1915 "fdset-id": 1
1918 "fds": [
1920 "fd": 28
1923 "fd": 29
1926 "fdset-id": 0
1931 Note: The list of fd sets is shared by all monitor connections.
1933 EQMP
1936 .name = "block_passwd",
1937 .args_type = "device:s?,node-name:s?,password:s",
1938 .mhandler.cmd_new = qmp_marshal_block_passwd,
1941 SQMP
1942 block_passwd
1943 ------------
1945 Set the password of encrypted block devices.
1947 Arguments:
1949 - "device": device name (json-string)
1950 - "node-name": name in the block driver state graph (json-string)
1951 - "password": password (json-string)
1953 Example:
1955 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1956 "password": "12345" } }
1957 <- { "return": {} }
1959 EQMP
1962 .name = "block_set_io_throttle",
1963 .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?",
1964 .mhandler.cmd_new = qmp_marshal_block_set_io_throttle,
1967 SQMP
1968 block_set_io_throttle
1969 ------------
1971 Change I/O throttle limits for a block drive.
1973 Arguments:
1975 - "device": device name (json-string)
1976 - "bps": total throughput limit in bytes per second (json-int)
1977 - "bps_rd": read throughput limit in bytes per second (json-int)
1978 - "bps_wr": write throughput limit in bytes per second (json-int)
1979 - "iops": total I/O operations per second (json-int)
1980 - "iops_rd": read I/O operations per second (json-int)
1981 - "iops_wr": write I/O operations per second (json-int)
1982 - "bps_max": total max in bytes (json-int)
1983 - "bps_rd_max": read max in bytes (json-int)
1984 - "bps_wr_max": write max in bytes (json-int)
1985 - "iops_max": total I/O operations max (json-int)
1986 - "iops_rd_max": read I/O operations max (json-int)
1987 - "iops_wr_max": write I/O operations max (json-int)
1988 - "iops_size": I/O size in bytes when limiting (json-int)
1989 - "group": throttle group name (json-string)
1991 Example:
1993 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1994 "bps": 1000000,
1995 "bps_rd": 0,
1996 "bps_wr": 0,
1997 "iops": 0,
1998 "iops_rd": 0,
1999 "iops_wr": 0,
2000 "bps_max": 8000000,
2001 "bps_rd_max": 0,
2002 "bps_wr_max": 0,
2003 "iops_max": 0,
2004 "iops_rd_max": 0,
2005 "iops_wr_max": 0,
2006 "iops_size": 0 } }
2007 <- { "return": {} }
2009 EQMP
2012 .name = "set_password",
2013 .args_type = "protocol:s,password:s,connected:s?",
2014 .mhandler.cmd_new = qmp_marshal_set_password,
2017 SQMP
2018 set_password
2019 ------------
2021 Set the password for vnc/spice protocols.
2023 Arguments:
2025 - "protocol": protocol name (json-string)
2026 - "password": password (json-string)
2027 - "connected": [ keep | disconnect | fail ] (json-string, optional)
2029 Example:
2031 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
2032 "password": "secret" } }
2033 <- { "return": {} }
2035 EQMP
2038 .name = "expire_password",
2039 .args_type = "protocol:s,time:s",
2040 .mhandler.cmd_new = qmp_marshal_expire_password,
2043 SQMP
2044 expire_password
2045 ---------------
2047 Set the password expire time for vnc/spice protocols.
2049 Arguments:
2051 - "protocol": protocol name (json-string)
2052 - "time": [ now | never | +secs | secs ] (json-string)
2054 Example:
2056 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2057 "time": "+60" } }
2058 <- { "return": {} }
2060 EQMP
2063 .name = "add_client",
2064 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
2065 .mhandler.cmd_new = qmp_marshal_add_client,
2068 SQMP
2069 add_client
2070 ----------
2072 Add a graphics client
2074 Arguments:
2076 - "protocol": protocol name (json-string)
2077 - "fdname": file descriptor name (json-string)
2078 - "skipauth": whether to skip authentication (json-bool, optional)
2079 - "tls": whether to perform TLS (json-bool, optional)
2081 Example:
2083 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
2084 "fdname": "myclient" } }
2085 <- { "return": {} }
2087 EQMP
2089 .name = "qmp_capabilities",
2090 .args_type = "",
2091 .params = "",
2092 .help = "enable QMP capabilities",
2093 .mhandler.cmd_new = qmp_capabilities,
2096 SQMP
2097 qmp_capabilities
2098 ----------------
2100 Enable QMP capabilities.
2102 Arguments: None.
2104 Example:
2106 -> { "execute": "qmp_capabilities" }
2107 <- { "return": {} }
2109 Note: This command must be issued before issuing any other command.
2111 EQMP
2114 .name = "human-monitor-command",
2115 .args_type = "command-line:s,cpu-index:i?",
2116 .mhandler.cmd_new = qmp_marshal_human_monitor_command,
2119 SQMP
2120 human-monitor-command
2121 ---------------------
2123 Execute a Human Monitor command.
2125 Arguments:
2127 - command-line: the command name and its arguments, just like the
2128 Human Monitor's shell (json-string)
2129 - cpu-index: select the CPU number to be used by commands which access CPU
2130 data, like 'info registers'. The Monitor selects CPU 0 if this
2131 argument is not provided (json-int, optional)
2133 Example:
2135 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
2136 <- { "return": "kvm support: enabled\r\n" }
2138 Notes:
2140 (1) The Human Monitor is NOT an stable interface, this means that command
2141 names, arguments and responses can change or be removed at ANY time.
2142 Applications that rely on long term stability guarantees should NOT
2143 use this command
2145 (2) Limitations:
2147 o This command is stateless, this means that commands that depend
2148 on state information (such as getfd) might not work
2150 o Commands that prompt the user for data (eg. 'cont' when the block
2151 device is encrypted) don't currently work
2153 3. Query Commands
2154 =================
2156 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
2157 HXCOMM this! We will possibly move query commands definitions inside those
2158 HXCOMM sections, just like regular commands.
2160 EQMP
2162 SQMP
2163 query-version
2164 -------------
2166 Show QEMU version.
2168 Return a json-object with the following information:
2170 - "qemu": A json-object containing three integer values:
2171 - "major": QEMU's major version (json-int)
2172 - "minor": QEMU's minor version (json-int)
2173 - "micro": QEMU's micro version (json-int)
2174 - "package": package's version (json-string)
2176 Example:
2178 -> { "execute": "query-version" }
2179 <- {
2180 "return":{
2181 "qemu":{
2182 "major":0,
2183 "minor":11,
2184 "micro":5
2186 "package":""
2190 EQMP
2193 .name = "query-version",
2194 .args_type = "",
2195 .mhandler.cmd_new = qmp_marshal_query_version,
2198 SQMP
2199 query-commands
2200 --------------
2202 List QMP available commands.
2204 Each command is represented by a json-object, the returned value is a json-array
2205 of all commands.
2207 Each json-object contain:
2209 - "name": command's name (json-string)
2211 Example:
2213 -> { "execute": "query-commands" }
2214 <- {
2215 "return":[
2217 "name":"query-balloon"
2220 "name":"system_powerdown"
2225 Note: This example has been shortened as the real response is too long.
2227 EQMP
2230 .name = "query-commands",
2231 .args_type = "",
2232 .mhandler.cmd_new = qmp_marshal_query_commands,
2235 SQMP
2236 query-events
2237 --------------
2239 List QMP available events.
2241 Each event is represented by a json-object, the returned value is a json-array
2242 of all events.
2244 Each json-object contains:
2246 - "name": event's name (json-string)
2248 Example:
2250 -> { "execute": "query-events" }
2251 <- {
2252 "return":[
2254 "name":"SHUTDOWN"
2257 "name":"RESET"
2262 Note: This example has been shortened as the real response is too long.
2264 EQMP
2267 .name = "query-events",
2268 .args_type = "",
2269 .mhandler.cmd_new = qmp_marshal_query_events,
2272 SQMP
2273 query-qmp-schema
2274 ----------------
2276 Return the QMP wire schema. The returned value is a json-array of
2277 named schema entities. Entities are commands, events and various
2278 types. See docs/qapi-code-gen.txt for information on their structure
2279 and intended use.
2281 EQMP
2284 .name = "query-qmp-schema",
2285 .args_type = "",
2286 .mhandler.cmd_new = qmp_query_qmp_schema,
2289 SQMP
2290 query-chardev
2291 -------------
2293 Each device is represented by a json-object. The returned value is a json-array
2294 of all devices.
2296 Each json-object contain the following:
2298 - "label": device's label (json-string)
2299 - "filename": device's file (json-string)
2300 - "frontend-open": open/closed state of the frontend device attached to this
2301 backend (json-bool)
2303 Example:
2305 -> { "execute": "query-chardev" }
2306 <- {
2307 "return": [
2309 "label": "charchannel0",
2310 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2311 "frontend-open": false
2314 "label": "charmonitor",
2315 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2316 "frontend-open": true
2319 "label": "charserial0",
2320 "filename": "pty:/dev/pts/2",
2321 "frontend-open": true
2326 EQMP
2329 .name = "query-chardev",
2330 .args_type = "",
2331 .mhandler.cmd_new = qmp_marshal_query_chardev,
2334 SQMP
2335 query-chardev-backends
2336 -------------
2338 List available character device backends.
2340 Each backend is represented by a json-object, the returned value is a json-array
2341 of all backends.
2343 Each json-object contains:
2345 - "name": backend name (json-string)
2347 Example:
2349 -> { "execute": "query-chardev-backends" }
2350 <- {
2351 "return":[
2353 "name":"udp"
2356 "name":"tcp"
2359 "name":"unix"
2362 "name":"spiceport"
2367 EQMP
2370 .name = "query-chardev-backends",
2371 .args_type = "",
2372 .mhandler.cmd_new = qmp_marshal_query_chardev_backends,
2375 SQMP
2376 query-block
2377 -----------
2379 Show the block devices.
2381 Each block device information is stored in a json-object and the returned value
2382 is a json-array of all devices.
2384 Each json-object contain the following:
2386 - "device": device name (json-string)
2387 - "type": device type (json-string)
2388 - deprecated, retained for backward compatibility
2389 - Possible values: "unknown"
2390 - "removable": true if the device is removable, false otherwise (json-bool)
2391 - "locked": true if the device is locked, false otherwise (json-bool)
2392 - "tray_open": only present if removable, true if the device has a tray,
2393 and it is open (json-bool)
2394 - "inserted": only present if the device is inserted, it is a json-object
2395 containing the following:
2396 - "file": device file name (json-string)
2397 - "ro": true if read-only, false otherwise (json-bool)
2398 - "drv": driver format name (json-string)
2399 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
2400 "file", "file", "ftp", "ftps", "host_cdrom",
2401 "host_device", "http", "https",
2402 "nbd", "parallels", "qcow", "qcow2", "raw",
2403 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2404 - "backing_file": backing file name (json-string, optional)
2405 - "backing_file_depth": number of files in the backing file chain (json-int)
2406 - "encrypted": true if encrypted, false otherwise (json-bool)
2407 - "bps": limit total bytes per second (json-int)
2408 - "bps_rd": limit read bytes per second (json-int)
2409 - "bps_wr": limit write bytes per second (json-int)
2410 - "iops": limit total I/O operations per second (json-int)
2411 - "iops_rd": limit read operations per second (json-int)
2412 - "iops_wr": limit write operations per second (json-int)
2413 - "bps_max": total max in bytes (json-int)
2414 - "bps_rd_max": read max in bytes (json-int)
2415 - "bps_wr_max": write max in bytes (json-int)
2416 - "iops_max": total I/O operations max (json-int)
2417 - "iops_rd_max": read I/O operations max (json-int)
2418 - "iops_wr_max": write I/O operations max (json-int)
2419 - "iops_size": I/O size when limiting by iops (json-int)
2420 - "detect_zeroes": detect and optimize zero writing (json-string)
2421 - Possible values: "off", "on", "unmap"
2422 - "write_threshold": write offset threshold in bytes, a event will be
2423 emitted if crossed. Zero if disabled (json-int)
2424 - "image": the detail of the image, it is a json-object containing
2425 the following:
2426 - "filename": image file name (json-string)
2427 - "format": image format (json-string)
2428 - "virtual-size": image capacity in bytes (json-int)
2429 - "dirty-flag": true if image is not cleanly closed, not present
2430 means clean (json-bool, optional)
2431 - "actual-size": actual size on disk in bytes of the image, not
2432 present when image does not support thin
2433 provision (json-int, optional)
2434 - "cluster-size": size of a cluster in bytes, not present if image
2435 format does not support it (json-int, optional)
2436 - "encrypted": true if the image is encrypted, not present means
2437 false or the image format does not support
2438 encryption (json-bool, optional)
2439 - "backing_file": backing file name, not present means no backing
2440 file is used or the image format does not
2441 support backing file chain
2442 (json-string, optional)
2443 - "full-backing-filename": full path of the backing file, not
2444 present if it equals backing_file or no
2445 backing file is used
2446 (json-string, optional)
2447 - "backing-filename-format": the format of the backing file, not
2448 present means unknown or no backing
2449 file (json-string, optional)
2450 - "snapshots": the internal snapshot info, it is an optional list
2451 of json-object containing the following:
2452 - "id": unique snapshot id (json-string)
2453 - "name": snapshot name (json-string)
2454 - "vm-state-size": size of the VM state in bytes (json-int)
2455 - "date-sec": UTC date of the snapshot in seconds (json-int)
2456 - "date-nsec": fractional part in nanoseconds to be used with
2457 date-sec (json-int)
2458 - "vm-clock-sec": VM clock relative to boot in seconds
2459 (json-int)
2460 - "vm-clock-nsec": fractional part in nanoseconds to be used
2461 with vm-clock-sec (json-int)
2462 - "backing-image": the detail of the backing image, it is an
2463 optional json-object only present when a
2464 backing image present for this image
2466 - "io-status": I/O operation status, only present if the device supports it
2467 and the VM is configured to stop on errors. It's always reset
2468 to "ok" when the "cont" command is issued (json_string, optional)
2469 - Possible values: "ok", "failed", "nospace"
2471 Example:
2473 -> { "execute": "query-block" }
2474 <- {
2475 "return":[
2477 "io-status": "ok",
2478 "device":"ide0-hd0",
2479 "locked":false,
2480 "removable":false,
2481 "inserted":{
2482 "ro":false,
2483 "drv":"qcow2",
2484 "encrypted":false,
2485 "file":"disks/test.qcow2",
2486 "backing_file_depth":1,
2487 "bps":1000000,
2488 "bps_rd":0,
2489 "bps_wr":0,
2490 "iops":1000000,
2491 "iops_rd":0,
2492 "iops_wr":0,
2493 "bps_max": 8000000,
2494 "bps_rd_max": 0,
2495 "bps_wr_max": 0,
2496 "iops_max": 0,
2497 "iops_rd_max": 0,
2498 "iops_wr_max": 0,
2499 "iops_size": 0,
2500 "detect_zeroes": "on",
2501 "write_threshold": 0,
2502 "image":{
2503 "filename":"disks/test.qcow2",
2504 "format":"qcow2",
2505 "virtual-size":2048000,
2506 "backing_file":"base.qcow2",
2507 "full-backing-filename":"disks/base.qcow2",
2508 "backing-filename-format":"qcow2",
2509 "snapshots":[
2511 "id": "1",
2512 "name": "snapshot1",
2513 "vm-state-size": 0,
2514 "date-sec": 10000200,
2515 "date-nsec": 12,
2516 "vm-clock-sec": 206,
2517 "vm-clock-nsec": 30
2520 "backing-image":{
2521 "filename":"disks/base.qcow2",
2522 "format":"qcow2",
2523 "virtual-size":2048000
2527 "type":"unknown"
2530 "io-status": "ok",
2531 "device":"ide1-cd0",
2532 "locked":false,
2533 "removable":true,
2534 "type":"unknown"
2537 "device":"floppy0",
2538 "locked":false,
2539 "removable":true,
2540 "type":"unknown"
2543 "device":"sd0",
2544 "locked":false,
2545 "removable":true,
2546 "type":"unknown"
2551 EQMP
2554 .name = "query-block",
2555 .args_type = "",
2556 .mhandler.cmd_new = qmp_marshal_query_block,
2559 SQMP
2560 query-blockstats
2561 ----------------
2563 Show block device statistics.
2565 Each device statistic information is stored in a json-object and the returned
2566 value is a json-array of all devices.
2568 Each json-object contain the following:
2570 - "device": device name (json-string)
2571 - "stats": A json-object with the statistics information, it contains:
2572 - "rd_bytes": bytes read (json-int)
2573 - "wr_bytes": bytes written (json-int)
2574 - "rd_operations": read operations (json-int)
2575 - "wr_operations": write operations (json-int)
2576 - "flush_operations": cache flush operations (json-int)
2577 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
2578 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
2579 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
2580 - "wr_highest_offset": The offset after the greatest byte written to the
2581 BlockDriverState since it has been opened (json-int)
2582 - "rd_merged": number of read requests that have been merged into
2583 another request (json-int)
2584 - "wr_merged": number of write requests that have been merged into
2585 another request (json-int)
2586 - "parent": Contains recursively the statistics of the underlying
2587 protocol (e.g. the host file for a qcow2 image). If there is
2588 no underlying protocol, this field is omitted
2589 (json-object, optional)
2591 Example:
2593 -> { "execute": "query-blockstats" }
2594 <- {
2595 "return":[
2597 "device":"ide0-hd0",
2598 "parent":{
2599 "stats":{
2600 "wr_highest_offset":3686448128,
2601 "wr_bytes":9786368,
2602 "wr_operations":751,
2603 "rd_bytes":122567168,
2604 "rd_operations":36772
2605 "wr_total_times_ns":313253456
2606 "rd_total_times_ns":3465673657
2607 "flush_total_times_ns":49653
2608 "flush_operations":61,
2609 "rd_merged":0,
2610 "wr_merged":0
2613 "stats":{
2614 "wr_highest_offset":2821110784,
2615 "wr_bytes":9786368,
2616 "wr_operations":692,
2617 "rd_bytes":122739200,
2618 "rd_operations":36604
2619 "flush_operations":51,
2620 "wr_total_times_ns":313253456
2621 "rd_total_times_ns":3465673657
2622 "flush_total_times_ns":49653,
2623 "rd_merged":0,
2624 "wr_merged":0
2628 "device":"ide1-cd0",
2629 "stats":{
2630 "wr_highest_offset":0,
2631 "wr_bytes":0,
2632 "wr_operations":0,
2633 "rd_bytes":0,
2634 "rd_operations":0
2635 "flush_operations":0,
2636 "wr_total_times_ns":0
2637 "rd_total_times_ns":0
2638 "flush_total_times_ns":0,
2639 "rd_merged":0,
2640 "wr_merged":0
2644 "device":"floppy0",
2645 "stats":{
2646 "wr_highest_offset":0,
2647 "wr_bytes":0,
2648 "wr_operations":0,
2649 "rd_bytes":0,
2650 "rd_operations":0
2651 "flush_operations":0,
2652 "wr_total_times_ns":0
2653 "rd_total_times_ns":0
2654 "flush_total_times_ns":0,
2655 "rd_merged":0,
2656 "wr_merged":0
2660 "device":"sd0",
2661 "stats":{
2662 "wr_highest_offset":0,
2663 "wr_bytes":0,
2664 "wr_operations":0,
2665 "rd_bytes":0,
2666 "rd_operations":0
2667 "flush_operations":0,
2668 "wr_total_times_ns":0
2669 "rd_total_times_ns":0
2670 "flush_total_times_ns":0,
2671 "rd_merged":0,
2672 "wr_merged":0
2678 EQMP
2681 .name = "query-blockstats",
2682 .args_type = "query-nodes:b?",
2683 .mhandler.cmd_new = qmp_marshal_query_blockstats,
2686 SQMP
2687 query-cpus
2688 ----------
2690 Show CPU information.
2692 Return a json-array. Each CPU is represented by a json-object, which contains:
2694 - "CPU": CPU index (json-int)
2695 - "current": true if this is the current CPU, false otherwise (json-bool)
2696 - "halted": true if the cpu is halted, false otherwise (json-bool)
2697 - "qom_path": path to the CPU object in the QOM tree (json-str)
2698 - Current program counter. The key's name depends on the architecture:
2699 "pc": i386/x86_64 (json-int)
2700 "nip": PPC (json-int)
2701 "pc" and "npc": sparc (json-int)
2702 "PC": mips (json-int)
2703 - "thread_id": ID of the underlying host thread (json-int)
2705 Example:
2707 -> { "execute": "query-cpus" }
2708 <- {
2709 "return":[
2711 "CPU":0,
2712 "current":true,
2713 "halted":false,
2714 "qom_path":"/machine/unattached/device[0]",
2715 "pc":3227107138,
2716 "thread_id":3134
2719 "CPU":1,
2720 "current":false,
2721 "halted":true,
2722 "qom_path":"/machine/unattached/device[2]",
2723 "pc":7108165,
2724 "thread_id":3135
2729 EQMP
2732 .name = "query-cpus",
2733 .args_type = "",
2734 .mhandler.cmd_new = qmp_marshal_query_cpus,
2737 SQMP
2738 query-iothreads
2739 ---------------
2741 Returns a list of information about each iothread.
2743 Note this list excludes the QEMU main loop thread, which is not declared
2744 using the -object iothread command-line option. It is always the main thread
2745 of the process.
2747 Return a json-array. Each iothread is represented by a json-object, which contains:
2749 - "id": name of iothread (json-str)
2750 - "thread-id": ID of the underlying host thread (json-int)
2752 Example:
2754 -> { "execute": "query-iothreads" }
2755 <- {
2756 "return":[
2758 "id":"iothread0",
2759 "thread-id":3134
2762 "id":"iothread1",
2763 "thread-id":3135
2768 EQMP
2771 .name = "query-iothreads",
2772 .args_type = "",
2773 .mhandler.cmd_new = qmp_marshal_query_iothreads,
2776 SQMP
2777 query-pci
2778 ---------
2780 PCI buses and devices information.
2782 The returned value is a json-array of all buses. Each bus is represented by
2783 a json-object, which has a key with a json-array of all PCI devices attached
2784 to it. Each device is represented by a json-object.
2786 The bus json-object contains the following:
2788 - "bus": bus number (json-int)
2789 - "devices": a json-array of json-objects, each json-object represents a
2790 PCI device
2792 The PCI device json-object contains the following:
2794 - "bus": identical to the parent's bus number (json-int)
2795 - "slot": slot number (json-int)
2796 - "function": function number (json-int)
2797 - "class_info": a json-object containing:
2798 - "desc": device class description (json-string, optional)
2799 - "class": device class number (json-int)
2800 - "id": a json-object containing:
2801 - "device": device ID (json-int)
2802 - "vendor": vendor ID (json-int)
2803 - "irq": device's IRQ if assigned (json-int, optional)
2804 - "qdev_id": qdev id string (json-string)
2805 - "pci_bridge": It's a json-object, only present if this device is a
2806 PCI bridge, contains:
2807 - "bus": bus number (json-int)
2808 - "secondary": secondary bus number (json-int)
2809 - "subordinate": subordinate bus number (json-int)
2810 - "io_range": I/O memory range information, a json-object with the
2811 following members:
2812 - "base": base address, in bytes (json-int)
2813 - "limit": limit address, in bytes (json-int)
2814 - "memory_range": memory range information, a json-object with the
2815 following members:
2816 - "base": base address, in bytes (json-int)
2817 - "limit": limit address, in bytes (json-int)
2818 - "prefetchable_range": Prefetchable memory range information, a
2819 json-object with the following members:
2820 - "base": base address, in bytes (json-int)
2821 - "limit": limit address, in bytes (json-int)
2822 - "devices": a json-array of PCI devices if there's any attached, each
2823 each element is represented by a json-object, which contains
2824 the same members of the 'PCI device json-object' described
2825 above (optional)
2826 - "regions": a json-array of json-objects, each json-object represents a
2827 memory region of this device
2829 The memory range json-object contains the following:
2831 - "base": base memory address (json-int)
2832 - "limit": limit value (json-int)
2834 The region json-object can be an I/O region or a memory region, an I/O region
2835 json-object contains the following:
2837 - "type": "io" (json-string, fixed)
2838 - "bar": BAR number (json-int)
2839 - "address": memory address (json-int)
2840 - "size": memory size (json-int)
2842 A memory region json-object contains the following:
2844 - "type": "memory" (json-string, fixed)
2845 - "bar": BAR number (json-int)
2846 - "address": memory address (json-int)
2847 - "size": memory size (json-int)
2848 - "mem_type_64": true or false (json-bool)
2849 - "prefetch": true or false (json-bool)
2851 Example:
2853 -> { "execute": "query-pci" }
2854 <- {
2855 "return":[
2857 "bus":0,
2858 "devices":[
2860 "bus":0,
2861 "qdev_id":"",
2862 "slot":0,
2863 "class_info":{
2864 "class":1536,
2865 "desc":"Host bridge"
2867 "id":{
2868 "device":32902,
2869 "vendor":4663
2871 "function":0,
2872 "regions":[
2877 "bus":0,
2878 "qdev_id":"",
2879 "slot":1,
2880 "class_info":{
2881 "class":1537,
2882 "desc":"ISA bridge"
2884 "id":{
2885 "device":32902,
2886 "vendor":28672
2888 "function":0,
2889 "regions":[
2894 "bus":0,
2895 "qdev_id":"",
2896 "slot":1,
2897 "class_info":{
2898 "class":257,
2899 "desc":"IDE controller"
2901 "id":{
2902 "device":32902,
2903 "vendor":28688
2905 "function":1,
2906 "regions":[
2908 "bar":4,
2909 "size":16,
2910 "address":49152,
2911 "type":"io"
2916 "bus":0,
2917 "qdev_id":"",
2918 "slot":2,
2919 "class_info":{
2920 "class":768,
2921 "desc":"VGA controller"
2923 "id":{
2924 "device":4115,
2925 "vendor":184
2927 "function":0,
2928 "regions":[
2930 "prefetch":true,
2931 "mem_type_64":false,
2932 "bar":0,
2933 "size":33554432,
2934 "address":4026531840,
2935 "type":"memory"
2938 "prefetch":false,
2939 "mem_type_64":false,
2940 "bar":1,
2941 "size":4096,
2942 "address":4060086272,
2943 "type":"memory"
2946 "prefetch":false,
2947 "mem_type_64":false,
2948 "bar":6,
2949 "size":65536,
2950 "address":-1,
2951 "type":"memory"
2956 "bus":0,
2957 "qdev_id":"",
2958 "irq":11,
2959 "slot":4,
2960 "class_info":{
2961 "class":1280,
2962 "desc":"RAM controller"
2964 "id":{
2965 "device":6900,
2966 "vendor":4098
2968 "function":0,
2969 "regions":[
2971 "bar":0,
2972 "size":32,
2973 "address":49280,
2974 "type":"io"
2983 Note: This example has been shortened as the real response is too long.
2985 EQMP
2988 .name = "query-pci",
2989 .args_type = "",
2990 .mhandler.cmd_new = qmp_marshal_query_pci,
2993 SQMP
2994 query-kvm
2995 ---------
2997 Show KVM information.
2999 Return a json-object with the following information:
3001 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
3002 - "present": true if QEMU has KVM support, false otherwise (json-bool)
3004 Example:
3006 -> { "execute": "query-kvm" }
3007 <- { "return": { "enabled": true, "present": true } }
3009 EQMP
3012 .name = "query-kvm",
3013 .args_type = "",
3014 .mhandler.cmd_new = qmp_marshal_query_kvm,
3017 SQMP
3018 query-status
3019 ------------
3021 Return a json-object with the following information:
3023 - "running": true if the VM is running, or false if it is paused (json-bool)
3024 - "singlestep": true if the VM is in single step mode,
3025 false otherwise (json-bool)
3026 - "status": one of the following values (json-string)
3027 "debug" - QEMU is running on a debugger
3028 "inmigrate" - guest is paused waiting for an incoming migration
3029 "internal-error" - An internal error that prevents further guest
3030 execution has occurred
3031 "io-error" - the last IOP has failed and the device is configured
3032 to pause on I/O errors
3033 "paused" - guest has been paused via the 'stop' command
3034 "postmigrate" - guest is paused following a successful 'migrate'
3035 "prelaunch" - QEMU was started with -S and guest has not started
3036 "finish-migrate" - guest is paused to finish the migration process
3037 "restore-vm" - guest is paused to restore VM state
3038 "running" - guest is actively running
3039 "save-vm" - guest is paused to save the VM state
3040 "shutdown" - guest is shut down (and -no-shutdown is in use)
3041 "watchdog" - the watchdog action is configured to pause and
3042 has been triggered
3044 Example:
3046 -> { "execute": "query-status" }
3047 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
3049 EQMP
3052 .name = "query-status",
3053 .args_type = "",
3054 .mhandler.cmd_new = qmp_marshal_query_status,
3057 SQMP
3058 query-mice
3059 ----------
3061 Show VM mice information.
3063 Each mouse is represented by a json-object, the returned value is a json-array
3064 of all mice.
3066 The mouse json-object contains the following:
3068 - "name": mouse's name (json-string)
3069 - "index": mouse's index (json-int)
3070 - "current": true if this mouse is receiving events, false otherwise (json-bool)
3071 - "absolute": true if the mouse generates absolute input events (json-bool)
3073 Example:
3075 -> { "execute": "query-mice" }
3076 <- {
3077 "return":[
3079 "name":"QEMU Microsoft Mouse",
3080 "index":0,
3081 "current":false,
3082 "absolute":false
3085 "name":"QEMU PS/2 Mouse",
3086 "index":1,
3087 "current":true,
3088 "absolute":true
3093 EQMP
3096 .name = "query-mice",
3097 .args_type = "",
3098 .mhandler.cmd_new = qmp_marshal_query_mice,
3101 SQMP
3102 query-vnc
3103 ---------
3105 Show VNC server information.
3107 Return a json-object with server information. Connected clients are returned
3108 as a json-array of json-objects.
3110 The main json-object contains the following:
3112 - "enabled": true or false (json-bool)
3113 - "host": server's IP address (json-string)
3114 - "family": address family (json-string)
3115 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3116 - "service": server's port number (json-string)
3117 - "auth": authentication method (json-string)
3118 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
3119 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
3120 "vencrypt+plain", "vencrypt+tls+none",
3121 "vencrypt+tls+plain", "vencrypt+tls+sasl",
3122 "vencrypt+tls+vnc", "vencrypt+x509+none",
3123 "vencrypt+x509+plain", "vencrypt+x509+sasl",
3124 "vencrypt+x509+vnc", "vnc"
3125 - "clients": a json-array of all connected clients
3127 Clients are described by a json-object, each one contain the following:
3129 - "host": client's IP address (json-string)
3130 - "family": address family (json-string)
3131 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3132 - "service": client's port number (json-string)
3133 - "x509_dname": TLS dname (json-string, optional)
3134 - "sasl_username": SASL username (json-string, optional)
3136 Example:
3138 -> { "execute": "query-vnc" }
3139 <- {
3140 "return":{
3141 "enabled":true,
3142 "host":"0.0.0.0",
3143 "service":"50402",
3144 "auth":"vnc",
3145 "family":"ipv4",
3146 "clients":[
3148 "host":"127.0.0.1",
3149 "service":"50401",
3150 "family":"ipv4"
3156 EQMP
3159 .name = "query-vnc",
3160 .args_type = "",
3161 .mhandler.cmd_new = qmp_marshal_query_vnc,
3164 .name = "query-vnc-servers",
3165 .args_type = "",
3166 .mhandler.cmd_new = qmp_marshal_query_vnc_servers,
3169 SQMP
3170 query-spice
3171 -----------
3173 Show SPICE server information.
3175 Return a json-object with server information. Connected clients are returned
3176 as a json-array of json-objects.
3178 The main json-object contains the following:
3180 - "enabled": true or false (json-bool)
3181 - "host": server's IP address (json-string)
3182 - "port": server's port number (json-int, optional)
3183 - "tls-port": server's port number (json-int, optional)
3184 - "auth": authentication method (json-string)
3185 - Possible values: "none", "spice"
3186 - "channels": a json-array of all active channels clients
3188 Channels are described by a json-object, each one contain the following:
3190 - "host": client's IP address (json-string)
3191 - "family": address family (json-string)
3192 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3193 - "port": client's port number (json-string)
3194 - "connection-id": spice connection id. All channels with the same id
3195 belong to the same spice session (json-int)
3196 - "channel-type": channel type. "1" is the main control channel, filter for
3197 this one if you want track spice sessions only (json-int)
3198 - "channel-id": channel id. Usually "0", might be different needed when
3199 multiple channels of the same type exist, such as multiple
3200 display channels in a multihead setup (json-int)
3201 - "tls": whether the channel is encrypted (json-bool)
3203 Example:
3205 -> { "execute": "query-spice" }
3206 <- {
3207 "return": {
3208 "enabled": true,
3209 "auth": "spice",
3210 "port": 5920,
3211 "tls-port": 5921,
3212 "host": "0.0.0.0",
3213 "channels": [
3215 "port": "54924",
3216 "family": "ipv4",
3217 "channel-type": 1,
3218 "connection-id": 1804289383,
3219 "host": "127.0.0.1",
3220 "channel-id": 0,
3221 "tls": true
3224 "port": "36710",
3225 "family": "ipv4",
3226 "channel-type": 4,
3227 "connection-id": 1804289383,
3228 "host": "127.0.0.1",
3229 "channel-id": 0,
3230 "tls": false
3232 [ ... more channels follow ... ]
3237 EQMP
3239 #if defined(CONFIG_SPICE)
3241 .name = "query-spice",
3242 .args_type = "",
3243 .mhandler.cmd_new = qmp_marshal_query_spice,
3245 #endif
3247 SQMP
3248 query-name
3249 ----------
3251 Show VM name.
3253 Return a json-object with the following information:
3255 - "name": VM's name (json-string, optional)
3257 Example:
3259 -> { "execute": "query-name" }
3260 <- { "return": { "name": "qemu-name" } }
3262 EQMP
3265 .name = "query-name",
3266 .args_type = "",
3267 .mhandler.cmd_new = qmp_marshal_query_name,
3270 SQMP
3271 query-uuid
3272 ----------
3274 Show VM UUID.
3276 Return a json-object with the following information:
3278 - "UUID": Universally Unique Identifier (json-string)
3280 Example:
3282 -> { "execute": "query-uuid" }
3283 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
3285 EQMP
3288 .name = "query-uuid",
3289 .args_type = "",
3290 .mhandler.cmd_new = qmp_marshal_query_uuid,
3293 SQMP
3294 query-command-line-options
3295 --------------------------
3297 Show command line option schema.
3299 Return a json-array of command line option schema for all options (or for
3300 the given option), returning an error if the given option doesn't exist.
3302 Each array entry contains the following:
3304 - "option": option name (json-string)
3305 - "parameters": a json-array describes all parameters of the option:
3306 - "name": parameter name (json-string)
3307 - "type": parameter type (one of 'string', 'boolean', 'number',
3308 or 'size')
3309 - "help": human readable description of the parameter
3310 (json-string, optional)
3311 - "default": default value string for the parameter
3312 (json-string, optional)
3314 Example:
3316 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
3317 <- { "return": [
3319 "parameters": [
3321 "name": "romfile",
3322 "type": "string"
3325 "name": "bootindex",
3326 "type": "number"
3329 "option": "option-rom"
3334 EQMP
3337 .name = "query-command-line-options",
3338 .args_type = "option:s?",
3339 .mhandler.cmd_new = qmp_marshal_query_command_line_options,
3342 SQMP
3343 query-migrate
3344 -------------
3346 Migration status.
3348 Return a json-object. If migration is active there will be another json-object
3349 with RAM migration status and if block migration is active another one with
3350 block migration status.
3352 The main json-object contains the following:
3354 - "status": migration status (json-string)
3355 - Possible values: "setup", "active", "completed", "failed", "cancelled"
3356 - "total-time": total amount of ms since migration started. If
3357 migration has ended, it returns the total migration
3358 time (json-int)
3359 - "setup-time" amount of setup time in milliseconds _before_ the
3360 iterations begin but _after_ the QMP command is issued.
3361 This is designed to provide an accounting of any activities
3362 (such as RDMA pinning) which may be expensive, but do not
3363 actually occur during the iterative migration rounds
3364 themselves. (json-int)
3365 - "downtime": only present when migration has finished correctly
3366 total amount in ms for downtime that happened (json-int)
3367 - "expected-downtime": only present while migration is active
3368 total amount in ms for downtime that was calculated on
3369 the last bitmap round (json-int)
3370 - "ram": only present if "status" is "active", it is a json-object with the
3371 following RAM information:
3372 - "transferred": amount transferred in bytes (json-int)
3373 - "remaining": amount remaining to transfer in bytes (json-int)
3374 - "total": total amount of memory in bytes (json-int)
3375 - "duplicate": number of pages filled entirely with the same
3376 byte (json-int)
3377 These are sent over the wire much more efficiently.
3378 - "skipped": number of skipped zero pages (json-int)
3379 - "normal" : number of whole pages transferred. I.e. they
3380 were not sent as duplicate or xbzrle pages (json-int)
3381 - "normal-bytes" : number of bytes transferred in whole
3382 pages. This is just normal pages times size of one page,
3383 but this way upper levels don't need to care about page
3384 size (json-int)
3385 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
3386 - "disk": only present if "status" is "active" and it is a block migration,
3387 it is a json-object with the following disk information:
3388 - "transferred": amount transferred in bytes (json-int)
3389 - "remaining": amount remaining to transfer in bytes json-int)
3390 - "total": total disk size in bytes (json-int)
3391 - "xbzrle-cache": only present if XBZRLE is active.
3392 It is a json-object with the following XBZRLE information:
3393 - "cache-size": XBZRLE cache size in bytes
3394 - "bytes": number of bytes transferred for XBZRLE compressed pages
3395 - "pages": number of XBZRLE compressed pages
3396 - "cache-miss": number of XBRZRLE page cache misses
3397 - "cache-miss-rate": rate of XBRZRLE page cache misses
3398 - "overflow": number of times XBZRLE overflows. This means
3399 that the XBZRLE encoding was bigger than just sent the
3400 whole page, and then we sent the whole page instead (as as
3401 normal page).
3403 Examples:
3405 1. Before the first migration
3407 -> { "execute": "query-migrate" }
3408 <- { "return": {} }
3410 2. Migration is done and has succeeded
3412 -> { "execute": "query-migrate" }
3413 <- { "return": {
3414 "status": "completed",
3415 "ram":{
3416 "transferred":123,
3417 "remaining":123,
3418 "total":246,
3419 "total-time":12345,
3420 "setup-time":12345,
3421 "downtime":12345,
3422 "duplicate":123,
3423 "normal":123,
3424 "normal-bytes":123456,
3425 "dirty-sync-count":15
3430 3. Migration is done and has failed
3432 -> { "execute": "query-migrate" }
3433 <- { "return": { "status": "failed" } }
3435 4. Migration is being performed and is not a block migration:
3437 -> { "execute": "query-migrate" }
3438 <- {
3439 "return":{
3440 "status":"active",
3441 "ram":{
3442 "transferred":123,
3443 "remaining":123,
3444 "total":246,
3445 "total-time":12345,
3446 "setup-time":12345,
3447 "expected-downtime":12345,
3448 "duplicate":123,
3449 "normal":123,
3450 "normal-bytes":123456,
3451 "dirty-sync-count":15
3456 5. Migration is being performed and is a block migration:
3458 -> { "execute": "query-migrate" }
3459 <- {
3460 "return":{
3461 "status":"active",
3462 "ram":{
3463 "total":1057024,
3464 "remaining":1053304,
3465 "transferred":3720,
3466 "total-time":12345,
3467 "setup-time":12345,
3468 "expected-downtime":12345,
3469 "duplicate":123,
3470 "normal":123,
3471 "normal-bytes":123456,
3472 "dirty-sync-count":15
3474 "disk":{
3475 "total":20971520,
3476 "remaining":20880384,
3477 "transferred":91136
3482 6. Migration is being performed and XBZRLE is active:
3484 -> { "execute": "query-migrate" }
3485 <- {
3486 "return":{
3487 "status":"active",
3488 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
3489 "ram":{
3490 "total":1057024,
3491 "remaining":1053304,
3492 "transferred":3720,
3493 "total-time":12345,
3494 "setup-time":12345,
3495 "expected-downtime":12345,
3496 "duplicate":10,
3497 "normal":3333,
3498 "normal-bytes":3412992,
3499 "dirty-sync-count":15
3501 "xbzrle-cache":{
3502 "cache-size":67108864,
3503 "bytes":20971520,
3504 "pages":2444343,
3505 "cache-miss":2244,
3506 "cache-miss-rate":0.123,
3507 "overflow":34434
3512 EQMP
3515 .name = "query-migrate",
3516 .args_type = "",
3517 .mhandler.cmd_new = qmp_marshal_query_migrate,
3520 SQMP
3521 migrate-set-capabilities
3522 ------------------------
3524 Enable/Disable migration capabilities
3526 - "xbzrle": XBZRLE support
3527 - "rdma-pin-all": pin all pages when using RDMA during migration
3528 - "auto-converge": throttle down guest to help convergence of migration
3529 - "zero-blocks": compress zero blocks during block migration
3530 - "events": generate events for each migration state change
3532 Arguments:
3534 Example:
3536 -> { "execute": "migrate-set-capabilities" , "arguments":
3537 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
3539 EQMP
3542 .name = "migrate-set-capabilities",
3543 .args_type = "capabilities:q",
3544 .params = "capability:s,state:b",
3545 .mhandler.cmd_new = qmp_marshal_migrate_set_capabilities,
3547 SQMP
3548 query-migrate-capabilities
3549 --------------------------
3551 Query current migration capabilities
3553 - "capabilities": migration capabilities state
3554 - "xbzrle" : XBZRLE state (json-bool)
3555 - "rdma-pin-all" : RDMA Pin Page state (json-bool)
3556 - "auto-converge" : Auto Converge state (json-bool)
3557 - "zero-blocks" : Zero Blocks state (json-bool)
3559 Arguments:
3561 Example:
3563 -> { "execute": "query-migrate-capabilities" }
3564 <- { "return": [ { "state": false, "capability": "xbzrle" } ] }
3566 EQMP
3569 .name = "query-migrate-capabilities",
3570 .args_type = "",
3571 .mhandler.cmd_new = qmp_marshal_query_migrate_capabilities,
3574 SQMP
3575 migrate-set-parameters
3576 ----------------------
3578 Set migration parameters
3580 - "compress-level": set compression level during migration (json-int)
3581 - "compress-threads": set compression thread count for migration (json-int)
3582 - "decompress-threads": set decompression thread count for migration (json-int)
3584 Arguments:
3586 Example:
3588 -> { "execute": "migrate-set-parameters" , "arguments":
3589 { "compress-level": 1 } }
3591 EQMP
3594 .name = "migrate-set-parameters",
3595 .args_type =
3596 "compress-level:i?,compress-threads:i?,decompress-threads:i?",
3597 .mhandler.cmd_new = qmp_marshal_migrate_set_parameters,
3599 SQMP
3600 query-migrate-parameters
3601 ------------------------
3603 Query current migration parameters
3605 - "parameters": migration parameters value
3606 - "compress-level" : compression level value (json-int)
3607 - "compress-threads" : compression thread count value (json-int)
3608 - "decompress-threads" : decompression thread count value (json-int)
3610 Arguments:
3612 Example:
3614 -> { "execute": "query-migrate-parameters" }
3615 <- {
3616 "return": {
3617 "decompress-threads", 2,
3618 "compress-threads", 8,
3619 "compress-level", 1
3623 EQMP
3626 .name = "query-migrate-parameters",
3627 .args_type = "",
3628 .mhandler.cmd_new = qmp_marshal_query_migrate_parameters,
3631 SQMP
3632 query-balloon
3633 -------------
3635 Show balloon information.
3637 Make an asynchronous request for balloon info. When the request completes a
3638 json-object will be returned containing the following data:
3640 - "actual": current balloon value in bytes (json-int)
3642 Example:
3644 -> { "execute": "query-balloon" }
3645 <- {
3646 "return":{
3647 "actual":1073741824,
3651 EQMP
3654 .name = "query-balloon",
3655 .args_type = "",
3656 .mhandler.cmd_new = qmp_marshal_query_balloon,
3660 .name = "query-block-jobs",
3661 .args_type = "",
3662 .mhandler.cmd_new = qmp_marshal_query_block_jobs,
3666 .name = "qom-list",
3667 .args_type = "path:s",
3668 .mhandler.cmd_new = qmp_marshal_qom_list,
3672 .name = "qom-set",
3673 .args_type = "path:s,property:s,value:q",
3674 .mhandler.cmd_new = qmp_marshal_qom_set,
3678 .name = "qom-get",
3679 .args_type = "path:s,property:s",
3680 .mhandler.cmd_new = qmp_marshal_qom_get,
3684 .name = "nbd-server-start",
3685 .args_type = "addr:q",
3686 .mhandler.cmd_new = qmp_marshal_nbd_server_start,
3689 .name = "nbd-server-add",
3690 .args_type = "device:B,writable:b?",
3691 .mhandler.cmd_new = qmp_marshal_nbd_server_add,
3694 .name = "nbd-server-stop",
3695 .args_type = "",
3696 .mhandler.cmd_new = qmp_marshal_nbd_server_stop,
3700 .name = "change-vnc-password",
3701 .args_type = "password:s",
3702 .mhandler.cmd_new = qmp_marshal_change_vnc_password,
3705 .name = "qom-list-types",
3706 .args_type = "implements:s?,abstract:b?",
3707 .mhandler.cmd_new = qmp_marshal_qom_list_types,
3711 .name = "device-list-properties",
3712 .args_type = "typename:s",
3713 .mhandler.cmd_new = qmp_marshal_device_list_properties,
3717 .name = "query-machines",
3718 .args_type = "",
3719 .mhandler.cmd_new = qmp_marshal_query_machines,
3723 .name = "query-cpu-definitions",
3724 .args_type = "",
3725 .mhandler.cmd_new = qmp_marshal_query_cpu_definitions,
3729 .name = "query-target",
3730 .args_type = "",
3731 .mhandler.cmd_new = qmp_marshal_query_target,
3735 .name = "query-tpm",
3736 .args_type = "",
3737 .mhandler.cmd_new = qmp_marshal_query_tpm,
3740 SQMP
3741 query-tpm
3742 ---------
3744 Return information about the TPM device.
3746 Arguments: None
3748 Example:
3750 -> { "execute": "query-tpm" }
3751 <- { "return":
3753 { "model": "tpm-tis",
3754 "options":
3755 { "type": "passthrough",
3756 "data":
3757 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3758 "path": "/dev/tpm0"
3761 "id": "tpm0"
3766 EQMP
3769 .name = "query-tpm-models",
3770 .args_type = "",
3771 .mhandler.cmd_new = qmp_marshal_query_tpm_models,
3774 SQMP
3775 query-tpm-models
3776 ----------------
3778 Return a list of supported TPM models.
3780 Arguments: None
3782 Example:
3784 -> { "execute": "query-tpm-models" }
3785 <- { "return": [ "tpm-tis" ] }
3787 EQMP
3790 .name = "query-tpm-types",
3791 .args_type = "",
3792 .mhandler.cmd_new = qmp_marshal_query_tpm_types,
3795 SQMP
3796 query-tpm-types
3797 ---------------
3799 Return a list of supported TPM types.
3801 Arguments: None
3803 Example:
3805 -> { "execute": "query-tpm-types" }
3806 <- { "return": [ "passthrough" ] }
3808 EQMP
3811 .name = "chardev-add",
3812 .args_type = "id:s,backend:q",
3813 .mhandler.cmd_new = qmp_marshal_chardev_add,
3816 SQMP
3817 chardev-add
3818 ----------------
3820 Add a chardev.
3822 Arguments:
3824 - "id": the chardev's ID, must be unique (json-string)
3825 - "backend": chardev backend type + parameters
3827 Examples:
3829 -> { "execute" : "chardev-add",
3830 "arguments" : { "id" : "foo",
3831 "backend" : { "type" : "null", "data" : {} } } }
3832 <- { "return": {} }
3834 -> { "execute" : "chardev-add",
3835 "arguments" : { "id" : "bar",
3836 "backend" : { "type" : "file",
3837 "data" : { "out" : "/tmp/bar.log" } } } }
3838 <- { "return": {} }
3840 -> { "execute" : "chardev-add",
3841 "arguments" : { "id" : "baz",
3842 "backend" : { "type" : "pty", "data" : {} } } }
3843 <- { "return": { "pty" : "/dev/pty/42" } }
3845 EQMP
3848 .name = "chardev-remove",
3849 .args_type = "id:s",
3850 .mhandler.cmd_new = qmp_marshal_chardev_remove,
3854 SQMP
3855 chardev-remove
3856 --------------
3858 Remove a chardev.
3860 Arguments:
3862 - "id": the chardev's ID, must exist and not be in use (json-string)
3864 Example:
3866 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3867 <- { "return": {} }
3869 EQMP
3871 .name = "query-rx-filter",
3872 .args_type = "name:s?",
3873 .mhandler.cmd_new = qmp_marshal_query_rx_filter,
3876 SQMP
3877 query-rx-filter
3878 ---------------
3880 Show rx-filter information.
3882 Returns a json-array of rx-filter information for all NICs (or for the
3883 given NIC), returning an error if the given NIC doesn't exist, or
3884 given NIC doesn't support rx-filter querying, or given net client
3885 isn't a NIC.
3887 The query will clear the event notification flag of each NIC, then qemu
3888 will start to emit event to QMP monitor.
3890 Each array entry contains the following:
3892 - "name": net client name (json-string)
3893 - "promiscuous": promiscuous mode is enabled (json-bool)
3894 - "multicast": multicast receive state (one of 'normal', 'none', 'all')
3895 - "unicast": unicast receive state (one of 'normal', 'none', 'all')
3896 - "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
3897 - "broadcast-allowed": allow to receive broadcast (json-bool)
3898 - "multicast-overflow": multicast table is overflowed (json-bool)
3899 - "unicast-overflow": unicast table is overflowed (json-bool)
3900 - "main-mac": main macaddr string (json-string)
3901 - "vlan-table": a json-array of active vlan id
3902 - "unicast-table": a json-array of unicast macaddr string
3903 - "multicast-table": a json-array of multicast macaddr string
3905 Example:
3907 -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
3908 <- { "return": [
3910 "promiscuous": true,
3911 "name": "vnet0",
3912 "main-mac": "52:54:00:12:34:56",
3913 "unicast": "normal",
3914 "vlan": "normal",
3915 "vlan-table": [
3919 "unicast-table": [
3921 "multicast": "normal",
3922 "multicast-overflow": false,
3923 "unicast-overflow": false,
3924 "multicast-table": [
3925 "01:00:5e:00:00:01",
3926 "33:33:00:00:00:01",
3927 "33:33:ff:12:34:56"
3929 "broadcast-allowed": false
3934 EQMP
3937 .name = "blockdev-add",
3938 .args_type = "options:q",
3939 .mhandler.cmd_new = qmp_marshal_blockdev_add,
3942 SQMP
3943 blockdev-add
3944 ------------
3946 Add a block device.
3948 This command is still a work in progress. It doesn't support all
3949 block drivers among other things. Stay away from it unless you want
3950 to help with its development.
3952 Arguments:
3954 - "options": block driver options
3956 Example (1):
3958 -> { "execute": "blockdev-add",
3959 "arguments": { "options" : { "driver": "qcow2",
3960 "file": { "driver": "file",
3961 "filename": "test.qcow2" } } } }
3962 <- { "return": {} }
3964 Example (2):
3966 -> { "execute": "blockdev-add",
3967 "arguments": {
3968 "options": {
3969 "driver": "qcow2",
3970 "id": "my_disk",
3971 "discard": "unmap",
3972 "cache": {
3973 "direct": true,
3974 "writeback": true
3976 "file": {
3977 "driver": "file",
3978 "filename": "/tmp/test.qcow2"
3980 "backing": {
3981 "driver": "raw",
3982 "file": {
3983 "driver": "file",
3984 "filename": "/dev/fdset/4"
3991 <- { "return": {} }
3993 EQMP
3996 .name = "x-blockdev-del",
3997 .args_type = "id:s?,node-name:s?",
3998 .mhandler.cmd_new = qmp_marshal_x_blockdev_del,
4001 SQMP
4002 x-blockdev-del
4003 ------------
4004 Since 2.5
4006 Deletes a block device thas has been added using blockdev-add.
4007 The selected device can be either a block backend or a graph node.
4009 In the former case the backend will be destroyed, along with its
4010 inserted medium if there's any. The command will fail if the backend
4011 or its medium are in use.
4013 In the latter case the node will be destroyed. The command will fail
4014 if the node is attached to a block backend or is otherwise being
4015 used.
4017 One of "id" or "node-name" must be specified, but not both.
4019 This command is still a work in progress and is considered
4020 experimental. Stay away from it unless you want to help with its
4021 development.
4023 Arguments:
4025 - "id": Name of the block backend device to delete (json-string, optional)
4026 - "node-name": Name of the graph node to delete (json-string, optional)
4028 Example:
4030 -> { "execute": "blockdev-add",
4031 "arguments": {
4032 "options": {
4033 "driver": "qcow2",
4034 "id": "drive0",
4035 "file": {
4036 "driver": "file",
4037 "filename": "test.qcow2"
4043 <- { "return": {} }
4045 -> { "execute": "x-blockdev-del",
4046 "arguments": { "id": "drive0" }
4048 <- { "return": {} }
4050 EQMP
4053 .name = "blockdev-open-tray",
4054 .args_type = "device:s,force:b?",
4055 .mhandler.cmd_new = qmp_marshal_blockdev_open_tray,
4058 SQMP
4059 blockdev-open-tray
4060 ------------------
4062 Opens a block device's tray. If there is a block driver state tree inserted as a
4063 medium, it will become inaccessible to the guest (but it will remain associated
4064 to the block device, so closing the tray will make it accessible again).
4066 If the tray was already open before, this will be a no-op.
4068 Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in
4069 which no such event will be generated, these include:
4070 - if the guest has locked the tray, @force is false and the guest does not
4071 respond to the eject request
4072 - if the BlockBackend denoted by @device does not have a guest device attached
4073 to it
4074 - if the guest device does not have an actual tray and is empty, for instance
4075 for floppy disk drives
4077 Arguments:
4079 - "device": block device name (json-string)
4080 - "force": if false (the default), an eject request will be sent to the guest if
4081 it has locked the tray (and the tray will not be opened immediately);
4082 if true, the tray will be opened regardless of whether it is locked
4083 (json-bool, optional)
4085 Example:
4087 -> { "execute": "blockdev-open-tray",
4088 "arguments": { "device": "ide1-cd0" } }
4090 <- { "timestamp": { "seconds": 1418751016,
4091 "microseconds": 716996 },
4092 "event": "DEVICE_TRAY_MOVED",
4093 "data": { "device": "ide1-cd0",
4094 "tray-open": true } }
4096 <- { "return": {} }
4098 EQMP
4101 .name = "blockdev-close-tray",
4102 .args_type = "device:s",
4103 .mhandler.cmd_new = qmp_marshal_blockdev_close_tray,
4106 SQMP
4107 blockdev-close-tray
4108 -------------------
4110 Closes a block device's tray. If there is a block driver state tree associated
4111 with the block device (which is currently ejected), that tree will be loaded as
4112 the medium.
4114 If the tray was already closed before, this will be a no-op.
4116 Arguments:
4118 - "device": block device name (json-string)
4120 Example:
4122 -> { "execute": "blockdev-close-tray",
4123 "arguments": { "device": "ide1-cd0" } }
4125 <- { "timestamp": { "seconds": 1418751345,
4126 "microseconds": 272147 },
4127 "event": "DEVICE_TRAY_MOVED",
4128 "data": { "device": "ide1-cd0",
4129 "tray-open": false } }
4131 <- { "return": {} }
4133 EQMP
4136 .name = "blockdev-remove-medium",
4137 .args_type = "device:s",
4138 .mhandler.cmd_new = qmp_marshal_blockdev_remove_medium,
4141 SQMP
4142 blockdev-remove-medium
4143 ----------------------
4145 Removes a medium (a block driver state tree) from a block device. That block
4146 device's tray must currently be open (unless there is no attached guest device).
4148 If the tray is open and there is no medium inserted, this will be a no-op.
4150 Arguments:
4152 - "device": block device name (json-string)
4154 Example:
4156 -> { "execute": "blockdev-remove-medium",
4157 "arguments": { "device": "ide1-cd0" } }
4159 <- { "error": { "class": "GenericError",
4160 "desc": "Tray of device 'ide1-cd0' is not open" } }
4162 -> { "execute": "blockdev-open-tray",
4163 "arguments": { "device": "ide1-cd0" } }
4165 <- { "timestamp": { "seconds": 1418751627,
4166 "microseconds": 549958 },
4167 "event": "DEVICE_TRAY_MOVED",
4168 "data": { "device": "ide1-cd0",
4169 "tray-open": true } }
4171 <- { "return": {} }
4173 -> { "execute": "blockdev-remove-medium",
4174 "arguments": { "device": "ide1-cd0" } }
4176 <- { "return": {} }
4178 EQMP
4181 .name = "blockdev-insert-medium",
4182 .args_type = "device:s,node-name:s",
4183 .mhandler.cmd_new = qmp_marshal_blockdev_insert_medium,
4186 SQMP
4187 blockdev-insert-medium
4188 ----------------------
4190 Inserts a medium (a block driver state tree) into a block device. That block
4191 device's tray must currently be open (unless there is no attached guest device)
4192 and there must be no medium inserted already.
4194 Arguments:
4196 - "device": block device name (json-string)
4197 - "node-name": root node of the BDS tree to insert into the block device
4199 Example:
4201 -> { "execute": "blockdev-add",
4202 "arguments": { "options": { "node-name": "node0",
4203 "driver": "raw",
4204 "file": { "driver": "file",
4205 "filename": "fedora.iso" } } } }
4207 <- { "return": {} }
4209 -> { "execute": "blockdev-insert-medium",
4210 "arguments": { "device": "ide1-cd0",
4211 "node-name": "node0" } }
4213 <- { "return": {} }
4215 EQMP
4218 .name = "query-named-block-nodes",
4219 .args_type = "",
4220 .mhandler.cmd_new = qmp_marshal_query_named_block_nodes,
4223 SQMP
4224 @query-named-block-nodes
4225 ------------------------
4227 Return a list of BlockDeviceInfo for all the named block driver nodes
4229 Example:
4231 -> { "execute": "query-named-block-nodes" }
4232 <- { "return": [ { "ro":false,
4233 "drv":"qcow2",
4234 "encrypted":false,
4235 "file":"disks/test.qcow2",
4236 "node-name": "my-node",
4237 "backing_file_depth":1,
4238 "bps":1000000,
4239 "bps_rd":0,
4240 "bps_wr":0,
4241 "iops":1000000,
4242 "iops_rd":0,
4243 "iops_wr":0,
4244 "bps_max": 8000000,
4245 "bps_rd_max": 0,
4246 "bps_wr_max": 0,
4247 "iops_max": 0,
4248 "iops_rd_max": 0,
4249 "iops_wr_max": 0,
4250 "iops_size": 0,
4251 "write_threshold": 0,
4252 "image":{
4253 "filename":"disks/test.qcow2",
4254 "format":"qcow2",
4255 "virtual-size":2048000,
4256 "backing_file":"base.qcow2",
4257 "full-backing-filename":"disks/base.qcow2",
4258 "backing-filename-format":"qcow2",
4259 "snapshots":[
4261 "id": "1",
4262 "name": "snapshot1",
4263 "vm-state-size": 0,
4264 "date-sec": 10000200,
4265 "date-nsec": 12,
4266 "vm-clock-sec": 206,
4267 "vm-clock-nsec": 30
4270 "backing-image":{
4271 "filename":"disks/base.qcow2",
4272 "format":"qcow2",
4273 "virtual-size":2048000
4275 } } ] }
4277 EQMP
4280 .name = "blockdev-change-medium",
4281 .args_type = "device:B,filename:F,format:s?,read-only-mode:s?",
4282 .mhandler.cmd_new = qmp_marshal_blockdev_change_medium,
4285 SQMP
4286 blockdev-change-medium
4287 ----------------------
4289 Changes the medium inserted into a block device by ejecting the current medium
4290 and loading a new image file which is inserted as the new medium.
4292 Arguments:
4294 - "device": device name (json-string)
4295 - "filename": filename of the new image (json-string)
4296 - "format": format of the new image (json-string, optional)
4297 - "read-only-mode": new read-only mode (json-string, optional)
4298 - Possible values: "retain" (default), "read-only", "read-write"
4300 Examples:
4302 1. Change a removable medium
4304 -> { "execute": "blockdev-change-medium",
4305 "arguments": { "device": "ide1-cd0",
4306 "filename": "/srv/images/Fedora-12-x86_64-DVD.iso",
4307 "format": "raw" } }
4308 <- { "return": {} }
4310 2. Load a read-only medium into a writable drive
4312 -> { "execute": "blockdev-change-medium",
4313 "arguments": { "device": "isa-fd0",
4314 "filename": "/srv/images/ro.img",
4315 "format": "raw",
4316 "read-only-mode": "retain" } }
4318 <- { "error":
4319 { "class": "GenericError",
4320 "desc": "Could not open '/srv/images/ro.img': Permission denied" } }
4322 -> { "execute": "blockdev-change-medium",
4323 "arguments": { "device": "isa-fd0",
4324 "filename": "/srv/images/ro.img",
4325 "format": "raw",
4326 "read-only-mode": "read-only" } }
4328 <- { "return": {} }
4330 EQMP
4333 .name = "query-memdev",
4334 .args_type = "",
4335 .mhandler.cmd_new = qmp_marshal_query_memdev,
4338 SQMP
4339 query-memdev
4340 ------------
4342 Show memory devices information.
4345 Example (1):
4347 -> { "execute": "query-memdev" }
4348 <- { "return": [
4350 "size": 536870912,
4351 "merge": false,
4352 "dump": true,
4353 "prealloc": false,
4354 "host-nodes": [0, 1],
4355 "policy": "bind"
4358 "size": 536870912,
4359 "merge": false,
4360 "dump": true,
4361 "prealloc": true,
4362 "host-nodes": [2, 3],
4363 "policy": "preferred"
4368 EQMP
4371 .name = "query-memory-devices",
4372 .args_type = "",
4373 .mhandler.cmd_new = qmp_marshal_query_memory_devices,
4376 SQMP
4377 @query-memory-devices
4378 --------------------
4380 Return a list of memory devices.
4382 Example:
4383 -> { "execute": "query-memory-devices" }
4384 <- { "return": [ { "data":
4385 { "addr": 5368709120,
4386 "hotpluggable": true,
4387 "hotplugged": true,
4388 "id": "d1",
4389 "memdev": "/objects/memX",
4390 "node": 0,
4391 "size": 1073741824,
4392 "slot": 0},
4393 "type": "dimm"
4394 } ] }
4395 EQMP
4398 .name = "query-acpi-ospm-status",
4399 .args_type = "",
4400 .mhandler.cmd_new = qmp_marshal_query_acpi_ospm_status,
4403 SQMP
4404 @query-acpi-ospm-status
4405 --------------------
4407 Return list of ACPIOSTInfo for devices that support status reporting
4408 via ACPI _OST method.
4410 Example:
4411 -> { "execute": "query-acpi-ospm-status" }
4412 <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
4413 { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
4414 { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
4415 { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
4417 EQMP
4419 #if defined TARGET_I386
4421 .name = "rtc-reset-reinjection",
4422 .args_type = "",
4423 .mhandler.cmd_new = qmp_marshal_rtc_reset_reinjection,
4425 #endif
4427 SQMP
4428 rtc-reset-reinjection
4429 ---------------------
4431 Reset the RTC interrupt reinjection backlog.
4433 Arguments: None.
4435 Example:
4437 -> { "execute": "rtc-reset-reinjection" }
4438 <- { "return": {} }
4439 EQMP
4442 .name = "trace-event-get-state",
4443 .args_type = "name:s",
4444 .mhandler.cmd_new = qmp_marshal_trace_event_get_state,
4447 SQMP
4448 trace-event-get-state
4449 ---------------------
4451 Query the state of events.
4453 Example:
4455 -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
4456 <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
4457 EQMP
4460 .name = "trace-event-set-state",
4461 .args_type = "name:s,enable:b,ignore-unavailable:b?",
4462 .mhandler.cmd_new = qmp_marshal_trace_event_set_state,
4465 SQMP
4466 trace-event-set-state
4467 ---------------------
4469 Set the state of events.
4471 Example:
4473 -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
4474 <- { "return": {} }
4475 EQMP
4478 .name = "x-input-send-event",
4479 .args_type = "console:i?,events:q",
4480 .mhandler.cmd_new = qmp_marshal_x_input_send_event,
4483 SQMP
4484 @x-input-send-event
4485 -----------------
4487 Send input event to guest.
4489 Arguments:
4491 - "console": console index. (json-int, optional)
4492 - "events": list of input events.
4494 The consoles are visible in the qom tree, under
4495 /backend/console[$index]. They have a device link and head property, so
4496 it is possible to map which console belongs to which device and display.
4498 Note: this command is experimental, and not a stable API.
4500 Example (1):
4502 Press left mouse button.
4504 -> { "execute": "x-input-send-event",
4505 "arguments": { "console": 0,
4506 "events": [ { "type": "btn",
4507 "data" : { "down": true, "button": "Left" } } ] } }
4508 <- { "return": {} }
4510 -> { "execute": "x-input-send-event",
4511 "arguments": { "console": 0,
4512 "events": [ { "type": "btn",
4513 "data" : { "down": false, "button": "Left" } } ] } }
4514 <- { "return": {} }
4516 Example (2):
4518 Press ctrl-alt-del.
4520 -> { "execute": "x-input-send-event",
4521 "arguments": { "console": 0, "events": [
4522 { "type": "key", "data" : { "down": true,
4523 "key": {"type": "qcode", "data": "ctrl" } } },
4524 { "type": "key", "data" : { "down": true,
4525 "key": {"type": "qcode", "data": "alt" } } },
4526 { "type": "key", "data" : { "down": true,
4527 "key": {"type": "qcode", "data": "delete" } } } ] } }
4528 <- { "return": {} }
4530 Example (3):
4532 Move mouse pointer to absolute coordinates (20000, 400).
4534 -> { "execute": "x-input-send-event" ,
4535 "arguments": { "console": 0, "events": [
4536 { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
4537 { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
4538 <- { "return": {} }
4540 EQMP
4543 .name = "block-set-write-threshold",
4544 .args_type = "node-name:s,write-threshold:l",
4545 .mhandler.cmd_new = qmp_marshal_block_set_write_threshold,
4548 SQMP
4549 block-set-write-threshold
4550 ------------
4552 Change the write threshold for a block drive. The threshold is an offset,
4553 thus must be non-negative. Default is no write threshold.
4554 Setting the threshold to zero disables it.
4556 Arguments:
4558 - "node-name": the node name in the block driver state graph (json-string)
4559 - "write-threshold": the write threshold in bytes (json-int)
4561 Example:
4563 -> { "execute": "block-set-write-threshold",
4564 "arguments": { "node-name": "mydev",
4565 "write-threshold": 17179869184 } }
4566 <- { "return": {} }
4568 EQMP
4571 .name = "query-rocker",
4572 .args_type = "name:s",
4573 .mhandler.cmd_new = qmp_marshal_query_rocker,
4576 SQMP
4577 Show rocker switch
4578 ------------------
4580 Arguments:
4582 - "name": switch name
4584 Example:
4586 -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
4587 <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
4589 EQMP
4592 .name = "query-rocker-ports",
4593 .args_type = "name:s",
4594 .mhandler.cmd_new = qmp_marshal_query_rocker_ports,
4597 SQMP
4598 Show rocker switch ports
4599 ------------------------
4601 Arguments:
4603 - "name": switch name
4605 Example:
4607 -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
4608 <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
4609 "autoneg": "off", "link-up": true, "speed": 10000},
4610 {"duplex": "full", "enabled": true, "name": "sw1.2",
4611 "autoneg": "off", "link-up": true, "speed": 10000}
4614 EQMP
4617 .name = "query-rocker-of-dpa-flows",
4618 .args_type = "name:s,tbl-id:i?",
4619 .mhandler.cmd_new = qmp_marshal_query_rocker_of_dpa_flows,
4622 SQMP
4623 Show rocker switch OF-DPA flow tables
4624 -------------------------------------
4626 Arguments:
4628 - "name": switch name
4629 - "tbl-id": (optional) flow table ID
4631 Example:
4633 -> { "execute": "query-rocker-of-dpa-flows", "arguments": { "name": "sw1" } }
4634 <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
4635 "hits": 138,
4636 "cookie": 0,
4637 "action": {"goto-tbl": 10},
4638 "mask": {"in-pport": 4294901760}
4640 {...more...},
4643 EQMP
4646 .name = "query-rocker-of-dpa-groups",
4647 .args_type = "name:s,type:i?",
4648 .mhandler.cmd_new = qmp_marshal_query_rocker_of_dpa_groups,
4651 SQMP
4652 Show rocker OF-DPA group tables
4653 -------------------------------
4655 Arguments:
4657 - "name": switch name
4658 - "type": (optional) group type
4660 Example:
4662 -> { "execute": "query-rocker-of-dpa-groups", "arguments": { "name": "sw1" } }
4663 <- { "return": [ {"type": 0, "out-pport": 2, "pport": 2, "vlan-id": 3841,
4664 "pop-vlan": 1, "id": 251723778},
4665 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3841,
4666 "pop-vlan": 1, "id": 251723776},
4667 {"type": 0, "out-pport": 1, "pport": 1, "vlan-id": 3840,
4668 "pop-vlan": 1, "id": 251658241},
4669 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840,
4670 "pop-vlan": 1, "id": 251658240}