]> git.proxmox.com Git - mirror_qemu.git/blob - qmp-commands.hx
mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror'
[mirror_qemu.git] / qmp-commands.hx
1 HXCOMM QMP dispatch table and documentation
2 HXCOMM Text between SQMP and EQMP is copied to the QMP documentation file and
3 HXCOMM does not show up in the other formats.
4
5 SQMP
6 QMP Supported Commands
7 ----------------------
8
9 This document describes all commands currently supported by QMP.
10
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.
14
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.
18
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.
22
23 Also, the following notation is used to denote data flow:
24
25 -> data issued by the Client
26 <- Server data response
27
28 Please, refer to the QMP specification (QMP/qmp-spec.txt) for detailed
29 information on the Server command and response formats.
30
31 NOTE: This document is temporary and will be replaced soon.
32
33 1. Stability Considerations
34 ===========================
35
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.
39
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.
42
43 If you're planning to adopt QMP, please observe the following:
44
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
48
49 2. DO NOT rely on anything which is not explicit documented
50
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)
54
55 2. Regular Commands
56 ===================
57
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.
60
61 EQMP
62
63 {
64 .name = "quit",
65 .args_type = "",
66 .mhandler.cmd_new = qmp_marshal_quit,
67 },
68
69 SQMP
70 quit
71 ----
72
73 Quit the emulator.
74
75 Arguments: None.
76
77 Example:
78
79 -> { "execute": "quit" }
80 <- { "return": {} }
81
82 EQMP
83
84 {
85 .name = "eject",
86 .args_type = "force:-f,device:B",
87 .mhandler.cmd_new = qmp_marshal_eject,
88 },
89
90 SQMP
91 eject
92 -----
93
94 Eject a removable medium.
95
96 Arguments:
97
98 - force: force ejection (json-bool, optional)
99 - device: device name (json-string)
100
101 Example:
102
103 -> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
104 <- { "return": {} }
105
106 Note: The "force" argument defaults to false.
107
108 EQMP
109
110 {
111 .name = "change",
112 .args_type = "device:B,target:F,arg:s?",
113 .mhandler.cmd_new = qmp_marshal_change,
114 },
115
116 SQMP
117 change
118 ------
119
120 Change a removable medium or VNC configuration.
121
122 Arguments:
123
124 - "device": device name (json-string)
125 - "target": filename or item (json-string)
126 - "arg": additional argument (json-string, optional)
127
128 Examples:
129
130 1. Change a removable medium
131
132 -> { "execute": "change",
133 "arguments": { "device": "ide1-cd0",
134 "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
135 <- { "return": {} }
136
137 2. Change VNC password
138
139 -> { "execute": "change",
140 "arguments": { "device": "vnc", "target": "password",
141 "arg": "foobar1" } }
142 <- { "return": {} }
143
144 EQMP
145
146 {
147 .name = "screendump",
148 .args_type = "filename:F",
149 .mhandler.cmd_new = qmp_marshal_screendump,
150 },
151
152 SQMP
153 screendump
154 ----------
155
156 Save screen into PPM image.
157
158 Arguments:
159
160 - "filename": file path (json-string)
161
162 Example:
163
164 -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
165 <- { "return": {} }
166
167 EQMP
168
169 {
170 .name = "stop",
171 .args_type = "",
172 .mhandler.cmd_new = qmp_marshal_stop,
173 },
174
175 SQMP
176 stop
177 ----
178
179 Stop the emulator.
180
181 Arguments: None.
182
183 Example:
184
185 -> { "execute": "stop" }
186 <- { "return": {} }
187
188 EQMP
189
190 {
191 .name = "cont",
192 .args_type = "",
193 .mhandler.cmd_new = qmp_marshal_cont,
194 },
195
196 SQMP
197 cont
198 ----
199
200 Resume emulation.
201
202 Arguments: None.
203
204 Example:
205
206 -> { "execute": "cont" }
207 <- { "return": {} }
208
209 EQMP
210
211 {
212 .name = "system_wakeup",
213 .args_type = "",
214 .mhandler.cmd_new = qmp_marshal_system_wakeup,
215 },
216
217 SQMP
218 system_wakeup
219 -------------
220
221 Wakeup guest from suspend.
222
223 Arguments: None.
224
225 Example:
226
227 -> { "execute": "system_wakeup" }
228 <- { "return": {} }
229
230 EQMP
231
232 {
233 .name = "system_reset",
234 .args_type = "",
235 .mhandler.cmd_new = qmp_marshal_system_reset,
236 },
237
238 SQMP
239 system_reset
240 ------------
241
242 Reset the system.
243
244 Arguments: None.
245
246 Example:
247
248 -> { "execute": "system_reset" }
249 <- { "return": {} }
250
251 EQMP
252
253 {
254 .name = "system_powerdown",
255 .args_type = "",
256 .mhandler.cmd_new = qmp_marshal_system_powerdown,
257 },
258
259 SQMP
260 system_powerdown
261 ----------------
262
263 Send system power down event.
264
265 Arguments: None.
266
267 Example:
268
269 -> { "execute": "system_powerdown" }
270 <- { "return": {} }
271
272 EQMP
273
274 {
275 .name = "device_add",
276 .args_type = "device:O",
277 .params = "driver[,prop=value][,...]",
278 .help = "add device, like -device on the command line",
279 .mhandler.cmd_new = qmp_device_add,
280 },
281
282 SQMP
283 device_add
284 ----------
285
286 Add a device.
287
288 Arguments:
289
290 - "driver": the name of the new device's driver (json-string)
291 - "bus": the device's parent bus (device tree path, json-string, optional)
292 - "id": the device's ID, must be unique (json-string)
293 - device properties
294
295 Example:
296
297 -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
298 <- { "return": {} }
299
300 Notes:
301
302 (1) For detailed information about this command, please refer to the
303 'docs/qdev-device-use.txt' file.
304
305 (2) It's possible to list device properties by running QEMU with the
306 "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
307
308 EQMP
309
310 {
311 .name = "device_del",
312 .args_type = "id:s",
313 .mhandler.cmd_new = qmp_marshal_device_del,
314 },
315
316 SQMP
317 device_del
318 ----------
319
320 Remove a device.
321
322 Arguments:
323
324 - "id": the device's ID or QOM path (json-string)
325
326 Example:
327
328 -> { "execute": "device_del", "arguments": { "id": "net1" } }
329 <- { "return": {} }
330
331 Example:
332
333 -> { "execute": "device_del", "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
334 <- { "return": {} }
335
336 EQMP
337
338 {
339 .name = "send-key",
340 .args_type = "keys:q,hold-time:i?",
341 .mhandler.cmd_new = qmp_marshal_send_key,
342 },
343
344 SQMP
345 send-key
346 ----------
347
348 Send keys to VM.
349
350 Arguments:
351
352 keys array:
353 - "key": key sequence (a json-array of key union values,
354 union can be number or qcode enum)
355
356 - hold-time: time to delay key up events, milliseconds. Defaults to 100
357 (json-int, optional)
358
359 Example:
360
361 -> { "execute": "send-key",
362 "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
363 { "type": "qcode", "data": "alt" },
364 { "type": "qcode", "data": "delete" } ] } }
365 <- { "return": {} }
366
367 EQMP
368
369 {
370 .name = "cpu",
371 .args_type = "index:i",
372 .mhandler.cmd_new = qmp_marshal_cpu,
373 },
374
375 SQMP
376 cpu
377 ---
378
379 Set the default CPU.
380
381 Arguments:
382
383 - "index": the CPU's index (json-int)
384
385 Example:
386
387 -> { "execute": "cpu", "arguments": { "index": 0 } }
388 <- { "return": {} }
389
390 Note: CPUs' indexes are obtained with the 'query-cpus' command.
391
392 EQMP
393
394 {
395 .name = "cpu-add",
396 .args_type = "id:i",
397 .mhandler.cmd_new = qmp_marshal_cpu_add,
398 },
399
400 SQMP
401 cpu-add
402 -------
403
404 Adds virtual cpu
405
406 Arguments:
407
408 - "id": cpu id (json-int)
409
410 Example:
411
412 -> { "execute": "cpu-add", "arguments": { "id": 2 } }
413 <- { "return": {} }
414
415 EQMP
416
417 {
418 .name = "memsave",
419 .args_type = "val:l,size:i,filename:s,cpu:i?",
420 .mhandler.cmd_new = qmp_marshal_memsave,
421 },
422
423 SQMP
424 memsave
425 -------
426
427 Save to disk virtual memory dump starting at 'val' of size 'size'.
428
429 Arguments:
430
431 - "val": the starting address (json-int)
432 - "size": the memory size, in bytes (json-int)
433 - "filename": file path (json-string)
434 - "cpu": virtual CPU index (json-int, optional)
435
436 Example:
437
438 -> { "execute": "memsave",
439 "arguments": { "val": 10,
440 "size": 100,
441 "filename": "/tmp/virtual-mem-dump" } }
442 <- { "return": {} }
443
444 EQMP
445
446 {
447 .name = "pmemsave",
448 .args_type = "val:l,size:i,filename:s",
449 .mhandler.cmd_new = qmp_marshal_pmemsave,
450 },
451
452 SQMP
453 pmemsave
454 --------
455
456 Save to disk physical memory dump starting at 'val' of size 'size'.
457
458 Arguments:
459
460 - "val": the starting address (json-int)
461 - "size": the memory size, in bytes (json-int)
462 - "filename": file path (json-string)
463
464 Example:
465
466 -> { "execute": "pmemsave",
467 "arguments": { "val": 10,
468 "size": 100,
469 "filename": "/tmp/physical-mem-dump" } }
470 <- { "return": {} }
471
472 EQMP
473
474 {
475 .name = "inject-nmi",
476 .args_type = "",
477 .mhandler.cmd_new = qmp_marshal_inject_nmi,
478 },
479
480 SQMP
481 inject-nmi
482 ----------
483
484 Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
485
486 Arguments: None.
487
488 Example:
489
490 -> { "execute": "inject-nmi" }
491 <- { "return": {} }
492
493 Note: inject-nmi fails when the guest doesn't support injecting.
494
495 EQMP
496
497 {
498 .name = "ringbuf-write",
499 .args_type = "device:s,data:s,format:s?",
500 .mhandler.cmd_new = qmp_marshal_ringbuf_write,
501 },
502
503 SQMP
504 ringbuf-write
505 -------------
506
507 Write to a ring buffer character device.
508
509 Arguments:
510
511 - "device": ring buffer character device name (json-string)
512 - "data": data to write (json-string)
513 - "format": data format (json-string, optional)
514 - Possible values: "utf8" (default), "base64"
515
516 Example:
517
518 -> { "execute": "ringbuf-write",
519 "arguments": { "device": "foo",
520 "data": "abcdefgh",
521 "format": "utf8" } }
522 <- { "return": {} }
523
524 EQMP
525
526 {
527 .name = "ringbuf-read",
528 .args_type = "device:s,size:i,format:s?",
529 .mhandler.cmd_new = qmp_marshal_ringbuf_read,
530 },
531
532 SQMP
533 ringbuf-read
534 -------------
535
536 Read from a ring buffer character device.
537
538 Arguments:
539
540 - "device": ring buffer character device name (json-string)
541 - "size": how many bytes to read at most (json-int)
542 - Number of data bytes, not number of characters in encoded data
543 - "format": data format (json-string, optional)
544 - Possible values: "utf8" (default), "base64"
545 - Naturally, format "utf8" works only when the ring buffer
546 contains valid UTF-8 text. Invalid UTF-8 sequences get
547 replaced. Bug: replacement doesn't work. Bug: can screw
548 up on encountering NUL characters, after the ring buffer
549 lost data, and when reading stops because the size limit
550 is reached.
551
552 Example:
553
554 -> { "execute": "ringbuf-read",
555 "arguments": { "device": "foo",
556 "size": 1000,
557 "format": "utf8" } }
558 <- {"return": "abcdefgh"}
559
560 EQMP
561
562 {
563 .name = "xen-save-devices-state",
564 .args_type = "filename:F",
565 .mhandler.cmd_new = qmp_marshal_xen_save_devices_state,
566 },
567
568 SQMP
569 xen-save-devices-state
570 -------
571
572 Save the state of all devices to file. The RAM and the block devices
573 of the VM are not saved by this command.
574
575 Arguments:
576
577 - "filename": the file to save the state of the devices to as binary
578 data. See xen-save-devices-state.txt for a description of the binary
579 format.
580
581 Example:
582
583 -> { "execute": "xen-save-devices-state",
584 "arguments": { "filename": "/tmp/save" } }
585 <- { "return": {} }
586
587 EQMP
588
589 {
590 .name = "xen-load-devices-state",
591 .args_type = "filename:F",
592 .mhandler.cmd_new = qmp_marshal_xen_load_devices_state,
593 },
594
595 SQMP
596 xen-load-devices-state
597 ----------------------
598
599 Load the state of all devices from file. The RAM and the block devices
600 of the VM are not loaded by this command.
601
602 Arguments:
603
604 - "filename": the file to load the state of the devices from as binary
605 data. See xen-save-devices-state.txt for a description of the binary
606 format.
607
608 Example:
609
610 -> { "execute": "xen-load-devices-state",
611 "arguments": { "filename": "/tmp/resume" } }
612 <- { "return": {} }
613
614 EQMP
615
616 {
617 .name = "xen-set-global-dirty-log",
618 .args_type = "enable:b",
619 .mhandler.cmd_new = qmp_marshal_xen_set_global_dirty_log,
620 },
621
622 SQMP
623 xen-set-global-dirty-log
624 -------
625
626 Enable or disable the global dirty log mode.
627
628 Arguments:
629
630 - "enable": Enable it or disable it.
631
632 Example:
633
634 -> { "execute": "xen-set-global-dirty-log",
635 "arguments": { "enable": true } }
636 <- { "return": {} }
637
638 EQMP
639
640 {
641 .name = "migrate",
642 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
643 .mhandler.cmd_new = qmp_marshal_migrate,
644 },
645
646 SQMP
647 migrate
648 -------
649
650 Migrate to URI.
651
652 Arguments:
653
654 - "blk": block migration, full disk copy (json-bool, optional)
655 - "inc": incremental disk copy (json-bool, optional)
656 - "uri": Destination URI (json-string)
657
658 Example:
659
660 -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
661 <- { "return": {} }
662
663 Notes:
664
665 (1) The 'query-migrate' command should be used to check migration's progress
666 and final result (this information is provided by the 'status' member)
667 (2) All boolean arguments default to false
668 (3) The user Monitor's "detach" argument is invalid in QMP and should not
669 be used
670
671 EQMP
672
673 {
674 .name = "migrate_cancel",
675 .args_type = "",
676 .mhandler.cmd_new = qmp_marshal_migrate_cancel,
677 },
678
679 SQMP
680 migrate_cancel
681 --------------
682
683 Cancel the current migration.
684
685 Arguments: None.
686
687 Example:
688
689 -> { "execute": "migrate_cancel" }
690 <- { "return": {} }
691
692 EQMP
693
694 {
695 .name = "migrate-incoming",
696 .args_type = "uri:s",
697 .mhandler.cmd_new = qmp_marshal_migrate_incoming,
698 },
699
700 SQMP
701 migrate-incoming
702 ----------------
703
704 Continue an incoming migration
705
706 Arguments:
707
708 - "uri": Source/listening URI (json-string)
709
710 Example:
711
712 -> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } }
713 <- { "return": {} }
714
715 Notes:
716
717 (1) QEMU must be started with -incoming defer to allow migrate-incoming to
718 be used
719 (2) The uri format is the same as for -incoming
720
721 EQMP
722 {
723 .name = "migrate-set-cache-size",
724 .args_type = "value:o",
725 .mhandler.cmd_new = qmp_marshal_migrate_set_cache_size,
726 },
727
728 SQMP
729 migrate-set-cache-size
730 ----------------------
731
732 Set cache size to be used by XBZRLE migration, the cache size will be rounded
733 down to the nearest power of 2
734
735 Arguments:
736
737 - "value": cache size in bytes (json-int)
738
739 Example:
740
741 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
742 <- { "return": {} }
743
744 EQMP
745 {
746 .name = "migrate-start-postcopy",
747 .args_type = "",
748 .mhandler.cmd_new = qmp_marshal_migrate_start_postcopy,
749 },
750
751 SQMP
752 migrate-start-postcopy
753 ----------------------
754
755 Switch an in-progress migration to postcopy mode. Ignored after the end of
756 migration (or once already in postcopy).
757
758 Example:
759 -> { "execute": "migrate-start-postcopy" }
760 <- { "return": {} }
761
762 EQMP
763
764 {
765 .name = "query-migrate-cache-size",
766 .args_type = "",
767 .mhandler.cmd_new = qmp_marshal_query_migrate_cache_size,
768 },
769
770 SQMP
771 query-migrate-cache-size
772 ------------------------
773
774 Show cache size to be used by XBZRLE migration
775
776 returns a json-object with the following information:
777 - "size" : json-int
778
779 Example:
780
781 -> { "execute": "query-migrate-cache-size" }
782 <- { "return": 67108864 }
783
784 EQMP
785
786 {
787 .name = "migrate_set_speed",
788 .args_type = "value:o",
789 .mhandler.cmd_new = qmp_marshal_migrate_set_speed,
790 },
791
792 SQMP
793 migrate_set_speed
794 -----------------
795
796 Set maximum speed for migrations.
797
798 Arguments:
799
800 - "value": maximum speed, in bytes per second (json-int)
801
802 Example:
803
804 -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
805 <- { "return": {} }
806
807 EQMP
808
809 {
810 .name = "migrate_set_downtime",
811 .args_type = "value:T",
812 .mhandler.cmd_new = qmp_marshal_migrate_set_downtime,
813 },
814
815 SQMP
816 migrate_set_downtime
817 --------------------
818
819 Set maximum tolerated downtime (in seconds) for migrations.
820
821 Arguments:
822
823 - "value": maximum downtime (json-number)
824
825 Example:
826
827 -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
828 <- { "return": {} }
829
830 EQMP
831
832 {
833 .name = "client_migrate_info",
834 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
835 .params = "protocol hostname port tls-port cert-subject",
836 .help = "set migration information for remote display",
837 .mhandler.cmd_new = qmp_marshal_client_migrate_info,
838 },
839
840 SQMP
841 client_migrate_info
842 -------------------
843
844 Set migration information for remote display. This makes the server
845 ask the client to automatically reconnect using the new parameters
846 once migration finished successfully. Only implemented for SPICE.
847
848 Arguments:
849
850 - "protocol": must be "spice" (json-string)
851 - "hostname": migration target hostname (json-string)
852 - "port": spice tcp port for plaintext channels (json-int, optional)
853 - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
854 - "cert-subject": server certificate subject (json-string, optional)
855
856 Example:
857
858 -> { "execute": "client_migrate_info",
859 "arguments": { "protocol": "spice",
860 "hostname": "virt42.lab.kraxel.org",
861 "port": 1234 } }
862 <- { "return": {} }
863
864 EQMP
865
866 {
867 .name = "dump-guest-memory",
868 .args_type = "paging:b,protocol:s,detach:b?,begin:i?,end:i?,format:s?",
869 .params = "-p protocol [-d] [begin] [length] [format]",
870 .help = "dump guest memory to file",
871 .mhandler.cmd_new = qmp_marshal_dump_guest_memory,
872 },
873
874 SQMP
875 dump
876
877
878 Dump guest memory to file. The file can be processed with crash or gdb.
879
880 Arguments:
881
882 - "paging": do paging to get guest's memory mapping (json-bool)
883 - "protocol": destination file(started with "file:") or destination file
884 descriptor (started with "fd:") (json-string)
885 - "detach": if specified, command will return immediately, without waiting
886 for the dump to finish. The user can track progress using
887 "query-dump". (json-bool)
888 - "begin": the starting physical address. It's optional, and should be specified
889 with length together (json-int)
890 - "length": the memory size, in bytes. It's optional, and should be specified
891 with begin together (json-int)
892 - "format": the format of guest memory dump. It's optional, and can be
893 elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
894 conflict with paging and filter, ie. begin and length (json-string)
895
896 Example:
897
898 -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
899 <- { "return": {} }
900
901 Notes:
902
903 (1) All boolean arguments default to false
904
905 EQMP
906
907 {
908 .name = "query-dump-guest-memory-capability",
909 .args_type = "",
910 .mhandler.cmd_new = qmp_marshal_query_dump_guest_memory_capability,
911 },
912
913 SQMP
914 query-dump-guest-memory-capability
915 ----------
916
917 Show available formats for 'dump-guest-memory'
918
919 Example:
920
921 -> { "execute": "query-dump-guest-memory-capability" }
922 <- { "return": { "formats":
923 ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
924
925 EQMP
926
927 {
928 .name = "query-dump",
929 .args_type = "",
930 .params = "",
931 .help = "query background dump status",
932 .mhandler.cmd_new = qmp_marshal_query_dump,
933 },
934
935 SQMP
936 query-dump
937 ----------
938
939 Query background dump status.
940
941 Arguments: None.
942
943 Example:
944
945 -> { "execute": "query-dump" }
946 <- { "return": { "status": "active", "completed": 1024000,
947 "total": 2048000 } }
948
949 EQMP
950
951 #if defined TARGET_S390X
952 {
953 .name = "dump-skeys",
954 .args_type = "filename:F",
955 .mhandler.cmd_new = qmp_marshal_dump_skeys,
956 },
957 #endif
958
959 SQMP
960 dump-skeys
961 ----------
962
963 Save guest storage keys to file.
964
965 Arguments:
966
967 - "filename": file path (json-string)
968
969 Example:
970
971 -> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } }
972 <- { "return": {} }
973
974 EQMP
975
976 {
977 .name = "netdev_add",
978 .args_type = "netdev:O",
979 .mhandler.cmd_new = qmp_netdev_add,
980 },
981
982 SQMP
983 netdev_add
984 ----------
985
986 Add host network device.
987
988 Arguments:
989
990 - "type": the device type, "tap", "user", ... (json-string)
991 - "id": the device's ID, must be unique (json-string)
992 - device options
993
994 Example:
995
996 -> { "execute": "netdev_add",
997 "arguments": { "type": "user", "id": "netdev1",
998 "dnssearch": "example.org" } }
999 <- { "return": {} }
1000
1001 Note: The supported device options are the same ones supported by the '-netdev'
1002 command-line argument, which are listed in the '-help' output or QEMU's
1003 manual
1004
1005 EQMP
1006
1007 {
1008 .name = "netdev_del",
1009 .args_type = "id:s",
1010 .mhandler.cmd_new = qmp_marshal_netdev_del,
1011 },
1012
1013 SQMP
1014 netdev_del
1015 ----------
1016
1017 Remove host network device.
1018
1019 Arguments:
1020
1021 - "id": the device's ID, must be unique (json-string)
1022
1023 Example:
1024
1025 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
1026 <- { "return": {} }
1027
1028
1029 EQMP
1030
1031 {
1032 .name = "object-add",
1033 .args_type = "qom-type:s,id:s,props:q?",
1034 .mhandler.cmd_new = qmp_marshal_object_add,
1035 },
1036
1037 SQMP
1038 object-add
1039 ----------
1040
1041 Create QOM object.
1042
1043 Arguments:
1044
1045 - "qom-type": the object's QOM type, i.e. the class name (json-string)
1046 - "id": the object's ID, must be unique (json-string)
1047 - "props": a dictionary of object property values (optional, json-dict)
1048
1049 Example:
1050
1051 -> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
1052 "props": { "filename": "/dev/hwrng" } } }
1053 <- { "return": {} }
1054
1055 EQMP
1056
1057 {
1058 .name = "object-del",
1059 .args_type = "id:s",
1060 .mhandler.cmd_new = qmp_marshal_object_del,
1061 },
1062
1063 SQMP
1064 object-del
1065 ----------
1066
1067 Remove QOM object.
1068
1069 Arguments:
1070
1071 - "id": the object's ID (json-string)
1072
1073 Example:
1074
1075 -> { "execute": "object-del", "arguments": { "id": "rng1" } }
1076 <- { "return": {} }
1077
1078
1079 EQMP
1080
1081
1082 {
1083 .name = "block_resize",
1084 .args_type = "device:s?,node-name:s?,size:o",
1085 .mhandler.cmd_new = qmp_marshal_block_resize,
1086 },
1087
1088 SQMP
1089 block_resize
1090 ------------
1091
1092 Resize a block image while a guest is running.
1093
1094 Arguments:
1095
1096 - "device": the device's ID, must be unique (json-string)
1097 - "node-name": the node name in the block driver state graph (json-string)
1098 - "size": new size
1099
1100 Example:
1101
1102 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1103 <- { "return": {} }
1104
1105 EQMP
1106
1107 {
1108 .name = "block-stream",
1109 .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
1110 .mhandler.cmd_new = qmp_marshal_block_stream,
1111 },
1112
1113 SQMP
1114 block-stream
1115 ------------
1116
1117 Copy data from a backing file into a block device.
1118
1119 Arguments:
1120
1121 - "device": The device's ID, must be unique (json-string)
1122 - "base": The file name of the backing image above which copying starts
1123 (json-string, optional)
1124 - "backing-file": The backing file string to write into the active layer. This
1125 filename is not validated.
1126
1127 If a pathname string is such that it cannot be resolved by
1128 QEMU, that means that subsequent QMP or HMP commands must use
1129 node-names for the image in question, as filename lookup
1130 methods will fail.
1131
1132 If not specified, QEMU will automatically determine the
1133 backing file string to use, or error out if there is no
1134 obvious choice. Care should be taken when specifying the
1135 string, to specify a valid filename or protocol.
1136 (json-string, optional) (Since 2.1)
1137 - "speed": the maximum speed, in bytes per second (json-int, optional)
1138 - "on-error": the action to take on an error (default 'report'). 'stop' and
1139 'enospc' can only be used if the block device supports io-status.
1140 (json-string, optional) (Since 2.1)
1141
1142 Example:
1143
1144 -> { "execute": "block-stream", "arguments": { "device": "virtio0",
1145 "base": "/tmp/master.qcow2" } }
1146 <- { "return": {} }
1147
1148 EQMP
1149
1150 {
1151 .name = "block-commit",
1152 .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
1153 .mhandler.cmd_new = qmp_marshal_block_commit,
1154 },
1155
1156 SQMP
1157 block-commit
1158 ------------
1159
1160 Live commit of data from overlay image nodes into backing nodes - i.e., writes
1161 data between 'top' and 'base' into 'base'.
1162
1163 Arguments:
1164
1165 - "device": The device's ID, must be unique (json-string)
1166 - "base": The file name of the backing image to write data into.
1167 If not specified, this is the deepest backing image
1168 (json-string, optional)
1169 - "top": The file name of the backing image within the image chain,
1170 which contains the topmost data to be committed down. If
1171 not specified, this is the active layer. (json-string, optional)
1172
1173 - backing-file: The backing file string to write into the overlay
1174 image of 'top'. If 'top' is the active layer,
1175 specifying a backing file string is an error. This
1176 filename is not validated.
1177
1178 If a pathname string is such that it cannot be
1179 resolved by QEMU, that means that subsequent QMP or
1180 HMP commands must use node-names for the image in
1181 question, as filename lookup methods will fail.
1182
1183 If not specified, QEMU will automatically determine
1184 the backing file string to use, or error out if
1185 there is no obvious choice. Care should be taken
1186 when specifying the string, to specify a valid
1187 filename or protocol.
1188 (json-string, optional) (Since 2.1)
1189
1190 If top == base, that is an error.
1191 If top == active, the job will not be completed by itself,
1192 user needs to complete the job with the block-job-complete
1193 command after getting the ready event. (Since 2.0)
1194
1195 If the base image is smaller than top, then the base image
1196 will be resized to be the same size as top. If top is
1197 smaller than the base image, the base will not be
1198 truncated. If you want the base image size to match the
1199 size of the smaller top, you can safely truncate it
1200 yourself once the commit operation successfully completes.
1201 (json-string)
1202 - "speed": the maximum speed, in bytes per second (json-int, optional)
1203
1204
1205 Example:
1206
1207 -> { "execute": "block-commit", "arguments": { "device": "virtio0",
1208 "top": "/tmp/snap1.qcow2" } }
1209 <- { "return": {} }
1210
1211 EQMP
1212
1213 {
1214 .name = "drive-backup",
1215 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1216 "bitmap:s?,on-source-error:s?,on-target-error:s?",
1217 .mhandler.cmd_new = qmp_marshal_drive_backup,
1218 },
1219
1220 SQMP
1221 drive-backup
1222 ------------
1223
1224 Start a point-in-time copy of a block device to a new destination. The
1225 status of ongoing drive-backup operations can be checked with
1226 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1227 The operation can be stopped before it has completed using the
1228 block-job-cancel command.
1229
1230 Arguments:
1231
1232 - "device": the name of the device which should be copied.
1233 (json-string)
1234 - "target": the target of the new image. If the file exists, or if it is a
1235 device, the existing file/device will be used as the new
1236 destination. If it does not exist, a new file will be created.
1237 (json-string)
1238 - "format": the format of the new destination, default is to probe if 'mode' is
1239 'existing', else the format of the source
1240 (json-string, optional)
1241 - "sync": what parts of the disk image should be copied to the destination;
1242 possibilities include "full" for all the disk, "top" for only the sectors
1243 allocated in the topmost image, "incremental" for only the dirty sectors in
1244 the bitmap, or "none" to only replicate new I/O (MirrorSyncMode).
1245 - "bitmap": dirty bitmap name for sync==incremental. Must be present if sync
1246 is "incremental", must NOT be present otherwise.
1247 - "mode": whether and how QEMU should create a new image
1248 (NewImageMode, optional, default 'absolute-paths')
1249 - "speed": the maximum speed, in bytes per second (json-int, optional)
1250 - "on-source-error": the action to take on an error on the source, default
1251 'report'. 'stop' and 'enospc' can only be used
1252 if the block device supports io-status.
1253 (BlockdevOnError, optional)
1254 - "on-target-error": the action to take on an error on the target, default
1255 'report' (no limitations, since this applies to
1256 a different block device than device).
1257 (BlockdevOnError, optional)
1258
1259 Example:
1260 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
1261 "sync": "full",
1262 "target": "backup.img" } }
1263 <- { "return": {} }
1264
1265 EQMP
1266
1267 {
1268 .name = "blockdev-backup",
1269 .args_type = "sync:s,device:B,target:B,speed:i?,"
1270 "on-source-error:s?,on-target-error:s?",
1271 .mhandler.cmd_new = qmp_marshal_blockdev_backup,
1272 },
1273
1274 SQMP
1275 blockdev-backup
1276 ---------------
1277
1278 The device version of drive-backup: this command takes an existing named device
1279 as backup target.
1280
1281 Arguments:
1282
1283 - "device": the name of the device which should be copied.
1284 (json-string)
1285 - "target": the name of the backup target device. (json-string)
1286 - "sync": what parts of the disk image should be copied to the destination;
1287 possibilities include "full" for all the disk, "top" for only the
1288 sectors allocated in the topmost image, or "none" to only replicate
1289 new I/O (MirrorSyncMode).
1290 - "speed": the maximum speed, in bytes per second (json-int, optional)
1291 - "on-source-error": the action to take on an error on the source, default
1292 'report'. 'stop' and 'enospc' can only be used
1293 if the block device supports io-status.
1294 (BlockdevOnError, optional)
1295 - "on-target-error": the action to take on an error on the target, default
1296 'report' (no limitations, since this applies to
1297 a different block device than device).
1298 (BlockdevOnError, optional)
1299
1300 Example:
1301 -> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
1302 "sync": "full",
1303 "target": "tgt-id" } }
1304 <- { "return": {} }
1305
1306 EQMP
1307
1308 {
1309 .name = "block-job-set-speed",
1310 .args_type = "device:B,speed:o",
1311 .mhandler.cmd_new = qmp_marshal_block_job_set_speed,
1312 },
1313
1314 {
1315 .name = "block-job-cancel",
1316 .args_type = "device:B,force:b?",
1317 .mhandler.cmd_new = qmp_marshal_block_job_cancel,
1318 },
1319 {
1320 .name = "block-job-pause",
1321 .args_type = "device:B",
1322 .mhandler.cmd_new = qmp_marshal_block_job_pause,
1323 },
1324 {
1325 .name = "block-job-resume",
1326 .args_type = "device:B",
1327 .mhandler.cmd_new = qmp_marshal_block_job_resume,
1328 },
1329 {
1330 .name = "block-job-complete",
1331 .args_type = "device:B",
1332 .mhandler.cmd_new = qmp_marshal_block_job_complete,
1333 },
1334 {
1335 .name = "transaction",
1336 .args_type = "actions:q,properties:q?",
1337 .mhandler.cmd_new = qmp_marshal_transaction,
1338 },
1339
1340 SQMP
1341 transaction
1342 -----------
1343
1344 Atomically operate on one or more block devices. Operations that are
1345 currently supported:
1346
1347 - drive-backup
1348 - blockdev-backup
1349 - blockdev-snapshot-sync
1350 - blockdev-snapshot-internal-sync
1351 - abort
1352 - block-dirty-bitmap-add
1353 - block-dirty-bitmap-clear
1354
1355 Refer to the qemu/qapi-schema.json file for minimum required QEMU
1356 versions for these operations. A list of dictionaries is accepted,
1357 that contains the actions to be performed. If there is any failure
1358 performing any of the operations, all operations for the group are
1359 abandoned.
1360
1361 For external snapshots, the dictionary contains the device, the file to use for
1362 the new snapshot, and the format. The default format, if not specified, is
1363 qcow2.
1364
1365 Each new snapshot defaults to being created by QEMU (wiping any
1366 contents if the file already exists), but it is also possible to reuse
1367 an externally-created file. In the latter case, you should ensure that
1368 the new image file has the same contents as the current one; QEMU cannot
1369 perform any meaningful check. Typically this is achieved by using the
1370 current image file as the backing file for the new image.
1371
1372 On failure, the original disks pre-snapshot attempt will be used.
1373
1374 For internal snapshots, the dictionary contains the device and the snapshot's
1375 name. If an internal snapshot matching name already exists, the request will
1376 be rejected. Only some image formats support it, for example, qcow2, rbd,
1377 and sheepdog.
1378
1379 On failure, qemu will try delete the newly created internal snapshot in the
1380 transaction. When an I/O error occurs during deletion, the user needs to fix
1381 it later with qemu-img or other command.
1382
1383 Arguments:
1384
1385 actions array:
1386 - "type": the operation to perform (json-string). Possible
1387 values: "drive-backup", "blockdev-backup",
1388 "blockdev-snapshot-sync",
1389 "blockdev-snapshot-internal-sync",
1390 "abort", "block-dirty-bitmap-add",
1391 "block-dirty-bitmap-clear"
1392 - "data": a dictionary. The contents depend on the value
1393 of "type". When "type" is "blockdev-snapshot-sync":
1394 - "device": device name to snapshot (json-string)
1395 - "node-name": graph node name to snapshot (json-string)
1396 - "snapshot-file": name of new image file (json-string)
1397 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1398 - "format": format of new image (json-string, optional)
1399 - "mode": whether and how QEMU should create the snapshot file
1400 (NewImageMode, optional, default "absolute-paths")
1401 When "type" is "blockdev-snapshot-internal-sync":
1402 - "device": device name to snapshot (json-string)
1403 - "name": name of the new snapshot (json-string)
1404
1405 Example:
1406
1407 -> { "execute": "transaction",
1408 "arguments": { "actions": [
1409 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
1410 "snapshot-file": "/some/place/my-image",
1411 "format": "qcow2" } },
1412 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
1413 "snapshot-file": "/some/place/my-image2",
1414 "snapshot-node-name": "node3432",
1415 "mode": "existing",
1416 "format": "qcow2" } },
1417 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
1418 "snapshot-file": "/some/place/my-image2",
1419 "mode": "existing",
1420 "format": "qcow2" } },
1421 { "type": "blockdev-snapshot-internal-sync", "data" : {
1422 "device": "ide-hd2",
1423 "name": "snapshot0" } } ] } }
1424 <- { "return": {} }
1425
1426 EQMP
1427
1428 {
1429 .name = "block-dirty-bitmap-add",
1430 .args_type = "node:B,name:s,granularity:i?",
1431 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_add,
1432 },
1433
1434 SQMP
1435
1436 block-dirty-bitmap-add
1437 ----------------------
1438 Since 2.4
1439
1440 Create a dirty bitmap with a name on the device, and start tracking the writes.
1441
1442 Arguments:
1443
1444 - "node": device/node on which to create dirty bitmap (json-string)
1445 - "name": name of the new dirty bitmap (json-string)
1446 - "granularity": granularity to track writes with (int, optional)
1447
1448 Example:
1449
1450 -> { "execute": "block-dirty-bitmap-add", "arguments": { "node": "drive0",
1451 "name": "bitmap0" } }
1452 <- { "return": {} }
1453
1454 EQMP
1455
1456 {
1457 .name = "block-dirty-bitmap-remove",
1458 .args_type = "node:B,name:s",
1459 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_remove,
1460 },
1461
1462 SQMP
1463
1464 block-dirty-bitmap-remove
1465 -------------------------
1466 Since 2.4
1467
1468 Stop write tracking and remove the dirty bitmap that was created with
1469 block-dirty-bitmap-add.
1470
1471 Arguments:
1472
1473 - "node": device/node on which to remove dirty bitmap (json-string)
1474 - "name": name of the dirty bitmap to remove (json-string)
1475
1476 Example:
1477
1478 -> { "execute": "block-dirty-bitmap-remove", "arguments": { "node": "drive0",
1479 "name": "bitmap0" } }
1480 <- { "return": {} }
1481
1482 EQMP
1483
1484 {
1485 .name = "block-dirty-bitmap-clear",
1486 .args_type = "node:B,name:s",
1487 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_clear,
1488 },
1489
1490 SQMP
1491
1492 block-dirty-bitmap-clear
1493 ------------------------
1494 Since 2.4
1495
1496 Reset the dirty bitmap associated with a node so that an incremental backup
1497 from this point in time forward will only backup clusters modified after this
1498 clear operation.
1499
1500 Arguments:
1501
1502 - "node": device/node on which to remove dirty bitmap (json-string)
1503 - "name": name of the dirty bitmap to remove (json-string)
1504
1505 Example:
1506
1507 -> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0",
1508 "name": "bitmap0" } }
1509 <- { "return": {} }
1510
1511 EQMP
1512
1513 {
1514 .name = "blockdev-snapshot-sync",
1515 .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
1516 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot_sync,
1517 },
1518
1519 SQMP
1520 blockdev-snapshot-sync
1521 ----------------------
1522
1523 Synchronous snapshot of a block device. snapshot-file specifies the
1524 target of the new image. If the file exists, or if it is a device, the
1525 snapshot will be created in the existing file/device. If does not
1526 exist, a new file will be created. format specifies the format of the
1527 snapshot image, default is qcow2.
1528
1529 Arguments:
1530
1531 - "device": device name to snapshot (json-string)
1532 - "node-name": graph node name to snapshot (json-string)
1533 - "snapshot-file": name of new image file (json-string)
1534 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1535 - "mode": whether and how QEMU should create the snapshot file
1536 (NewImageMode, optional, default "absolute-paths")
1537 - "format": format of new image (json-string, optional)
1538
1539 Example:
1540
1541 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1542 "snapshot-file":
1543 "/some/place/my-image",
1544 "format": "qcow2" } }
1545 <- { "return": {} }
1546
1547 EQMP
1548
1549 {
1550 .name = "blockdev-snapshot",
1551 .args_type = "node:s,overlay:s",
1552 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot,
1553 },
1554
1555 SQMP
1556 blockdev-snapshot
1557 -----------------
1558 Since 2.5
1559
1560 Create a snapshot, by installing 'node' as the backing image of
1561 'overlay'. Additionally, if 'node' is associated with a block
1562 device, the block device changes to using 'overlay' as its new active
1563 image.
1564
1565 Arguments:
1566
1567 - "node": device that will have a snapshot created (json-string)
1568 - "overlay": device that will have 'node' as its backing image (json-string)
1569
1570 Example:
1571
1572 -> { "execute": "blockdev-add",
1573 "arguments": { "options": { "driver": "qcow2",
1574 "node-name": "node1534",
1575 "file": { "driver": "file",
1576 "filename": "hd1.qcow2" },
1577 "backing": "" } } }
1578
1579 <- { "return": {} }
1580
1581 -> { "execute": "blockdev-snapshot", "arguments": { "node": "ide-hd0",
1582 "overlay": "node1534" } }
1583 <- { "return": {} }
1584
1585 EQMP
1586
1587 {
1588 .name = "blockdev-snapshot-internal-sync",
1589 .args_type = "device:B,name:s",
1590 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot_internal_sync,
1591 },
1592
1593 SQMP
1594 blockdev-snapshot-internal-sync
1595 -------------------------------
1596
1597 Synchronously take an internal snapshot of a block device when the format of
1598 image used supports it. If the name is an empty string, or a snapshot with
1599 name already exists, the operation will fail.
1600
1601 Arguments:
1602
1603 - "device": device name to snapshot (json-string)
1604 - "name": name of the new snapshot (json-string)
1605
1606 Example:
1607
1608 -> { "execute": "blockdev-snapshot-internal-sync",
1609 "arguments": { "device": "ide-hd0",
1610 "name": "snapshot0" }
1611 }
1612 <- { "return": {} }
1613
1614 EQMP
1615
1616 {
1617 .name = "blockdev-snapshot-delete-internal-sync",
1618 .args_type = "device:B,id:s?,name:s?",
1619 .mhandler.cmd_new =
1620 qmp_marshal_blockdev_snapshot_delete_internal_sync,
1621 },
1622
1623 SQMP
1624 blockdev-snapshot-delete-internal-sync
1625 --------------------------------------
1626
1627 Synchronously delete an internal snapshot of a block device when the format of
1628 image used supports it. The snapshot is identified by name or id or both. One
1629 of name or id is required. If the snapshot is not found, the operation will
1630 fail.
1631
1632 Arguments:
1633
1634 - "device": device name (json-string)
1635 - "id": ID of the snapshot (json-string, optional)
1636 - "name": name of the snapshot (json-string, optional)
1637
1638 Example:
1639
1640 -> { "execute": "blockdev-snapshot-delete-internal-sync",
1641 "arguments": { "device": "ide-hd0",
1642 "name": "snapshot0" }
1643 }
1644 <- { "return": {
1645 "id": "1",
1646 "name": "snapshot0",
1647 "vm-state-size": 0,
1648 "date-sec": 1000012,
1649 "date-nsec": 10,
1650 "vm-clock-sec": 100,
1651 "vm-clock-nsec": 20
1652 }
1653 }
1654
1655 EQMP
1656
1657 {
1658 .name = "drive-mirror",
1659 .args_type = "job-id:s?,sync:s,device:B,target:s,speed:i?,mode:s?,"
1660 "format:s?,node-name:s?,replaces:s?,"
1661 "on-source-error:s?,on-target-error:s?,"
1662 "unmap:b?,"
1663 "granularity:i?,buf-size:i?",
1664 .mhandler.cmd_new = qmp_marshal_drive_mirror,
1665 },
1666
1667 SQMP
1668 drive-mirror
1669 ------------
1670
1671 Start mirroring a block device's writes to a new destination. target
1672 specifies the target of the new image. If the file exists, or if it is
1673 a device, it will be used as the new destination for writes. If it does not
1674 exist, a new file will be created. format specifies the format of the
1675 mirror image, default is to probe if mode='existing', else the format
1676 of the source.
1677
1678 Arguments:
1679
1680 - "job-id": Identifier for the newly-created block job. If omitted,
1681 the device name will be used. (json-string, optional)
1682 - "device": device name to operate on (json-string)
1683 - "target": name of new image file (json-string)
1684 - "format": format of new image (json-string, optional)
1685 - "node-name": the name of the new block driver state in the node graph
1686 (json-string, optional)
1687 - "replaces": the block driver node name to replace when finished
1688 (json-string, optional)
1689 - "mode": how an image file should be created into the target
1690 file/device (NewImageMode, optional, default 'absolute-paths')
1691 - "speed": maximum speed of the streaming job, in bytes per second
1692 (json-int)
1693 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1694 - "buf-size": maximum amount of data in flight from source to target, in bytes
1695 (json-int, default 10M)
1696 - "sync": what parts of the disk image should be copied to the destination;
1697 possibilities include "full" for all the disk, "top" for only the sectors
1698 allocated in the topmost image, or "none" to only replicate new I/O
1699 (MirrorSyncMode).
1700 - "on-source-error": the action to take on an error on the source
1701 (BlockdevOnError, default 'report')
1702 - "on-target-error": the action to take on an error on the target
1703 (BlockdevOnError, default 'report')
1704 - "unmap": whether the target sectors should be discarded where source has only
1705 zeroes. (json-bool, optional, default true)
1706
1707 The default value of the granularity is the image cluster size clamped
1708 between 4096 and 65536, if the image format defines one. If the format
1709 does not define a cluster size, the default value of the granularity
1710 is 65536.
1711
1712
1713 Example:
1714
1715 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1716 "target": "/some/place/my-image",
1717 "sync": "full",
1718 "format": "qcow2" } }
1719 <- { "return": {} }
1720
1721 EQMP
1722
1723 {
1724 .name = "blockdev-mirror",
1725 .args_type = "job-id:s?,sync:s,device:B,target:B,replaces:s?,speed:i?,"
1726 "on-source-error:s?,on-target-error:s?,"
1727 "granularity:i?,buf-size:i?",
1728 .mhandler.cmd_new = qmp_marshal_blockdev_mirror,
1729 },
1730
1731 SQMP
1732 blockdev-mirror
1733 ------------
1734
1735 Start mirroring a block device's writes to another block device. target
1736 specifies the target of mirror operation.
1737
1738 Arguments:
1739
1740 - "job-id": Identifier for the newly-created block job. If omitted,
1741 the device name will be used. (json-string, optional)
1742 - "device": device name to operate on (json-string)
1743 - "target": device name to mirror to (json-string)
1744 - "replaces": the block driver node name to replace when finished
1745 (json-string, optional)
1746 - "speed": maximum speed of the streaming job, in bytes per second
1747 (json-int)
1748 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1749 - "buf_size": maximum amount of data in flight from source to target, in bytes
1750 (json-int, default 10M)
1751 - "sync": what parts of the disk image should be copied to the destination;
1752 possibilities include "full" for all the disk, "top" for only the sectors
1753 allocated in the topmost image, or "none" to only replicate new I/O
1754 (MirrorSyncMode).
1755 - "on-source-error": the action to take on an error on the source
1756 (BlockdevOnError, default 'report')
1757 - "on-target-error": the action to take on an error on the target
1758 (BlockdevOnError, default 'report')
1759
1760 The default value of the granularity is the image cluster size clamped
1761 between 4096 and 65536, if the image format defines one. If the format
1762 does not define a cluster size, the default value of the granularity
1763 is 65536.
1764
1765 Example:
1766
1767 -> { "execute": "blockdev-mirror", "arguments": { "device": "ide-hd0",
1768 "target": "target0",
1769 "sync": "full" } }
1770 <- { "return": {} }
1771
1772 EQMP
1773 {
1774 .name = "change-backing-file",
1775 .args_type = "device:s,image-node-name:s,backing-file:s",
1776 .mhandler.cmd_new = qmp_marshal_change_backing_file,
1777 },
1778
1779 SQMP
1780 change-backing-file
1781 -------------------
1782 Since: 2.1
1783
1784 Change the backing file in the image file metadata. This does not cause
1785 QEMU to reopen the image file to reparse the backing filename (it may,
1786 however, perform a reopen to change permissions from r/o -> r/w -> r/o,
1787 if needed). The new backing file string is written into the image file
1788 metadata, and the QEMU internal strings are updated.
1789
1790 Arguments:
1791
1792 - "image-node-name": The name of the block driver state node of the
1793 image to modify. The "device" is argument is used to
1794 verify "image-node-name" is in the chain described by
1795 "device".
1796 (json-string, optional)
1797
1798 - "device": The name of the device.
1799 (json-string)
1800
1801 - "backing-file": The string to write as the backing file. This string is
1802 not validated, so care should be taken when specifying
1803 the string or the image chain may not be able to be
1804 reopened again.
1805 (json-string)
1806
1807 Returns: Nothing on success
1808 If "device" does not exist or cannot be determined, DeviceNotFound
1809
1810 EQMP
1811
1812 {
1813 .name = "balloon",
1814 .args_type = "value:M",
1815 .mhandler.cmd_new = qmp_marshal_balloon,
1816 },
1817
1818 SQMP
1819 balloon
1820 -------
1821
1822 Request VM to change its memory allocation (in bytes).
1823
1824 Arguments:
1825
1826 - "value": New memory allocation (json-int)
1827
1828 Example:
1829
1830 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1831 <- { "return": {} }
1832
1833 EQMP
1834
1835 {
1836 .name = "set_link",
1837 .args_type = "name:s,up:b",
1838 .mhandler.cmd_new = qmp_marshal_set_link,
1839 },
1840
1841 SQMP
1842 set_link
1843 --------
1844
1845 Change the link status of a network adapter.
1846
1847 Arguments:
1848
1849 - "name": network device name (json-string)
1850 - "up": status is up (json-bool)
1851
1852 Example:
1853
1854 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1855 <- { "return": {} }
1856
1857 EQMP
1858
1859 {
1860 .name = "getfd",
1861 .args_type = "fdname:s",
1862 .params = "getfd name",
1863 .help = "receive a file descriptor via SCM rights and assign it a name",
1864 .mhandler.cmd_new = qmp_marshal_getfd,
1865 },
1866
1867 SQMP
1868 getfd
1869 -----
1870
1871 Receive a file descriptor via SCM rights and assign it a name.
1872
1873 Arguments:
1874
1875 - "fdname": file descriptor name (json-string)
1876
1877 Example:
1878
1879 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1880 <- { "return": {} }
1881
1882 Notes:
1883
1884 (1) If the name specified by the "fdname" argument already exists,
1885 the file descriptor assigned to it will be closed and replaced
1886 by the received file descriptor.
1887 (2) The 'closefd' command can be used to explicitly close the file
1888 descriptor when it is no longer needed.
1889
1890 EQMP
1891
1892 {
1893 .name = "closefd",
1894 .args_type = "fdname:s",
1895 .params = "closefd name",
1896 .help = "close a file descriptor previously passed via SCM rights",
1897 .mhandler.cmd_new = qmp_marshal_closefd,
1898 },
1899
1900 SQMP
1901 closefd
1902 -------
1903
1904 Close a file descriptor previously passed via SCM rights.
1905
1906 Arguments:
1907
1908 - "fdname": file descriptor name (json-string)
1909
1910 Example:
1911
1912 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1913 <- { "return": {} }
1914
1915 EQMP
1916
1917 {
1918 .name = "add-fd",
1919 .args_type = "fdset-id:i?,opaque:s?",
1920 .params = "add-fd fdset-id opaque",
1921 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1922 .mhandler.cmd_new = qmp_marshal_add_fd,
1923 },
1924
1925 SQMP
1926 add-fd
1927 -------
1928
1929 Add a file descriptor, that was passed via SCM rights, to an fd set.
1930
1931 Arguments:
1932
1933 - "fdset-id": The ID of the fd set to add the file descriptor to.
1934 (json-int, optional)
1935 - "opaque": A free-form string that can be used to describe the fd.
1936 (json-string, optional)
1937
1938 Return a json-object with the following information:
1939
1940 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1941 - "fd": The file descriptor that was received via SCM rights and added to the
1942 fd set. (json-int)
1943
1944 Example:
1945
1946 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1947 <- { "return": { "fdset-id": 1, "fd": 3 } }
1948
1949 Notes:
1950
1951 (1) The list of fd sets is shared by all monitor connections.
1952 (2) If "fdset-id" is not specified, a new fd set will be created.
1953
1954 EQMP
1955
1956 {
1957 .name = "remove-fd",
1958 .args_type = "fdset-id:i,fd:i?",
1959 .params = "remove-fd fdset-id fd",
1960 .help = "Remove a file descriptor from an fd set",
1961 .mhandler.cmd_new = qmp_marshal_remove_fd,
1962 },
1963
1964 SQMP
1965 remove-fd
1966 ---------
1967
1968 Remove a file descriptor from an fd set.
1969
1970 Arguments:
1971
1972 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1973 (json-int)
1974 - "fd": The file descriptor that is to be removed. (json-int, optional)
1975
1976 Example:
1977
1978 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1979 <- { "return": {} }
1980
1981 Notes:
1982
1983 (1) The list of fd sets is shared by all monitor connections.
1984 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1985 removed.
1986
1987 EQMP
1988
1989 {
1990 .name = "query-fdsets",
1991 .args_type = "",
1992 .help = "Return information describing all fd sets",
1993 .mhandler.cmd_new = qmp_marshal_query_fdsets,
1994 },
1995
1996 SQMP
1997 query-fdsets
1998 -------------
1999
2000 Return information describing all fd sets.
2001
2002 Arguments: None
2003
2004 Example:
2005
2006 -> { "execute": "query-fdsets" }
2007 <- { "return": [
2008 {
2009 "fds": [
2010 {
2011 "fd": 30,
2012 "opaque": "rdonly:/path/to/file"
2013 },
2014 {
2015 "fd": 24,
2016 "opaque": "rdwr:/path/to/file"
2017 }
2018 ],
2019 "fdset-id": 1
2020 },
2021 {
2022 "fds": [
2023 {
2024 "fd": 28
2025 },
2026 {
2027 "fd": 29
2028 }
2029 ],
2030 "fdset-id": 0
2031 }
2032 ]
2033 }
2034
2035 Note: The list of fd sets is shared by all monitor connections.
2036
2037 EQMP
2038
2039 {
2040 .name = "block_passwd",
2041 .args_type = "device:s?,node-name:s?,password:s",
2042 .mhandler.cmd_new = qmp_marshal_block_passwd,
2043 },
2044
2045 SQMP
2046 block_passwd
2047 ------------
2048
2049 Set the password of encrypted block devices.
2050
2051 Arguments:
2052
2053 - "device": device name (json-string)
2054 - "node-name": name in the block driver state graph (json-string)
2055 - "password": password (json-string)
2056
2057 Example:
2058
2059 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
2060 "password": "12345" } }
2061 <- { "return": {} }
2062
2063 EQMP
2064
2065 {
2066 .name = "block_set_io_throttle",
2067 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,bps_max_length:l?,bps_rd_max_length:l?,bps_wr_max_length:l?,iops_max_length:l?,iops_rd_max_length:l?,iops_wr_max_length:l?,iops_size:l?,group:s?",
2068 .mhandler.cmd_new = qmp_marshal_block_set_io_throttle,
2069 },
2070
2071 SQMP
2072 block_set_io_throttle
2073 ------------
2074
2075 Change I/O throttle limits for a block drive.
2076
2077 Arguments:
2078
2079 - "device": device name (json-string)
2080 - "bps": total throughput limit in bytes per second (json-int)
2081 - "bps_rd": read throughput limit in bytes per second (json-int)
2082 - "bps_wr": write throughput limit in bytes per second (json-int)
2083 - "iops": total I/O operations per second (json-int)
2084 - "iops_rd": read I/O operations per second (json-int)
2085 - "iops_wr": write I/O operations per second (json-int)
2086 - "bps_max": total throughput limit during bursts, in bytes (json-int, optional)
2087 - "bps_rd_max": read throughput limit during bursts, in bytes (json-int, optional)
2088 - "bps_wr_max": write throughput limit during bursts, in bytes (json-int, optional)
2089 - "iops_max": total I/O operations per second during bursts (json-int, optional)
2090 - "iops_rd_max": read I/O operations per second during bursts (json-int, optional)
2091 - "iops_wr_max": write I/O operations per second during bursts (json-int, optional)
2092 - "bps_max_length": maximum length of the @bps_max burst period, in seconds (json-int, optional)
2093 - "bps_rd_max_length": maximum length of the @bps_rd_max burst period, in seconds (json-int, optional)
2094 - "bps_wr_max_length": maximum length of the @bps_wr_max burst period, in seconds (json-int, optional)
2095 - "iops_max_length": maximum length of the @iops_max burst period, in seconds (json-int, optional)
2096 - "iops_rd_max_length": maximum length of the @iops_rd_max burst period, in seconds (json-int, optional)
2097 - "iops_wr_max_length": maximum length of the @iops_wr_max burst period, in seconds (json-int, optional)
2098 - "iops_size": I/O size in bytes when limiting (json-int, optional)
2099 - "group": throttle group name (json-string, optional)
2100
2101 Example:
2102
2103 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
2104 "bps": 1000000,
2105 "bps_rd": 0,
2106 "bps_wr": 0,
2107 "iops": 0,
2108 "iops_rd": 0,
2109 "iops_wr": 0,
2110 "bps_max": 8000000,
2111 "bps_rd_max": 0,
2112 "bps_wr_max": 0,
2113 "iops_max": 0,
2114 "iops_rd_max": 0,
2115 "iops_wr_max": 0,
2116 "bps_max_length": 60,
2117 "iops_size": 0 } }
2118 <- { "return": {} }
2119
2120 EQMP
2121
2122 {
2123 .name = "set_password",
2124 .args_type = "protocol:s,password:s,connected:s?",
2125 .mhandler.cmd_new = qmp_marshal_set_password,
2126 },
2127
2128 SQMP
2129 set_password
2130 ------------
2131
2132 Set the password for vnc/spice protocols.
2133
2134 Arguments:
2135
2136 - "protocol": protocol name (json-string)
2137 - "password": password (json-string)
2138 - "connected": [ keep | disconnect | fail ] (json-string, optional)
2139
2140 Example:
2141
2142 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
2143 "password": "secret" } }
2144 <- { "return": {} }
2145
2146 EQMP
2147
2148 {
2149 .name = "expire_password",
2150 .args_type = "protocol:s,time:s",
2151 .mhandler.cmd_new = qmp_marshal_expire_password,
2152 },
2153
2154 SQMP
2155 expire_password
2156 ---------------
2157
2158 Set the password expire time for vnc/spice protocols.
2159
2160 Arguments:
2161
2162 - "protocol": protocol name (json-string)
2163 - "time": [ now | never | +secs | secs ] (json-string)
2164
2165 Example:
2166
2167 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2168 "time": "+60" } }
2169 <- { "return": {} }
2170
2171 EQMP
2172
2173 {
2174 .name = "add_client",
2175 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
2176 .mhandler.cmd_new = qmp_marshal_add_client,
2177 },
2178
2179 SQMP
2180 add_client
2181 ----------
2182
2183 Add a graphics client
2184
2185 Arguments:
2186
2187 - "protocol": protocol name (json-string)
2188 - "fdname": file descriptor name (json-string)
2189 - "skipauth": whether to skip authentication (json-bool, optional)
2190 - "tls": whether to perform TLS (json-bool, optional)
2191
2192 Example:
2193
2194 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
2195 "fdname": "myclient" } }
2196 <- { "return": {} }
2197
2198 EQMP
2199 {
2200 .name = "qmp_capabilities",
2201 .args_type = "",
2202 .params = "",
2203 .help = "enable QMP capabilities",
2204 .mhandler.cmd_new = qmp_capabilities,
2205 },
2206
2207 SQMP
2208 qmp_capabilities
2209 ----------------
2210
2211 Enable QMP capabilities.
2212
2213 Arguments: None.
2214
2215 Example:
2216
2217 -> { "execute": "qmp_capabilities" }
2218 <- { "return": {} }
2219
2220 Note: This command must be issued before issuing any other command.
2221
2222 EQMP
2223
2224 {
2225 .name = "human-monitor-command",
2226 .args_type = "command-line:s,cpu-index:i?",
2227 .mhandler.cmd_new = qmp_marshal_human_monitor_command,
2228 },
2229
2230 SQMP
2231 human-monitor-command
2232 ---------------------
2233
2234 Execute a Human Monitor command.
2235
2236 Arguments:
2237
2238 - command-line: the command name and its arguments, just like the
2239 Human Monitor's shell (json-string)
2240 - cpu-index: select the CPU number to be used by commands which access CPU
2241 data, like 'info registers'. The Monitor selects CPU 0 if this
2242 argument is not provided (json-int, optional)
2243
2244 Example:
2245
2246 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
2247 <- { "return": "kvm support: enabled\r\n" }
2248
2249 Notes:
2250
2251 (1) The Human Monitor is NOT an stable interface, this means that command
2252 names, arguments and responses can change or be removed at ANY time.
2253 Applications that rely on long term stability guarantees should NOT
2254 use this command
2255
2256 (2) Limitations:
2257
2258 o This command is stateless, this means that commands that depend
2259 on state information (such as getfd) might not work
2260
2261 o Commands that prompt the user for data (eg. 'cont' when the block
2262 device is encrypted) don't currently work
2263
2264 3. Query Commands
2265 =================
2266
2267 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
2268 HXCOMM this! We will possibly move query commands definitions inside those
2269 HXCOMM sections, just like regular commands.
2270
2271 EQMP
2272
2273 SQMP
2274 query-version
2275 -------------
2276
2277 Show QEMU version.
2278
2279 Return a json-object with the following information:
2280
2281 - "qemu": A json-object containing three integer values:
2282 - "major": QEMU's major version (json-int)
2283 - "minor": QEMU's minor version (json-int)
2284 - "micro": QEMU's micro version (json-int)
2285 - "package": package's version (json-string)
2286
2287 Example:
2288
2289 -> { "execute": "query-version" }
2290 <- {
2291 "return":{
2292 "qemu":{
2293 "major":0,
2294 "minor":11,
2295 "micro":5
2296 },
2297 "package":""
2298 }
2299 }
2300
2301 EQMP
2302
2303 {
2304 .name = "query-version",
2305 .args_type = "",
2306 .mhandler.cmd_new = qmp_marshal_query_version,
2307 },
2308
2309 SQMP
2310 query-commands
2311 --------------
2312
2313 List QMP available commands.
2314
2315 Each command is represented by a json-object, the returned value is a json-array
2316 of all commands.
2317
2318 Each json-object contain:
2319
2320 - "name": command's name (json-string)
2321
2322 Example:
2323
2324 -> { "execute": "query-commands" }
2325 <- {
2326 "return":[
2327 {
2328 "name":"query-balloon"
2329 },
2330 {
2331 "name":"system_powerdown"
2332 }
2333 ]
2334 }
2335
2336 Note: This example has been shortened as the real response is too long.
2337
2338 EQMP
2339
2340 {
2341 .name = "query-commands",
2342 .args_type = "",
2343 .mhandler.cmd_new = qmp_marshal_query_commands,
2344 },
2345
2346 SQMP
2347 query-events
2348 --------------
2349
2350 List QMP available events.
2351
2352 Each event is represented by a json-object, the returned value is a json-array
2353 of all events.
2354
2355 Each json-object contains:
2356
2357 - "name": event's name (json-string)
2358
2359 Example:
2360
2361 -> { "execute": "query-events" }
2362 <- {
2363 "return":[
2364 {
2365 "name":"SHUTDOWN"
2366 },
2367 {
2368 "name":"RESET"
2369 }
2370 ]
2371 }
2372
2373 Note: This example has been shortened as the real response is too long.
2374
2375 EQMP
2376
2377 {
2378 .name = "query-events",
2379 .args_type = "",
2380 .mhandler.cmd_new = qmp_marshal_query_events,
2381 },
2382
2383 SQMP
2384 query-qmp-schema
2385 ----------------
2386
2387 Return the QMP wire schema. The returned value is a json-array of
2388 named schema entities. Entities are commands, events and various
2389 types. See docs/qapi-code-gen.txt for information on their structure
2390 and intended use.
2391
2392 EQMP
2393
2394 {
2395 .name = "query-qmp-schema",
2396 .args_type = "",
2397 .mhandler.cmd_new = qmp_query_qmp_schema,
2398 },
2399
2400 SQMP
2401 query-chardev
2402 -------------
2403
2404 Each device is represented by a json-object. The returned value is a json-array
2405 of all devices.
2406
2407 Each json-object contain the following:
2408
2409 - "label": device's label (json-string)
2410 - "filename": device's file (json-string)
2411 - "frontend-open": open/closed state of the frontend device attached to this
2412 backend (json-bool)
2413
2414 Example:
2415
2416 -> { "execute": "query-chardev" }
2417 <- {
2418 "return": [
2419 {
2420 "label": "charchannel0",
2421 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2422 "frontend-open": false
2423 },
2424 {
2425 "label": "charmonitor",
2426 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2427 "frontend-open": true
2428 },
2429 {
2430 "label": "charserial0",
2431 "filename": "pty:/dev/pts/2",
2432 "frontend-open": true
2433 }
2434 ]
2435 }
2436
2437 EQMP
2438
2439 {
2440 .name = "query-chardev",
2441 .args_type = "",
2442 .mhandler.cmd_new = qmp_marshal_query_chardev,
2443 },
2444
2445 SQMP
2446 query-chardev-backends
2447 -------------
2448
2449 List available character device backends.
2450
2451 Each backend is represented by a json-object, the returned value is a json-array
2452 of all backends.
2453
2454 Each json-object contains:
2455
2456 - "name": backend name (json-string)
2457
2458 Example:
2459
2460 -> { "execute": "query-chardev-backends" }
2461 <- {
2462 "return":[
2463 {
2464 "name":"udp"
2465 },
2466 {
2467 "name":"tcp"
2468 },
2469 {
2470 "name":"unix"
2471 },
2472 {
2473 "name":"spiceport"
2474 }
2475 ]
2476 }
2477
2478 EQMP
2479
2480 {
2481 .name = "query-chardev-backends",
2482 .args_type = "",
2483 .mhandler.cmd_new = qmp_marshal_query_chardev_backends,
2484 },
2485
2486 SQMP
2487 query-block
2488 -----------
2489
2490 Show the block devices.
2491
2492 Each block device information is stored in a json-object and the returned value
2493 is a json-array of all devices.
2494
2495 Each json-object contain the following:
2496
2497 - "device": device name (json-string)
2498 - "type": device type (json-string)
2499 - deprecated, retained for backward compatibility
2500 - Possible values: "unknown"
2501 - "removable": true if the device is removable, false otherwise (json-bool)
2502 - "locked": true if the device is locked, false otherwise (json-bool)
2503 - "tray_open": only present if removable, true if the device has a tray,
2504 and it is open (json-bool)
2505 - "inserted": only present if the device is inserted, it is a json-object
2506 containing the following:
2507 - "file": device file name (json-string)
2508 - "ro": true if read-only, false otherwise (json-bool)
2509 - "drv": driver format name (json-string)
2510 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
2511 "file", "file", "ftp", "ftps", "host_cdrom",
2512 "host_device", "http", "https",
2513 "nbd", "parallels", "qcow", "qcow2", "raw",
2514 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2515 - "backing_file": backing file name (json-string, optional)
2516 - "backing_file_depth": number of files in the backing file chain (json-int)
2517 - "encrypted": true if encrypted, false otherwise (json-bool)
2518 - "bps": limit total bytes per second (json-int)
2519 - "bps_rd": limit read bytes per second (json-int)
2520 - "bps_wr": limit write bytes per second (json-int)
2521 - "iops": limit total I/O operations per second (json-int)
2522 - "iops_rd": limit read operations per second (json-int)
2523 - "iops_wr": limit write operations per second (json-int)
2524 - "bps_max": total max in bytes (json-int)
2525 - "bps_rd_max": read max in bytes (json-int)
2526 - "bps_wr_max": write max in bytes (json-int)
2527 - "iops_max": total I/O operations max (json-int)
2528 - "iops_rd_max": read I/O operations max (json-int)
2529 - "iops_wr_max": write I/O operations max (json-int)
2530 - "iops_size": I/O size when limiting by iops (json-int)
2531 - "detect_zeroes": detect and optimize zero writing (json-string)
2532 - Possible values: "off", "on", "unmap"
2533 - "write_threshold": write offset threshold in bytes, a event will be
2534 emitted if crossed. Zero if disabled (json-int)
2535 - "image": the detail of the image, it is a json-object containing
2536 the following:
2537 - "filename": image file name (json-string)
2538 - "format": image format (json-string)
2539 - "virtual-size": image capacity in bytes (json-int)
2540 - "dirty-flag": true if image is not cleanly closed, not present
2541 means clean (json-bool, optional)
2542 - "actual-size": actual size on disk in bytes of the image, not
2543 present when image does not support thin
2544 provision (json-int, optional)
2545 - "cluster-size": size of a cluster in bytes, not present if image
2546 format does not support it (json-int, optional)
2547 - "encrypted": true if the image is encrypted, not present means
2548 false or the image format does not support
2549 encryption (json-bool, optional)
2550 - "backing_file": backing file name, not present means no backing
2551 file is used or the image format does not
2552 support backing file chain
2553 (json-string, optional)
2554 - "full-backing-filename": full path of the backing file, not
2555 present if it equals backing_file or no
2556 backing file is used
2557 (json-string, optional)
2558 - "backing-filename-format": the format of the backing file, not
2559 present means unknown or no backing
2560 file (json-string, optional)
2561 - "snapshots": the internal snapshot info, it is an optional list
2562 of json-object containing the following:
2563 - "id": unique snapshot id (json-string)
2564 - "name": snapshot name (json-string)
2565 - "vm-state-size": size of the VM state in bytes (json-int)
2566 - "date-sec": UTC date of the snapshot in seconds (json-int)
2567 - "date-nsec": fractional part in nanoseconds to be used with
2568 date-sec (json-int)
2569 - "vm-clock-sec": VM clock relative to boot in seconds
2570 (json-int)
2571 - "vm-clock-nsec": fractional part in nanoseconds to be used
2572 with vm-clock-sec (json-int)
2573 - "backing-image": the detail of the backing image, it is an
2574 optional json-object only present when a
2575 backing image present for this image
2576
2577 - "io-status": I/O operation status, only present if the device supports it
2578 and the VM is configured to stop on errors. It's always reset
2579 to "ok" when the "cont" command is issued (json_string, optional)
2580 - Possible values: "ok", "failed", "nospace"
2581
2582 Example:
2583
2584 -> { "execute": "query-block" }
2585 <- {
2586 "return":[
2587 {
2588 "io-status": "ok",
2589 "device":"ide0-hd0",
2590 "locked":false,
2591 "removable":false,
2592 "inserted":{
2593 "ro":false,
2594 "drv":"qcow2",
2595 "encrypted":false,
2596 "file":"disks/test.qcow2",
2597 "backing_file_depth":1,
2598 "bps":1000000,
2599 "bps_rd":0,
2600 "bps_wr":0,
2601 "iops":1000000,
2602 "iops_rd":0,
2603 "iops_wr":0,
2604 "bps_max": 8000000,
2605 "bps_rd_max": 0,
2606 "bps_wr_max": 0,
2607 "iops_max": 0,
2608 "iops_rd_max": 0,
2609 "iops_wr_max": 0,
2610 "iops_size": 0,
2611 "detect_zeroes": "on",
2612 "write_threshold": 0,
2613 "image":{
2614 "filename":"disks/test.qcow2",
2615 "format":"qcow2",
2616 "virtual-size":2048000,
2617 "backing_file":"base.qcow2",
2618 "full-backing-filename":"disks/base.qcow2",
2619 "backing-filename-format":"qcow2",
2620 "snapshots":[
2621 {
2622 "id": "1",
2623 "name": "snapshot1",
2624 "vm-state-size": 0,
2625 "date-sec": 10000200,
2626 "date-nsec": 12,
2627 "vm-clock-sec": 206,
2628 "vm-clock-nsec": 30
2629 }
2630 ],
2631 "backing-image":{
2632 "filename":"disks/base.qcow2",
2633 "format":"qcow2",
2634 "virtual-size":2048000
2635 }
2636 }
2637 },
2638 "type":"unknown"
2639 },
2640 {
2641 "io-status": "ok",
2642 "device":"ide1-cd0",
2643 "locked":false,
2644 "removable":true,
2645 "type":"unknown"
2646 },
2647 {
2648 "device":"floppy0",
2649 "locked":false,
2650 "removable":true,
2651 "type":"unknown"
2652 },
2653 {
2654 "device":"sd0",
2655 "locked":false,
2656 "removable":true,
2657 "type":"unknown"
2658 }
2659 ]
2660 }
2661
2662 EQMP
2663
2664 {
2665 .name = "query-block",
2666 .args_type = "",
2667 .mhandler.cmd_new = qmp_marshal_query_block,
2668 },
2669
2670 SQMP
2671 query-blockstats
2672 ----------------
2673
2674 Show block device statistics.
2675
2676 Each device statistic information is stored in a json-object and the returned
2677 value is a json-array of all devices.
2678
2679 Each json-object contain the following:
2680
2681 - "device": device name (json-string)
2682 - "stats": A json-object with the statistics information, it contains:
2683 - "rd_bytes": bytes read (json-int)
2684 - "wr_bytes": bytes written (json-int)
2685 - "rd_operations": read operations (json-int)
2686 - "wr_operations": write operations (json-int)
2687 - "flush_operations": cache flush operations (json-int)
2688 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
2689 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
2690 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
2691 - "wr_highest_offset": The offset after the greatest byte written to the
2692 BlockDriverState since it has been opened (json-int)
2693 - "rd_merged": number of read requests that have been merged into
2694 another request (json-int)
2695 - "wr_merged": number of write requests that have been merged into
2696 another request (json-int)
2697 - "idle_time_ns": time since the last I/O operation, in
2698 nanoseconds. If the field is absent it means
2699 that there haven't been any operations yet
2700 (json-int, optional)
2701 - "failed_rd_operations": number of failed read operations
2702 (json-int)
2703 - "failed_wr_operations": number of failed write operations
2704 (json-int)
2705 - "failed_flush_operations": number of failed flush operations
2706 (json-int)
2707 - "invalid_rd_operations": number of invalid read operations
2708 (json-int)
2709 - "invalid_wr_operations": number of invalid write operations
2710 (json-int)
2711 - "invalid_flush_operations": number of invalid flush operations
2712 (json-int)
2713 - "account_invalid": whether invalid operations are included in
2714 the last access statistics (json-bool)
2715 - "account_failed": whether failed operations are included in the
2716 latency and last access statistics
2717 (json-bool)
2718 - "timed_stats": A json-array containing statistics collected in
2719 specific intervals, with the following members:
2720 - "interval_length": interval used for calculating the
2721 statistics, in seconds (json-int)
2722 - "min_rd_latency_ns": minimum latency of read operations in
2723 the defined interval, in nanoseconds
2724 (json-int)
2725 - "min_wr_latency_ns": minimum latency of write operations in
2726 the defined interval, in nanoseconds
2727 (json-int)
2728 - "min_flush_latency_ns": minimum latency of flush operations
2729 in the defined interval, in
2730 nanoseconds (json-int)
2731 - "max_rd_latency_ns": maximum latency of read operations in
2732 the defined interval, in nanoseconds
2733 (json-int)
2734 - "max_wr_latency_ns": maximum latency of write operations in
2735 the defined interval, in nanoseconds
2736 (json-int)
2737 - "max_flush_latency_ns": maximum latency of flush operations
2738 in the defined interval, in
2739 nanoseconds (json-int)
2740 - "avg_rd_latency_ns": average latency of read operations in
2741 the defined interval, in nanoseconds
2742 (json-int)
2743 - "avg_wr_latency_ns": average latency of write operations in
2744 the defined interval, in nanoseconds
2745 (json-int)
2746 - "avg_flush_latency_ns": average latency of flush operations
2747 in the defined interval, in
2748 nanoseconds (json-int)
2749 - "avg_rd_queue_depth": average number of pending read
2750 operations in the defined interval
2751 (json-number)
2752 - "avg_wr_queue_depth": average number of pending write
2753 operations in the defined interval
2754 (json-number).
2755 - "parent": Contains recursively the statistics of the underlying
2756 protocol (e.g. the host file for a qcow2 image). If there is
2757 no underlying protocol, this field is omitted
2758 (json-object, optional)
2759
2760 Example:
2761
2762 -> { "execute": "query-blockstats" }
2763 <- {
2764 "return":[
2765 {
2766 "device":"ide0-hd0",
2767 "parent":{
2768 "stats":{
2769 "wr_highest_offset":3686448128,
2770 "wr_bytes":9786368,
2771 "wr_operations":751,
2772 "rd_bytes":122567168,
2773 "rd_operations":36772
2774 "wr_total_times_ns":313253456
2775 "rd_total_times_ns":3465673657
2776 "flush_total_times_ns":49653
2777 "flush_operations":61,
2778 "rd_merged":0,
2779 "wr_merged":0,
2780 "idle_time_ns":2953431879,
2781 "account_invalid":true,
2782 "account_failed":false
2783 }
2784 },
2785 "stats":{
2786 "wr_highest_offset":2821110784,
2787 "wr_bytes":9786368,
2788 "wr_operations":692,
2789 "rd_bytes":122739200,
2790 "rd_operations":36604
2791 "flush_operations":51,
2792 "wr_total_times_ns":313253456
2793 "rd_total_times_ns":3465673657
2794 "flush_total_times_ns":49653,
2795 "rd_merged":0,
2796 "wr_merged":0,
2797 "idle_time_ns":2953431879,
2798 "account_invalid":true,
2799 "account_failed":false
2800 }
2801 },
2802 {
2803 "device":"ide1-cd0",
2804 "stats":{
2805 "wr_highest_offset":0,
2806 "wr_bytes":0,
2807 "wr_operations":0,
2808 "rd_bytes":0,
2809 "rd_operations":0
2810 "flush_operations":0,
2811 "wr_total_times_ns":0
2812 "rd_total_times_ns":0
2813 "flush_total_times_ns":0,
2814 "rd_merged":0,
2815 "wr_merged":0,
2816 "account_invalid":false,
2817 "account_failed":false
2818 }
2819 },
2820 {
2821 "device":"floppy0",
2822 "stats":{
2823 "wr_highest_offset":0,
2824 "wr_bytes":0,
2825 "wr_operations":0,
2826 "rd_bytes":0,
2827 "rd_operations":0
2828 "flush_operations":0,
2829 "wr_total_times_ns":0
2830 "rd_total_times_ns":0
2831 "flush_total_times_ns":0,
2832 "rd_merged":0,
2833 "wr_merged":0,
2834 "account_invalid":false,
2835 "account_failed":false
2836 }
2837 },
2838 {
2839 "device":"sd0",
2840 "stats":{
2841 "wr_highest_offset":0,
2842 "wr_bytes":0,
2843 "wr_operations":0,
2844 "rd_bytes":0,
2845 "rd_operations":0
2846 "flush_operations":0,
2847 "wr_total_times_ns":0
2848 "rd_total_times_ns":0
2849 "flush_total_times_ns":0,
2850 "rd_merged":0,
2851 "wr_merged":0,
2852 "account_invalid":false,
2853 "account_failed":false
2854 }
2855 }
2856 ]
2857 }
2858
2859 EQMP
2860
2861 {
2862 .name = "query-blockstats",
2863 .args_type = "query-nodes:b?",
2864 .mhandler.cmd_new = qmp_marshal_query_blockstats,
2865 },
2866
2867 SQMP
2868 query-cpus
2869 ----------
2870
2871 Show CPU information.
2872
2873 Return a json-array. Each CPU is represented by a json-object, which contains:
2874
2875 - "CPU": CPU index (json-int)
2876 - "current": true if this is the current CPU, false otherwise (json-bool)
2877 - "halted": true if the cpu is halted, false otherwise (json-bool)
2878 - "qom_path": path to the CPU object in the QOM tree (json-str)
2879 - "arch": architecture of the cpu, which determines what additional
2880 keys will be present (json-str)
2881 - Current program counter. The key's name depends on the architecture:
2882 "pc": i386/x86_64 (json-int)
2883 "nip": PPC (json-int)
2884 "pc" and "npc": sparc (json-int)
2885 "PC": mips (json-int)
2886 - "thread_id": ID of the underlying host thread (json-int)
2887
2888 Example:
2889
2890 -> { "execute": "query-cpus" }
2891 <- {
2892 "return":[
2893 {
2894 "CPU":0,
2895 "current":true,
2896 "halted":false,
2897 "qom_path":"/machine/unattached/device[0]",
2898 "arch":"x86",
2899 "pc":3227107138,
2900 "thread_id":3134
2901 },
2902 {
2903 "CPU":1,
2904 "current":false,
2905 "halted":true,
2906 "qom_path":"/machine/unattached/device[2]",
2907 "arch":"x86",
2908 "pc":7108165,
2909 "thread_id":3135
2910 }
2911 ]
2912 }
2913
2914 EQMP
2915
2916 {
2917 .name = "query-cpus",
2918 .args_type = "",
2919 .mhandler.cmd_new = qmp_marshal_query_cpus,
2920 },
2921
2922 SQMP
2923 query-iothreads
2924 ---------------
2925
2926 Returns a list of information about each iothread.
2927
2928 Note this list excludes the QEMU main loop thread, which is not declared
2929 using the -object iothread command-line option. It is always the main thread
2930 of the process.
2931
2932 Return a json-array. Each iothread is represented by a json-object, which contains:
2933
2934 - "id": name of iothread (json-str)
2935 - "thread-id": ID of the underlying host thread (json-int)
2936
2937 Example:
2938
2939 -> { "execute": "query-iothreads" }
2940 <- {
2941 "return":[
2942 {
2943 "id":"iothread0",
2944 "thread-id":3134
2945 },
2946 {
2947 "id":"iothread1",
2948 "thread-id":3135
2949 }
2950 ]
2951 }
2952
2953 EQMP
2954
2955 {
2956 .name = "query-iothreads",
2957 .args_type = "",
2958 .mhandler.cmd_new = qmp_marshal_query_iothreads,
2959 },
2960
2961 SQMP
2962 query-pci
2963 ---------
2964
2965 PCI buses and devices information.
2966
2967 The returned value is a json-array of all buses. Each bus is represented by
2968 a json-object, which has a key with a json-array of all PCI devices attached
2969 to it. Each device is represented by a json-object.
2970
2971 The bus json-object contains the following:
2972
2973 - "bus": bus number (json-int)
2974 - "devices": a json-array of json-objects, each json-object represents a
2975 PCI device
2976
2977 The PCI device json-object contains the following:
2978
2979 - "bus": identical to the parent's bus number (json-int)
2980 - "slot": slot number (json-int)
2981 - "function": function number (json-int)
2982 - "class_info": a json-object containing:
2983 - "desc": device class description (json-string, optional)
2984 - "class": device class number (json-int)
2985 - "id": a json-object containing:
2986 - "device": device ID (json-int)
2987 - "vendor": vendor ID (json-int)
2988 - "irq": device's IRQ if assigned (json-int, optional)
2989 - "qdev_id": qdev id string (json-string)
2990 - "pci_bridge": It's a json-object, only present if this device is a
2991 PCI bridge, contains:
2992 - "bus": bus number (json-int)
2993 - "secondary": secondary bus number (json-int)
2994 - "subordinate": subordinate bus number (json-int)
2995 - "io_range": I/O memory range information, a json-object with the
2996 following members:
2997 - "base": base address, in bytes (json-int)
2998 - "limit": limit address, in bytes (json-int)
2999 - "memory_range": memory range information, a json-object with the
3000 following members:
3001 - "base": base address, in bytes (json-int)
3002 - "limit": limit address, in bytes (json-int)
3003 - "prefetchable_range": Prefetchable memory range information, a
3004 json-object with the following members:
3005 - "base": base address, in bytes (json-int)
3006 - "limit": limit address, in bytes (json-int)
3007 - "devices": a json-array of PCI devices if there's any attached, each
3008 each element is represented by a json-object, which contains
3009 the same members of the 'PCI device json-object' described
3010 above (optional)
3011 - "regions": a json-array of json-objects, each json-object represents a
3012 memory region of this device
3013
3014 The memory range json-object contains the following:
3015
3016 - "base": base memory address (json-int)
3017 - "limit": limit value (json-int)
3018
3019 The region json-object can be an I/O region or a memory region, an I/O region
3020 json-object contains the following:
3021
3022 - "type": "io" (json-string, fixed)
3023 - "bar": BAR number (json-int)
3024 - "address": memory address (json-int)
3025 - "size": memory size (json-int)
3026
3027 A memory region json-object contains the following:
3028
3029 - "type": "memory" (json-string, fixed)
3030 - "bar": BAR number (json-int)
3031 - "address": memory address (json-int)
3032 - "size": memory size (json-int)
3033 - "mem_type_64": true or false (json-bool)
3034 - "prefetch": true or false (json-bool)
3035
3036 Example:
3037
3038 -> { "execute": "query-pci" }
3039 <- {
3040 "return":[
3041 {
3042 "bus":0,
3043 "devices":[
3044 {
3045 "bus":0,
3046 "qdev_id":"",
3047 "slot":0,
3048 "class_info":{
3049 "class":1536,
3050 "desc":"Host bridge"
3051 },
3052 "id":{
3053 "device":32902,
3054 "vendor":4663
3055 },
3056 "function":0,
3057 "regions":[
3058
3059 ]
3060 },
3061 {
3062 "bus":0,
3063 "qdev_id":"",
3064 "slot":1,
3065 "class_info":{
3066 "class":1537,
3067 "desc":"ISA bridge"
3068 },
3069 "id":{
3070 "device":32902,
3071 "vendor":28672
3072 },
3073 "function":0,
3074 "regions":[
3075
3076 ]
3077 },
3078 {
3079 "bus":0,
3080 "qdev_id":"",
3081 "slot":1,
3082 "class_info":{
3083 "class":257,
3084 "desc":"IDE controller"
3085 },
3086 "id":{
3087 "device":32902,
3088 "vendor":28688
3089 },
3090 "function":1,
3091 "regions":[
3092 {
3093 "bar":4,
3094 "size":16,
3095 "address":49152,
3096 "type":"io"
3097 }
3098 ]
3099 },
3100 {
3101 "bus":0,
3102 "qdev_id":"",
3103 "slot":2,
3104 "class_info":{
3105 "class":768,
3106 "desc":"VGA controller"
3107 },
3108 "id":{
3109 "device":4115,
3110 "vendor":184
3111 },
3112 "function":0,
3113 "regions":[
3114 {
3115 "prefetch":true,
3116 "mem_type_64":false,
3117 "bar":0,
3118 "size":33554432,
3119 "address":4026531840,
3120 "type":"memory"
3121 },
3122 {
3123 "prefetch":false,
3124 "mem_type_64":false,
3125 "bar":1,
3126 "size":4096,
3127 "address":4060086272,
3128 "type":"memory"
3129 },
3130 {
3131 "prefetch":false,
3132 "mem_type_64":false,
3133 "bar":6,
3134 "size":65536,
3135 "address":-1,
3136 "type":"memory"
3137 }
3138 ]
3139 },
3140 {
3141 "bus":0,
3142 "qdev_id":"",
3143 "irq":11,
3144 "slot":4,
3145 "class_info":{
3146 "class":1280,
3147 "desc":"RAM controller"
3148 },
3149 "id":{
3150 "device":6900,
3151 "vendor":4098
3152 },
3153 "function":0,
3154 "regions":[
3155 {
3156 "bar":0,
3157 "size":32,
3158 "address":49280,
3159 "type":"io"
3160 }
3161 ]
3162 }
3163 ]
3164 }
3165 ]
3166 }
3167
3168 Note: This example has been shortened as the real response is too long.
3169
3170 EQMP
3171
3172 {
3173 .name = "query-pci",
3174 .args_type = "",
3175 .mhandler.cmd_new = qmp_marshal_query_pci,
3176 },
3177
3178 SQMP
3179 query-kvm
3180 ---------
3181
3182 Show KVM information.
3183
3184 Return a json-object with the following information:
3185
3186 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
3187 - "present": true if QEMU has KVM support, false otherwise (json-bool)
3188
3189 Example:
3190
3191 -> { "execute": "query-kvm" }
3192 <- { "return": { "enabled": true, "present": true } }
3193
3194 EQMP
3195
3196 {
3197 .name = "query-kvm",
3198 .args_type = "",
3199 .mhandler.cmd_new = qmp_marshal_query_kvm,
3200 },
3201
3202 SQMP
3203 query-status
3204 ------------
3205
3206 Return a json-object with the following information:
3207
3208 - "running": true if the VM is running, or false if it is paused (json-bool)
3209 - "singlestep": true if the VM is in single step mode,
3210 false otherwise (json-bool)
3211 - "status": one of the following values (json-string)
3212 "debug" - QEMU is running on a debugger
3213 "inmigrate" - guest is paused waiting for an incoming migration
3214 "internal-error" - An internal error that prevents further guest
3215 execution has occurred
3216 "io-error" - the last IOP has failed and the device is configured
3217 to pause on I/O errors
3218 "paused" - guest has been paused via the 'stop' command
3219 "postmigrate" - guest is paused following a successful 'migrate'
3220 "prelaunch" - QEMU was started with -S and guest has not started
3221 "finish-migrate" - guest is paused to finish the migration process
3222 "restore-vm" - guest is paused to restore VM state
3223 "running" - guest is actively running
3224 "save-vm" - guest is paused to save the VM state
3225 "shutdown" - guest is shut down (and -no-shutdown is in use)
3226 "watchdog" - the watchdog action is configured to pause and
3227 has been triggered
3228
3229 Example:
3230
3231 -> { "execute": "query-status" }
3232 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
3233
3234 EQMP
3235
3236 {
3237 .name = "query-status",
3238 .args_type = "",
3239 .mhandler.cmd_new = qmp_marshal_query_status,
3240 },
3241
3242 SQMP
3243 query-mice
3244 ----------
3245
3246 Show VM mice information.
3247
3248 Each mouse is represented by a json-object, the returned value is a json-array
3249 of all mice.
3250
3251 The mouse json-object contains the following:
3252
3253 - "name": mouse's name (json-string)
3254 - "index": mouse's index (json-int)
3255 - "current": true if this mouse is receiving events, false otherwise (json-bool)
3256 - "absolute": true if the mouse generates absolute input events (json-bool)
3257
3258 Example:
3259
3260 -> { "execute": "query-mice" }
3261 <- {
3262 "return":[
3263 {
3264 "name":"QEMU Microsoft Mouse",
3265 "index":0,
3266 "current":false,
3267 "absolute":false
3268 },
3269 {
3270 "name":"QEMU PS/2 Mouse",
3271 "index":1,
3272 "current":true,
3273 "absolute":true
3274 }
3275 ]
3276 }
3277
3278 EQMP
3279
3280 {
3281 .name = "query-mice",
3282 .args_type = "",
3283 .mhandler.cmd_new = qmp_marshal_query_mice,
3284 },
3285
3286 SQMP
3287 query-vnc
3288 ---------
3289
3290 Show VNC server information.
3291
3292 Return a json-object with server information. Connected clients are returned
3293 as a json-array of json-objects.
3294
3295 The main json-object contains the following:
3296
3297 - "enabled": true or false (json-bool)
3298 - "host": server's IP address (json-string)
3299 - "family": address family (json-string)
3300 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3301 - "service": server's port number (json-string)
3302 - "auth": authentication method (json-string)
3303 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
3304 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
3305 "vencrypt+plain", "vencrypt+tls+none",
3306 "vencrypt+tls+plain", "vencrypt+tls+sasl",
3307 "vencrypt+tls+vnc", "vencrypt+x509+none",
3308 "vencrypt+x509+plain", "vencrypt+x509+sasl",
3309 "vencrypt+x509+vnc", "vnc"
3310 - "clients": a json-array of all connected clients
3311
3312 Clients are described by a json-object, each one contain the following:
3313
3314 - "host": client's IP address (json-string)
3315 - "family": address family (json-string)
3316 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3317 - "service": client's port number (json-string)
3318 - "x509_dname": TLS dname (json-string, optional)
3319 - "sasl_username": SASL username (json-string, optional)
3320
3321 Example:
3322
3323 -> { "execute": "query-vnc" }
3324 <- {
3325 "return":{
3326 "enabled":true,
3327 "host":"0.0.0.0",
3328 "service":"50402",
3329 "auth":"vnc",
3330 "family":"ipv4",
3331 "clients":[
3332 {
3333 "host":"127.0.0.1",
3334 "service":"50401",
3335 "family":"ipv4"
3336 }
3337 ]
3338 }
3339 }
3340
3341 EQMP
3342
3343 {
3344 .name = "query-vnc",
3345 .args_type = "",
3346 .mhandler.cmd_new = qmp_marshal_query_vnc,
3347 },
3348 {
3349 .name = "query-vnc-servers",
3350 .args_type = "",
3351 .mhandler.cmd_new = qmp_marshal_query_vnc_servers,
3352 },
3353
3354 SQMP
3355 query-spice
3356 -----------
3357
3358 Show SPICE server information.
3359
3360 Return a json-object with server information. Connected clients are returned
3361 as a json-array of json-objects.
3362
3363 The main json-object contains the following:
3364
3365 - "enabled": true or false (json-bool)
3366 - "host": server's IP address (json-string)
3367 - "port": server's port number (json-int, optional)
3368 - "tls-port": server's port number (json-int, optional)
3369 - "auth": authentication method (json-string)
3370 - Possible values: "none", "spice"
3371 - "channels": a json-array of all active channels clients
3372
3373 Channels are described by a json-object, each one contain the following:
3374
3375 - "host": client's IP address (json-string)
3376 - "family": address family (json-string)
3377 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3378 - "port": client's port number (json-string)
3379 - "connection-id": spice connection id. All channels with the same id
3380 belong to the same spice session (json-int)
3381 - "channel-type": channel type. "1" is the main control channel, filter for
3382 this one if you want track spice sessions only (json-int)
3383 - "channel-id": channel id. Usually "0", might be different needed when
3384 multiple channels of the same type exist, such as multiple
3385 display channels in a multihead setup (json-int)
3386 - "tls": whether the channel is encrypted (json-bool)
3387
3388 Example:
3389
3390 -> { "execute": "query-spice" }
3391 <- {
3392 "return": {
3393 "enabled": true,
3394 "auth": "spice",
3395 "port": 5920,
3396 "tls-port": 5921,
3397 "host": "0.0.0.0",
3398 "channels": [
3399 {
3400 "port": "54924",
3401 "family": "ipv4",
3402 "channel-type": 1,
3403 "connection-id": 1804289383,
3404 "host": "127.0.0.1",
3405 "channel-id": 0,
3406 "tls": true
3407 },
3408 {
3409 "port": "36710",
3410 "family": "ipv4",
3411 "channel-type": 4,
3412 "connection-id": 1804289383,
3413 "host": "127.0.0.1",
3414 "channel-id": 0,
3415 "tls": false
3416 },
3417 [ ... more channels follow ... ]
3418 ]
3419 }
3420 }
3421
3422 EQMP
3423
3424 #if defined(CONFIG_SPICE)
3425 {
3426 .name = "query-spice",
3427 .args_type = "",
3428 .mhandler.cmd_new = qmp_marshal_query_spice,
3429 },
3430 #endif
3431
3432 SQMP
3433 query-name
3434 ----------
3435
3436 Show VM name.
3437
3438 Return a json-object with the following information:
3439
3440 - "name": VM's name (json-string, optional)
3441
3442 Example:
3443
3444 -> { "execute": "query-name" }
3445 <- { "return": { "name": "qemu-name" } }
3446
3447 EQMP
3448
3449 {
3450 .name = "query-name",
3451 .args_type = "",
3452 .mhandler.cmd_new = qmp_marshal_query_name,
3453 },
3454
3455 SQMP
3456 query-uuid
3457 ----------
3458
3459 Show VM UUID.
3460
3461 Return a json-object with the following information:
3462
3463 - "UUID": Universally Unique Identifier (json-string)
3464
3465 Example:
3466
3467 -> { "execute": "query-uuid" }
3468 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
3469
3470 EQMP
3471
3472 {
3473 .name = "query-uuid",
3474 .args_type = "",
3475 .mhandler.cmd_new = qmp_marshal_query_uuid,
3476 },
3477
3478 SQMP
3479 query-command-line-options
3480 --------------------------
3481
3482 Show command line option schema.
3483
3484 Return a json-array of command line option schema for all options (or for
3485 the given option), returning an error if the given option doesn't exist.
3486
3487 Each array entry contains the following:
3488
3489 - "option": option name (json-string)
3490 - "parameters": a json-array describes all parameters of the option:
3491 - "name": parameter name (json-string)
3492 - "type": parameter type (one of 'string', 'boolean', 'number',
3493 or 'size')
3494 - "help": human readable description of the parameter
3495 (json-string, optional)
3496 - "default": default value string for the parameter
3497 (json-string, optional)
3498
3499 Example:
3500
3501 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
3502 <- { "return": [
3503 {
3504 "parameters": [
3505 {
3506 "name": "romfile",
3507 "type": "string"
3508 },
3509 {
3510 "name": "bootindex",
3511 "type": "number"
3512 }
3513 ],
3514 "option": "option-rom"
3515 }
3516 ]
3517 }
3518
3519 EQMP
3520
3521 {
3522 .name = "query-command-line-options",
3523 .args_type = "option:s?",
3524 .mhandler.cmd_new = qmp_marshal_query_command_line_options,
3525 },
3526
3527 SQMP
3528 query-migrate
3529 -------------
3530
3531 Migration status.
3532
3533 Return a json-object. If migration is active there will be another json-object
3534 with RAM migration status and if block migration is active another one with
3535 block migration status.
3536
3537 The main json-object contains the following:
3538
3539 - "status": migration status (json-string)
3540 - Possible values: "setup", "active", "completed", "failed", "cancelled"
3541 - "total-time": total amount of ms since migration started. If
3542 migration has ended, it returns the total migration
3543 time (json-int)
3544 - "setup-time" amount of setup time in milliseconds _before_ the
3545 iterations begin but _after_ the QMP command is issued.
3546 This is designed to provide an accounting of any activities
3547 (such as RDMA pinning) which may be expensive, but do not
3548 actually occur during the iterative migration rounds
3549 themselves. (json-int)
3550 - "downtime": only present when migration has finished correctly
3551 total amount in ms for downtime that happened (json-int)
3552 - "expected-downtime": only present while migration is active
3553 total amount in ms for downtime that was calculated on
3554 the last bitmap round (json-int)
3555 - "ram": only present if "status" is "active", it is a json-object with the
3556 following RAM information:
3557 - "transferred": amount transferred in bytes (json-int)
3558 - "remaining": amount remaining to transfer in bytes (json-int)
3559 - "total": total amount of memory in bytes (json-int)
3560 - "duplicate": number of pages filled entirely with the same
3561 byte (json-int)
3562 These are sent over the wire much more efficiently.
3563 - "skipped": number of skipped zero pages (json-int)
3564 - "normal" : number of whole pages transferred. I.e. they
3565 were not sent as duplicate or xbzrle pages (json-int)
3566 - "normal-bytes" : number of bytes transferred in whole
3567 pages. This is just normal pages times size of one page,
3568 but this way upper levels don't need to care about page
3569 size (json-int)
3570 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
3571 - "disk": only present if "status" is "active" and it is a block migration,
3572 it is a json-object with the following disk information:
3573 - "transferred": amount transferred in bytes (json-int)
3574 - "remaining": amount remaining to transfer in bytes json-int)
3575 - "total": total disk size in bytes (json-int)
3576 - "xbzrle-cache": only present if XBZRLE is active.
3577 It is a json-object with the following XBZRLE information:
3578 - "cache-size": XBZRLE cache size in bytes
3579 - "bytes": number of bytes transferred for XBZRLE compressed pages
3580 - "pages": number of XBZRLE compressed pages
3581 - "cache-miss": number of XBRZRLE page cache misses
3582 - "cache-miss-rate": rate of XBRZRLE page cache misses
3583 - "overflow": number of times XBZRLE overflows. This means
3584 that the XBZRLE encoding was bigger than just sent the
3585 whole page, and then we sent the whole page instead (as as
3586 normal page).
3587
3588 Examples:
3589
3590 1. Before the first migration
3591
3592 -> { "execute": "query-migrate" }
3593 <- { "return": {} }
3594
3595 2. Migration is done and has succeeded
3596
3597 -> { "execute": "query-migrate" }
3598 <- { "return": {
3599 "status": "completed",
3600 "ram":{
3601 "transferred":123,
3602 "remaining":123,
3603 "total":246,
3604 "total-time":12345,
3605 "setup-time":12345,
3606 "downtime":12345,
3607 "duplicate":123,
3608 "normal":123,
3609 "normal-bytes":123456,
3610 "dirty-sync-count":15
3611 }
3612 }
3613 }
3614
3615 3. Migration is done and has failed
3616
3617 -> { "execute": "query-migrate" }
3618 <- { "return": { "status": "failed" } }
3619
3620 4. Migration is being performed and is not a block migration:
3621
3622 -> { "execute": "query-migrate" }
3623 <- {
3624 "return":{
3625 "status":"active",
3626 "ram":{
3627 "transferred":123,
3628 "remaining":123,
3629 "total":246,
3630 "total-time":12345,
3631 "setup-time":12345,
3632 "expected-downtime":12345,
3633 "duplicate":123,
3634 "normal":123,
3635 "normal-bytes":123456,
3636 "dirty-sync-count":15
3637 }
3638 }
3639 }
3640
3641 5. Migration is being performed and is a block migration:
3642
3643 -> { "execute": "query-migrate" }
3644 <- {
3645 "return":{
3646 "status":"active",
3647 "ram":{
3648 "total":1057024,
3649 "remaining":1053304,
3650 "transferred":3720,
3651 "total-time":12345,
3652 "setup-time":12345,
3653 "expected-downtime":12345,
3654 "duplicate":123,
3655 "normal":123,
3656 "normal-bytes":123456,
3657 "dirty-sync-count":15
3658 },
3659 "disk":{
3660 "total":20971520,
3661 "remaining":20880384,
3662 "transferred":91136
3663 }
3664 }
3665 }
3666
3667 6. Migration is being performed and XBZRLE is active:
3668
3669 -> { "execute": "query-migrate" }
3670 <- {
3671 "return":{
3672 "status":"active",
3673 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
3674 "ram":{
3675 "total":1057024,
3676 "remaining":1053304,
3677 "transferred":3720,
3678 "total-time":12345,
3679 "setup-time":12345,
3680 "expected-downtime":12345,
3681 "duplicate":10,
3682 "normal":3333,
3683 "normal-bytes":3412992,
3684 "dirty-sync-count":15
3685 },
3686 "xbzrle-cache":{
3687 "cache-size":67108864,
3688 "bytes":20971520,
3689 "pages":2444343,
3690 "cache-miss":2244,
3691 "cache-miss-rate":0.123,
3692 "overflow":34434
3693 }
3694 }
3695 }
3696
3697 EQMP
3698
3699 {
3700 .name = "query-migrate",
3701 .args_type = "",
3702 .mhandler.cmd_new = qmp_marshal_query_migrate,
3703 },
3704
3705 SQMP
3706 migrate-set-capabilities
3707 ------------------------
3708
3709 Enable/Disable migration capabilities
3710
3711 - "xbzrle": XBZRLE support
3712 - "rdma-pin-all": pin all pages when using RDMA during migration
3713 - "auto-converge": throttle down guest to help convergence of migration
3714 - "zero-blocks": compress zero blocks during block migration
3715 - "compress": use multiple compression threads to accelerate live migration
3716 - "events": generate events for each migration state change
3717 - "postcopy-ram": postcopy mode for live migration
3718
3719 Arguments:
3720
3721 Example:
3722
3723 -> { "execute": "migrate-set-capabilities" , "arguments":
3724 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
3725
3726 EQMP
3727
3728 {
3729 .name = "migrate-set-capabilities",
3730 .args_type = "capabilities:q",
3731 .params = "capability:s,state:b",
3732 .mhandler.cmd_new = qmp_marshal_migrate_set_capabilities,
3733 },
3734 SQMP
3735 query-migrate-capabilities
3736 --------------------------
3737
3738 Query current migration capabilities
3739
3740 - "capabilities": migration capabilities state
3741 - "xbzrle" : XBZRLE state (json-bool)
3742 - "rdma-pin-all" : RDMA Pin Page state (json-bool)
3743 - "auto-converge" : Auto Converge state (json-bool)
3744 - "zero-blocks" : Zero Blocks state (json-bool)
3745 - "compress": Multiple compression threads state (json-bool)
3746 - "events": Migration state change event state (json-bool)
3747 - "postcopy-ram": postcopy ram state (json-bool)
3748
3749 Arguments:
3750
3751 Example:
3752
3753 -> { "execute": "query-migrate-capabilities" }
3754 <- {"return": [
3755 {"state": false, "capability": "xbzrle"},
3756 {"state": false, "capability": "rdma-pin-all"},
3757 {"state": false, "capability": "auto-converge"},
3758 {"state": false, "capability": "zero-blocks"},
3759 {"state": false, "capability": "compress"},
3760 {"state": true, "capability": "events"},
3761 {"state": false, "capability": "postcopy-ram"}
3762 ]}
3763
3764 EQMP
3765
3766 {
3767 .name = "query-migrate-capabilities",
3768 .args_type = "",
3769 .mhandler.cmd_new = qmp_marshal_query_migrate_capabilities,
3770 },
3771
3772 SQMP
3773 migrate-set-parameters
3774 ----------------------
3775
3776 Set migration parameters
3777
3778 - "compress-level": set compression level during migration (json-int)
3779 - "compress-threads": set compression thread count for migration (json-int)
3780 - "decompress-threads": set decompression thread count for migration (json-int)
3781 - "cpu-throttle-initial": set initial percentage of time guest cpus are
3782 throttled for auto-converge (json-int)
3783 - "cpu-throttle-increment": set throttle increasing percentage for
3784 auto-converge (json-int)
3785
3786 Arguments:
3787
3788 Example:
3789
3790 -> { "execute": "migrate-set-parameters" , "arguments":
3791 { "compress-level": 1 } }
3792
3793 EQMP
3794
3795 {
3796 .name = "migrate-set-parameters",
3797 .args_type =
3798 "compress-level:i?,compress-threads:i?,decompress-threads:i?,cpu-throttle-initial:i?,cpu-throttle-increment:i?",
3799 .mhandler.cmd_new = qmp_marshal_migrate_set_parameters,
3800 },
3801 SQMP
3802 query-migrate-parameters
3803 ------------------------
3804
3805 Query current migration parameters
3806
3807 - "parameters": migration parameters value
3808 - "compress-level" : compression level value (json-int)
3809 - "compress-threads" : compression thread count value (json-int)
3810 - "decompress-threads" : decompression thread count value (json-int)
3811 - "cpu-throttle-initial" : initial percentage of time guest cpus are
3812 throttled (json-int)
3813 - "cpu-throttle-increment" : throttle increasing percentage for
3814 auto-converge (json-int)
3815
3816 Arguments:
3817
3818 Example:
3819
3820 -> { "execute": "query-migrate-parameters" }
3821 <- {
3822 "return": {
3823 "decompress-threads": 2,
3824 "cpu-throttle-increment": 10,
3825 "compress-threads": 8,
3826 "compress-level": 1,
3827 "cpu-throttle-initial": 20
3828 }
3829 }
3830
3831 EQMP
3832
3833 {
3834 .name = "query-migrate-parameters",
3835 .args_type = "",
3836 .mhandler.cmd_new = qmp_marshal_query_migrate_parameters,
3837 },
3838
3839 SQMP
3840 query-balloon
3841 -------------
3842
3843 Show balloon information.
3844
3845 Make an asynchronous request for balloon info. When the request completes a
3846 json-object will be returned containing the following data:
3847
3848 - "actual": current balloon value in bytes (json-int)
3849
3850 Example:
3851
3852 -> { "execute": "query-balloon" }
3853 <- {
3854 "return":{
3855 "actual":1073741824,
3856 }
3857 }
3858
3859 EQMP
3860
3861 {
3862 .name = "query-balloon",
3863 .args_type = "",
3864 .mhandler.cmd_new = qmp_marshal_query_balloon,
3865 },
3866
3867 {
3868 .name = "query-block-jobs",
3869 .args_type = "",
3870 .mhandler.cmd_new = qmp_marshal_query_block_jobs,
3871 },
3872
3873 {
3874 .name = "qom-list",
3875 .args_type = "path:s",
3876 .mhandler.cmd_new = qmp_marshal_qom_list,
3877 },
3878
3879 {
3880 .name = "qom-set",
3881 .args_type = "path:s,property:s,value:q",
3882 .mhandler.cmd_new = qmp_marshal_qom_set,
3883 },
3884
3885 {
3886 .name = "qom-get",
3887 .args_type = "path:s,property:s",
3888 .mhandler.cmd_new = qmp_marshal_qom_get,
3889 },
3890
3891 {
3892 .name = "nbd-server-start",
3893 .args_type = "addr:q,tls-creds:s?",
3894 .mhandler.cmd_new = qmp_marshal_nbd_server_start,
3895 },
3896 {
3897 .name = "nbd-server-add",
3898 .args_type = "device:B,writable:b?",
3899 .mhandler.cmd_new = qmp_marshal_nbd_server_add,
3900 },
3901 {
3902 .name = "nbd-server-stop",
3903 .args_type = "",
3904 .mhandler.cmd_new = qmp_marshal_nbd_server_stop,
3905 },
3906
3907 {
3908 .name = "change-vnc-password",
3909 .args_type = "password:s",
3910 .mhandler.cmd_new = qmp_marshal_change_vnc_password,
3911 },
3912 {
3913 .name = "qom-list-types",
3914 .args_type = "implements:s?,abstract:b?",
3915 .mhandler.cmd_new = qmp_marshal_qom_list_types,
3916 },
3917
3918 {
3919 .name = "device-list-properties",
3920 .args_type = "typename:s",
3921 .mhandler.cmd_new = qmp_marshal_device_list_properties,
3922 },
3923
3924 {
3925 .name = "query-machines",
3926 .args_type = "",
3927 .mhandler.cmd_new = qmp_marshal_query_machines,
3928 },
3929
3930 {
3931 .name = "query-cpu-definitions",
3932 .args_type = "",
3933 .mhandler.cmd_new = qmp_marshal_query_cpu_definitions,
3934 },
3935
3936 {
3937 .name = "query-target",
3938 .args_type = "",
3939 .mhandler.cmd_new = qmp_marshal_query_target,
3940 },
3941
3942 {
3943 .name = "query-tpm",
3944 .args_type = "",
3945 .mhandler.cmd_new = qmp_marshal_query_tpm,
3946 },
3947
3948 SQMP
3949 query-tpm
3950 ---------
3951
3952 Return information about the TPM device.
3953
3954 Arguments: None
3955
3956 Example:
3957
3958 -> { "execute": "query-tpm" }
3959 <- { "return":
3960 [
3961 { "model": "tpm-tis",
3962 "options":
3963 { "type": "passthrough",
3964 "data":
3965 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3966 "path": "/dev/tpm0"
3967 }
3968 },
3969 "id": "tpm0"
3970 }
3971 ]
3972 }
3973
3974 EQMP
3975
3976 {
3977 .name = "query-tpm-models",
3978 .args_type = "",
3979 .mhandler.cmd_new = qmp_marshal_query_tpm_models,
3980 },
3981
3982 SQMP
3983 query-tpm-models
3984 ----------------
3985
3986 Return a list of supported TPM models.
3987
3988 Arguments: None
3989
3990 Example:
3991
3992 -> { "execute": "query-tpm-models" }
3993 <- { "return": [ "tpm-tis" ] }
3994
3995 EQMP
3996
3997 {
3998 .name = "query-tpm-types",
3999 .args_type = "",
4000 .mhandler.cmd_new = qmp_marshal_query_tpm_types,
4001 },
4002
4003 SQMP
4004 query-tpm-types
4005 ---------------
4006
4007 Return a list of supported TPM types.
4008
4009 Arguments: None
4010
4011 Example:
4012
4013 -> { "execute": "query-tpm-types" }
4014 <- { "return": [ "passthrough" ] }
4015
4016 EQMP
4017
4018 {
4019 .name = "chardev-add",
4020 .args_type = "id:s,backend:q",
4021 .mhandler.cmd_new = qmp_marshal_chardev_add,
4022 },
4023
4024 SQMP
4025 chardev-add
4026 ----------------
4027
4028 Add a chardev.
4029
4030 Arguments:
4031
4032 - "id": the chardev's ID, must be unique (json-string)
4033 - "backend": chardev backend type + parameters
4034
4035 Examples:
4036
4037 -> { "execute" : "chardev-add",
4038 "arguments" : { "id" : "foo",
4039 "backend" : { "type" : "null", "data" : {} } } }
4040 <- { "return": {} }
4041
4042 -> { "execute" : "chardev-add",
4043 "arguments" : { "id" : "bar",
4044 "backend" : { "type" : "file",
4045 "data" : { "out" : "/tmp/bar.log" } } } }
4046 <- { "return": {} }
4047
4048 -> { "execute" : "chardev-add",
4049 "arguments" : { "id" : "baz",
4050 "backend" : { "type" : "pty", "data" : {} } } }
4051 <- { "return": { "pty" : "/dev/pty/42" } }
4052
4053 EQMP
4054
4055 {
4056 .name = "chardev-remove",
4057 .args_type = "id:s",
4058 .mhandler.cmd_new = qmp_marshal_chardev_remove,
4059 },
4060
4061
4062 SQMP
4063 chardev-remove
4064 --------------
4065
4066 Remove a chardev.
4067
4068 Arguments:
4069
4070 - "id": the chardev's ID, must exist and not be in use (json-string)
4071
4072 Example:
4073
4074 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
4075 <- { "return": {} }
4076
4077 EQMP
4078 {
4079 .name = "query-rx-filter",
4080 .args_type = "name:s?",
4081 .mhandler.cmd_new = qmp_marshal_query_rx_filter,
4082 },
4083
4084 SQMP
4085 query-rx-filter
4086 ---------------
4087
4088 Show rx-filter information.
4089
4090 Returns a json-array of rx-filter information for all NICs (or for the
4091 given NIC), returning an error if the given NIC doesn't exist, or
4092 given NIC doesn't support rx-filter querying, or given net client
4093 isn't a NIC.
4094
4095 The query will clear the event notification flag of each NIC, then qemu
4096 will start to emit event to QMP monitor.
4097
4098 Each array entry contains the following:
4099
4100 - "name": net client name (json-string)
4101 - "promiscuous": promiscuous mode is enabled (json-bool)
4102 - "multicast": multicast receive state (one of 'normal', 'none', 'all')
4103 - "unicast": unicast receive state (one of 'normal', 'none', 'all')
4104 - "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
4105 - "broadcast-allowed": allow to receive broadcast (json-bool)
4106 - "multicast-overflow": multicast table is overflowed (json-bool)
4107 - "unicast-overflow": unicast table is overflowed (json-bool)
4108 - "main-mac": main macaddr string (json-string)
4109 - "vlan-table": a json-array of active vlan id
4110 - "unicast-table": a json-array of unicast macaddr string
4111 - "multicast-table": a json-array of multicast macaddr string
4112
4113 Example:
4114
4115 -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
4116 <- { "return": [
4117 {
4118 "promiscuous": true,
4119 "name": "vnet0",
4120 "main-mac": "52:54:00:12:34:56",
4121 "unicast": "normal",
4122 "vlan": "normal",
4123 "vlan-table": [
4124 4,
4125 0
4126 ],
4127 "unicast-table": [
4128 ],
4129 "multicast": "normal",
4130 "multicast-overflow": false,
4131 "unicast-overflow": false,
4132 "multicast-table": [
4133 "01:00:5e:00:00:01",
4134 "33:33:00:00:00:01",
4135 "33:33:ff:12:34:56"
4136 ],
4137 "broadcast-allowed": false
4138 }
4139 ]
4140 }
4141
4142 EQMP
4143
4144 {
4145 .name = "blockdev-add",
4146 .args_type = "options:q",
4147 .mhandler.cmd_new = qmp_marshal_blockdev_add,
4148 },
4149
4150 SQMP
4151 blockdev-add
4152 ------------
4153
4154 Add a block device.
4155
4156 This command is still a work in progress. It doesn't support all
4157 block drivers among other things. Stay away from it unless you want
4158 to help with its development.
4159
4160 Arguments:
4161
4162 - "options": block driver options
4163
4164 Example (1):
4165
4166 -> { "execute": "blockdev-add",
4167 "arguments": { "options" : { "driver": "qcow2",
4168 "file": { "driver": "file",
4169 "filename": "test.qcow2" } } } }
4170 <- { "return": {} }
4171
4172 Example (2):
4173
4174 -> { "execute": "blockdev-add",
4175 "arguments": {
4176 "options": {
4177 "driver": "qcow2",
4178 "id": "my_disk",
4179 "discard": "unmap",
4180 "cache": {
4181 "direct": true,
4182 "writeback": true
4183 },
4184 "file": {
4185 "driver": "file",
4186 "filename": "/tmp/test.qcow2"
4187 },
4188 "backing": {
4189 "driver": "raw",
4190 "file": {
4191 "driver": "file",
4192 "filename": "/dev/fdset/4"
4193 }
4194 }
4195 }
4196 }
4197 }
4198
4199 <- { "return": {} }
4200
4201 EQMP
4202
4203 {
4204 .name = "x-blockdev-del",
4205 .args_type = "id:s?,node-name:s?",
4206 .mhandler.cmd_new = qmp_marshal_x_blockdev_del,
4207 },
4208
4209 SQMP
4210 x-blockdev-del
4211 ------------
4212 Since 2.5
4213
4214 Deletes a block device thas has been added using blockdev-add.
4215 The selected device can be either a block backend or a graph node.
4216
4217 In the former case the backend will be destroyed, along with its
4218 inserted medium if there's any. The command will fail if the backend
4219 or its medium are in use.
4220
4221 In the latter case the node will be destroyed. The command will fail
4222 if the node is attached to a block backend or is otherwise being
4223 used.
4224
4225 One of "id" or "node-name" must be specified, but not both.
4226
4227 This command is still a work in progress and is considered
4228 experimental. Stay away from it unless you want to help with its
4229 development.
4230
4231 Arguments:
4232
4233 - "id": Name of the block backend device to delete (json-string, optional)
4234 - "node-name": Name of the graph node to delete (json-string, optional)
4235
4236 Example:
4237
4238 -> { "execute": "blockdev-add",
4239 "arguments": {
4240 "options": {
4241 "driver": "qcow2",
4242 "id": "drive0",
4243 "file": {
4244 "driver": "file",
4245 "filename": "test.qcow2"
4246 }
4247 }
4248 }
4249 }
4250
4251 <- { "return": {} }
4252
4253 -> { "execute": "x-blockdev-del",
4254 "arguments": { "id": "drive0" }
4255 }
4256 <- { "return": {} }
4257
4258 EQMP
4259
4260 {
4261 .name = "blockdev-open-tray",
4262 .args_type = "device:s,force:b?",
4263 .mhandler.cmd_new = qmp_marshal_blockdev_open_tray,
4264 },
4265
4266 SQMP
4267 blockdev-open-tray
4268 ------------------
4269
4270 Opens a block device's tray. If there is a block driver state tree inserted as a
4271 medium, it will become inaccessible to the guest (but it will remain associated
4272 to the block device, so closing the tray will make it accessible again).
4273
4274 If the tray was already open before, this will be a no-op.
4275
4276 Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in
4277 which no such event will be generated, these include:
4278 - if the guest has locked the tray, @force is false and the guest does not
4279 respond to the eject request
4280 - if the BlockBackend denoted by @device does not have a guest device attached
4281 to it
4282 - if the guest device does not have an actual tray and is empty, for instance
4283 for floppy disk drives
4284
4285 Arguments:
4286
4287 - "device": block device name (json-string)
4288 - "force": if false (the default), an eject request will be sent to the guest if
4289 it has locked the tray (and the tray will not be opened immediately);
4290 if true, the tray will be opened regardless of whether it is locked
4291 (json-bool, optional)
4292
4293 Example:
4294
4295 -> { "execute": "blockdev-open-tray",
4296 "arguments": { "device": "ide1-cd0" } }
4297
4298 <- { "timestamp": { "seconds": 1418751016,
4299 "microseconds": 716996 },
4300 "event": "DEVICE_TRAY_MOVED",
4301 "data": { "device": "ide1-cd0",
4302 "tray-open": true } }
4303
4304 <- { "return": {} }
4305
4306 EQMP
4307
4308 {
4309 .name = "blockdev-close-tray",
4310 .args_type = "device:s",
4311 .mhandler.cmd_new = qmp_marshal_blockdev_close_tray,
4312 },
4313
4314 SQMP
4315 blockdev-close-tray
4316 -------------------
4317
4318 Closes a block device's tray. If there is a block driver state tree associated
4319 with the block device (which is currently ejected), that tree will be loaded as
4320 the medium.
4321
4322 If the tray was already closed before, this will be a no-op.
4323
4324 Arguments:
4325
4326 - "device": block device name (json-string)
4327
4328 Example:
4329
4330 -> { "execute": "blockdev-close-tray",
4331 "arguments": { "device": "ide1-cd0" } }
4332
4333 <- { "timestamp": { "seconds": 1418751345,
4334 "microseconds": 272147 },
4335 "event": "DEVICE_TRAY_MOVED",
4336 "data": { "device": "ide1-cd0",
4337 "tray-open": false } }
4338
4339 <- { "return": {} }
4340
4341 EQMP
4342
4343 {
4344 .name = "x-blockdev-remove-medium",
4345 .args_type = "device:s",
4346 .mhandler.cmd_new = qmp_marshal_x_blockdev_remove_medium,
4347 },
4348
4349 SQMP
4350 x-blockdev-remove-medium
4351 ------------------------
4352
4353 Removes a medium (a block driver state tree) from a block device. That block
4354 device's tray must currently be open (unless there is no attached guest device).
4355
4356 If the tray is open and there is no medium inserted, this will be a no-op.
4357
4358 This command is still a work in progress and is considered experimental.
4359 Stay away from it unless you want to help with its development.
4360
4361 Arguments:
4362
4363 - "device": block device name (json-string)
4364
4365 Example:
4366
4367 -> { "execute": "x-blockdev-remove-medium",
4368 "arguments": { "device": "ide1-cd0" } }
4369
4370 <- { "error": { "class": "GenericError",
4371 "desc": "Tray of device 'ide1-cd0' is not open" } }
4372
4373 -> { "execute": "blockdev-open-tray",
4374 "arguments": { "device": "ide1-cd0" } }
4375
4376 <- { "timestamp": { "seconds": 1418751627,
4377 "microseconds": 549958 },
4378 "event": "DEVICE_TRAY_MOVED",
4379 "data": { "device": "ide1-cd0",
4380 "tray-open": true } }
4381
4382 <- { "return": {} }
4383
4384 -> { "execute": "x-blockdev-remove-medium",
4385 "arguments": { "device": "ide1-cd0" } }
4386
4387 <- { "return": {} }
4388
4389 EQMP
4390
4391 {
4392 .name = "x-blockdev-insert-medium",
4393 .args_type = "device:s,node-name:s",
4394 .mhandler.cmd_new = qmp_marshal_x_blockdev_insert_medium,
4395 },
4396
4397 SQMP
4398 x-blockdev-insert-medium
4399 ------------------------
4400
4401 Inserts a medium (a block driver state tree) into a block device. That block
4402 device's tray must currently be open (unless there is no attached guest device)
4403 and there must be no medium inserted already.
4404
4405 This command is still a work in progress and is considered experimental.
4406 Stay away from it unless you want to help with its development.
4407
4408 Arguments:
4409
4410 - "device": block device name (json-string)
4411 - "node-name": root node of the BDS tree to insert into the block device
4412
4413 Example:
4414
4415 -> { "execute": "blockdev-add",
4416 "arguments": { "options": { "node-name": "node0",
4417 "driver": "raw",
4418 "file": { "driver": "file",
4419 "filename": "fedora.iso" } } } }
4420
4421 <- { "return": {} }
4422
4423 -> { "execute": "x-blockdev-insert-medium",
4424 "arguments": { "device": "ide1-cd0",
4425 "node-name": "node0" } }
4426
4427 <- { "return": {} }
4428
4429 EQMP
4430
4431 {
4432 .name = "x-blockdev-change",
4433 .args_type = "parent:B,child:B?,node:B?",
4434 .mhandler.cmd_new = qmp_marshal_x_blockdev_change,
4435 },
4436
4437 SQMP
4438 x-blockdev-change
4439 -----------------
4440
4441 Dynamically reconfigure the block driver state graph. It can be used
4442 to add, remove, insert or replace a graph node. Currently only the
4443 Quorum driver implements this feature to add or remove its child. This
4444 is useful to fix a broken quorum child.
4445
4446 If @node is specified, it will be inserted under @parent. @child
4447 may not be specified in this case. If both @parent and @child are
4448 specified but @node is not, @child will be detached from @parent.
4449
4450 Arguments:
4451 - "parent": the id or name of the parent node (json-string)
4452 - "child": the name of a child under the given parent node (json-string, optional)
4453 - "node": the name of the node that will be added (json-string, optional)
4454
4455 Note: this command is experimental, and not a stable API. It doesn't
4456 support all kinds of operations, all kinds of children, nor all block
4457 drivers.
4458
4459 Warning: The data in a new quorum child MUST be consistent with that of
4460 the rest of the array.
4461
4462 Example:
4463
4464 Add a new node to a quorum
4465 -> { "execute": "blockdev-add",
4466 "arguments": { "options": { "driver": "raw",
4467 "node-name": "new_node",
4468 "file": { "driver": "file",
4469 "filename": "test.raw" } } } }
4470 <- { "return": {} }
4471 -> { "execute": "x-blockdev-change",
4472 "arguments": { "parent": "disk1",
4473 "node": "new_node" } }
4474 <- { "return": {} }
4475
4476 Delete a quorum's node
4477 -> { "execute": "x-blockdev-change",
4478 "arguments": { "parent": "disk1",
4479 "child": "children.1" } }
4480 <- { "return": {} }
4481
4482 EQMP
4483
4484 {
4485 .name = "query-named-block-nodes",
4486 .args_type = "",
4487 .mhandler.cmd_new = qmp_marshal_query_named_block_nodes,
4488 },
4489
4490 SQMP
4491 @query-named-block-nodes
4492 ------------------------
4493
4494 Return a list of BlockDeviceInfo for all the named block driver nodes
4495
4496 Example:
4497
4498 -> { "execute": "query-named-block-nodes" }
4499 <- { "return": [ { "ro":false,
4500 "drv":"qcow2",
4501 "encrypted":false,
4502 "file":"disks/test.qcow2",
4503 "node-name": "my-node",
4504 "backing_file_depth":1,
4505 "bps":1000000,
4506 "bps_rd":0,
4507 "bps_wr":0,
4508 "iops":1000000,
4509 "iops_rd":0,
4510 "iops_wr":0,
4511 "bps_max": 8000000,
4512 "bps_rd_max": 0,
4513 "bps_wr_max": 0,
4514 "iops_max": 0,
4515 "iops_rd_max": 0,
4516 "iops_wr_max": 0,
4517 "iops_size": 0,
4518 "write_threshold": 0,
4519 "image":{
4520 "filename":"disks/test.qcow2",
4521 "format":"qcow2",
4522 "virtual-size":2048000,
4523 "backing_file":"base.qcow2",
4524 "full-backing-filename":"disks/base.qcow2",
4525 "backing-filename-format":"qcow2",
4526 "snapshots":[
4527 {
4528 "id": "1",
4529 "name": "snapshot1",
4530 "vm-state-size": 0,
4531 "date-sec": 10000200,
4532 "date-nsec": 12,
4533 "vm-clock-sec": 206,
4534 "vm-clock-nsec": 30
4535 }
4536 ],
4537 "backing-image":{
4538 "filename":"disks/base.qcow2",
4539 "format":"qcow2",
4540 "virtual-size":2048000
4541 }
4542 } } ] }
4543
4544 EQMP
4545
4546 {
4547 .name = "blockdev-change-medium",
4548 .args_type = "device:B,filename:F,format:s?,read-only-mode:s?",
4549 .mhandler.cmd_new = qmp_marshal_blockdev_change_medium,
4550 },
4551
4552 SQMP
4553 blockdev-change-medium
4554 ----------------------
4555
4556 Changes the medium inserted into a block device by ejecting the current medium
4557 and loading a new image file which is inserted as the new medium.
4558
4559 Arguments:
4560
4561 - "device": device name (json-string)
4562 - "filename": filename of the new image (json-string)
4563 - "format": format of the new image (json-string, optional)
4564 - "read-only-mode": new read-only mode (json-string, optional)
4565 - Possible values: "retain" (default), "read-only", "read-write"
4566
4567 Examples:
4568
4569 1. Change a removable medium
4570
4571 -> { "execute": "blockdev-change-medium",
4572 "arguments": { "device": "ide1-cd0",
4573 "filename": "/srv/images/Fedora-12-x86_64-DVD.iso",
4574 "format": "raw" } }
4575 <- { "return": {} }
4576
4577 2. Load a read-only medium into a writable drive
4578
4579 -> { "execute": "blockdev-change-medium",
4580 "arguments": { "device": "isa-fd0",
4581 "filename": "/srv/images/ro.img",
4582 "format": "raw",
4583 "read-only-mode": "retain" } }
4584
4585 <- { "error":
4586 { "class": "GenericError",
4587 "desc": "Could not open '/srv/images/ro.img': Permission denied" } }
4588
4589 -> { "execute": "blockdev-change-medium",
4590 "arguments": { "device": "isa-fd0",
4591 "filename": "/srv/images/ro.img",
4592 "format": "raw",
4593 "read-only-mode": "read-only" } }
4594
4595 <- { "return": {} }
4596
4597 EQMP
4598
4599 {
4600 .name = "query-memdev",
4601 .args_type = "",
4602 .mhandler.cmd_new = qmp_marshal_query_memdev,
4603 },
4604
4605 SQMP
4606 query-memdev
4607 ------------
4608
4609 Show memory devices information.
4610
4611
4612 Example (1):
4613
4614 -> { "execute": "query-memdev" }
4615 <- { "return": [
4616 {
4617 "size": 536870912,
4618 "merge": false,
4619 "dump": true,
4620 "prealloc": false,
4621 "host-nodes": [0, 1],
4622 "policy": "bind"
4623 },
4624 {
4625 "size": 536870912,
4626 "merge": false,
4627 "dump": true,
4628 "prealloc": true,
4629 "host-nodes": [2, 3],
4630 "policy": "preferred"
4631 }
4632 ]
4633 }
4634
4635 EQMP
4636
4637 {
4638 .name = "query-memory-devices",
4639 .args_type = "",
4640 .mhandler.cmd_new = qmp_marshal_query_memory_devices,
4641 },
4642
4643 SQMP
4644 @query-memory-devices
4645 --------------------
4646
4647 Return a list of memory devices.
4648
4649 Example:
4650 -> { "execute": "query-memory-devices" }
4651 <- { "return": [ { "data":
4652 { "addr": 5368709120,
4653 "hotpluggable": true,
4654 "hotplugged": true,
4655 "id": "d1",
4656 "memdev": "/objects/memX",
4657 "node": 0,
4658 "size": 1073741824,
4659 "slot": 0},
4660 "type": "dimm"
4661 } ] }
4662 EQMP
4663
4664 {
4665 .name = "query-acpi-ospm-status",
4666 .args_type = "",
4667 .mhandler.cmd_new = qmp_marshal_query_acpi_ospm_status,
4668 },
4669
4670 SQMP
4671 @query-acpi-ospm-status
4672 --------------------
4673
4674 Return list of ACPIOSTInfo for devices that support status reporting
4675 via ACPI _OST method.
4676
4677 Example:
4678 -> { "execute": "query-acpi-ospm-status" }
4679 <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
4680 { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
4681 { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
4682 { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
4683 ]}
4684 EQMP
4685
4686 #if defined TARGET_I386
4687 {
4688 .name = "rtc-reset-reinjection",
4689 .args_type = "",
4690 .mhandler.cmd_new = qmp_marshal_rtc_reset_reinjection,
4691 },
4692 #endif
4693
4694 SQMP
4695 rtc-reset-reinjection
4696 ---------------------
4697
4698 Reset the RTC interrupt reinjection backlog.
4699
4700 Arguments: None.
4701
4702 Example:
4703
4704 -> { "execute": "rtc-reset-reinjection" }
4705 <- { "return": {} }
4706 EQMP
4707
4708 {
4709 .name = "trace-event-get-state",
4710 .args_type = "name:s",
4711 .mhandler.cmd_new = qmp_marshal_trace_event_get_state,
4712 },
4713
4714 SQMP
4715 trace-event-get-state
4716 ---------------------
4717
4718 Query the state of events.
4719
4720 Example:
4721
4722 -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
4723 <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
4724 EQMP
4725
4726 {
4727 .name = "trace-event-set-state",
4728 .args_type = "name:s,enable:b,ignore-unavailable:b?",
4729 .mhandler.cmd_new = qmp_marshal_trace_event_set_state,
4730 },
4731
4732 SQMP
4733 trace-event-set-state
4734 ---------------------
4735
4736 Set the state of events.
4737
4738 Example:
4739
4740 -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
4741 <- { "return": {} }
4742 EQMP
4743
4744 {
4745 .name = "input-send-event",
4746 .args_type = "console:i?,events:q",
4747 .mhandler.cmd_new = qmp_marshal_input_send_event,
4748 },
4749
4750 SQMP
4751 @input-send-event
4752 -----------------
4753
4754 Send input event to guest.
4755
4756 Arguments:
4757
4758 - "device": display device (json-string, optional)
4759 - "head": display head (json-int, optional)
4760 - "events": list of input events
4761
4762 The consoles are visible in the qom tree, under
4763 /backend/console[$index]. They have a device link and head property, so
4764 it is possible to map which console belongs to which device and display.
4765
4766 Note: this command is experimental, and not a stable API.
4767
4768 Example (1):
4769
4770 Press left mouse button.
4771
4772 -> { "execute": "input-send-event",
4773 "arguments": { "device": "video0",
4774 "events": [ { "type": "btn",
4775 "data" : { "down": true, "button": "left" } } ] } }
4776 <- { "return": {} }
4777
4778 -> { "execute": "input-send-event",
4779 "arguments": { "device": "video0",
4780 "events": [ { "type": "btn",
4781 "data" : { "down": false, "button": "left" } } ] } }
4782 <- { "return": {} }
4783
4784 Example (2):
4785
4786 Press ctrl-alt-del.
4787
4788 -> { "execute": "input-send-event",
4789 "arguments": { "events": [
4790 { "type": "key", "data" : { "down": true,
4791 "key": {"type": "qcode", "data": "ctrl" } } },
4792 { "type": "key", "data" : { "down": true,
4793 "key": {"type": "qcode", "data": "alt" } } },
4794 { "type": "key", "data" : { "down": true,
4795 "key": {"type": "qcode", "data": "delete" } } } ] } }
4796 <- { "return": {} }
4797
4798 Example (3):
4799
4800 Move mouse pointer to absolute coordinates (20000, 400).
4801
4802 -> { "execute": "input-send-event" ,
4803 "arguments": { "events": [
4804 { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
4805 { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
4806 <- { "return": {} }
4807
4808 EQMP
4809
4810 {
4811 .name = "block-set-write-threshold",
4812 .args_type = "node-name:s,write-threshold:l",
4813 .mhandler.cmd_new = qmp_marshal_block_set_write_threshold,
4814 },
4815
4816 SQMP
4817 block-set-write-threshold
4818 ------------
4819
4820 Change the write threshold for a block drive. The threshold is an offset,
4821 thus must be non-negative. Default is no write threshold.
4822 Setting the threshold to zero disables it.
4823
4824 Arguments:
4825
4826 - "node-name": the node name in the block driver state graph (json-string)
4827 - "write-threshold": the write threshold in bytes (json-int)
4828
4829 Example:
4830
4831 -> { "execute": "block-set-write-threshold",
4832 "arguments": { "node-name": "mydev",
4833 "write-threshold": 17179869184 } }
4834 <- { "return": {} }
4835
4836 EQMP
4837
4838 {
4839 .name = "query-rocker",
4840 .args_type = "name:s",
4841 .mhandler.cmd_new = qmp_marshal_query_rocker,
4842 },
4843
4844 SQMP
4845 Show rocker switch
4846 ------------------
4847
4848 Arguments:
4849
4850 - "name": switch name
4851
4852 Example:
4853
4854 -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
4855 <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
4856
4857 EQMP
4858
4859 {
4860 .name = "query-rocker-ports",
4861 .args_type = "name:s",
4862 .mhandler.cmd_new = qmp_marshal_query_rocker_ports,
4863 },
4864
4865 SQMP
4866 Show rocker switch ports
4867 ------------------------
4868
4869 Arguments:
4870
4871 - "name": switch name
4872
4873 Example:
4874
4875 -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
4876 <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
4877 "autoneg": "off", "link-up": true, "speed": 10000},
4878 {"duplex": "full", "enabled": true, "name": "sw1.2",
4879 "autoneg": "off", "link-up": true, "speed": 10000}
4880 ]}
4881
4882 EQMP
4883
4884 {
4885 .name = "query-rocker-of-dpa-flows",
4886 .args_type = "name:s,tbl-id:i?",
4887 .mhandler.cmd_new = qmp_marshal_query_rocker_of_dpa_flows,
4888 },
4889
4890 SQMP
4891 Show rocker switch OF-DPA flow tables
4892 -------------------------------------
4893
4894 Arguments:
4895
4896 - "name": switch name
4897 - "tbl-id": (optional) flow table ID
4898
4899 Example:
4900
4901 -> { "execute": "query-rocker-of-dpa-flows", "arguments": { "name": "sw1" } }
4902 <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
4903 "hits": 138,
4904 "cookie": 0,
4905 "action": {"goto-tbl": 10},
4906 "mask": {"in-pport": 4294901760}
4907 },
4908 {...more...},
4909 ]}
4910
4911 EQMP
4912
4913 {
4914 .name = "query-rocker-of-dpa-groups",
4915 .args_type = "name:s,type:i?",
4916 .mhandler.cmd_new = qmp_marshal_query_rocker_of_dpa_groups,
4917 },
4918
4919 SQMP
4920 Show rocker OF-DPA group tables
4921 -------------------------------
4922
4923 Arguments:
4924
4925 - "name": switch name
4926 - "type": (optional) group type
4927
4928 Example:
4929
4930 -> { "execute": "query-rocker-of-dpa-groups", "arguments": { "name": "sw1" } }
4931 <- { "return": [ {"type": 0, "out-pport": 2, "pport": 2, "vlan-id": 3841,
4932 "pop-vlan": 1, "id": 251723778},
4933 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3841,
4934 "pop-vlan": 1, "id": 251723776},
4935 {"type": 0, "out-pport": 1, "pport": 1, "vlan-id": 3840,
4936 "pop-vlan": 1, "id": 251658241},
4937 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840,
4938 "pop-vlan": 1, "id": 251658240}
4939 ]}
4940
4941 EQMP
4942
4943 #if defined TARGET_ARM
4944 {
4945 .name = "query-gic-capabilities",
4946 .args_type = "",
4947 .mhandler.cmd_new = qmp_marshal_query_gic_capabilities,
4948 },
4949 #endif
4950
4951 SQMP
4952 query-gic-capabilities
4953 ---------------
4954
4955 Return a list of GICCapability objects, describing supported GIC
4956 (Generic Interrupt Controller) versions.
4957
4958 Arguments: None
4959
4960 Example:
4961
4962 -> { "execute": "query-gic-capabilities" }
4963 <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
4964 { "version": 3, "emulated": false, "kernel": true } ] }
4965
4966 EQMP
4967
4968 {
4969 .name = "query-hotpluggable-cpus",
4970 .args_type = "",
4971 .mhandler.cmd_new = qmp_marshal_query_hotpluggable_cpus,
4972 },
4973
4974 SQMP
4975 Show existing/possible CPUs
4976 ---------------------------
4977
4978 Arguments: None.
4979
4980 Example for pseries machine type started with
4981 -smp 2,cores=2,maxcpus=4 -cpu POWER8:
4982
4983 -> { "execute": "query-hotpluggable-cpus" }
4984 <- {"return": [
4985 { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
4986 "vcpus-count": 1 },
4987 { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
4988 "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
4989 ]}'