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
.
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 efect and be documented soon
, please
46 check the documentation of each used command as soon as a
new release of
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)
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
.
67 .help
= "quit the emulator",
68 .user_print
= monitor_user_noop
,
69 .mhandler
.cmd_new
= do_quit
,
82 -> { "execute": "quit" }
88 .name
= "plug_create",
89 .args_type
= "device:O",
90 .params
= "type=value,id=value[,prop=value][,...]",
91 .help
= "create a plug",
92 .user_print
= monitor_user_noop
,
93 .mhandler
.cmd_new
= do_plug_create
,
100 .help
= "list plugs",
101 .user_print
= monitor_user_noop
,
102 .mhandler
.cmd_new
= do_plug_list
,
107 .args_type
= "options:O",
109 .help
= "get plug property",
110 .user_print
= monitor_user_noop
,
111 .mhandler
.cmd_new
= do_plug_get
,
116 .args_type
= "options:O",
118 .help
= "set plug property",
119 .user_print
= monitor_user_noop
,
120 .mhandler
.cmd_new
= do_plug_set
,
124 .name
= "plug_list_props",
127 .help
= "list plug properties",
128 .user_print
= monitor_user_noop
,
129 .mhandler
.cmd_new
= do_plug_list_props
,
134 .args_type
= "force:-f,device:B",
135 .params
= "[-f] device",
136 .help
= "eject a removable medium (use -f to force it)",
137 .user_print
= monitor_user_noop
,
138 .mhandler
.cmd_new
= do_eject
,
145 Eject a removable medium
.
149 - force
: force
ejection (json
-bool
, optional
)
150 - device
: device
name (json
-string
)
154 -> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
157 Note
: The
"force" argument defaults to
false.
163 .args_type
= "device:B,target:F,arg:s?",
164 .params
= "device filename [format]",
165 .help
= "change a removable medium, optional format",
166 .user_print
= monitor_user_noop
,
167 .mhandler
.cmd_new
= do_change
,
174 Change a removable medium or VNC configuration
.
178 - "device": device
name (json
-string
)
179 - "target": filename or
item (json
-string
)
180 - "arg": additional
argument (json
-string
, optional
)
184 1. Change a removable medium
186 -> { "execute": "change",
187 "arguments": { "device": "ide1-cd0",
188 "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
191 2. Change VNC password
193 -> { "execute": "change",
194 "arguments": { "device": "vnc", "target": "password",
201 .name
= "screendump",
202 .args_type
= "filename:F",
203 .params
= "filename",
204 .help
= "save screen into PPM image 'filename'",
205 .user_print
= monitor_user_noop
,
206 .mhandler
.cmd_new
= do_screen_dump
,
213 Save screen into PPM image
.
217 - "filename": file
path (json
-string
)
221 -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
230 .help
= "stop emulation",
231 .user_print
= monitor_user_noop
,
232 .mhandler
.cmd_new
= do_stop
,
245 -> { "execute": "stop" }
254 .help
= "resume emulation",
255 .user_print
= monitor_user_noop
,
256 .mhandler
.cmd_new
= do_cont
,
269 -> { "execute": "cont" }
275 .name
= "system_reset",
278 .help
= "reset the system",
279 .user_print
= monitor_user_noop
,
280 .mhandler
.cmd_new
= do_system_reset
,
293 -> { "execute": "system_reset" }
299 .name
= "system_powerdown",
302 .help
= "send system power down event",
303 .user_print
= monitor_user_noop
,
304 .mhandler
.cmd_new
= do_system_powerdown
,
311 Send system power down event
.
317 -> { "execute": "system_powerdown" }
323 .name
= "device_add",
324 .args_type
= "device:O",
325 .params
= "driver[,prop=value][,...]",
326 .help
= "add device, like -device on the command line",
327 .user_print
= monitor_user_noop
,
328 .mhandler
.cmd_new
= do_device_add
,
339 - "driver": the name of the
new device
's driver (json-string)
340 - "bus": the device's parent
bus (device tree path
, json
-string
, optional
)
341 - "id": the device
's ID, must be unique (json-string)
346 -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
351 (1) For detailed information about this command, please refer to the
352 'docs
/qdev
-device
-use
.txt
' file.
354 (2) It's possible to list device properties by running QEMU with the
355 "-device DEVICE,\?" command
-line argument
, where DEVICE is the device
's name
360 .name = "device_del",
363 .help = "remove device",
364 .user_print = monitor_user_noop,
365 .mhandler.cmd_new = do_device_del,
376 - "id": the device's
ID (json
-string
)
380 -> { "execute": "device_del", "arguments": { "id": "net1" } }
387 .args_type
= "index:i",
389 .help
= "set the default CPU",
390 .user_print
= monitor_user_noop
,
391 .mhandler
.cmd_new
= do_cpu_set
,
402 - "index": the CPU
's index (json-int)
406 -> { "execute": "cpu", "arguments": { "index": 0 } }
409 Note: CPUs' indexes are obtained with the
'query-cpus' command
.
415 .args_type
= "val:l,size:i,filename:s",
416 .params
= "addr size file",
417 .help
= "save to disk virtual memory dump starting at 'addr' of size 'size'",
418 .user_print
= monitor_user_noop
,
419 .mhandler
.cmd_new
= do_memory_save
,
426 Save to disk virtual memory dump starting at
'val' of size
'size'.
430 - "val": the starting
address (json
-int
)
431 - "size": the memory size
, in bytes (json
-int
)
432 - "filename": file
path (json
-string
)
436 -> { "execute": "memsave",
437 "arguments": { "val": 10,
439 "filename": "/tmp/virtual-mem-dump" } }
442 Note
: Depends on the current CPU
.
448 .args_type
= "val:l,size:i,filename:s",
449 .params
= "addr size file",
450 .help
= "save to disk physical memory dump starting at 'addr' of size 'size'",
451 .user_print
= monitor_user_noop
,
452 .mhandler
.cmd_new
= do_physical_memory_save
,
459 Save to disk physical memory dump starting at
'val' of size
'size'.
463 - "val": the starting
address (json
-int
)
464 - "size": the memory size
, in bytes (json
-int
)
465 - "filename": file
path (json
-string
)
469 -> { "execute": "pmemsave",
470 "arguments": { "val": 10,
472 "filename": "/tmp/physical-mem-dump" } }
478 .name
= "inject-nmi",
482 .user_print
= monitor_user_noop
,
483 .mhandler
.cmd_new
= do_inject_nmi
,
490 Inject an NMI on guest
's CPUs.
496 -> { "execute": "inject-nmi" }
499 Note: inject-nmi is only supported for x86 guest currently, it will
500 returns "Unsupported" error for non-x86 guest.
506 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
507 .params = "[-d] [-b] [-i] uri",
508 .help = "migrate to URI (using -d to not wait for completion)"
509 "\n\t\t\t -b for migration without shared storage with"
510 " full copy of disk\n\t\t\t -i for migration without "
511 "shared storage with incremental copy of disk "
512 "(base image shared between src and destination)",
513 .user_print = monitor_user_noop,
514 .mhandler.cmd_new = do_migrate,
525 - "blk": block migration, full disk copy (json-bool, optional)
526 - "inc": incremental disk copy (json-bool, optional)
527 - "uri": Destination URI (json-string)
531 -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
536 (1) The 'query
-migrate
' command should be used to check migration's progress
537 and final
result (this information is provided by the
'status' member
)
538 (2) All boolean arguments
default to
false
539 (3) The user Monitor
's "detach" argument is invalid in QMP and should not
545 .name = "migrate_cancel",
548 .help = "cancel the current VM migration",
549 .user_print = monitor_user_noop,
550 .mhandler.cmd_new = do_migrate_cancel,
557 Cancel the current migration.
563 -> { "execute": "migrate_cancel" }
569 .name = "migrate_set_speed",
570 .args_type = "value:o",
572 .help = "set maximum speed (in bytes) for migrations",
573 .user_print = monitor_user_noop,
574 .mhandler.cmd_new = do_migrate_set_speed,
581 Set maximum speed for migrations.
585 - "value": maximum speed, in bytes per second (json-int)
589 -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
595 .name = "migrate_set_downtime",
596 .args_type = "value:T",
598 .help = "set maximum tolerated downtime (in seconds) for migrations",
599 .user_print = monitor_user_noop,
600 .mhandler.cmd_new = do_migrate_set_downtime,
607 Set maximum tolerated downtime (in seconds) for migrations.
611 - "value": maximum downtime (json-number)
615 -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
621 .name = "client_migrate_info",
622 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
623 .params = "protocol hostname port tls-port cert-subject",
624 .help = "send migration info to spice/vnc client",
625 .user_print = monitor_user_noop,
626 .mhandler.cmd_new = client_migrate_info,
633 Set the spice/vnc connection info for the migration target. The spice/vnc
634 server will ask the spice/vnc client to automatically reconnect using the
635 new parameters (if specified) once the vm migration finished successfully.
639 - "protocol": protocol: "spice" or "vnc" (json-string)
640 - "hostname": migration target hostname (json-string)
641 - "port": spice/vnc tcp port for plaintext channels (json-int, optional)
642 - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
643 - "cert-subject": server certificate subject (json-string, optional)
647 -> { "execute": "client_migrate_info",
648 "arguments": { "protocol": "spice",
649 "hostname": "virt42.lab.kraxel.org",
656 .name = "netdev_add",
657 .args_type = "netdev:O",
658 .params = "[user|tap|socket],id=str[,prop=value][,...]",
659 .help = "add host network device",
660 .user_print = monitor_user_noop,
661 .mhandler.cmd_new = do_netdev_add,
668 Add host network device.
672 - "type": the device type, "tap", "user", ... (json-string)
673 - "id": the device's ID
, must be
unique (json
-string
)
678 -> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
681 Note
: The supported device options are the same ones supported by the
'-net'
682 command
-line argument
, which are listed
in the
'-help' output or QEMU
's
688 .name = "netdev_del",
691 .help = "remove host network device",
692 .user_print = monitor_user_noop,
693 .mhandler.cmd_new = do_netdev_del,
700 Remove host network device.
704 - "id": the device's ID
, must be
unique (json
-string
)
708 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
715 .name
= "block_resize",
716 .args_type
= "device:B,size:o",
717 .params
= "device size",
718 .help
= "resize a block image",
719 .user_print
= monitor_user_noop
,
720 .mhandler
.cmd_new
= do_block_resize
,
727 Resize a block image
while a guest is running
.
731 - "device": the device
's ID, must be unique (json-string)
736 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
743 .args_type = "value:M",
745 .help = "request VM to change its memory allocation (in MB)",
746 .user_print = monitor_user_noop,
747 .mhandler.cmd_async = do_balloon,
748 .flags = MONITOR_CMD_ASYNC,
755 Request VM to change its memory allocation (in bytes).
759 - "value": New memory allocation (json-int)
763 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
770 .args_type = "name:s,up:b",
771 .params = "name on|off",
772 .help = "change the link status of a network adapter",
773 .user_print = monitor_user_noop,
774 .mhandler.cmd_new = do_set_link,
781 Change the link status of a network adapter.
785 - "name": network device name (json-string)
786 - "up": status is up (json-bool)
790 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
797 .args_type = "fdname:s",
798 .params = "getfd name",
799 .help = "receive a file descriptor via SCM rights and assign it a name",
800 .user_print = monitor_user_noop,
801 .mhandler.cmd_new = do_getfd,
808 Receive a file descriptor via SCM rights and assign it a name.
812 - "fdname": file descriptor name (json-string)
816 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
823 .args_type = "fdname:s",
824 .params = "closefd name",
825 .help = "close a file descriptor previously passed via SCM rights",
826 .user_print = monitor_user_noop,
827 .mhandler.cmd_new = do_closefd,
834 Close a file descriptor previously passed via SCM rights.
838 - "fdname": file descriptor name (json-string)
842 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
848 .name = "block_passwd",
849 .args_type = "device:B,password:s",
850 .params = "block_passwd device password",
851 .help = "set the password of encrypted block devices",
852 .user_print = monitor_user_noop,
853 .mhandler.cmd_new = do_block_set_passwd,
860 Set the password of encrypted block devices.
864 - "device": device name (json-string)
865 - "password": password (json-string)
869 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
870 "password": "12345" } }
876 .name = "set_password",
877 .args_type = "protocol:s,password:s,connected:s?",
878 .params = "protocol password action-if-connected",
879 .help = "set spice/vnc password",
880 .user_print = monitor_user_noop,
881 .mhandler.cmd_new = set_password,
888 Set the password for vnc/spice protocols.
892 - "protocol": protocol name (json-string)
893 - "password": password (json-string)
894 - "connected": [ keep | disconnect | fail ] (josn-string, optional)
898 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
899 "password": "secret" } }
905 .name = "expire_password",
906 .args_type = "protocol:s,time:s",
907 .params = "protocol time",
908 .help = "set spice/vnc password expire-time",
909 .user_print = monitor_user_noop,
910 .mhandler.cmd_new = expire_password,
917 Set the password expire time for vnc/spice protocols.
921 - "protocol": protocol name (json-string)
922 - "time": [ now | never | +secs | secs ] (json-string)
926 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
933 .name = "qmp_capabilities",
936 .help = "enable QMP capabilities",
937 .user_print = monitor_user_noop,
938 .mhandler.cmd_new = do_qmp_capabilities,
945 Enable QMP capabilities.
951 -> { "execute": "qmp_capabilities" }
954 Note: This command must be issued before issuing any other command.
959 .name = "human-monitor-command",
960 .args_type = "command-line:s,cpu-index:i?",
963 .user_print = monitor_user_noop,
964 .mhandler.cmd_new = do_hmp_passthrough,
968 human-monitor-command
969 ---------------------
971 Execute a Human Monitor command.
975 - command-line: the command name and its arguments, just like the
976 Human Monitor's
shell (json
-string
)
977 - cpu
-index
: select the CPU number to be used by commands which access CPU
978 data
, like
'info registers'. The Monitor selects CPU
0 if this
979 argument is not
provided (json
-int
, optional
)
983 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
984 <- { "return": "kvm support: enabled\r\n" }
988 (1) The Human Monitor is NOT an stable
interface, this means that command
989 names
, arguments and responses can change or be removed at ANY time
.
990 Applications that rely on long term stability guarantees should NOT
995 o This command is stateless
, this means that commands that depend
996 on state
information (such as getfd
) might not work
998 o Commands that prompt the user
for data (eg
. 'cont' when the block
999 device is encrypted
) don
't currently work
1004 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1005 HXCOMM this! We will possibly move query commands definitions inside those
1006 HXCOMM sections, just like regular commands.
1016 Return a json-object with the following information:
1018 - "qemu": A json-object containing three integer values:
1019 - "major": QEMU's major
version (json
-int
)
1020 - "minor": QEMU
's minor version (json-int)
1021 - "micro": QEMU's micro
version (json
-int
)
1022 - "package": package's version (json-string)
1026 -> { "execute": "query-version" }
1044 List QMP available commands.
1046 Each command is represented by a json-object, the returned value is a json-array
1049 Each json-object contain:
1051 - "name": command's
name (json
-string
)
1055 -> { "execute": "query-commands" }
1059 "name":"query-balloon"
1062 "name":"system_powerdown"
1067 Note
: This example has been shortened as the real response is too long
.
1075 Each device is represented by a json
-object
. The returned value is a json
-array
1078 Each json
-object contain the following
:
1080 - "label": device
's label (json-string)
1081 - "filename": device's
file (json
-string
)
1085 -> { "execute": "query-chardev" }
1105 Show the block devices
.
1107 Each block device information is stored
in a json
-object and the returned value
1108 is a json
-array of all devices
.
1110 Each json
-object contain the following
:
1112 - "device": device
name (json
-string
)
1113 - "type": device
type (json
-string
)
1114 - deprecated
, retained
for backward compatibility
1115 - Possible values
: "unknown"
1116 - "removable": true if the device is removable
, false otherwise (json
-bool
)
1117 - "locked": true if the device is locked
, false otherwise (json
-bool
)
1118 - "inserted": only present
if the device is inserted
, it is a json
-object
1119 containing the following
:
1120 - "file": device file
name (json
-string
)
1121 - "ro": true if read
-only
, false otherwise (json
-bool
)
1122 - "drv": driver format
name (json
-string
)
1123 - Possible values
: "blkdebug", "bochs", "cloop", "cow", "dmg",
1124 "file", "file", "ftp", "ftps", "host_cdrom",
1125 "host_device", "host_floppy", "http", "https",
1126 "nbd", "parallels", "qcow", "qcow2", "raw",
1127 "tftp", "vdi", "vmdk", "vpc", "vvfat"
1128 - "backing_file": backing file
name (json
-string
, optional
)
1129 - "encrypted": true if encrypted
, false otherwise (json
-bool
)
1133 -> { "execute": "query-block" }
1137 "device":"ide0-hd0",
1144 "file":"disks/test.img"
1149 "device":"ide1-cd0",
1175 Show block device statistics
.
1177 Each device statistic information is stored
in a json
-object and the returned
1178 value is a json
-array of all devices
.
1180 Each json
-object contain the following
:
1182 - "device": device
name (json
-string
)
1183 - "stats": A json
-object with the statistics information
, it contains
:
1184 - "rd_bytes": bytes
read (json
-int
)
1185 - "wr_bytes": bytes
written (json
-int
)
1186 - "rd_operations": read
operations (json
-int
)
1187 - "wr_operations": write
operations (json
-int
)
1188 - "wr_highest_offset": Highest offset of a sector written since the
1189 BlockDriverState has been
opened (json
-int
)
1190 - "parent": Contains recursively the statistics of the underlying
1191 protocol (e
.g
. the host file
for a qcow2 image
). If there is
1192 no underlying protocol
, this field is omitted
1193 (json
-object
, optional
)
1197 -> { "execute": "query-blockstats" }
1201 "device":"ide0-hd0",
1204 "wr_highest_offset":3686448128,
1206 "wr_operations":751,
1207 "rd_bytes":122567168,
1208 "rd_operations":36772
1212 "wr_highest_offset":2821110784,
1214 "wr_operations":692,
1215 "rd_bytes":122739200,
1216 "rd_operations":36604
1220 "device":"ide1-cd0",
1222 "wr_highest_offset":0,
1232 "wr_highest_offset":0,
1242 "wr_highest_offset":0,
1258 Show CPU information
.
1260 Return a json
-array
. Each CPU is represented by a json
-object
, which contains
:
1262 - "CPU": CPU
index (json
-int
)
1263 - "current": true if this is the current CPU
, false otherwise (json
-bool
)
1264 - "halted": true if the cpu is halted
, false otherwise (json
-bool
)
1265 - Current program counter
. The key
's name depends on the architecture:
1266 "pc": i386/x86_64 (json-int)
1267 "nip": PPC (json-int)
1268 "pc" and "npc": sparc (json-int)
1269 "PC": mips (json-int)
1270 - "thread_id": ID of the underlying host thread (json-int)
1274 -> { "execute": "query-cpus" }
1300 PCI buses and devices information.
1302 The returned value is a json-array of all buses. Each bus is represented by
1303 a json-object, which has a key with a json-array of all PCI devices attached
1304 to it. Each device is represented by a json-object.
1306 The bus json-object contains the following:
1308 - "bus": bus number (json-int)
1309 - "devices": a json-array of json-objects, each json-object represents a
1312 The PCI device json-object contains the following:
1314 - "bus": identical to the parent's bus
number (json
-int
)
1315 - "slot": slot
number (json
-int
)
1316 - "function": function number (json
-int
)
1317 - "class_info": a json
-object containing
:
1318 - "desc": device
class description (json
-string
, optional
)
1319 - "class": device
class number (json
-int
)
1320 - "id": a json
-object containing
:
1321 - "device": device
ID (json
-int
)
1322 - "vendor": vendor
ID (json
-int
)
1323 - "irq": device
's IRQ if assigned (json-int, optional)
1324 - "qdev_id": qdev id string (json-string)
1325 - "pci_bridge": It's a json
-object
, only present
if this device is a
1326 PCI bridge
, contains
:
1327 - "bus": bus
number (json
-int
)
1328 - "secondary": secondary bus
number (json
-int
)
1329 - "subordinate": subordinate bus
number (json
-int
)
1330 - "io_range": I
/O memory range information
, a json
-object with the
1332 - "base": base address
, in bytes (json
-int
)
1333 - "limit": limit address
, in bytes (json
-int
)
1334 - "memory_range": memory range information
, a json
-object with the
1336 - "base": base address
, in bytes (json
-int
)
1337 - "limit": limit address
, in bytes (json
-int
)
1338 - "prefetchable_range": Prefetchable memory range information
, a
1339 json
-object with the following members
:
1340 - "base": base address
, in bytes (json
-int
)
1341 - "limit": limit address
, in bytes (json
-int
)
1342 - "devices": a json
-array of PCI devices
if there
's any attached, each
1343 each element is represented by a json-object, which contains
1344 the same members of the 'PCI device json
-object
' described
1346 - "regions": a json-array of json-objects, each json-object represents a
1347 memory region of this device
1349 The memory range json-object contains the following:
1351 - "base": base memory address (json-int)
1352 - "limit": limit value (json-int)
1354 The region json-object can be an I/O region or a memory region, an I/O region
1355 json-object contains the following:
1357 - "type": "io" (json-string, fixed)
1358 - "bar": BAR number (json-int)
1359 - "address": memory address (json-int)
1360 - "size": memory size (json-int)
1362 A memory region json-object contains the following:
1364 - "type": "memory" (json-string, fixed)
1365 - "bar": BAR number (json-int)
1366 - "address": memory address (json-int)
1367 - "size": memory size (json-int)
1368 - "mem_type_64": true or false (json-bool)
1369 - "prefetch": true or false (json-bool)
1373 -> { "execute": "query-pci" }
1385 "desc":"Host bridge"
1419 "desc":"IDE controller"
1441 "desc":"VGA controller"
1451 "mem_type_64":false,
1454 "address":4026531840,
1459 "mem_type_64":false,
1462 "address":4060086272,
1467 "mem_type_64":false,
1482 "desc":"RAM controller"
1503 Note: This example has been shortened as the real response is too long.
1511 Show KVM information.
1513 Return a json-object with the following information:
1515 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
1516 - "present": true if QEMU has KVM support, false otherwise (json-bool)
1520 -> { "execute": "query-kvm" }
1521 <- { "return": { "enabled": true, "present": true } }
1529 Return a json-object with the following information:
1531 - "running": true if the VM is running, or false if it is paused (json-bool)
1532 - "singlestep": true if the VM is in single step mode,
1533 false otherwise (json-bool)
1537 -> { "execute": "query-status" }
1538 <- { "return": { "running": true, "singlestep": false } }
1546 Show VM mice information.
1548 Each mouse is represented by a json-object, the returned value is a json-array
1551 The mouse json-object contains the following:
1553 - "name": mouse's
name (json
-string
)
1554 - "index": mouse
's index (json-int)
1555 - "current": true if this mouse is receiving events, false otherwise (json-bool)
1556 - "absolute": true if the mouse generates absolute input events (json-bool)
1560 -> { "execute": "query-mice" }
1564 "name":"QEMU Microsoft Mouse",
1570 "name":"QEMU PS/2 Mouse",
1584 Show VNC server information.
1586 Return a json-object with server information. Connected clients are returned
1587 as a json-array of json-objects.
1589 The main json-object contains the following:
1591 - "enabled": true or false (json-bool)
1592 - "host": server's IP
address (json
-string
)
1593 - "family": address
family (json
-string
)
1594 - Possible values
: "ipv4", "ipv6", "unix", "unknown"
1595 - "service": server
's port number (json-string)
1596 - "auth": authentication method (json-string)
1597 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
1598 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
1599 "vencrypt+plain", "vencrypt+tls+none",
1600 "vencrypt+tls+plain", "vencrypt+tls+sasl",
1601 "vencrypt+tls+vnc", "vencrypt+x509+none",
1602 "vencrypt+x509+plain", "vencrypt+x509+sasl",
1603 "vencrypt+x509+vnc", "vnc"
1604 - "clients": a json-array of all connected clients
1606 Clients are described by a json-object, each one contain the following:
1608 - "host": client's IP
address (json
-string
)
1609 - "family": address
family (json
-string
)
1610 - Possible values
: "ipv4", "ipv6", "unix", "unknown"
1611 - "service": client
's port number (json-string)
1612 - "x509_dname": TLS dname (json-string, optional)
1613 - "sasl_username": SASL username (json-string, optional)
1617 -> { "execute": "query-vnc" }
1641 Show SPICE server information.
1643 Return a json-object with server information. Connected clients are returned
1644 as a json-array of json-objects.
1646 The main json-object contains the following:
1648 - "enabled": true or false (json-bool)
1649 - "host": server's IP
address (json
-string
)
1650 - "port": server
's port number (json-int, optional)
1651 - "tls-port": server's port
number (json
-int
, optional
)
1652 - "auth": authentication
method (json
-string
)
1653 - Possible values
: "none", "spice"
1654 - "channels": a json
-array of all active channels clients
1656 Channels are described by a json
-object
, each one contain the following
:
1658 - "host": client
's IP address (json-string)
1659 - "family": address family (json-string)
1660 - Possible values: "ipv4", "ipv6", "unix", "unknown"
1661 - "port": client's port
number (json
-string
)
1662 - "connection-id": spice connection id
. All channels with the same id
1663 belong to the same spice
session (json
-int
)
1664 - "channel-type": channel type
. "1" is the main control channel
, filter
for
1665 this one
if you want track spice sessions
only (json
-int
)
1666 - "channel-id": channel id
. Usually
"0", might be different needed when
1667 multiple channels of the same type exist
, such as multiple
1668 display channels
in a multihead
setup (json
-int
)
1669 - "tls": whevener the channel is
encrypted (json
-bool
)
1673 -> { "execute": "query-spice" }
1686 "connection-id": 1804289383,
1687 "host": "127.0.0.1",
1695 "connection-id": 1804289383,
1696 "host": "127.0.0.1",
1700 [ ... more channels follow
... ]
1713 Return a json
-object with the following information
:
1715 - "name": VM
's name (json-string, optional)
1719 -> { "execute": "query-name" }
1720 <- { "return": { "name": "qemu-name" } }
1730 Return a json-object with the following information:
1732 - "UUID": Universally Unique Identifier (json-string)
1736 -> { "execute": "query-uuid" }
1737 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
1747 Return a json-object. If migration is active there will be another json-object
1748 with RAM migration status and if block migration is active another one with
1749 block migration status.
1751 The main json-object contains the following:
1753 - "status": migration status (json-string)
1754 - Possible values: "active", "completed", "failed", "cancelled"
1755 - "ram": only present if "status" is "active", it is a json-object with the
1756 following RAM information (in bytes):
1757 - "transferred": amount transferred (json-int)
1758 - "remaining": amount remaining (json-int)
1759 - "total": total (json-int)
1760 - "disk": only present if "status" is "active" and it is a block migration,
1761 it is a json-object with the following disk information (in bytes):
1762 - "transferred": amount transferred (json-int)
1763 - "remaining": amount remaining (json-int)
1764 - "total": total (json-int)
1768 1. Before the first migration
1770 -> { "execute": "query-migrate" }
1773 2. Migration is done and has succeeded
1775 -> { "execute": "query-migrate" }
1776 <- { "return": { "status": "completed" } }
1778 3. Migration is done and has failed
1780 -> { "execute": "query-migrate" }
1781 <- { "return": { "status": "failed" } }
1783 4. Migration is being performed and is not a block migration:
1785 -> { "execute": "query-migrate" }
1797 5. Migration is being performed and is a block migration:
1799 -> { "execute": "query-migrate" }
1805 "remaining":1053304,
1810 "remaining":20880384,
1822 Show balloon information.
1824 Make an asynchronous request for balloon info. When the request completes a
1825 json-object will be returned containing the following data:
1827 - "actual": current balloon value in bytes (json-int)
1828 - "mem_swapped_in": Amount of memory swapped in bytes (json-int, optional)
1829 - "mem_swapped_out": Amount of memory swapped out in bytes (json-int, optional)
1830 - "major_page_faults": Number of major faults (json-int, optional)
1831 - "minor_page_faults": Number of minor faults (json-int, optional)
1832 - "free_mem": Total amount of free and unused memory in
1833 bytes (json-int, optional)
1834 - "total_mem": Total amount of available memory in bytes (json-int, optional)
1838 -> { "execute": "query-balloon" }
1841 "actual":1073741824,
1843 "mem_swapped_out":0,
1844 "major_page_faults":142,
1845 "minor_page_faults":239245,
1846 "free_mem":1014185984,
1847 "total_mem":1044668416