i82374: replace register_ioport*
[qemu/ar7.git] / qmp-commands.hx
blob362f0e1ef862c3bae7c97c77e373c5912dc59cca
1 HXCOMM QMP dispatch table and documentation
2 HXCOMM Text between SQMP and EQMP is copied to the QMP documention 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_input_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_input_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_input_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_input_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_input_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_input_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_input_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_input_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_input_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 .user_print = monitor_user_noop,
280 .mhandler.cmd_new = do_device_add,
283 SQMP
284 device_add
285 ----------
287 Add a device.
289 Arguments:
291 - "driver": the name of the new device's driver (json-string)
292 - "bus": the device's parent bus (device tree path, json-string, optional)
293 - "id": the device's ID, must be unique (json-string)
294 - device properties
296 Example:
298 -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
299 <- { "return": {} }
301 Notes:
303 (1) For detailed information about this command, please refer to the
304 'docs/qdev-device-use.txt' file.
306 (2) It's possible to list device properties by running QEMU with the
307 "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
309 EQMP
312 .name = "device_del",
313 .args_type = "id:s",
314 .mhandler.cmd_new = qmp_marshal_input_device_del,
317 SQMP
318 device_del
319 ----------
321 Remove a device.
323 Arguments:
325 - "id": the device's ID (json-string)
327 Example:
329 -> { "execute": "device_del", "arguments": { "id": "net1" } }
330 <- { "return": {} }
332 EQMP
335 .name = "send-key",
336 .args_type = "keys:O,hold-time:i?",
337 .mhandler.cmd_new = qmp_marshal_input_send_key,
340 SQMP
341 send-key
342 ----------
344 Send keys to VM.
346 Arguments:
348 keys array:
349 - "key": key sequence (a json-array of key enum values)
351 - hold-time: time to delay key up events, milliseconds. Defaults to 100
352 (json-int, optional)
354 Example:
356 -> { "execute": "send-key",
357 "arguments": { 'keys': [ 'ctrl', 'alt', 'delete' ] } }
358 <- { "return": {} }
360 EQMP
363 .name = "cpu",
364 .args_type = "index:i",
365 .mhandler.cmd_new = qmp_marshal_input_cpu,
368 SQMP
372 Set the default CPU.
374 Arguments:
376 - "index": the CPU's index (json-int)
378 Example:
380 -> { "execute": "cpu", "arguments": { "index": 0 } }
381 <- { "return": {} }
383 Note: CPUs' indexes are obtained with the 'query-cpus' command.
385 EQMP
388 .name = "cpu-add",
389 .args_type = "id:i",
390 .mhandler.cmd_new = qmp_marshal_input_cpu_add,
393 SQMP
394 cpu-add
395 -------
397 Adds virtual cpu
399 Arguments:
401 - "id": cpu id (json-int)
403 Example:
405 -> { "execute": "cpu-add", "arguments": { "id": 2 } }
406 <- { "return": {} }
408 EQMP
411 .name = "memsave",
412 .args_type = "val:l,size:i,filename:s,cpu:i?",
413 .mhandler.cmd_new = qmp_marshal_input_memsave,
416 SQMP
417 memsave
418 -------
420 Save to disk virtual memory dump starting at 'val' of size 'size'.
422 Arguments:
424 - "val": the starting address (json-int)
425 - "size": the memory size, in bytes (json-int)
426 - "filename": file path (json-string)
427 - "cpu": virtual CPU index (json-int, optional)
429 Example:
431 -> { "execute": "memsave",
432 "arguments": { "val": 10,
433 "size": 100,
434 "filename": "/tmp/virtual-mem-dump" } }
435 <- { "return": {} }
437 EQMP
440 .name = "pmemsave",
441 .args_type = "val:l,size:i,filename:s",
442 .mhandler.cmd_new = qmp_marshal_input_pmemsave,
445 SQMP
446 pmemsave
447 --------
449 Save to disk physical memory dump starting at 'val' of size 'size'.
451 Arguments:
453 - "val": the starting address (json-int)
454 - "size": the memory size, in bytes (json-int)
455 - "filename": file path (json-string)
457 Example:
459 -> { "execute": "pmemsave",
460 "arguments": { "val": 10,
461 "size": 100,
462 "filename": "/tmp/physical-mem-dump" } }
463 <- { "return": {} }
465 EQMP
468 .name = "inject-nmi",
469 .args_type = "",
470 .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
473 SQMP
474 inject-nmi
475 ----------
477 Inject an NMI on guest's CPUs.
479 Arguments: None.
481 Example:
483 -> { "execute": "inject-nmi" }
484 <- { "return": {} }
486 Note: inject-nmi fails when the guest doesn't support injecting.
487 Currently, only x86 guests do.
489 EQMP
492 .name = "ringbuf-write",
493 .args_type = "device:s,data:s,format:s?",
494 .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
497 SQMP
498 ringbuf-write
499 -------------
501 Write to a ring buffer character device.
503 Arguments:
505 - "device": ring buffer character device name (json-string)
506 - "data": data to write (json-string)
507 - "format": data format (json-string, optional)
508 - Possible values: "utf8" (default), "base64"
509 Bug: invalid base64 is currently not rejected.
510 Whitespace *is* invalid.
512 Example:
514 -> { "execute": "ringbuf-write",
515 "arguments": { "device": "foo",
516 "data": "abcdefgh",
517 "format": "utf8" } }
518 <- { "return": {} }
520 EQMP
523 .name = "ringbuf-read",
524 .args_type = "device:s,size:i,format:s?",
525 .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
528 SQMP
529 ringbuf-read
530 -------------
532 Read from a ring buffer character device.
534 Arguments:
536 - "device": ring buffer character device name (json-string)
537 - "size": how many bytes to read at most (json-int)
538 - Number of data bytes, not number of characters in encoded data
539 - "format": data format (json-string, optional)
540 - Possible values: "utf8" (default), "base64"
541 - Naturally, format "utf8" works only when the ring buffer
542 contains valid UTF-8 text. Invalid UTF-8 sequences get
543 replaced. Bug: replacement doesn't work. Bug: can screw
544 up on encountering NUL characters, after the ring buffer
545 lost data, and when reading stops because the size limit
546 is reached.
548 Example:
550 -> { "execute": "ringbuf-read",
551 "arguments": { "device": "foo",
552 "size": 1000,
553 "format": "utf8" } }
554 <- {"return": "abcdefgh"}
556 EQMP
559 .name = "xen-save-devices-state",
560 .args_type = "filename:F",
561 .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
564 SQMP
565 xen-save-devices-state
566 -------
568 Save the state of all devices to file. The RAM and the block devices
569 of the VM are not saved by this command.
571 Arguments:
573 - "filename": the file to save the state of the devices to as binary
574 data. See xen-save-devices-state.txt for a description of the binary
575 format.
577 Example:
579 -> { "execute": "xen-save-devices-state",
580 "arguments": { "filename": "/tmp/save" } }
581 <- { "return": {} }
583 EQMP
586 .name = "xen-set-global-dirty-log",
587 .args_type = "enable:b",
588 .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
591 SQMP
592 xen-set-global-dirty-log
593 -------
595 Enable or disable the global dirty log mode.
597 Arguments:
599 - "enable": Enable it or disable it.
601 Example:
603 -> { "execute": "xen-set-global-dirty-log",
604 "arguments": { "enable": true } }
605 <- { "return": {} }
607 EQMP
610 .name = "migrate",
611 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
612 .mhandler.cmd_new = qmp_marshal_input_migrate,
615 SQMP
616 migrate
617 -------
619 Migrate to URI.
621 Arguments:
623 - "blk": block migration, full disk copy (json-bool, optional)
624 - "inc": incremental disk copy (json-bool, optional)
625 - "uri": Destination URI (json-string)
627 Example:
629 -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
630 <- { "return": {} }
632 Notes:
634 (1) The 'query-migrate' command should be used to check migration's progress
635 and final result (this information is provided by the 'status' member)
636 (2) All boolean arguments default to false
637 (3) The user Monitor's "detach" argument is invalid in QMP and should not
638 be used
640 EQMP
643 .name = "migrate_cancel",
644 .args_type = "",
645 .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
648 SQMP
649 migrate_cancel
650 --------------
652 Cancel the current migration.
654 Arguments: None.
656 Example:
658 -> { "execute": "migrate_cancel" }
659 <- { "return": {} }
661 EQMP
663 .name = "migrate-set-cache-size",
664 .args_type = "value:o",
665 .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
668 SQMP
669 migrate-set-cache-size
670 ----------------------
672 Set cache size to be used by XBZRLE migration, the cache size will be rounded
673 down to the nearest power of 2
675 Arguments:
677 - "value": cache size in bytes (json-int)
679 Example:
681 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
682 <- { "return": {} }
684 EQMP
686 .name = "query-migrate-cache-size",
687 .args_type = "",
688 .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
691 SQMP
692 query-migrate-cache-size
693 ------------------------
695 Show cache size to be used by XBZRLE migration
697 returns a json-object with the following information:
698 - "size" : json-int
700 Example:
702 -> { "execute": "query-migrate-cache-size" }
703 <- { "return": 67108864 }
705 EQMP
708 .name = "migrate_set_speed",
709 .args_type = "value:o",
710 .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
713 SQMP
714 migrate_set_speed
715 -----------------
717 Set maximum speed for migrations.
719 Arguments:
721 - "value": maximum speed, in bytes per second (json-int)
723 Example:
725 -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
726 <- { "return": {} }
728 EQMP
731 .name = "migrate_set_downtime",
732 .args_type = "value:T",
733 .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
736 SQMP
737 migrate_set_downtime
738 --------------------
740 Set maximum tolerated downtime (in seconds) for migrations.
742 Arguments:
744 - "value": maximum downtime (json-number)
746 Example:
748 -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
749 <- { "return": {} }
751 EQMP
754 .name = "client_migrate_info",
755 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
756 .params = "protocol hostname port tls-port cert-subject",
757 .help = "send migration info to spice/vnc client",
758 .user_print = monitor_user_noop,
759 .mhandler.cmd_async = client_migrate_info,
760 .flags = MONITOR_CMD_ASYNC,
763 SQMP
764 client_migrate_info
765 ------------------
767 Set the spice/vnc connection info for the migration target. The spice/vnc
768 server will ask the spice/vnc client to automatically reconnect using the
769 new parameters (if specified) once the vm migration finished successfully.
771 Arguments:
773 - "protocol": protocol: "spice" or "vnc" (json-string)
774 - "hostname": migration target hostname (json-string)
775 - "port": spice/vnc tcp port for plaintext channels (json-int, optional)
776 - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
777 - "cert-subject": server certificate subject (json-string, optional)
779 Example:
781 -> { "execute": "client_migrate_info",
782 "arguments": { "protocol": "spice",
783 "hostname": "virt42.lab.kraxel.org",
784 "port": 1234 } }
785 <- { "return": {} }
787 EQMP
790 .name = "dump-guest-memory",
791 .args_type = "paging:b,protocol:s,begin:i?,end:i?",
792 .params = "-p protocol [begin] [length]",
793 .help = "dump guest memory to file",
794 .user_print = monitor_user_noop,
795 .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
798 SQMP
799 dump
802 Dump guest memory to file. The file can be processed with crash or gdb.
804 Arguments:
806 - "paging": do paging to get guest's memory mapping (json-bool)
807 - "protocol": destination file(started with "file:") or destination file
808 descriptor (started with "fd:") (json-string)
809 - "begin": the starting physical address. It's optional, and should be specified
810 with length together (json-int)
811 - "length": the memory size, in bytes. It's optional, and should be specified
812 with begin together (json-int)
814 Example:
816 -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
817 <- { "return": {} }
819 Notes:
821 (1) All boolean arguments default to false
823 EQMP
826 .name = "netdev_add",
827 .args_type = "netdev:O",
828 .mhandler.cmd_new = qmp_netdev_add,
831 SQMP
832 netdev_add
833 ----------
835 Add host network device.
837 Arguments:
839 - "type": the device type, "tap", "user", ... (json-string)
840 - "id": the device's ID, must be unique (json-string)
841 - device options
843 Example:
845 -> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
846 <- { "return": {} }
848 Note: The supported device options are the same ones supported by the '-netdev'
849 command-line argument, which are listed in the '-help' output or QEMU's
850 manual
852 EQMP
855 .name = "netdev_del",
856 .args_type = "id:s",
857 .mhandler.cmd_new = qmp_marshal_input_netdev_del,
860 SQMP
861 netdev_del
862 ----------
864 Remove host network device.
866 Arguments:
868 - "id": the device's ID, must be unique (json-string)
870 Example:
872 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
873 <- { "return": {} }
876 EQMP
879 .name = "block_resize",
880 .args_type = "device:B,size:o",
881 .mhandler.cmd_new = qmp_marshal_input_block_resize,
884 SQMP
885 block_resize
886 ------------
888 Resize a block image while a guest is running.
890 Arguments:
892 - "device": the device's ID, must be unique (json-string)
893 - "size": new size
895 Example:
897 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
898 <- { "return": {} }
900 EQMP
903 .name = "block-stream",
904 .args_type = "device:B,base:s?,speed:o?,on-error:s?",
905 .mhandler.cmd_new = qmp_marshal_input_block_stream,
909 .name = "block-commit",
910 .args_type = "device:B,base:s?,top:s,speed:o?",
911 .mhandler.cmd_new = qmp_marshal_input_block_commit,
915 .name = "drive-backup",
916 .args_type = "device:B,target:s,speed:i?,mode:s?,format:s?,"
917 "on-source-error:s?,on-target-error:s?",
918 .mhandler.cmd_new = qmp_marshal_input_drive_backup,
921 SQMP
922 drive-backup
923 ------------
925 Start a point-in-time copy of a block device to a new destination. The
926 status of ongoing drive-backup operations can be checked with
927 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
928 The operation can be stopped before it has completed using the
929 block-job-cancel command.
931 Arguments:
933 - "device": the name of the device which should be copied.
934 (json-string)
935 - "target": the target of the new image. If the file exists, or if it is a
936 device, the existing file/device will be used as the new
937 destination. If it does not exist, a new file will be created.
938 (json-string)
939 - "format": the format of the new destination, default is to probe if 'mode' is
940 'existing', else the format of the source
941 (json-string, optional)
942 - "mode": whether and how QEMU should create a new image
943 (NewImageMode, optional, default 'absolute-paths')
944 - "speed": the maximum speed, in bytes per second (json-int, optional)
945 - "on-source-error": the action to take on an error on the source, default
946 'report'. 'stop' and 'enospc' can only be used
947 if the block device supports io-status.
948 (BlockdevOnError, optional)
949 - "on-target-error": the action to take on an error on the target, default
950 'report' (no limitations, since this applies to
951 a different block device than device).
952 (BlockdevOnError, optional)
954 Example:
955 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
956 "target": "backup.img" } }
957 <- { "return": {} }
958 EQMP
961 .name = "block-job-set-speed",
962 .args_type = "device:B,speed:o",
963 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
967 .name = "block-job-cancel",
968 .args_type = "device:B,force:b?",
969 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
972 .name = "block-job-pause",
973 .args_type = "device:B",
974 .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
977 .name = "block-job-resume",
978 .args_type = "device:B",
979 .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
982 .name = "block-job-complete",
983 .args_type = "device:B",
984 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
987 .name = "transaction",
988 .args_type = "actions:q",
989 .mhandler.cmd_new = qmp_marshal_input_transaction,
992 SQMP
993 transaction
994 -----------
996 Atomically operate on one or more block devices. The only supported
997 operation for now is snapshotting. If there is any failure performing
998 any of the operations, all snapshots for the group are abandoned, and
999 the original disks pre-snapshot attempt are used.
1001 A list of dictionaries is accepted, that contains the actions to be performed.
1002 For snapshots this is the device, the file to use for the new snapshot,
1003 and the format. The default format, if not specified, is qcow2.
1005 Each new snapshot defaults to being created by QEMU (wiping any
1006 contents if the file already exists), but it is also possible to reuse
1007 an externally-created file. In the latter case, you should ensure that
1008 the new image file has the same contents as the current one; QEMU cannot
1009 perform any meaningful check. Typically this is achieved by using the
1010 current image file as the backing file for the new image.
1012 Arguments:
1014 actions array:
1015 - "type": the operation to perform. The only supported
1016 value is "blockdev-snapshot-sync". (json-string)
1017 - "data": a dictionary. The contents depend on the value
1018 of "type". When "type" is "blockdev-snapshot-sync":
1019 - "device": device name to snapshot (json-string)
1020 - "snapshot-file": name of new image file (json-string)
1021 - "format": format of new image (json-string, optional)
1022 - "mode": whether and how QEMU should create the snapshot file
1023 (NewImageMode, optional, default "absolute-paths")
1025 Example:
1027 -> { "execute": "transaction",
1028 "arguments": { "actions": [
1029 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd0",
1030 "snapshot-file": "/some/place/my-image",
1031 "format": "qcow2" } },
1032 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd1",
1033 "snapshot-file": "/some/place/my-image2",
1034 "mode": "existing",
1035 "format": "qcow2" } } ] } }
1036 <- { "return": {} }
1038 EQMP
1041 .name = "blockdev-snapshot-sync",
1042 .args_type = "device:B,snapshot-file:s,format:s?,mode:s?",
1043 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
1046 SQMP
1047 blockdev-snapshot-sync
1048 ----------------------
1050 Synchronous snapshot of a block device. snapshot-file specifies the
1051 target of the new image. If the file exists, or if it is a device, the
1052 snapshot will be created in the existing file/device. If does not
1053 exist, a new file will be created. format specifies the format of the
1054 snapshot image, default is qcow2.
1056 Arguments:
1058 - "device": device name to snapshot (json-string)
1059 - "snapshot-file": name of new image file (json-string)
1060 - "mode": whether and how QEMU should create the snapshot file
1061 (NewImageMode, optional, default "absolute-paths")
1062 - "format": format of new image (json-string, optional)
1064 Example:
1066 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1067 "snapshot-file":
1068 "/some/place/my-image",
1069 "format": "qcow2" } }
1070 <- { "return": {} }
1072 EQMP
1075 .name = "drive-mirror",
1076 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1077 "on-source-error:s?,on-target-error:s?,"
1078 "granularity:i?,buf-size:i?",
1079 .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
1082 SQMP
1083 drive-mirror
1084 ------------
1086 Start mirroring a block device's writes to a new destination. target
1087 specifies the target of the new image. If the file exists, or if it is
1088 a device, it will be used as the new destination for writes. If it does not
1089 exist, a new file will be created. format specifies the format of the
1090 mirror image, default is to probe if mode='existing', else the format
1091 of the source.
1093 Arguments:
1095 - "device": device name to operate on (json-string)
1096 - "target": name of new image file (json-string)
1097 - "format": format of new image (json-string, optional)
1098 - "mode": how an image file should be created into the target
1099 file/device (NewImageMode, optional, default 'absolute-paths')
1100 - "speed": maximum speed of the streaming job, in bytes per second
1101 (json-int)
1102 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1103 - "buf_size": maximum amount of data in flight from source to target, in bytes
1104 (json-int, default 10M)
1105 - "sync": what parts of the disk image should be copied to the destination;
1106 possibilities include "full" for all the disk, "top" for only the sectors
1107 allocated in the topmost image, or "none" to only replicate new I/O
1108 (MirrorSyncMode).
1109 - "on-source-error": the action to take on an error on the source
1110 (BlockdevOnError, default 'report')
1111 - "on-target-error": the action to take on an error on the target
1112 (BlockdevOnError, default 'report')
1114 The default value of the granularity is the image cluster size clamped
1115 between 4096 and 65536, if the image format defines one. If the format
1116 does not define a cluster size, the default value of the granularity
1117 is 65536.
1120 Example:
1122 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1123 "target": "/some/place/my-image",
1124 "sync": "full",
1125 "format": "qcow2" } }
1126 <- { "return": {} }
1128 EQMP
1131 .name = "balloon",
1132 .args_type = "value:M",
1133 .mhandler.cmd_new = qmp_marshal_input_balloon,
1136 SQMP
1137 balloon
1138 -------
1140 Request VM to change its memory allocation (in bytes).
1142 Arguments:
1144 - "value": New memory allocation (json-int)
1146 Example:
1148 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1149 <- { "return": {} }
1151 EQMP
1154 .name = "set_link",
1155 .args_type = "name:s,up:b",
1156 .mhandler.cmd_new = qmp_marshal_input_set_link,
1159 SQMP
1160 set_link
1161 --------
1163 Change the link status of a network adapter.
1165 Arguments:
1167 - "name": network device name (json-string)
1168 - "up": status is up (json-bool)
1170 Example:
1172 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1173 <- { "return": {} }
1175 EQMP
1178 .name = "getfd",
1179 .args_type = "fdname:s",
1180 .params = "getfd name",
1181 .help = "receive a file descriptor via SCM rights and assign it a name",
1182 .mhandler.cmd_new = qmp_marshal_input_getfd,
1185 SQMP
1186 getfd
1187 -----
1189 Receive a file descriptor via SCM rights and assign it a name.
1191 Arguments:
1193 - "fdname": file descriptor name (json-string)
1195 Example:
1197 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1198 <- { "return": {} }
1200 Notes:
1202 (1) If the name specified by the "fdname" argument already exists,
1203 the file descriptor assigned to it will be closed and replaced
1204 by the received file descriptor.
1205 (2) The 'closefd' command can be used to explicitly close the file
1206 descriptor when it is no longer needed.
1208 EQMP
1211 .name = "closefd",
1212 .args_type = "fdname:s",
1213 .params = "closefd name",
1214 .help = "close a file descriptor previously passed via SCM rights",
1215 .mhandler.cmd_new = qmp_marshal_input_closefd,
1218 SQMP
1219 closefd
1220 -------
1222 Close a file descriptor previously passed via SCM rights.
1224 Arguments:
1226 - "fdname": file descriptor name (json-string)
1228 Example:
1230 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1231 <- { "return": {} }
1233 EQMP
1236 .name = "add-fd",
1237 .args_type = "fdset-id:i?,opaque:s?",
1238 .params = "add-fd fdset-id opaque",
1239 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1240 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1243 SQMP
1244 add-fd
1245 -------
1247 Add a file descriptor, that was passed via SCM rights, to an fd set.
1249 Arguments:
1251 - "fdset-id": The ID of the fd set to add the file descriptor to.
1252 (json-int, optional)
1253 - "opaque": A free-form string that can be used to describe the fd.
1254 (json-string, optional)
1256 Return a json-object with the following information:
1258 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1259 - "fd": The file descriptor that was received via SCM rights and added to the
1260 fd set. (json-int)
1262 Example:
1264 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1265 <- { "return": { "fdset-id": 1, "fd": 3 } }
1267 Notes:
1269 (1) The list of fd sets is shared by all monitor connections.
1270 (2) If "fdset-id" is not specified, a new fd set will be created.
1272 EQMP
1275 .name = "remove-fd",
1276 .args_type = "fdset-id:i,fd:i?",
1277 .params = "remove-fd fdset-id fd",
1278 .help = "Remove a file descriptor from an fd set",
1279 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1282 SQMP
1283 remove-fd
1284 ---------
1286 Remove a file descriptor from an fd set.
1288 Arguments:
1290 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1291 (json-int)
1292 - "fd": The file descriptor that is to be removed. (json-int, optional)
1294 Example:
1296 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1297 <- { "return": {} }
1299 Notes:
1301 (1) The list of fd sets is shared by all monitor connections.
1302 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1303 removed.
1305 EQMP
1308 .name = "query-fdsets",
1309 .args_type = "",
1310 .help = "Return information describing all fd sets",
1311 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1314 SQMP
1315 query-fdsets
1316 -------------
1318 Return information describing all fd sets.
1320 Arguments: None
1322 Example:
1324 -> { "execute": "query-fdsets" }
1325 <- { "return": [
1327 "fds": [
1329 "fd": 30,
1330 "opaque": "rdonly:/path/to/file"
1333 "fd": 24,
1334 "opaque": "rdwr:/path/to/file"
1337 "fdset-id": 1
1340 "fds": [
1342 "fd": 28
1345 "fd": 29
1348 "fdset-id": 0
1353 Note: The list of fd sets is shared by all monitor connections.
1355 EQMP
1358 .name = "block_passwd",
1359 .args_type = "device:B,password:s",
1360 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
1363 SQMP
1364 block_passwd
1365 ------------
1367 Set the password of encrypted block devices.
1369 Arguments:
1371 - "device": device name (json-string)
1372 - "password": password (json-string)
1374 Example:
1376 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1377 "password": "12345" } }
1378 <- { "return": {} }
1380 EQMP
1383 .name = "block_set_io_throttle",
1384 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1385 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
1388 SQMP
1389 block_set_io_throttle
1390 ------------
1392 Change I/O throttle limits for a block drive.
1394 Arguments:
1396 - "device": device name (json-string)
1397 - "bps": total throughput limit in bytes per second(json-int)
1398 - "bps_rd": read throughput limit in bytes per second(json-int)
1399 - "bps_wr": read throughput limit in bytes per second(json-int)
1400 - "iops": total I/O operations per second(json-int)
1401 - "iops_rd": read I/O operations per second(json-int)
1402 - "iops_wr": write I/O operations per second(json-int)
1404 Example:
1406 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1407 "bps": "1000000",
1408 "bps_rd": "0",
1409 "bps_wr": "0",
1410 "iops": "0",
1411 "iops_rd": "0",
1412 "iops_wr": "0" } }
1413 <- { "return": {} }
1415 EQMP
1418 .name = "set_password",
1419 .args_type = "protocol:s,password:s,connected:s?",
1420 .mhandler.cmd_new = qmp_marshal_input_set_password,
1423 SQMP
1424 set_password
1425 ------------
1427 Set the password for vnc/spice protocols.
1429 Arguments:
1431 - "protocol": protocol name (json-string)
1432 - "password": password (json-string)
1433 - "connected": [ keep | disconnect | fail ] (josn-string, optional)
1435 Example:
1437 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
1438 "password": "secret" } }
1439 <- { "return": {} }
1441 EQMP
1444 .name = "expire_password",
1445 .args_type = "protocol:s,time:s",
1446 .mhandler.cmd_new = qmp_marshal_input_expire_password,
1449 SQMP
1450 expire_password
1451 ---------------
1453 Set the password expire time for vnc/spice protocols.
1455 Arguments:
1457 - "protocol": protocol name (json-string)
1458 - "time": [ now | never | +secs | secs ] (json-string)
1460 Example:
1462 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1463 "time": "+60" } }
1464 <- { "return": {} }
1466 EQMP
1469 .name = "add_client",
1470 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
1471 .mhandler.cmd_new = qmp_marshal_input_add_client,
1474 SQMP
1475 add_client
1476 ----------
1478 Add a graphics client
1480 Arguments:
1482 - "protocol": protocol name (json-string)
1483 - "fdname": file descriptor name (json-string)
1484 - "skipauth": whether to skip authentication (json-bool, optional)
1485 - "tls": whether to perform TLS (json-bool, optional)
1487 Example:
1489 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
1490 "fdname": "myclient" } }
1491 <- { "return": {} }
1493 EQMP
1495 .name = "qmp_capabilities",
1496 .args_type = "",
1497 .params = "",
1498 .help = "enable QMP capabilities",
1499 .user_print = monitor_user_noop,
1500 .mhandler.cmd_new = do_qmp_capabilities,
1503 SQMP
1504 qmp_capabilities
1505 ----------------
1507 Enable QMP capabilities.
1509 Arguments: None.
1511 Example:
1513 -> { "execute": "qmp_capabilities" }
1514 <- { "return": {} }
1516 Note: This command must be issued before issuing any other command.
1518 EQMP
1521 .name = "human-monitor-command",
1522 .args_type = "command-line:s,cpu-index:i?",
1523 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
1526 SQMP
1527 human-monitor-command
1528 ---------------------
1530 Execute a Human Monitor command.
1532 Arguments:
1534 - command-line: the command name and its arguments, just like the
1535 Human Monitor's shell (json-string)
1536 - cpu-index: select the CPU number to be used by commands which access CPU
1537 data, like 'info registers'. The Monitor selects CPU 0 if this
1538 argument is not provided (json-int, optional)
1540 Example:
1542 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
1543 <- { "return": "kvm support: enabled\r\n" }
1545 Notes:
1547 (1) The Human Monitor is NOT an stable interface, this means that command
1548 names, arguments and responses can change or be removed at ANY time.
1549 Applications that rely on long term stability guarantees should NOT
1550 use this command
1552 (2) Limitations:
1554 o This command is stateless, this means that commands that depend
1555 on state information (such as getfd) might not work
1557 o Commands that prompt the user for data (eg. 'cont' when the block
1558 device is encrypted) don't currently work
1560 3. Query Commands
1561 =================
1563 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1564 HXCOMM this! We will possibly move query commands definitions inside those
1565 HXCOMM sections, just like regular commands.
1567 EQMP
1569 SQMP
1570 query-version
1571 -------------
1573 Show QEMU version.
1575 Return a json-object with the following information:
1577 - "qemu": A json-object containing three integer values:
1578 - "major": QEMU's major version (json-int)
1579 - "minor": QEMU's minor version (json-int)
1580 - "micro": QEMU's micro version (json-int)
1581 - "package": package's version (json-string)
1583 Example:
1585 -> { "execute": "query-version" }
1586 <- {
1587 "return":{
1588 "qemu":{
1589 "major":0,
1590 "minor":11,
1591 "micro":5
1593 "package":""
1597 EQMP
1600 .name = "query-version",
1601 .args_type = "",
1602 .mhandler.cmd_new = qmp_marshal_input_query_version,
1605 SQMP
1606 query-commands
1607 --------------
1609 List QMP available commands.
1611 Each command is represented by a json-object, the returned value is a json-array
1612 of all commands.
1614 Each json-object contain:
1616 - "name": command's name (json-string)
1618 Example:
1620 -> { "execute": "query-commands" }
1621 <- {
1622 "return":[
1624 "name":"query-balloon"
1627 "name":"system_powerdown"
1632 Note: This example has been shortened as the real response is too long.
1634 EQMP
1637 .name = "query-commands",
1638 .args_type = "",
1639 .mhandler.cmd_new = qmp_marshal_input_query_commands,
1642 SQMP
1643 query-events
1644 --------------
1646 List QMP available events.
1648 Each event is represented by a json-object, the returned value is a json-array
1649 of all events.
1651 Each json-object contains:
1653 - "name": event's name (json-string)
1655 Example:
1657 -> { "execute": "query-events" }
1658 <- {
1659 "return":[
1661 "name":"SHUTDOWN"
1664 "name":"RESET"
1669 Note: This example has been shortened as the real response is too long.
1671 EQMP
1674 .name = "query-events",
1675 .args_type = "",
1676 .mhandler.cmd_new = qmp_marshal_input_query_events,
1679 SQMP
1680 query-chardev
1681 -------------
1683 Each device is represented by a json-object. The returned value is a json-array
1684 of all devices.
1686 Each json-object contain the following:
1688 - "label": device's label (json-string)
1689 - "filename": device's file (json-string)
1691 Example:
1693 -> { "execute": "query-chardev" }
1694 <- {
1695 "return":[
1697 "label":"monitor",
1698 "filename":"stdio"
1701 "label":"serial0",
1702 "filename":"vc"
1707 EQMP
1710 .name = "query-chardev",
1711 .args_type = "",
1712 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
1715 SQMP
1716 query-block
1717 -----------
1719 Show the block devices.
1721 Each block device information is stored in a json-object and the returned value
1722 is a json-array of all devices.
1724 Each json-object contain the following:
1726 - "device": device name (json-string)
1727 - "type": device type (json-string)
1728 - deprecated, retained for backward compatibility
1729 - Possible values: "unknown"
1730 - "removable": true if the device is removable, false otherwise (json-bool)
1731 - "locked": true if the device is locked, false otherwise (json-bool)
1732 - "tray_open": only present if removable, true if the device has a tray,
1733 and it is open (json-bool)
1734 - "inserted": only present if the device is inserted, it is a json-object
1735 containing the following:
1736 - "file": device file name (json-string)
1737 - "ro": true if read-only, false otherwise (json-bool)
1738 - "drv": driver format name (json-string)
1739 - Possible values: "blkdebug", "bochs", "cloop", "cow", "dmg",
1740 "file", "file", "ftp", "ftps", "host_cdrom",
1741 "host_device", "host_floppy", "http", "https",
1742 "nbd", "parallels", "qcow", "qcow2", "raw",
1743 "tftp", "vdi", "vmdk", "vpc", "vvfat"
1744 - "backing_file": backing file name (json-string, optional)
1745 - "backing_file_depth": number of files in the backing file chain (json-int)
1746 - "encrypted": true if encrypted, false otherwise (json-bool)
1747 - "bps": limit total bytes per second (json-int)
1748 - "bps_rd": limit read bytes per second (json-int)
1749 - "bps_wr": limit write bytes per second (json-int)
1750 - "iops": limit total I/O operations per second (json-int)
1751 - "iops_rd": limit read operations per second (json-int)
1752 - "iops_wr": limit write operations per second (json-int)
1753 - "image": the detail of the image, it is a json-object containing
1754 the following:
1755 - "filename": image file name (json-string)
1756 - "format": image format (json-string)
1757 - "virtual-size": image capacity in bytes (json-int)
1758 - "dirty-flag": true if image is not cleanly closed, not present
1759 means clean (json-bool, optional)
1760 - "actual-size": actual size on disk in bytes of the image, not
1761 present when image does not support thin
1762 provision (json-int, optional)
1763 - "cluster-size": size of a cluster in bytes, not present if image
1764 format does not support it (json-int, optional)
1765 - "encrypted": true if the image is encrypted, not present means
1766 false or the image format does not support
1767 encryption (json-bool, optional)
1768 - "backing_file": backing file name, not present means no backing
1769 file is used or the image format does not
1770 support backing file chain
1771 (json-string, optional)
1772 - "full-backing-filename": full path of the backing file, not
1773 present if it equals backing_file or no
1774 backing file is used
1775 (json-string, optional)
1776 - "backing-filename-format": the format of the backing file, not
1777 present means unknown or no backing
1778 file (json-string, optional)
1779 - "snapshots": the internal snapshot info, it is an optional list
1780 of json-object containing the following:
1781 - "id": unique snapshot id (json-string)
1782 - "name": snapshot name (json-string)
1783 - "vm-state-size": size of the VM state in bytes (json-int)
1784 - "date-sec": UTC date of the snapshot in seconds (json-int)
1785 - "date-nsec": fractional part in nanoseconds to be used with
1786 date-sec(json-int)
1787 - "vm-clock-sec": VM clock relative to boot in seconds
1788 (json-int)
1789 - "vm-clock-nsec": fractional part in nanoseconds to be used
1790 with vm-clock-sec (json-int)
1791 - "backing-image": the detail of the backing image, it is an
1792 optional json-object only present when a
1793 backing image present for this image
1795 - "io-status": I/O operation status, only present if the device supports it
1796 and the VM is configured to stop on errors. It's always reset
1797 to "ok" when the "cont" command is issued (json_string, optional)
1798 - Possible values: "ok", "failed", "nospace"
1800 Example:
1802 -> { "execute": "query-block" }
1803 <- {
1804 "return":[
1806 "io-status": "ok",
1807 "device":"ide0-hd0",
1808 "locked":false,
1809 "removable":false,
1810 "inserted":{
1811 "ro":false,
1812 "drv":"qcow2",
1813 "encrypted":false,
1814 "file":"disks/test.qcow2",
1815 "backing_file_depth":1,
1816 "bps":1000000,
1817 "bps_rd":0,
1818 "bps_wr":0,
1819 "iops":1000000,
1820 "iops_rd":0,
1821 "iops_wr":0,
1822 "image":{
1823 "filename":"disks/test.qcow2",
1824 "format":"qcow2",
1825 "virtual-size":2048000,
1826 "backing_file":"base.qcow2",
1827 "full-backing-filename":"disks/base.qcow2",
1828 "backing-filename-format:"qcow2",
1829 "snapshots":[
1831 "id": "1",
1832 "name": "snapshot1",
1833 "vm-state-size": 0,
1834 "date-sec": 10000200,
1835 "date-nsec": 12,
1836 "vm-clock-sec": 206,
1837 "vm-clock-nsec": 30
1840 "backing-image":{
1841 "filename":"disks/base.qcow2",
1842 "format":"qcow2",
1843 "virtual-size":2048000
1847 "type":"unknown"
1850 "io-status": "ok",
1851 "device":"ide1-cd0",
1852 "locked":false,
1853 "removable":true,
1854 "type":"unknown"
1857 "device":"floppy0",
1858 "locked":false,
1859 "removable":true,
1860 "type":"unknown"
1863 "device":"sd0",
1864 "locked":false,
1865 "removable":true,
1866 "type":"unknown"
1871 EQMP
1874 .name = "query-block",
1875 .args_type = "",
1876 .mhandler.cmd_new = qmp_marshal_input_query_block,
1879 SQMP
1880 query-blockstats
1881 ----------------
1883 Show block device statistics.
1885 Each device statistic information is stored in a json-object and the returned
1886 value is a json-array of all devices.
1888 Each json-object contain the following:
1890 - "device": device name (json-string)
1891 - "stats": A json-object with the statistics information, it contains:
1892 - "rd_bytes": bytes read (json-int)
1893 - "wr_bytes": bytes written (json-int)
1894 - "rd_operations": read operations (json-int)
1895 - "wr_operations": write operations (json-int)
1896 - "flush_operations": cache flush operations (json-int)
1897 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
1898 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
1899 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
1900 - "wr_highest_offset": Highest offset of a sector written since the
1901 BlockDriverState has been opened (json-int)
1902 - "parent": Contains recursively the statistics of the underlying
1903 protocol (e.g. the host file for a qcow2 image). If there is
1904 no underlying protocol, this field is omitted
1905 (json-object, optional)
1907 Example:
1909 -> { "execute": "query-blockstats" }
1910 <- {
1911 "return":[
1913 "device":"ide0-hd0",
1914 "parent":{
1915 "stats":{
1916 "wr_highest_offset":3686448128,
1917 "wr_bytes":9786368,
1918 "wr_operations":751,
1919 "rd_bytes":122567168,
1920 "rd_operations":36772
1921 "wr_total_times_ns":313253456
1922 "rd_total_times_ns":3465673657
1923 "flush_total_times_ns":49653
1924 "flush_operations":61,
1927 "stats":{
1928 "wr_highest_offset":2821110784,
1929 "wr_bytes":9786368,
1930 "wr_operations":692,
1931 "rd_bytes":122739200,
1932 "rd_operations":36604
1933 "flush_operations":51,
1934 "wr_total_times_ns":313253456
1935 "rd_total_times_ns":3465673657
1936 "flush_total_times_ns":49653
1940 "device":"ide1-cd0",
1941 "stats":{
1942 "wr_highest_offset":0,
1943 "wr_bytes":0,
1944 "wr_operations":0,
1945 "rd_bytes":0,
1946 "rd_operations":0
1947 "flush_operations":0,
1948 "wr_total_times_ns":0
1949 "rd_total_times_ns":0
1950 "flush_total_times_ns":0
1954 "device":"floppy0",
1955 "stats":{
1956 "wr_highest_offset":0,
1957 "wr_bytes":0,
1958 "wr_operations":0,
1959 "rd_bytes":0,
1960 "rd_operations":0
1961 "flush_operations":0,
1962 "wr_total_times_ns":0
1963 "rd_total_times_ns":0
1964 "flush_total_times_ns":0
1968 "device":"sd0",
1969 "stats":{
1970 "wr_highest_offset":0,
1971 "wr_bytes":0,
1972 "wr_operations":0,
1973 "rd_bytes":0,
1974 "rd_operations":0
1975 "flush_operations":0,
1976 "wr_total_times_ns":0
1977 "rd_total_times_ns":0
1978 "flush_total_times_ns":0
1984 EQMP
1987 .name = "query-blockstats",
1988 .args_type = "",
1989 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
1992 SQMP
1993 query-cpus
1994 ----------
1996 Show CPU information.
1998 Return a json-array. Each CPU is represented by a json-object, which contains:
2000 - "CPU": CPU index (json-int)
2001 - "current": true if this is the current CPU, false otherwise (json-bool)
2002 - "halted": true if the cpu is halted, false otherwise (json-bool)
2003 - Current program counter. The key's name depends on the architecture:
2004 "pc": i386/x86_64 (json-int)
2005 "nip": PPC (json-int)
2006 "pc" and "npc": sparc (json-int)
2007 "PC": mips (json-int)
2008 - "thread_id": ID of the underlying host thread (json-int)
2010 Example:
2012 -> { "execute": "query-cpus" }
2013 <- {
2014 "return":[
2016 "CPU":0,
2017 "current":true,
2018 "halted":false,
2019 "pc":3227107138
2020 "thread_id":3134
2023 "CPU":1,
2024 "current":false,
2025 "halted":true,
2026 "pc":7108165
2027 "thread_id":3135
2032 EQMP
2035 .name = "query-cpus",
2036 .args_type = "",
2037 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
2040 SQMP
2041 query-pci
2042 ---------
2044 PCI buses and devices information.
2046 The returned value is a json-array of all buses. Each bus is represented by
2047 a json-object, which has a key with a json-array of all PCI devices attached
2048 to it. Each device is represented by a json-object.
2050 The bus json-object contains the following:
2052 - "bus": bus number (json-int)
2053 - "devices": a json-array of json-objects, each json-object represents a
2054 PCI device
2056 The PCI device json-object contains the following:
2058 - "bus": identical to the parent's bus number (json-int)
2059 - "slot": slot number (json-int)
2060 - "function": function number (json-int)
2061 - "class_info": a json-object containing:
2062 - "desc": device class description (json-string, optional)
2063 - "class": device class number (json-int)
2064 - "id": a json-object containing:
2065 - "device": device ID (json-int)
2066 - "vendor": vendor ID (json-int)
2067 - "irq": device's IRQ if assigned (json-int, optional)
2068 - "qdev_id": qdev id string (json-string)
2069 - "pci_bridge": It's a json-object, only present if this device is a
2070 PCI bridge, contains:
2071 - "bus": bus number (json-int)
2072 - "secondary": secondary bus number (json-int)
2073 - "subordinate": subordinate bus number (json-int)
2074 - "io_range": I/O memory range information, a json-object with the
2075 following members:
2076 - "base": base address, in bytes (json-int)
2077 - "limit": limit address, in bytes (json-int)
2078 - "memory_range": memory range information, a json-object with the
2079 following members:
2080 - "base": base address, in bytes (json-int)
2081 - "limit": limit address, in bytes (json-int)
2082 - "prefetchable_range": Prefetchable memory range information, a
2083 json-object with the following members:
2084 - "base": base address, in bytes (json-int)
2085 - "limit": limit address, in bytes (json-int)
2086 - "devices": a json-array of PCI devices if there's any attached, each
2087 each element is represented by a json-object, which contains
2088 the same members of the 'PCI device json-object' described
2089 above (optional)
2090 - "regions": a json-array of json-objects, each json-object represents a
2091 memory region of this device
2093 The memory range json-object contains the following:
2095 - "base": base memory address (json-int)
2096 - "limit": limit value (json-int)
2098 The region json-object can be an I/O region or a memory region, an I/O region
2099 json-object contains the following:
2101 - "type": "io" (json-string, fixed)
2102 - "bar": BAR number (json-int)
2103 - "address": memory address (json-int)
2104 - "size": memory size (json-int)
2106 A memory region json-object contains the following:
2108 - "type": "memory" (json-string, fixed)
2109 - "bar": BAR number (json-int)
2110 - "address": memory address (json-int)
2111 - "size": memory size (json-int)
2112 - "mem_type_64": true or false (json-bool)
2113 - "prefetch": true or false (json-bool)
2115 Example:
2117 -> { "execute": "query-pci" }
2118 <- {
2119 "return":[
2121 "bus":0,
2122 "devices":[
2124 "bus":0,
2125 "qdev_id":"",
2126 "slot":0,
2127 "class_info":{
2128 "class":1536,
2129 "desc":"Host bridge"
2131 "id":{
2132 "device":32902,
2133 "vendor":4663
2135 "function":0,
2136 "regions":[
2141 "bus":0,
2142 "qdev_id":"",
2143 "slot":1,
2144 "class_info":{
2145 "class":1537,
2146 "desc":"ISA bridge"
2148 "id":{
2149 "device":32902,
2150 "vendor":28672
2152 "function":0,
2153 "regions":[
2158 "bus":0,
2159 "qdev_id":"",
2160 "slot":1,
2161 "class_info":{
2162 "class":257,
2163 "desc":"IDE controller"
2165 "id":{
2166 "device":32902,
2167 "vendor":28688
2169 "function":1,
2170 "regions":[
2172 "bar":4,
2173 "size":16,
2174 "address":49152,
2175 "type":"io"
2180 "bus":0,
2181 "qdev_id":"",
2182 "slot":2,
2183 "class_info":{
2184 "class":768,
2185 "desc":"VGA controller"
2187 "id":{
2188 "device":4115,
2189 "vendor":184
2191 "function":0,
2192 "regions":[
2194 "prefetch":true,
2195 "mem_type_64":false,
2196 "bar":0,
2197 "size":33554432,
2198 "address":4026531840,
2199 "type":"memory"
2202 "prefetch":false,
2203 "mem_type_64":false,
2204 "bar":1,
2205 "size":4096,
2206 "address":4060086272,
2207 "type":"memory"
2210 "prefetch":false,
2211 "mem_type_64":false,
2212 "bar":6,
2213 "size":65536,
2214 "address":-1,
2215 "type":"memory"
2220 "bus":0,
2221 "qdev_id":"",
2222 "irq":11,
2223 "slot":4,
2224 "class_info":{
2225 "class":1280,
2226 "desc":"RAM controller"
2228 "id":{
2229 "device":6900,
2230 "vendor":4098
2232 "function":0,
2233 "regions":[
2235 "bar":0,
2236 "size":32,
2237 "address":49280,
2238 "type":"io"
2247 Note: This example has been shortened as the real response is too long.
2249 EQMP
2252 .name = "query-pci",
2253 .args_type = "",
2254 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2257 SQMP
2258 query-kvm
2259 ---------
2261 Show KVM information.
2263 Return a json-object with the following information:
2265 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
2266 - "present": true if QEMU has KVM support, false otherwise (json-bool)
2268 Example:
2270 -> { "execute": "query-kvm" }
2271 <- { "return": { "enabled": true, "present": true } }
2273 EQMP
2276 .name = "query-kvm",
2277 .args_type = "",
2278 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2281 SQMP
2282 query-status
2283 ------------
2285 Return a json-object with the following information:
2287 - "running": true if the VM is running, or false if it is paused (json-bool)
2288 - "singlestep": true if the VM is in single step mode,
2289 false otherwise (json-bool)
2290 - "status": one of the following values (json-string)
2291 "debug" - QEMU is running on a debugger
2292 "inmigrate" - guest is paused waiting for an incoming migration
2293 "internal-error" - An internal error that prevents further guest
2294 execution has occurred
2295 "io-error" - the last IOP has failed and the device is configured
2296 to pause on I/O errors
2297 "paused" - guest has been paused via the 'stop' command
2298 "postmigrate" - guest is paused following a successful 'migrate'
2299 "prelaunch" - QEMU was started with -S and guest has not started
2300 "finish-migrate" - guest is paused to finish the migration process
2301 "restore-vm" - guest is paused to restore VM state
2302 "running" - guest is actively running
2303 "save-vm" - guest is paused to save the VM state
2304 "shutdown" - guest is shut down (and -no-shutdown is in use)
2305 "watchdog" - the watchdog action is configured to pause and
2306 has been triggered
2308 Example:
2310 -> { "execute": "query-status" }
2311 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
2313 EQMP
2316 .name = "query-status",
2317 .args_type = "",
2318 .mhandler.cmd_new = qmp_marshal_input_query_status,
2321 SQMP
2322 query-mice
2323 ----------
2325 Show VM mice information.
2327 Each mouse is represented by a json-object, the returned value is a json-array
2328 of all mice.
2330 The mouse json-object contains the following:
2332 - "name": mouse's name (json-string)
2333 - "index": mouse's index (json-int)
2334 - "current": true if this mouse is receiving events, false otherwise (json-bool)
2335 - "absolute": true if the mouse generates absolute input events (json-bool)
2337 Example:
2339 -> { "execute": "query-mice" }
2340 <- {
2341 "return":[
2343 "name":"QEMU Microsoft Mouse",
2344 "index":0,
2345 "current":false,
2346 "absolute":false
2349 "name":"QEMU PS/2 Mouse",
2350 "index":1,
2351 "current":true,
2352 "absolute":true
2357 EQMP
2360 .name = "query-mice",
2361 .args_type = "",
2362 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2365 SQMP
2366 query-vnc
2367 ---------
2369 Show VNC server information.
2371 Return a json-object with server information. Connected clients are returned
2372 as a json-array of json-objects.
2374 The main json-object contains the following:
2376 - "enabled": true or false (json-bool)
2377 - "host": server's IP address (json-string)
2378 - "family": address family (json-string)
2379 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2380 - "service": server's port number (json-string)
2381 - "auth": authentication method (json-string)
2382 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2383 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2384 "vencrypt+plain", "vencrypt+tls+none",
2385 "vencrypt+tls+plain", "vencrypt+tls+sasl",
2386 "vencrypt+tls+vnc", "vencrypt+x509+none",
2387 "vencrypt+x509+plain", "vencrypt+x509+sasl",
2388 "vencrypt+x509+vnc", "vnc"
2389 - "clients": a json-array of all connected clients
2391 Clients are described by a json-object, each one contain the following:
2393 - "host": client's IP address (json-string)
2394 - "family": address family (json-string)
2395 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2396 - "service": client's port number (json-string)
2397 - "x509_dname": TLS dname (json-string, optional)
2398 - "sasl_username": SASL username (json-string, optional)
2400 Example:
2402 -> { "execute": "query-vnc" }
2403 <- {
2404 "return":{
2405 "enabled":true,
2406 "host":"0.0.0.0",
2407 "service":"50402",
2408 "auth":"vnc",
2409 "family":"ipv4",
2410 "clients":[
2412 "host":"127.0.0.1",
2413 "service":"50401",
2414 "family":"ipv4"
2420 EQMP
2423 .name = "query-vnc",
2424 .args_type = "",
2425 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2428 SQMP
2429 query-spice
2430 -----------
2432 Show SPICE server information.
2434 Return a json-object with server information. Connected clients are returned
2435 as a json-array of json-objects.
2437 The main json-object contains the following:
2439 - "enabled": true or false (json-bool)
2440 - "host": server's IP address (json-string)
2441 - "port": server's port number (json-int, optional)
2442 - "tls-port": server's port number (json-int, optional)
2443 - "auth": authentication method (json-string)
2444 - Possible values: "none", "spice"
2445 - "channels": a json-array of all active channels clients
2447 Channels are described by a json-object, each one contain the following:
2449 - "host": client's IP address (json-string)
2450 - "family": address family (json-string)
2451 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2452 - "port": client's port number (json-string)
2453 - "connection-id": spice connection id. All channels with the same id
2454 belong to the same spice session (json-int)
2455 - "channel-type": channel type. "1" is the main control channel, filter for
2456 this one if you want track spice sessions only (json-int)
2457 - "channel-id": channel id. Usually "0", might be different needed when
2458 multiple channels of the same type exist, such as multiple
2459 display channels in a multihead setup (json-int)
2460 - "tls": whevener the channel is encrypted (json-bool)
2462 Example:
2464 -> { "execute": "query-spice" }
2465 <- {
2466 "return": {
2467 "enabled": true,
2468 "auth": "spice",
2469 "port": 5920,
2470 "tls-port": 5921,
2471 "host": "0.0.0.0",
2472 "channels": [
2474 "port": "54924",
2475 "family": "ipv4",
2476 "channel-type": 1,
2477 "connection-id": 1804289383,
2478 "host": "127.0.0.1",
2479 "channel-id": 0,
2480 "tls": true
2483 "port": "36710",
2484 "family": "ipv4",
2485 "channel-type": 4,
2486 "connection-id": 1804289383,
2487 "host": "127.0.0.1",
2488 "channel-id": 0,
2489 "tls": false
2491 [ ... more channels follow ... ]
2496 EQMP
2498 #if defined(CONFIG_SPICE)
2500 .name = "query-spice",
2501 .args_type = "",
2502 .mhandler.cmd_new = qmp_marshal_input_query_spice,
2504 #endif
2506 SQMP
2507 query-name
2508 ----------
2510 Show VM name.
2512 Return a json-object with the following information:
2514 - "name": VM's name (json-string, optional)
2516 Example:
2518 -> { "execute": "query-name" }
2519 <- { "return": { "name": "qemu-name" } }
2521 EQMP
2524 .name = "query-name",
2525 .args_type = "",
2526 .mhandler.cmd_new = qmp_marshal_input_query_name,
2529 SQMP
2530 query-uuid
2531 ----------
2533 Show VM UUID.
2535 Return a json-object with the following information:
2537 - "UUID": Universally Unique Identifier (json-string)
2539 Example:
2541 -> { "execute": "query-uuid" }
2542 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
2544 EQMP
2547 .name = "query-uuid",
2548 .args_type = "",
2549 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
2552 SQMP
2553 query-command-line-options
2554 --------------------------
2556 Show command line option schema.
2558 Return a json-array of command line option schema for all options (or for
2559 the given option), returning an error if the given option doesn't exist.
2561 Each array entry contains the following:
2563 - "option": option name (json-string)
2564 - "parameters": a json-array describes all parameters of the option:
2565 - "name": parameter name (json-string)
2566 - "type": parameter type (one of 'string', 'boolean', 'number',
2567 or 'size')
2568 - "help": human readable description of the parameter
2569 (json-string, optional)
2571 Example:
2573 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
2574 <- { "return": [
2576 "parameters": [
2578 "name": "romfile",
2579 "type": "string"
2582 "name": "bootindex",
2583 "type": "number"
2586 "option": "option-rom"
2591 EQMP
2594 .name = "query-command-line-options",
2595 .args_type = "option:s?",
2596 .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
2599 SQMP
2600 query-migrate
2601 -------------
2603 Migration status.
2605 Return a json-object. If migration is active there will be another json-object
2606 with RAM migration status and if block migration is active another one with
2607 block migration status.
2609 The main json-object contains the following:
2611 - "status": migration status (json-string)
2612 - Possible values: "active", "completed", "failed", "cancelled"
2613 - "total-time": total amount of ms since migration started. If
2614 migration has ended, it returns the total migration
2615 time (json-int)
2616 - "downtime": only present when migration has finished correctly
2617 total amount in ms for downtime that happened (json-int)
2618 - "expected-downtime": only present while migration is active
2619 total amount in ms for downtime that was calculated on
2620 the last bitmap round (json-int)
2621 - "ram": only present if "status" is "active", it is a json-object with the
2622 following RAM information:
2623 - "transferred": amount transferred in bytes (json-int)
2624 - "remaining": amount remaining to transfer in bytes (json-int)
2625 - "total": total amount of memory in bytes (json-int)
2626 - "duplicate": number of pages filled entirely with the same
2627 byte (json-int)
2628 These are sent over the wire much more efficiently.
2629 - "skipped": number of skipped zero pages (json-int)
2630 - "normal" : number of whole pages transferred. I.e. they
2631 were not sent as duplicate or xbzrle pages (json-int)
2632 - "normal-bytes" : number of bytes transferred in whole
2633 pages. This is just normal pages times size of one page,
2634 but this way upper levels don't need to care about page
2635 size (json-int)
2636 - "disk": only present if "status" is "active" and it is a block migration,
2637 it is a json-object with the following disk information:
2638 - "transferred": amount transferred in bytes (json-int)
2639 - "remaining": amount remaining to transfer in bytes json-int)
2640 - "total": total disk size in bytes (json-int)
2641 - "xbzrle-cache": only present if XBZRLE is active.
2642 It is a json-object with the following XBZRLE information:
2643 - "cache-size": XBZRLE cache size in bytes
2644 - "bytes": number of bytes transferred for XBZRLE compressed pages
2645 - "pages": number of XBZRLE compressed pages
2646 - "cache-miss": number of XBRZRLE page cache misses
2647 - "overflow": number of times XBZRLE overflows. This means
2648 that the XBZRLE encoding was bigger than just sent the
2649 whole page, and then we sent the whole page instead (as as
2650 normal page).
2652 Examples:
2654 1. Before the first migration
2656 -> { "execute": "query-migrate" }
2657 <- { "return": {} }
2659 2. Migration is done and has succeeded
2661 -> { "execute": "query-migrate" }
2662 <- { "return": {
2663 "status": "completed",
2664 "ram":{
2665 "transferred":123,
2666 "remaining":123,
2667 "total":246,
2668 "total-time":12345,
2669 "downtime":12345,
2670 "duplicate":123,
2671 "normal":123,
2672 "normal-bytes":123456
2677 3. Migration is done and has failed
2679 -> { "execute": "query-migrate" }
2680 <- { "return": { "status": "failed" } }
2682 4. Migration is being performed and is not a block migration:
2684 -> { "execute": "query-migrate" }
2685 <- {
2686 "return":{
2687 "status":"active",
2688 "ram":{
2689 "transferred":123,
2690 "remaining":123,
2691 "total":246,
2692 "total-time":12345,
2693 "expected-downtime":12345,
2694 "duplicate":123,
2695 "normal":123,
2696 "normal-bytes":123456
2701 5. Migration is being performed and is a block migration:
2703 -> { "execute": "query-migrate" }
2704 <- {
2705 "return":{
2706 "status":"active",
2707 "ram":{
2708 "total":1057024,
2709 "remaining":1053304,
2710 "transferred":3720,
2711 "total-time":12345,
2712 "expected-downtime":12345,
2713 "duplicate":123,
2714 "normal":123,
2715 "normal-bytes":123456
2717 "disk":{
2718 "total":20971520,
2719 "remaining":20880384,
2720 "transferred":91136
2725 6. Migration is being performed and XBZRLE is active:
2727 -> { "execute": "query-migrate" }
2728 <- {
2729 "return":{
2730 "status":"active",
2731 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
2732 "ram":{
2733 "total":1057024,
2734 "remaining":1053304,
2735 "transferred":3720,
2736 "total-time":12345,
2737 "expected-downtime":12345,
2738 "duplicate":10,
2739 "normal":3333,
2740 "normal-bytes":3412992
2742 "xbzrle-cache":{
2743 "cache-size":67108864,
2744 "bytes":20971520,
2745 "pages":2444343,
2746 "cache-miss":2244,
2747 "overflow":34434
2752 EQMP
2755 .name = "query-migrate",
2756 .args_type = "",
2757 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
2760 SQMP
2761 migrate-set-capabilities
2762 ------------------------
2764 Enable/Disable migration capabilities
2766 - "xbzrle": XBZRLE support
2768 Arguments:
2770 Example:
2772 -> { "execute": "migrate-set-capabilities" , "arguments":
2773 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
2775 EQMP
2778 .name = "migrate-set-capabilities",
2779 .args_type = "capabilities:O",
2780 .params = "capability:s,state:b",
2781 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
2783 SQMP
2784 query-migrate-capabilities
2785 --------------------------
2787 Query current migration capabilities
2789 - "capabilities": migration capabilities state
2790 - "xbzrle" : XBZRLE state (json-bool)
2792 Arguments:
2794 Example:
2796 -> { "execute": "query-migrate-capabilities" }
2797 <- { "return": [ { "state": false, "capability": "xbzrle" } ] }
2799 EQMP
2802 .name = "query-migrate-capabilities",
2803 .args_type = "",
2804 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
2807 SQMP
2808 query-balloon
2809 -------------
2811 Show balloon information.
2813 Make an asynchronous request for balloon info. When the request completes a
2814 json-object will be returned containing the following data:
2816 - "actual": current balloon value in bytes (json-int)
2818 Example:
2820 -> { "execute": "query-balloon" }
2821 <- {
2822 "return":{
2823 "actual":1073741824,
2827 EQMP
2830 .name = "query-balloon",
2831 .args_type = "",
2832 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
2836 .name = "query-block-jobs",
2837 .args_type = "",
2838 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
2842 .name = "qom-list",
2843 .args_type = "path:s",
2844 .mhandler.cmd_new = qmp_marshal_input_qom_list,
2848 .name = "qom-set",
2849 .args_type = "path:s,property:s,value:q",
2850 .mhandler.cmd_new = qmp_qom_set,
2854 .name = "qom-get",
2855 .args_type = "path:s,property:s",
2856 .mhandler.cmd_new = qmp_qom_get,
2860 .name = "nbd-server-start",
2861 .args_type = "addr:q",
2862 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
2865 .name = "nbd-server-add",
2866 .args_type = "device:B,writable:b?",
2867 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
2870 .name = "nbd-server-stop",
2871 .args_type = "",
2872 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
2876 .name = "change-vnc-password",
2877 .args_type = "password:s",
2878 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
2881 .name = "qom-list-types",
2882 .args_type = "implements:s?,abstract:b?",
2883 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
2887 .name = "device-list-properties",
2888 .args_type = "typename:s",
2889 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
2893 .name = "query-machines",
2894 .args_type = "",
2895 .mhandler.cmd_new = qmp_marshal_input_query_machines,
2899 .name = "query-cpu-definitions",
2900 .args_type = "",
2901 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
2905 .name = "query-target",
2906 .args_type = "",
2907 .mhandler.cmd_new = qmp_marshal_input_query_target,
2911 .name = "query-tpm",
2912 .args_type = "",
2913 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
2916 SQMP
2917 query-tpm
2918 ---------
2920 Return information about the TPM device.
2922 Arguments: None
2924 Example:
2926 -> { "execute": "query-tpm" }
2927 <- { "return":
2929 { "model": "tpm-tis",
2930 "options":
2931 { "type": "passthrough",
2932 "data":
2933 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
2934 "path": "/dev/tpm0"
2937 "id": "tpm0"
2942 EQMP
2945 .name = "query-tpm-models",
2946 .args_type = "",
2947 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
2950 SQMP
2951 query-tpm-models
2952 ----------------
2954 Return a list of supported TPM models.
2956 Arguments: None
2958 Example:
2960 -> { "execute": "query-tpm-models" }
2961 <- { "return": [ "tpm-tis" ] }
2963 EQMP
2966 .name = "query-tpm-types",
2967 .args_type = "",
2968 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
2971 SQMP
2972 query-tpm-types
2973 ---------------
2975 Return a list of supported TPM types.
2977 Arguments: None
2979 Example:
2981 -> { "execute": "query-tpm-types" }
2982 <- { "return": [ "passthrough" ] }
2984 EQMP
2987 .name = "chardev-add",
2988 .args_type = "id:s,backend:q",
2989 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
2992 SQMP
2993 chardev-add
2994 ----------------
2996 Add a chardev.
2998 Arguments:
3000 - "id": the chardev's ID, must be unique (json-string)
3001 - "backend": chardev backend type + parameters
3003 Examples:
3005 -> { "execute" : "chardev-add",
3006 "arguments" : { "id" : "foo",
3007 "backend" : { "type" : "null", "data" : {} } } }
3008 <- { "return": {} }
3010 -> { "execute" : "chardev-add",
3011 "arguments" : { "id" : "bar",
3012 "backend" : { "type" : "file",
3013 "data" : { "out" : "/tmp/bar.log" } } } }
3014 <- { "return": {} }
3016 -> { "execute" : "chardev-add",
3017 "arguments" : { "id" : "baz",
3018 "backend" : { "type" : "pty", "data" : {} } } }
3019 <- { "return": { "pty" : "/dev/pty/42" } }
3021 EQMP
3024 .name = "chardev-remove",
3025 .args_type = "id:s",
3026 .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
3030 SQMP
3031 chardev-remove
3032 --------------
3034 Remove a chardev.
3036 Arguments:
3038 - "id": the chardev's ID, must exist and not be in use (json-string)
3040 Example:
3042 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3043 <- { "return": {} }
3045 EQMP