tcg: Remove temp_buf
[qemu/kevin.git] / qmp-commands.hx
blobe075df423ab3faaca4ab3026eaf94a04c3f22674
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 = "sync:s,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 - "sync": what parts of the disk image should be copied to the destination;
943 possibilities include "full" for all the disk, "top" for only the sectors
944 allocated in the topmost image, or "none" to only replicate new I/O
945 (MirrorSyncMode).
946 - "mode": whether and how QEMU should create a new image
947 (NewImageMode, optional, default 'absolute-paths')
948 - "speed": the maximum speed, in bytes per second (json-int, optional)
949 - "on-source-error": the action to take on an error on the source, default
950 'report'. 'stop' and 'enospc' can only be used
951 if the block device supports io-status.
952 (BlockdevOnError, optional)
953 - "on-target-error": the action to take on an error on the target, default
954 'report' (no limitations, since this applies to
955 a different block device than device).
956 (BlockdevOnError, optional)
958 Example:
959 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
960 "target": "backup.img" } }
961 <- { "return": {} }
962 EQMP
965 .name = "block-job-set-speed",
966 .args_type = "device:B,speed:o",
967 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
971 .name = "block-job-cancel",
972 .args_type = "device:B,force:b?",
973 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
976 .name = "block-job-pause",
977 .args_type = "device:B",
978 .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
981 .name = "block-job-resume",
982 .args_type = "device:B",
983 .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
986 .name = "block-job-complete",
987 .args_type = "device:B",
988 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
991 .name = "transaction",
992 .args_type = "actions:q",
993 .mhandler.cmd_new = qmp_marshal_input_transaction,
996 SQMP
997 transaction
998 -----------
1000 Atomically operate on one or more block devices. The only supported
1001 operation for now is snapshotting. If there is any failure performing
1002 any of the operations, all snapshots for the group are abandoned, and
1003 the original disks pre-snapshot attempt are used.
1005 A list of dictionaries is accepted, that contains the actions to be performed.
1006 For snapshots this is the device, the file to use for the new snapshot,
1007 and the format. The default format, if not specified, is qcow2.
1009 Each new snapshot defaults to being created by QEMU (wiping any
1010 contents if the file already exists), but it is also possible to reuse
1011 an externally-created file. In the latter case, you should ensure that
1012 the new image file has the same contents as the current one; QEMU cannot
1013 perform any meaningful check. Typically this is achieved by using the
1014 current image file as the backing file for the new image.
1016 Arguments:
1018 actions array:
1019 - "type": the operation to perform. The only supported
1020 value is "blockdev-snapshot-sync". (json-string)
1021 - "data": a dictionary. The contents depend on the value
1022 of "type". When "type" is "blockdev-snapshot-sync":
1023 - "device": device name to snapshot (json-string)
1024 - "snapshot-file": name of new image file (json-string)
1025 - "format": format of new image (json-string, optional)
1026 - "mode": whether and how QEMU should create the snapshot file
1027 (NewImageMode, optional, default "absolute-paths")
1029 Example:
1031 -> { "execute": "transaction",
1032 "arguments": { "actions": [
1033 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd0",
1034 "snapshot-file": "/some/place/my-image",
1035 "format": "qcow2" } },
1036 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd1",
1037 "snapshot-file": "/some/place/my-image2",
1038 "mode": "existing",
1039 "format": "qcow2" } } ] } }
1040 <- { "return": {} }
1042 EQMP
1045 .name = "blockdev-snapshot-sync",
1046 .args_type = "device:B,snapshot-file:s,format:s?,mode:s?",
1047 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
1050 SQMP
1051 blockdev-snapshot-sync
1052 ----------------------
1054 Synchronous snapshot of a block device. snapshot-file specifies the
1055 target of the new image. If the file exists, or if it is a device, the
1056 snapshot will be created in the existing file/device. If does not
1057 exist, a new file will be created. format specifies the format of the
1058 snapshot image, default is qcow2.
1060 Arguments:
1062 - "device": device name to snapshot (json-string)
1063 - "snapshot-file": name of new image file (json-string)
1064 - "mode": whether and how QEMU should create the snapshot file
1065 (NewImageMode, optional, default "absolute-paths")
1066 - "format": format of new image (json-string, optional)
1068 Example:
1070 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1071 "snapshot-file":
1072 "/some/place/my-image",
1073 "format": "qcow2" } }
1074 <- { "return": {} }
1076 EQMP
1079 .name = "drive-mirror",
1080 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1081 "on-source-error:s?,on-target-error:s?,"
1082 "granularity:i?,buf-size:i?",
1083 .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
1086 SQMP
1087 drive-mirror
1088 ------------
1090 Start mirroring a block device's writes to a new destination. target
1091 specifies the target of the new image. If the file exists, or if it is
1092 a device, it will be used as the new destination for writes. If it does not
1093 exist, a new file will be created. format specifies the format of the
1094 mirror image, default is to probe if mode='existing', else the format
1095 of the source.
1097 Arguments:
1099 - "device": device name to operate on (json-string)
1100 - "target": name of new image file (json-string)
1101 - "format": format of new image (json-string, optional)
1102 - "mode": how an image file should be created into the target
1103 file/device (NewImageMode, optional, default 'absolute-paths')
1104 - "speed": maximum speed of the streaming job, in bytes per second
1105 (json-int)
1106 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1107 - "buf_size": maximum amount of data in flight from source to target, in bytes
1108 (json-int, default 10M)
1109 - "sync": what parts of the disk image should be copied to the destination;
1110 possibilities include "full" for all the disk, "top" for only the sectors
1111 allocated in the topmost image, or "none" to only replicate new I/O
1112 (MirrorSyncMode).
1113 - "on-source-error": the action to take on an error on the source
1114 (BlockdevOnError, default 'report')
1115 - "on-target-error": the action to take on an error on the target
1116 (BlockdevOnError, default 'report')
1118 The default value of the granularity is the image cluster size clamped
1119 between 4096 and 65536, if the image format defines one. If the format
1120 does not define a cluster size, the default value of the granularity
1121 is 65536.
1124 Example:
1126 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1127 "target": "/some/place/my-image",
1128 "sync": "full",
1129 "format": "qcow2" } }
1130 <- { "return": {} }
1132 EQMP
1135 .name = "balloon",
1136 .args_type = "value:M",
1137 .mhandler.cmd_new = qmp_marshal_input_balloon,
1140 SQMP
1141 balloon
1142 -------
1144 Request VM to change its memory allocation (in bytes).
1146 Arguments:
1148 - "value": New memory allocation (json-int)
1150 Example:
1152 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1153 <- { "return": {} }
1155 EQMP
1158 .name = "set_link",
1159 .args_type = "name:s,up:b",
1160 .mhandler.cmd_new = qmp_marshal_input_set_link,
1163 SQMP
1164 set_link
1165 --------
1167 Change the link status of a network adapter.
1169 Arguments:
1171 - "name": network device name (json-string)
1172 - "up": status is up (json-bool)
1174 Example:
1176 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1177 <- { "return": {} }
1179 EQMP
1182 .name = "getfd",
1183 .args_type = "fdname:s",
1184 .params = "getfd name",
1185 .help = "receive a file descriptor via SCM rights and assign it a name",
1186 .mhandler.cmd_new = qmp_marshal_input_getfd,
1189 SQMP
1190 getfd
1191 -----
1193 Receive a file descriptor via SCM rights and assign it a name.
1195 Arguments:
1197 - "fdname": file descriptor name (json-string)
1199 Example:
1201 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1202 <- { "return": {} }
1204 Notes:
1206 (1) If the name specified by the "fdname" argument already exists,
1207 the file descriptor assigned to it will be closed and replaced
1208 by the received file descriptor.
1209 (2) The 'closefd' command can be used to explicitly close the file
1210 descriptor when it is no longer needed.
1212 EQMP
1215 .name = "closefd",
1216 .args_type = "fdname:s",
1217 .params = "closefd name",
1218 .help = "close a file descriptor previously passed via SCM rights",
1219 .mhandler.cmd_new = qmp_marshal_input_closefd,
1222 SQMP
1223 closefd
1224 -------
1226 Close a file descriptor previously passed via SCM rights.
1228 Arguments:
1230 - "fdname": file descriptor name (json-string)
1232 Example:
1234 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1235 <- { "return": {} }
1237 EQMP
1240 .name = "add-fd",
1241 .args_type = "fdset-id:i?,opaque:s?",
1242 .params = "add-fd fdset-id opaque",
1243 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1244 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1247 SQMP
1248 add-fd
1249 -------
1251 Add a file descriptor, that was passed via SCM rights, to an fd set.
1253 Arguments:
1255 - "fdset-id": The ID of the fd set to add the file descriptor to.
1256 (json-int, optional)
1257 - "opaque": A free-form string that can be used to describe the fd.
1258 (json-string, optional)
1260 Return a json-object with the following information:
1262 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1263 - "fd": The file descriptor that was received via SCM rights and added to the
1264 fd set. (json-int)
1266 Example:
1268 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1269 <- { "return": { "fdset-id": 1, "fd": 3 } }
1271 Notes:
1273 (1) The list of fd sets is shared by all monitor connections.
1274 (2) If "fdset-id" is not specified, a new fd set will be created.
1276 EQMP
1279 .name = "remove-fd",
1280 .args_type = "fdset-id:i,fd:i?",
1281 .params = "remove-fd fdset-id fd",
1282 .help = "Remove a file descriptor from an fd set",
1283 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1286 SQMP
1287 remove-fd
1288 ---------
1290 Remove a file descriptor from an fd set.
1292 Arguments:
1294 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1295 (json-int)
1296 - "fd": The file descriptor that is to be removed. (json-int, optional)
1298 Example:
1300 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1301 <- { "return": {} }
1303 Notes:
1305 (1) The list of fd sets is shared by all monitor connections.
1306 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1307 removed.
1309 EQMP
1312 .name = "query-fdsets",
1313 .args_type = "",
1314 .help = "Return information describing all fd sets",
1315 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1318 SQMP
1319 query-fdsets
1320 -------------
1322 Return information describing all fd sets.
1324 Arguments: None
1326 Example:
1328 -> { "execute": "query-fdsets" }
1329 <- { "return": [
1331 "fds": [
1333 "fd": 30,
1334 "opaque": "rdonly:/path/to/file"
1337 "fd": 24,
1338 "opaque": "rdwr:/path/to/file"
1341 "fdset-id": 1
1344 "fds": [
1346 "fd": 28
1349 "fd": 29
1352 "fdset-id": 0
1357 Note: The list of fd sets is shared by all monitor connections.
1359 EQMP
1362 .name = "block_passwd",
1363 .args_type = "device:B,password:s",
1364 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
1367 SQMP
1368 block_passwd
1369 ------------
1371 Set the password of encrypted block devices.
1373 Arguments:
1375 - "device": device name (json-string)
1376 - "password": password (json-string)
1378 Example:
1380 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1381 "password": "12345" } }
1382 <- { "return": {} }
1384 EQMP
1387 .name = "block_set_io_throttle",
1388 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1389 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
1392 SQMP
1393 block_set_io_throttle
1394 ------------
1396 Change I/O throttle limits for a block drive.
1398 Arguments:
1400 - "device": device name (json-string)
1401 - "bps": total throughput limit in bytes per second(json-int)
1402 - "bps_rd": read throughput limit in bytes per second(json-int)
1403 - "bps_wr": read throughput limit in bytes per second(json-int)
1404 - "iops": total I/O operations per second(json-int)
1405 - "iops_rd": read I/O operations per second(json-int)
1406 - "iops_wr": write I/O operations per second(json-int)
1408 Example:
1410 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1411 "bps": "1000000",
1412 "bps_rd": "0",
1413 "bps_wr": "0",
1414 "iops": "0",
1415 "iops_rd": "0",
1416 "iops_wr": "0" } }
1417 <- { "return": {} }
1419 EQMP
1422 .name = "set_password",
1423 .args_type = "protocol:s,password:s,connected:s?",
1424 .mhandler.cmd_new = qmp_marshal_input_set_password,
1427 SQMP
1428 set_password
1429 ------------
1431 Set the password for vnc/spice protocols.
1433 Arguments:
1435 - "protocol": protocol name (json-string)
1436 - "password": password (json-string)
1437 - "connected": [ keep | disconnect | fail ] (josn-string, optional)
1439 Example:
1441 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
1442 "password": "secret" } }
1443 <- { "return": {} }
1445 EQMP
1448 .name = "expire_password",
1449 .args_type = "protocol:s,time:s",
1450 .mhandler.cmd_new = qmp_marshal_input_expire_password,
1453 SQMP
1454 expire_password
1455 ---------------
1457 Set the password expire time for vnc/spice protocols.
1459 Arguments:
1461 - "protocol": protocol name (json-string)
1462 - "time": [ now | never | +secs | secs ] (json-string)
1464 Example:
1466 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1467 "time": "+60" } }
1468 <- { "return": {} }
1470 EQMP
1473 .name = "add_client",
1474 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
1475 .mhandler.cmd_new = qmp_marshal_input_add_client,
1478 SQMP
1479 add_client
1480 ----------
1482 Add a graphics client
1484 Arguments:
1486 - "protocol": protocol name (json-string)
1487 - "fdname": file descriptor name (json-string)
1488 - "skipauth": whether to skip authentication (json-bool, optional)
1489 - "tls": whether to perform TLS (json-bool, optional)
1491 Example:
1493 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
1494 "fdname": "myclient" } }
1495 <- { "return": {} }
1497 EQMP
1499 .name = "qmp_capabilities",
1500 .args_type = "",
1501 .params = "",
1502 .help = "enable QMP capabilities",
1503 .user_print = monitor_user_noop,
1504 .mhandler.cmd_new = do_qmp_capabilities,
1507 SQMP
1508 qmp_capabilities
1509 ----------------
1511 Enable QMP capabilities.
1513 Arguments: None.
1515 Example:
1517 -> { "execute": "qmp_capabilities" }
1518 <- { "return": {} }
1520 Note: This command must be issued before issuing any other command.
1522 EQMP
1525 .name = "human-monitor-command",
1526 .args_type = "command-line:s,cpu-index:i?",
1527 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
1530 SQMP
1531 human-monitor-command
1532 ---------------------
1534 Execute a Human Monitor command.
1536 Arguments:
1538 - command-line: the command name and its arguments, just like the
1539 Human Monitor's shell (json-string)
1540 - cpu-index: select the CPU number to be used by commands which access CPU
1541 data, like 'info registers'. The Monitor selects CPU 0 if this
1542 argument is not provided (json-int, optional)
1544 Example:
1546 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
1547 <- { "return": "kvm support: enabled\r\n" }
1549 Notes:
1551 (1) The Human Monitor is NOT an stable interface, this means that command
1552 names, arguments and responses can change or be removed at ANY time.
1553 Applications that rely on long term stability guarantees should NOT
1554 use this command
1556 (2) Limitations:
1558 o This command is stateless, this means that commands that depend
1559 on state information (such as getfd) might not work
1561 o Commands that prompt the user for data (eg. 'cont' when the block
1562 device is encrypted) don't currently work
1564 3. Query Commands
1565 =================
1567 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1568 HXCOMM this! We will possibly move query commands definitions inside those
1569 HXCOMM sections, just like regular commands.
1571 EQMP
1573 SQMP
1574 query-version
1575 -------------
1577 Show QEMU version.
1579 Return a json-object with the following information:
1581 - "qemu": A json-object containing three integer values:
1582 - "major": QEMU's major version (json-int)
1583 - "minor": QEMU's minor version (json-int)
1584 - "micro": QEMU's micro version (json-int)
1585 - "package": package's version (json-string)
1587 Example:
1589 -> { "execute": "query-version" }
1590 <- {
1591 "return":{
1592 "qemu":{
1593 "major":0,
1594 "minor":11,
1595 "micro":5
1597 "package":""
1601 EQMP
1604 .name = "query-version",
1605 .args_type = "",
1606 .mhandler.cmd_new = qmp_marshal_input_query_version,
1609 SQMP
1610 query-commands
1611 --------------
1613 List QMP available commands.
1615 Each command is represented by a json-object, the returned value is a json-array
1616 of all commands.
1618 Each json-object contain:
1620 - "name": command's name (json-string)
1622 Example:
1624 -> { "execute": "query-commands" }
1625 <- {
1626 "return":[
1628 "name":"query-balloon"
1631 "name":"system_powerdown"
1636 Note: This example has been shortened as the real response is too long.
1638 EQMP
1641 .name = "query-commands",
1642 .args_type = "",
1643 .mhandler.cmd_new = qmp_marshal_input_query_commands,
1646 SQMP
1647 query-events
1648 --------------
1650 List QMP available events.
1652 Each event is represented by a json-object, the returned value is a json-array
1653 of all events.
1655 Each json-object contains:
1657 - "name": event's name (json-string)
1659 Example:
1661 -> { "execute": "query-events" }
1662 <- {
1663 "return":[
1665 "name":"SHUTDOWN"
1668 "name":"RESET"
1673 Note: This example has been shortened as the real response is too long.
1675 EQMP
1678 .name = "query-events",
1679 .args_type = "",
1680 .mhandler.cmd_new = qmp_marshal_input_query_events,
1683 SQMP
1684 query-chardev
1685 -------------
1687 Each device is represented by a json-object. The returned value is a json-array
1688 of all devices.
1690 Each json-object contain the following:
1692 - "label": device's label (json-string)
1693 - "filename": device's file (json-string)
1695 Example:
1697 -> { "execute": "query-chardev" }
1698 <- {
1699 "return":[
1701 "label":"monitor",
1702 "filename":"stdio"
1705 "label":"serial0",
1706 "filename":"vc"
1711 EQMP
1714 .name = "query-chardev",
1715 .args_type = "",
1716 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
1719 SQMP
1720 query-block
1721 -----------
1723 Show the block devices.
1725 Each block device information is stored in a json-object and the returned value
1726 is a json-array of all devices.
1728 Each json-object contain the following:
1730 - "device": device name (json-string)
1731 - "type": device type (json-string)
1732 - deprecated, retained for backward compatibility
1733 - Possible values: "unknown"
1734 - "removable": true if the device is removable, false otherwise (json-bool)
1735 - "locked": true if the device is locked, false otherwise (json-bool)
1736 - "tray_open": only present if removable, true if the device has a tray,
1737 and it is open (json-bool)
1738 - "inserted": only present if the device is inserted, it is a json-object
1739 containing the following:
1740 - "file": device file name (json-string)
1741 - "ro": true if read-only, false otherwise (json-bool)
1742 - "drv": driver format name (json-string)
1743 - Possible values: "blkdebug", "bochs", "cloop", "cow", "dmg",
1744 "file", "file", "ftp", "ftps", "host_cdrom",
1745 "host_device", "host_floppy", "http", "https",
1746 "nbd", "parallels", "qcow", "qcow2", "raw",
1747 "tftp", "vdi", "vmdk", "vpc", "vvfat"
1748 - "backing_file": backing file name (json-string, optional)
1749 - "backing_file_depth": number of files in the backing file chain (json-int)
1750 - "encrypted": true if encrypted, false otherwise (json-bool)
1751 - "bps": limit total bytes per second (json-int)
1752 - "bps_rd": limit read bytes per second (json-int)
1753 - "bps_wr": limit write bytes per second (json-int)
1754 - "iops": limit total I/O operations per second (json-int)
1755 - "iops_rd": limit read operations per second (json-int)
1756 - "iops_wr": limit write operations per second (json-int)
1757 - "image": the detail of the image, it is a json-object containing
1758 the following:
1759 - "filename": image file name (json-string)
1760 - "format": image format (json-string)
1761 - "virtual-size": image capacity in bytes (json-int)
1762 - "dirty-flag": true if image is not cleanly closed, not present
1763 means clean (json-bool, optional)
1764 - "actual-size": actual size on disk in bytes of the image, not
1765 present when image does not support thin
1766 provision (json-int, optional)
1767 - "cluster-size": size of a cluster in bytes, not present if image
1768 format does not support it (json-int, optional)
1769 - "encrypted": true if the image is encrypted, not present means
1770 false or the image format does not support
1771 encryption (json-bool, optional)
1772 - "backing_file": backing file name, not present means no backing
1773 file is used or the image format does not
1774 support backing file chain
1775 (json-string, optional)
1776 - "full-backing-filename": full path of the backing file, not
1777 present if it equals backing_file or no
1778 backing file is used
1779 (json-string, optional)
1780 - "backing-filename-format": the format of the backing file, not
1781 present means unknown or no backing
1782 file (json-string, optional)
1783 - "snapshots": the internal snapshot info, it is an optional list
1784 of json-object containing the following:
1785 - "id": unique snapshot id (json-string)
1786 - "name": snapshot name (json-string)
1787 - "vm-state-size": size of the VM state in bytes (json-int)
1788 - "date-sec": UTC date of the snapshot in seconds (json-int)
1789 - "date-nsec": fractional part in nanoseconds to be used with
1790 date-sec(json-int)
1791 - "vm-clock-sec": VM clock relative to boot in seconds
1792 (json-int)
1793 - "vm-clock-nsec": fractional part in nanoseconds to be used
1794 with vm-clock-sec (json-int)
1795 - "backing-image": the detail of the backing image, it is an
1796 optional json-object only present when a
1797 backing image present for this image
1799 - "io-status": I/O operation status, only present if the device supports it
1800 and the VM is configured to stop on errors. It's always reset
1801 to "ok" when the "cont" command is issued (json_string, optional)
1802 - Possible values: "ok", "failed", "nospace"
1804 Example:
1806 -> { "execute": "query-block" }
1807 <- {
1808 "return":[
1810 "io-status": "ok",
1811 "device":"ide0-hd0",
1812 "locked":false,
1813 "removable":false,
1814 "inserted":{
1815 "ro":false,
1816 "drv":"qcow2",
1817 "encrypted":false,
1818 "file":"disks/test.qcow2",
1819 "backing_file_depth":1,
1820 "bps":1000000,
1821 "bps_rd":0,
1822 "bps_wr":0,
1823 "iops":1000000,
1824 "iops_rd":0,
1825 "iops_wr":0,
1826 "image":{
1827 "filename":"disks/test.qcow2",
1828 "format":"qcow2",
1829 "virtual-size":2048000,
1830 "backing_file":"base.qcow2",
1831 "full-backing-filename":"disks/base.qcow2",
1832 "backing-filename-format:"qcow2",
1833 "snapshots":[
1835 "id": "1",
1836 "name": "snapshot1",
1837 "vm-state-size": 0,
1838 "date-sec": 10000200,
1839 "date-nsec": 12,
1840 "vm-clock-sec": 206,
1841 "vm-clock-nsec": 30
1844 "backing-image":{
1845 "filename":"disks/base.qcow2",
1846 "format":"qcow2",
1847 "virtual-size":2048000
1851 "type":"unknown"
1854 "io-status": "ok",
1855 "device":"ide1-cd0",
1856 "locked":false,
1857 "removable":true,
1858 "type":"unknown"
1861 "device":"floppy0",
1862 "locked":false,
1863 "removable":true,
1864 "type":"unknown"
1867 "device":"sd0",
1868 "locked":false,
1869 "removable":true,
1870 "type":"unknown"
1875 EQMP
1878 .name = "query-block",
1879 .args_type = "",
1880 .mhandler.cmd_new = qmp_marshal_input_query_block,
1883 SQMP
1884 query-blockstats
1885 ----------------
1887 Show block device statistics.
1889 Each device statistic information is stored in a json-object and the returned
1890 value is a json-array of all devices.
1892 Each json-object contain the following:
1894 - "device": device name (json-string)
1895 - "stats": A json-object with the statistics information, it contains:
1896 - "rd_bytes": bytes read (json-int)
1897 - "wr_bytes": bytes written (json-int)
1898 - "rd_operations": read operations (json-int)
1899 - "wr_operations": write operations (json-int)
1900 - "flush_operations": cache flush operations (json-int)
1901 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
1902 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
1903 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
1904 - "wr_highest_offset": Highest offset of a sector written since the
1905 BlockDriverState has been opened (json-int)
1906 - "parent": Contains recursively the statistics of the underlying
1907 protocol (e.g. the host file for a qcow2 image). If there is
1908 no underlying protocol, this field is omitted
1909 (json-object, optional)
1911 Example:
1913 -> { "execute": "query-blockstats" }
1914 <- {
1915 "return":[
1917 "device":"ide0-hd0",
1918 "parent":{
1919 "stats":{
1920 "wr_highest_offset":3686448128,
1921 "wr_bytes":9786368,
1922 "wr_operations":751,
1923 "rd_bytes":122567168,
1924 "rd_operations":36772
1925 "wr_total_times_ns":313253456
1926 "rd_total_times_ns":3465673657
1927 "flush_total_times_ns":49653
1928 "flush_operations":61,
1931 "stats":{
1932 "wr_highest_offset":2821110784,
1933 "wr_bytes":9786368,
1934 "wr_operations":692,
1935 "rd_bytes":122739200,
1936 "rd_operations":36604
1937 "flush_operations":51,
1938 "wr_total_times_ns":313253456
1939 "rd_total_times_ns":3465673657
1940 "flush_total_times_ns":49653
1944 "device":"ide1-cd0",
1945 "stats":{
1946 "wr_highest_offset":0,
1947 "wr_bytes":0,
1948 "wr_operations":0,
1949 "rd_bytes":0,
1950 "rd_operations":0
1951 "flush_operations":0,
1952 "wr_total_times_ns":0
1953 "rd_total_times_ns":0
1954 "flush_total_times_ns":0
1958 "device":"floppy0",
1959 "stats":{
1960 "wr_highest_offset":0,
1961 "wr_bytes":0,
1962 "wr_operations":0,
1963 "rd_bytes":0,
1964 "rd_operations":0
1965 "flush_operations":0,
1966 "wr_total_times_ns":0
1967 "rd_total_times_ns":0
1968 "flush_total_times_ns":0
1972 "device":"sd0",
1973 "stats":{
1974 "wr_highest_offset":0,
1975 "wr_bytes":0,
1976 "wr_operations":0,
1977 "rd_bytes":0,
1978 "rd_operations":0
1979 "flush_operations":0,
1980 "wr_total_times_ns":0
1981 "rd_total_times_ns":0
1982 "flush_total_times_ns":0
1988 EQMP
1991 .name = "query-blockstats",
1992 .args_type = "",
1993 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
1996 SQMP
1997 query-cpus
1998 ----------
2000 Show CPU information.
2002 Return a json-array. Each CPU is represented by a json-object, which contains:
2004 - "CPU": CPU index (json-int)
2005 - "current": true if this is the current CPU, false otherwise (json-bool)
2006 - "halted": true if the cpu is halted, false otherwise (json-bool)
2007 - Current program counter. The key's name depends on the architecture:
2008 "pc": i386/x86_64 (json-int)
2009 "nip": PPC (json-int)
2010 "pc" and "npc": sparc (json-int)
2011 "PC": mips (json-int)
2012 - "thread_id": ID of the underlying host thread (json-int)
2014 Example:
2016 -> { "execute": "query-cpus" }
2017 <- {
2018 "return":[
2020 "CPU":0,
2021 "current":true,
2022 "halted":false,
2023 "pc":3227107138
2024 "thread_id":3134
2027 "CPU":1,
2028 "current":false,
2029 "halted":true,
2030 "pc":7108165
2031 "thread_id":3135
2036 EQMP
2039 .name = "query-cpus",
2040 .args_type = "",
2041 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
2044 SQMP
2045 query-pci
2046 ---------
2048 PCI buses and devices information.
2050 The returned value is a json-array of all buses. Each bus is represented by
2051 a json-object, which has a key with a json-array of all PCI devices attached
2052 to it. Each device is represented by a json-object.
2054 The bus json-object contains the following:
2056 - "bus": bus number (json-int)
2057 - "devices": a json-array of json-objects, each json-object represents a
2058 PCI device
2060 The PCI device json-object contains the following:
2062 - "bus": identical to the parent's bus number (json-int)
2063 - "slot": slot number (json-int)
2064 - "function": function number (json-int)
2065 - "class_info": a json-object containing:
2066 - "desc": device class description (json-string, optional)
2067 - "class": device class number (json-int)
2068 - "id": a json-object containing:
2069 - "device": device ID (json-int)
2070 - "vendor": vendor ID (json-int)
2071 - "irq": device's IRQ if assigned (json-int, optional)
2072 - "qdev_id": qdev id string (json-string)
2073 - "pci_bridge": It's a json-object, only present if this device is a
2074 PCI bridge, contains:
2075 - "bus": bus number (json-int)
2076 - "secondary": secondary bus number (json-int)
2077 - "subordinate": subordinate bus number (json-int)
2078 - "io_range": I/O 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 - "memory_range": memory range information, a json-object with the
2083 following members:
2084 - "base": base address, in bytes (json-int)
2085 - "limit": limit address, in bytes (json-int)
2086 - "prefetchable_range": Prefetchable memory range information, a
2087 json-object with the following members:
2088 - "base": base address, in bytes (json-int)
2089 - "limit": limit address, in bytes (json-int)
2090 - "devices": a json-array of PCI devices if there's any attached, each
2091 each element is represented by a json-object, which contains
2092 the same members of the 'PCI device json-object' described
2093 above (optional)
2094 - "regions": a json-array of json-objects, each json-object represents a
2095 memory region of this device
2097 The memory range json-object contains the following:
2099 - "base": base memory address (json-int)
2100 - "limit": limit value (json-int)
2102 The region json-object can be an I/O region or a memory region, an I/O region
2103 json-object contains the following:
2105 - "type": "io" (json-string, fixed)
2106 - "bar": BAR number (json-int)
2107 - "address": memory address (json-int)
2108 - "size": memory size (json-int)
2110 A memory region json-object contains the following:
2112 - "type": "memory" (json-string, fixed)
2113 - "bar": BAR number (json-int)
2114 - "address": memory address (json-int)
2115 - "size": memory size (json-int)
2116 - "mem_type_64": true or false (json-bool)
2117 - "prefetch": true or false (json-bool)
2119 Example:
2121 -> { "execute": "query-pci" }
2122 <- {
2123 "return":[
2125 "bus":0,
2126 "devices":[
2128 "bus":0,
2129 "qdev_id":"",
2130 "slot":0,
2131 "class_info":{
2132 "class":1536,
2133 "desc":"Host bridge"
2135 "id":{
2136 "device":32902,
2137 "vendor":4663
2139 "function":0,
2140 "regions":[
2145 "bus":0,
2146 "qdev_id":"",
2147 "slot":1,
2148 "class_info":{
2149 "class":1537,
2150 "desc":"ISA bridge"
2152 "id":{
2153 "device":32902,
2154 "vendor":28672
2156 "function":0,
2157 "regions":[
2162 "bus":0,
2163 "qdev_id":"",
2164 "slot":1,
2165 "class_info":{
2166 "class":257,
2167 "desc":"IDE controller"
2169 "id":{
2170 "device":32902,
2171 "vendor":28688
2173 "function":1,
2174 "regions":[
2176 "bar":4,
2177 "size":16,
2178 "address":49152,
2179 "type":"io"
2184 "bus":0,
2185 "qdev_id":"",
2186 "slot":2,
2187 "class_info":{
2188 "class":768,
2189 "desc":"VGA controller"
2191 "id":{
2192 "device":4115,
2193 "vendor":184
2195 "function":0,
2196 "regions":[
2198 "prefetch":true,
2199 "mem_type_64":false,
2200 "bar":0,
2201 "size":33554432,
2202 "address":4026531840,
2203 "type":"memory"
2206 "prefetch":false,
2207 "mem_type_64":false,
2208 "bar":1,
2209 "size":4096,
2210 "address":4060086272,
2211 "type":"memory"
2214 "prefetch":false,
2215 "mem_type_64":false,
2216 "bar":6,
2217 "size":65536,
2218 "address":-1,
2219 "type":"memory"
2224 "bus":0,
2225 "qdev_id":"",
2226 "irq":11,
2227 "slot":4,
2228 "class_info":{
2229 "class":1280,
2230 "desc":"RAM controller"
2232 "id":{
2233 "device":6900,
2234 "vendor":4098
2236 "function":0,
2237 "regions":[
2239 "bar":0,
2240 "size":32,
2241 "address":49280,
2242 "type":"io"
2251 Note: This example has been shortened as the real response is too long.
2253 EQMP
2256 .name = "query-pci",
2257 .args_type = "",
2258 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2261 SQMP
2262 query-kvm
2263 ---------
2265 Show KVM information.
2267 Return a json-object with the following information:
2269 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
2270 - "present": true if QEMU has KVM support, false otherwise (json-bool)
2272 Example:
2274 -> { "execute": "query-kvm" }
2275 <- { "return": { "enabled": true, "present": true } }
2277 EQMP
2280 .name = "query-kvm",
2281 .args_type = "",
2282 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2285 SQMP
2286 query-status
2287 ------------
2289 Return a json-object with the following information:
2291 - "running": true if the VM is running, or false if it is paused (json-bool)
2292 - "singlestep": true if the VM is in single step mode,
2293 false otherwise (json-bool)
2294 - "status": one of the following values (json-string)
2295 "debug" - QEMU is running on a debugger
2296 "inmigrate" - guest is paused waiting for an incoming migration
2297 "internal-error" - An internal error that prevents further guest
2298 execution has occurred
2299 "io-error" - the last IOP has failed and the device is configured
2300 to pause on I/O errors
2301 "paused" - guest has been paused via the 'stop' command
2302 "postmigrate" - guest is paused following a successful 'migrate'
2303 "prelaunch" - QEMU was started with -S and guest has not started
2304 "finish-migrate" - guest is paused to finish the migration process
2305 "restore-vm" - guest is paused to restore VM state
2306 "running" - guest is actively running
2307 "save-vm" - guest is paused to save the VM state
2308 "shutdown" - guest is shut down (and -no-shutdown is in use)
2309 "watchdog" - the watchdog action is configured to pause and
2310 has been triggered
2312 Example:
2314 -> { "execute": "query-status" }
2315 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
2317 EQMP
2320 .name = "query-status",
2321 .args_type = "",
2322 .mhandler.cmd_new = qmp_marshal_input_query_status,
2325 SQMP
2326 query-mice
2327 ----------
2329 Show VM mice information.
2331 Each mouse is represented by a json-object, the returned value is a json-array
2332 of all mice.
2334 The mouse json-object contains the following:
2336 - "name": mouse's name (json-string)
2337 - "index": mouse's index (json-int)
2338 - "current": true if this mouse is receiving events, false otherwise (json-bool)
2339 - "absolute": true if the mouse generates absolute input events (json-bool)
2341 Example:
2343 -> { "execute": "query-mice" }
2344 <- {
2345 "return":[
2347 "name":"QEMU Microsoft Mouse",
2348 "index":0,
2349 "current":false,
2350 "absolute":false
2353 "name":"QEMU PS/2 Mouse",
2354 "index":1,
2355 "current":true,
2356 "absolute":true
2361 EQMP
2364 .name = "query-mice",
2365 .args_type = "",
2366 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2369 SQMP
2370 query-vnc
2371 ---------
2373 Show VNC server information.
2375 Return a json-object with server information. Connected clients are returned
2376 as a json-array of json-objects.
2378 The main json-object contains the following:
2380 - "enabled": true or false (json-bool)
2381 - "host": server's IP address (json-string)
2382 - "family": address family (json-string)
2383 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2384 - "service": server's port number (json-string)
2385 - "auth": authentication method (json-string)
2386 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2387 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2388 "vencrypt+plain", "vencrypt+tls+none",
2389 "vencrypt+tls+plain", "vencrypt+tls+sasl",
2390 "vencrypt+tls+vnc", "vencrypt+x509+none",
2391 "vencrypt+x509+plain", "vencrypt+x509+sasl",
2392 "vencrypt+x509+vnc", "vnc"
2393 - "clients": a json-array of all connected clients
2395 Clients are described by a json-object, each one contain the following:
2397 - "host": client's IP address (json-string)
2398 - "family": address family (json-string)
2399 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2400 - "service": client's port number (json-string)
2401 - "x509_dname": TLS dname (json-string, optional)
2402 - "sasl_username": SASL username (json-string, optional)
2404 Example:
2406 -> { "execute": "query-vnc" }
2407 <- {
2408 "return":{
2409 "enabled":true,
2410 "host":"0.0.0.0",
2411 "service":"50402",
2412 "auth":"vnc",
2413 "family":"ipv4",
2414 "clients":[
2416 "host":"127.0.0.1",
2417 "service":"50401",
2418 "family":"ipv4"
2424 EQMP
2427 .name = "query-vnc",
2428 .args_type = "",
2429 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2432 SQMP
2433 query-spice
2434 -----------
2436 Show SPICE server information.
2438 Return a json-object with server information. Connected clients are returned
2439 as a json-array of json-objects.
2441 The main json-object contains the following:
2443 - "enabled": true or false (json-bool)
2444 - "host": server's IP address (json-string)
2445 - "port": server's port number (json-int, optional)
2446 - "tls-port": server's port number (json-int, optional)
2447 - "auth": authentication method (json-string)
2448 - Possible values: "none", "spice"
2449 - "channels": a json-array of all active channels clients
2451 Channels are described by a json-object, each one contain the following:
2453 - "host": client's IP address (json-string)
2454 - "family": address family (json-string)
2455 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2456 - "port": client's port number (json-string)
2457 - "connection-id": spice connection id. All channels with the same id
2458 belong to the same spice session (json-int)
2459 - "channel-type": channel type. "1" is the main control channel, filter for
2460 this one if you want track spice sessions only (json-int)
2461 - "channel-id": channel id. Usually "0", might be different needed when
2462 multiple channels of the same type exist, such as multiple
2463 display channels in a multihead setup (json-int)
2464 - "tls": whevener the channel is encrypted (json-bool)
2466 Example:
2468 -> { "execute": "query-spice" }
2469 <- {
2470 "return": {
2471 "enabled": true,
2472 "auth": "spice",
2473 "port": 5920,
2474 "tls-port": 5921,
2475 "host": "0.0.0.0",
2476 "channels": [
2478 "port": "54924",
2479 "family": "ipv4",
2480 "channel-type": 1,
2481 "connection-id": 1804289383,
2482 "host": "127.0.0.1",
2483 "channel-id": 0,
2484 "tls": true
2487 "port": "36710",
2488 "family": "ipv4",
2489 "channel-type": 4,
2490 "connection-id": 1804289383,
2491 "host": "127.0.0.1",
2492 "channel-id": 0,
2493 "tls": false
2495 [ ... more channels follow ... ]
2500 EQMP
2502 #if defined(CONFIG_SPICE)
2504 .name = "query-spice",
2505 .args_type = "",
2506 .mhandler.cmd_new = qmp_marshal_input_query_spice,
2508 #endif
2510 SQMP
2511 query-name
2512 ----------
2514 Show VM name.
2516 Return a json-object with the following information:
2518 - "name": VM's name (json-string, optional)
2520 Example:
2522 -> { "execute": "query-name" }
2523 <- { "return": { "name": "qemu-name" } }
2525 EQMP
2528 .name = "query-name",
2529 .args_type = "",
2530 .mhandler.cmd_new = qmp_marshal_input_query_name,
2533 SQMP
2534 query-uuid
2535 ----------
2537 Show VM UUID.
2539 Return a json-object with the following information:
2541 - "UUID": Universally Unique Identifier (json-string)
2543 Example:
2545 -> { "execute": "query-uuid" }
2546 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
2548 EQMP
2551 .name = "query-uuid",
2552 .args_type = "",
2553 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
2556 SQMP
2557 query-command-line-options
2558 --------------------------
2560 Show command line option schema.
2562 Return a json-array of command line option schema for all options (or for
2563 the given option), returning an error if the given option doesn't exist.
2565 Each array entry contains the following:
2567 - "option": option name (json-string)
2568 - "parameters": a json-array describes all parameters of the option:
2569 - "name": parameter name (json-string)
2570 - "type": parameter type (one of 'string', 'boolean', 'number',
2571 or 'size')
2572 - "help": human readable description of the parameter
2573 (json-string, optional)
2575 Example:
2577 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
2578 <- { "return": [
2580 "parameters": [
2582 "name": "romfile",
2583 "type": "string"
2586 "name": "bootindex",
2587 "type": "number"
2590 "option": "option-rom"
2595 EQMP
2598 .name = "query-command-line-options",
2599 .args_type = "option:s?",
2600 .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
2603 SQMP
2604 query-migrate
2605 -------------
2607 Migration status.
2609 Return a json-object. If migration is active there will be another json-object
2610 with RAM migration status and if block migration is active another one with
2611 block migration status.
2613 The main json-object contains the following:
2615 - "status": migration status (json-string)
2616 - Possible values: "active", "completed", "failed", "cancelled"
2617 - "total-time": total amount of ms since migration started. If
2618 migration has ended, it returns the total migration
2619 time (json-int)
2620 - "downtime": only present when migration has finished correctly
2621 total amount in ms for downtime that happened (json-int)
2622 - "expected-downtime": only present while migration is active
2623 total amount in ms for downtime that was calculated on
2624 the last bitmap round (json-int)
2625 - "ram": only present if "status" is "active", it is a json-object with the
2626 following RAM information:
2627 - "transferred": amount transferred in bytes (json-int)
2628 - "remaining": amount remaining to transfer in bytes (json-int)
2629 - "total": total amount of memory in bytes (json-int)
2630 - "duplicate": number of pages filled entirely with the same
2631 byte (json-int)
2632 These are sent over the wire much more efficiently.
2633 - "skipped": number of skipped zero pages (json-int)
2634 - "normal" : number of whole pages transferred. I.e. they
2635 were not sent as duplicate or xbzrle pages (json-int)
2636 - "normal-bytes" : number of bytes transferred in whole
2637 pages. This is just normal pages times size of one page,
2638 but this way upper levels don't need to care about page
2639 size (json-int)
2640 - "disk": only present if "status" is "active" and it is a block migration,
2641 it is a json-object with the following disk information:
2642 - "transferred": amount transferred in bytes (json-int)
2643 - "remaining": amount remaining to transfer in bytes json-int)
2644 - "total": total disk size in bytes (json-int)
2645 - "xbzrle-cache": only present if XBZRLE is active.
2646 It is a json-object with the following XBZRLE information:
2647 - "cache-size": XBZRLE cache size in bytes
2648 - "bytes": number of bytes transferred for XBZRLE compressed pages
2649 - "pages": number of XBZRLE compressed pages
2650 - "cache-miss": number of XBRZRLE page cache misses
2651 - "overflow": number of times XBZRLE overflows. This means
2652 that the XBZRLE encoding was bigger than just sent the
2653 whole page, and then we sent the whole page instead (as as
2654 normal page).
2656 Examples:
2658 1. Before the first migration
2660 -> { "execute": "query-migrate" }
2661 <- { "return": {} }
2663 2. Migration is done and has succeeded
2665 -> { "execute": "query-migrate" }
2666 <- { "return": {
2667 "status": "completed",
2668 "ram":{
2669 "transferred":123,
2670 "remaining":123,
2671 "total":246,
2672 "total-time":12345,
2673 "downtime":12345,
2674 "duplicate":123,
2675 "normal":123,
2676 "normal-bytes":123456
2681 3. Migration is done and has failed
2683 -> { "execute": "query-migrate" }
2684 <- { "return": { "status": "failed" } }
2686 4. Migration is being performed and is not a block migration:
2688 -> { "execute": "query-migrate" }
2689 <- {
2690 "return":{
2691 "status":"active",
2692 "ram":{
2693 "transferred":123,
2694 "remaining":123,
2695 "total":246,
2696 "total-time":12345,
2697 "expected-downtime":12345,
2698 "duplicate":123,
2699 "normal":123,
2700 "normal-bytes":123456
2705 5. Migration is being performed and is a block migration:
2707 -> { "execute": "query-migrate" }
2708 <- {
2709 "return":{
2710 "status":"active",
2711 "ram":{
2712 "total":1057024,
2713 "remaining":1053304,
2714 "transferred":3720,
2715 "total-time":12345,
2716 "expected-downtime":12345,
2717 "duplicate":123,
2718 "normal":123,
2719 "normal-bytes":123456
2721 "disk":{
2722 "total":20971520,
2723 "remaining":20880384,
2724 "transferred":91136
2729 6. Migration is being performed and XBZRLE is active:
2731 -> { "execute": "query-migrate" }
2732 <- {
2733 "return":{
2734 "status":"active",
2735 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
2736 "ram":{
2737 "total":1057024,
2738 "remaining":1053304,
2739 "transferred":3720,
2740 "total-time":12345,
2741 "expected-downtime":12345,
2742 "duplicate":10,
2743 "normal":3333,
2744 "normal-bytes":3412992
2746 "xbzrle-cache":{
2747 "cache-size":67108864,
2748 "bytes":20971520,
2749 "pages":2444343,
2750 "cache-miss":2244,
2751 "overflow":34434
2756 EQMP
2759 .name = "query-migrate",
2760 .args_type = "",
2761 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
2764 SQMP
2765 migrate-set-capabilities
2766 ------------------------
2768 Enable/Disable migration capabilities
2770 - "xbzrle": XBZRLE support
2772 Arguments:
2774 Example:
2776 -> { "execute": "migrate-set-capabilities" , "arguments":
2777 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
2779 EQMP
2782 .name = "migrate-set-capabilities",
2783 .args_type = "capabilities:O",
2784 .params = "capability:s,state:b",
2785 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
2787 SQMP
2788 query-migrate-capabilities
2789 --------------------------
2791 Query current migration capabilities
2793 - "capabilities": migration capabilities state
2794 - "xbzrle" : XBZRLE state (json-bool)
2796 Arguments:
2798 Example:
2800 -> { "execute": "query-migrate-capabilities" }
2801 <- { "return": [ { "state": false, "capability": "xbzrle" } ] }
2803 EQMP
2806 .name = "query-migrate-capabilities",
2807 .args_type = "",
2808 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
2811 SQMP
2812 query-balloon
2813 -------------
2815 Show balloon information.
2817 Make an asynchronous request for balloon info. When the request completes a
2818 json-object will be returned containing the following data:
2820 - "actual": current balloon value in bytes (json-int)
2822 Example:
2824 -> { "execute": "query-balloon" }
2825 <- {
2826 "return":{
2827 "actual":1073741824,
2831 EQMP
2834 .name = "query-balloon",
2835 .args_type = "",
2836 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
2840 .name = "query-block-jobs",
2841 .args_type = "",
2842 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
2846 .name = "qom-list",
2847 .args_type = "path:s",
2848 .mhandler.cmd_new = qmp_marshal_input_qom_list,
2852 .name = "qom-set",
2853 .args_type = "path:s,property:s,value:q",
2854 .mhandler.cmd_new = qmp_qom_set,
2858 .name = "qom-get",
2859 .args_type = "path:s,property:s",
2860 .mhandler.cmd_new = qmp_qom_get,
2864 .name = "nbd-server-start",
2865 .args_type = "addr:q",
2866 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
2869 .name = "nbd-server-add",
2870 .args_type = "device:B,writable:b?",
2871 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
2874 .name = "nbd-server-stop",
2875 .args_type = "",
2876 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
2880 .name = "change-vnc-password",
2881 .args_type = "password:s",
2882 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
2885 .name = "qom-list-types",
2886 .args_type = "implements:s?,abstract:b?",
2887 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
2891 .name = "device-list-properties",
2892 .args_type = "typename:s",
2893 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
2897 .name = "query-machines",
2898 .args_type = "",
2899 .mhandler.cmd_new = qmp_marshal_input_query_machines,
2903 .name = "query-cpu-definitions",
2904 .args_type = "",
2905 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
2909 .name = "query-target",
2910 .args_type = "",
2911 .mhandler.cmd_new = qmp_marshal_input_query_target,
2915 .name = "query-tpm",
2916 .args_type = "",
2917 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
2920 SQMP
2921 query-tpm
2922 ---------
2924 Return information about the TPM device.
2926 Arguments: None
2928 Example:
2930 -> { "execute": "query-tpm" }
2931 <- { "return":
2933 { "model": "tpm-tis",
2934 "options":
2935 { "type": "passthrough",
2936 "data":
2937 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
2938 "path": "/dev/tpm0"
2941 "id": "tpm0"
2946 EQMP
2949 .name = "query-tpm-models",
2950 .args_type = "",
2951 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
2954 SQMP
2955 query-tpm-models
2956 ----------------
2958 Return a list of supported TPM models.
2960 Arguments: None
2962 Example:
2964 -> { "execute": "query-tpm-models" }
2965 <- { "return": [ "tpm-tis" ] }
2967 EQMP
2970 .name = "query-tpm-types",
2971 .args_type = "",
2972 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
2975 SQMP
2976 query-tpm-types
2977 ---------------
2979 Return a list of supported TPM types.
2981 Arguments: None
2983 Example:
2985 -> { "execute": "query-tpm-types" }
2986 <- { "return": [ "passthrough" ] }
2988 EQMP
2991 .name = "chardev-add",
2992 .args_type = "id:s,backend:q",
2993 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
2996 SQMP
2997 chardev-add
2998 ----------------
3000 Add a chardev.
3002 Arguments:
3004 - "id": the chardev's ID, must be unique (json-string)
3005 - "backend": chardev backend type + parameters
3007 Examples:
3009 -> { "execute" : "chardev-add",
3010 "arguments" : { "id" : "foo",
3011 "backend" : { "type" : "null", "data" : {} } } }
3012 <- { "return": {} }
3014 -> { "execute" : "chardev-add",
3015 "arguments" : { "id" : "bar",
3016 "backend" : { "type" : "file",
3017 "data" : { "out" : "/tmp/bar.log" } } } }
3018 <- { "return": {} }
3020 -> { "execute" : "chardev-add",
3021 "arguments" : { "id" : "baz",
3022 "backend" : { "type" : "pty", "data" : {} } } }
3023 <- { "return": { "pty" : "/dev/pty/42" } }
3025 EQMP
3028 .name = "chardev-remove",
3029 .args_type = "id:s",
3030 .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
3034 SQMP
3035 chardev-remove
3036 --------------
3038 Remove a chardev.
3040 Arguments:
3042 - "id": the chardev's ID, must exist and not be in use (json-string)
3044 Example:
3046 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3047 <- { "return": {} }
3049 EQMP