]> Git Repo - qemu.git/blob - docs/qmp-commands.txt
qmp-commands: move 'xen-save-devices-state' doc to schema
[qemu.git] / docs / qmp-commands.txt
1                         QMP Supported Commands
2                         ----------------------
3
4 This document describes all commands currently supported by QMP.
5
6 Most of the time their usage is exactly the same as in the user Monitor, this
7 means that any other document which also describe commands (the manpage,
8 QEMU's manual, etc) can and should be consulted.
9
10 QMP has two types of commands: regular and query commands. Regular commands
11 usually change the Virtual Machine's state someway, while query commands just
12 return information. The sections below are divided accordingly.
13
14 It's important to observe that all communication examples are formatted in
15 a reader-friendly way, so that they're easier to understand. However, in real
16 protocol usage, they're emitted as a single line.
17
18 Also, the following notation is used to denote data flow:
19
20 -> data issued by the Client
21 <- Server data response
22
23 Please, refer to the QMP specification (docs/qmp-spec.txt) for detailed
24 information on the Server command and response formats.
25
26 NOTE: This document is temporary and will be replaced soon.
27
28 1. Stability Considerations
29 ===========================
30
31 The current QMP command set (described in this file) may be useful for a
32 number of use cases, however it's limited and several commands have bad
33 defined semantics, specially with regard to command completion.
34
35 These problems are going to be solved incrementally in the next QEMU releases
36 and we're going to establish a deprecation policy for badly defined commands.
37
38 If you're planning to adopt QMP, please observe the following:
39
40     1. The deprecation policy will take effect and be documented soon, please
41        check the documentation of each used command as soon as a new release of
42        QEMU is available
43
44     2. DO NOT rely on anything which is not explicit documented
45
46     3. Errors, in special, are not documented. Applications should NOT check
47        for specific errors classes or data (it's strongly recommended to only
48        check for the "error" key)
49
50 2. Regular Commands
51 ===================
52
53 Server's responses in the examples below are always a success response, please
54 refer to the QMP specification for more details on error responses.
55
56 eject
57 -----
58
59 Eject a removable medium.
60
61 Arguments:
62
63 - "force": force ejection (json-bool, optional)
64 - "device": block device name (deprecated, use @id instead)
65             (json-string, optional)
66 - "id": the name or QOM path of the guest device (json-string, optional)
67
68 Example:
69
70 -> { "execute": "eject", "arguments": { "id": "ide0-1-0" } }
71 <- { "return": {} }
72
73 Note: The "force" argument defaults to false.
74
75 screendump
76 ----------
77
78 Save screen into PPM image.
79
80 Arguments:
81
82 - "filename": file path (json-string)
83
84 Example:
85
86 -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
87 <- { "return": {} }
88
89 device_add
90 ----------
91
92 Add a device.
93
94 Arguments:
95
96 - "driver": the name of the new device's driver (json-string)
97 - "bus": the device's parent bus (device tree path, json-string, optional)
98 - "id": the device's ID, must be unique (json-string)
99 - device properties
100
101 Example:
102
103 -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
104 <- { "return": {} }
105
106 Notes:
107
108 (1) For detailed information about this command, please refer to the
109     'docs/qdev-device-use.txt' file.
110
111 (2) It's possible to list device properties by running QEMU with the
112     "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
113
114 device_del
115 ----------
116
117 Remove a device.
118
119 Arguments:
120
121 - "id": the device's ID or QOM path (json-string)
122
123 Example:
124
125 -> { "execute": "device_del", "arguments": { "id": "net1" } }
126 <- { "return": {} }
127
128 Example:
129
130 -> { "execute": "device_del", "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
131 <- { "return": {} }
132
133 send-key
134 ----------
135
136 Send keys to VM.
137
138 Arguments:
139
140 keys array:
141     - "key": key sequence (a json-array of key union values,
142              union can be number or qcode enum)
143
144 - hold-time: time to delay key up events, milliseconds. Defaults to 100
145              (json-int, optional)
146
147 Example:
148
149 -> { "execute": "send-key",
150      "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
151                               { "type": "qcode", "data": "alt" },
152                               { "type": "qcode", "data": "delete" } ] } }
153 <- { "return": {} }
154
155 cpu
156 ---
157
158 Set the default CPU.
159
160 Arguments:
161
162 - "index": the CPU's index (json-int)
163
164 Example:
165
166 -> { "execute": "cpu", "arguments": { "index": 0 } }
167 <- { "return": {} }
168
169 Note: CPUs' indexes are obtained with the 'query-cpus' command.
170
171 xen-load-devices-state
172 ----------------------
173
174 Load the state of all devices from file. The RAM and the block devices
175 of the VM are not loaded by this command.
176
177 Arguments:
178
179 - "filename": the file to load the state of the devices from as binary
180 data. See xen-save-devices-state.txt for a description of the binary
181 format.
182
183 Example:
184
185 -> { "execute": "xen-load-devices-state",
186      "arguments": { "filename": "/tmp/resume" } }
187 <- { "return": {} }
188
189 xen-set-global-dirty-log
190 -------
191
192 Enable or disable the global dirty log mode.
193
194 Arguments:
195
196 - "enable": Enable it or disable it.
197
198 Example:
199
200 -> { "execute": "xen-set-global-dirty-log",
201      "arguments": { "enable": true } }
202 <- { "return": {} }
203
204 migrate-set-cache-size
205 ----------------------
206
207 Set cache size to be used by XBZRLE migration, the cache size will be rounded
208 down to the nearest power of 2
209
210 Arguments:
211
212 - "value": cache size in bytes (json-int)
213
214 Example:
215
216 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
217 <- { "return": {} }
218
219 x-colo-lost-heartbeat
220 --------------------
221
222 Tell COLO that heartbeat is lost, a failover or takeover is needed.
223
224 Example:
225
226 -> { "execute": "x-colo-lost-heartbeat" }
227 <- { "return": {} }
228
229 dump
230
231
232 Dump guest memory to file. The file can be processed with crash or gdb.
233
234 Arguments:
235
236 - "paging": do paging to get guest's memory mapping (json-bool)
237 - "protocol": destination file(started with "file:") or destination file
238               descriptor (started with "fd:") (json-string)
239 - "detach": if specified, command will return immediately, without waiting
240             for the dump to finish. The user can track progress using
241             "query-dump". (json-bool)
242 - "begin": the starting physical address. It's optional, and should be specified
243            with length together (json-int)
244 - "length": the memory size, in bytes. It's optional, and should be specified
245             with begin together (json-int)
246 - "format": the format of guest memory dump. It's optional, and can be
247             elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
248             conflict with paging and filter, ie. begin and length (json-string)
249
250 Example:
251
252 -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
253 <- { "return": {} }
254
255 Notes:
256
257 (1) All boolean arguments default to false
258
259 query-dump-guest-memory-capability
260 ----------
261
262 Show available formats for 'dump-guest-memory'
263
264 Example:
265
266 -> { "execute": "query-dump-guest-memory-capability" }
267 <- { "return": { "formats":
268                     ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
269
270 query-dump
271 ----------
272
273 Query background dump status.
274
275 Arguments: None.
276
277 Example:
278
279 -> { "execute": "query-dump" }
280 <- { "return": { "status": "active", "completed": 1024000,
281                  "total": 2048000 } }
282
283 dump-skeys
284 ----------
285
286 Save guest storage keys to file.
287
288 Arguments:
289
290 - "filename": file path (json-string)
291
292 Example:
293
294 -> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } }
295 <- { "return": {} }
296
297 netdev_add
298 ----------
299
300 Add host network device.
301
302 Arguments:
303
304 - "type": the device type, "tap", "user", ... (json-string)
305 - "id": the device's ID, must be unique (json-string)
306 - device options
307
308 Example:
309
310 -> { "execute": "netdev_add",
311      "arguments": { "type": "user", "id": "netdev1",
312                     "dnssearch": "example.org" } }
313 <- { "return": {} }
314
315 Note: The supported device options are the same ones supported by the '-netdev'
316       command-line argument, which are listed in the '-help' output or QEMU's
317       manual
318
319 netdev_del
320 ----------
321
322 Remove host network device.
323
324 Arguments:
325
326 - "id": the device's ID, must be unique (json-string)
327
328 Example:
329
330 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
331 <- { "return": {} }
332
333
334 object-add
335 ----------
336
337 Create QOM object.
338
339 Arguments:
340
341 - "qom-type": the object's QOM type, i.e. the class name (json-string)
342 - "id": the object's ID, must be unique (json-string)
343 - "props": a dictionary of object property values (optional, json-dict)
344
345 Example:
346
347 -> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
348      "props": { "filename": "/dev/hwrng" } } }
349 <- { "return": {} }
350
351 object-del
352 ----------
353
354 Remove QOM object.
355
356 Arguments:
357
358 - "id": the object's ID (json-string)
359
360 Example:
361
362 -> { "execute": "object-del", "arguments": { "id": "rng1" } }
363 <- { "return": {} }
364
365
366 block_resize
367 ------------
368
369 Resize a block image while a guest is running.
370
371 Arguments:
372
373 - "device": the device's ID, must be unique (json-string)
374 - "node-name": the node name in the block driver state graph (json-string)
375 - "size": new size
376
377 Example:
378
379 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
380 <- { "return": {} }
381
382 block-stream
383 ------------
384
385 Copy data from a backing file into a block device.
386
387 Arguments:
388
389 - "job-id": Identifier for the newly-created block job. If omitted,
390             the device name will be used. (json-string, optional)
391 - "device": The device name or node-name of a root node (json-string)
392 - "base": The file name of the backing image above which copying starts.
393           It cannot be set if 'base-node' is also set (json-string, optional)
394 - "base-node": the node name of the backing image above which copying starts.
395                It cannot be set if 'base' is also set.
396                (json-string, optional) (Since 2.8)
397 - "backing-file": The backing file string to write into the active layer. This
398                   filename is not validated.
399
400                   If a pathname string is such that it cannot be resolved by
401                   QEMU, that means that subsequent QMP or HMP commands must use
402                   node-names for the image in question, as filename lookup
403                   methods will fail.
404
405                   If not specified, QEMU will automatically determine the
406                   backing file string to use, or error out if there is no
407                   obvious choice.  Care should be taken when specifying the
408                   string, to specify a valid filename or protocol.
409                   (json-string, optional) (Since 2.1)
410 - "speed":  the maximum speed, in bytes per second (json-int, optional)
411 - "on-error": the action to take on an error (default 'report').  'stop' and
412               'enospc' can only be used if the block device supports io-status.
413               (json-string, optional) (Since 2.1)
414
415 Example:
416
417 -> { "execute": "block-stream", "arguments": { "device": "virtio0",
418                                                "base": "/tmp/master.qcow2" } }
419 <- { "return": {} }
420
421 block-commit
422 ------------
423
424 Live commit of data from overlay image nodes into backing nodes - i.e., writes
425 data between 'top' and 'base' into 'base'.
426
427 Arguments:
428
429 - "job-id": Identifier for the newly-created block job. If omitted,
430             the device name will be used. (json-string, optional)
431 - "device": The device name or node-name of a root node (json-string)
432 - "base": The file name of the backing image to write data into.
433           If not specified, this is the deepest backing image
434           (json-string, optional)
435 - "top":  The file name of the backing image within the image chain,
436           which contains the topmost data to be committed down. If
437           not specified, this is the active layer. (json-string, optional)
438
439 - backing-file:     The backing file string to write into the overlay
440                     image of 'top'.  If 'top' is the active layer,
441                     specifying a backing file string is an error. This
442                     filename is not validated.
443
444                     If a pathname string is such that it cannot be
445                     resolved by QEMU, that means that subsequent QMP or
446                     HMP commands must use node-names for the image in
447                     question, as filename lookup methods will fail.
448
449                     If not specified, QEMU will automatically determine
450                     the backing file string to use, or error out if
451                     there is no obvious choice. Care should be taken
452                     when specifying the string, to specify a valid
453                     filename or protocol.
454                     (json-string, optional) (Since 2.1)
455
456           If top == base, that is an error.
457           If top == active, the job will not be completed by itself,
458           user needs to complete the job with the block-job-complete
459           command after getting the ready event. (Since 2.0)
460
461           If the base image is smaller than top, then the base image
462           will be resized to be the same size as top.  If top is
463           smaller than the base image, the base will not be
464           truncated.  If you want the base image size to match the
465           size of the smaller top, you can safely truncate it
466           yourself once the commit operation successfully completes.
467           (json-string)
468 - "speed":  the maximum speed, in bytes per second (json-int, optional)
469
470
471 Example:
472
473 -> { "execute": "block-commit", "arguments": { "device": "virtio0",
474                                               "top": "/tmp/snap1.qcow2" } }
475 <- { "return": {} }
476
477 drive-backup
478 ------------
479
480 Start a point-in-time copy of a block device to a new destination.  The
481 status of ongoing drive-backup operations can be checked with
482 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
483 The operation can be stopped before it has completed using the
484 block-job-cancel command.
485
486 Arguments:
487
488 - "job-id": Identifier for the newly-created block job. If omitted,
489             the device name will be used. (json-string, optional)
490 - "device": the device name or node-name of a root node which should be copied.
491             (json-string)
492 - "target": the target of the new image. If the file exists, or if it is a
493             device, the existing file/device will be used as the new
494             destination.  If it does not exist, a new file will be created.
495             (json-string)
496 - "format": the format of the new destination, default is to probe if 'mode' is
497             'existing', else the format of the source
498             (json-string, optional)
499 - "sync": what parts of the disk image should be copied to the destination;
500   possibilities include "full" for all the disk, "top" for only the sectors
501   allocated in the topmost image, "incremental" for only the dirty sectors in
502   the bitmap, or "none" to only replicate new I/O (MirrorSyncMode).
503 - "bitmap": dirty bitmap name for sync==incremental. Must be present if sync
504             is "incremental", must NOT be present otherwise.
505 - "mode": whether and how QEMU should create a new image
506           (NewImageMode, optional, default 'absolute-paths')
507 - "speed": the maximum speed, in bytes per second (json-int, optional)
508 - "compress": true to compress data, if the target format supports it.
509               (json-bool, optional, default false)
510 - "on-source-error": the action to take on an error on the source, default
511                      'report'.  'stop' and 'enospc' can only be used
512                      if the block device supports io-status.
513                      (BlockdevOnError, optional)
514 - "on-target-error": the action to take on an error on the target, default
515                      'report' (no limitations, since this applies to
516                      a different block device than device).
517                      (BlockdevOnError, optional)
518
519 Example:
520 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
521                                                "sync": "full",
522                                                "target": "backup.img" } }
523 <- { "return": {} }
524
525 blockdev-backup
526 ---------------
527
528 The device version of drive-backup: this command takes an existing named device
529 as backup target.
530
531 Arguments:
532
533 - "job-id": Identifier for the newly-created block job. If omitted,
534             the device name will be used. (json-string, optional)
535 - "device": the device name or node-name of a root node which should be copied.
536             (json-string)
537 - "target": the name of the backup target device. (json-string)
538 - "sync": what parts of the disk image should be copied to the destination;
539           possibilities include "full" for all the disk, "top" for only the
540           sectors allocated in the topmost image, or "none" to only replicate
541           new I/O (MirrorSyncMode).
542 - "speed": the maximum speed, in bytes per second (json-int, optional)
543 - "compress": true to compress data, if the target format supports it.
544               (json-bool, optional, default false)
545 - "on-source-error": the action to take on an error on the source, default
546                      'report'.  'stop' and 'enospc' can only be used
547                      if the block device supports io-status.
548                      (BlockdevOnError, optional)
549 - "on-target-error": the action to take on an error on the target, default
550                      'report' (no limitations, since this applies to
551                      a different block device than device).
552                      (BlockdevOnError, optional)
553
554 Example:
555 -> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
556                                                   "sync": "full",
557                                                   "target": "tgt-id" } }
558 <- { "return": {} }
559
560 block-dirty-bitmap-add
561 ----------------------
562 Since 2.4
563
564 Create a dirty bitmap with a name on the device, and start tracking the writes.
565
566 Arguments:
567
568 - "node": device/node on which to create dirty bitmap (json-string)
569 - "name": name of the new dirty bitmap (json-string)
570 - "granularity": granularity to track writes with (int, optional)
571
572 Example:
573
574 -> { "execute": "block-dirty-bitmap-add", "arguments": { "node": "drive0",
575                                                    "name": "bitmap0" } }
576 <- { "return": {} }
577
578 block-dirty-bitmap-remove
579 -------------------------
580 Since 2.4
581
582 Stop write tracking and remove the dirty bitmap that was created with
583 block-dirty-bitmap-add.
584
585 Arguments:
586
587 - "node": device/node on which to remove dirty bitmap (json-string)
588 - "name": name of the dirty bitmap to remove (json-string)
589
590 Example:
591
592 -> { "execute": "block-dirty-bitmap-remove", "arguments": { "node": "drive0",
593                                                       "name": "bitmap0" } }
594 <- { "return": {} }
595
596 block-dirty-bitmap-clear
597 ------------------------
598 Since 2.4
599
600 Reset the dirty bitmap associated with a node so that an incremental backup
601 from this point in time forward will only backup clusters modified after this
602 clear operation.
603
604 Arguments:
605
606 - "node": device/node on which to remove dirty bitmap (json-string)
607 - "name": name of the dirty bitmap to remove (json-string)
608
609 Example:
610
611 -> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0",
612                                                            "name": "bitmap0" } }
613 <- { "return": {} }
614
615 blockdev-snapshot-sync
616 ----------------------
617
618 Synchronous snapshot of a block device. snapshot-file specifies the
619 target of the new image. If the file exists, or if it is a device, the
620 snapshot will be created in the existing file/device. If does not
621 exist, a new file will be created. format specifies the format of the
622 snapshot image, default is qcow2.
623
624 Arguments:
625
626 - "device": device name to snapshot (json-string)
627 - "node-name": graph node name to snapshot (json-string)
628 - "snapshot-file": name of new image file (json-string)
629 - "snapshot-node-name": graph node name of the new snapshot (json-string)
630 - "mode": whether and how QEMU should create the snapshot file
631   (NewImageMode, optional, default "absolute-paths")
632 - "format": format of new image (json-string, optional)
633
634 Example:
635
636 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
637                                                          "snapshot-file":
638                                                         "/some/place/my-image",
639                                                         "format": "qcow2" } }
640 <- { "return": {} }
641
642 blockdev-snapshot
643 -----------------
644 Since 2.5
645
646 Create a snapshot, by installing 'node' as the backing image of
647 'overlay'. Additionally, if 'node' is associated with a block
648 device, the block device changes to using 'overlay' as its new active
649 image.
650
651 Arguments:
652
653 - "node": device that will have a snapshot created (json-string)
654 - "overlay": device that will have 'node' as its backing image (json-string)
655
656 Example:
657
658 -> { "execute": "blockdev-add",
659                 "arguments": { "driver": "qcow2",
660                                "node-name": "node1534",
661                                "file": { "driver": "file",
662                                          "filename": "hd1.qcow2" },
663                                "backing": "" } }
664
665 <- { "return": {} }
666
667 -> { "execute": "blockdev-snapshot", "arguments": { "node": "ide-hd0",
668                                                     "overlay": "node1534" } }
669 <- { "return": {} }
670
671 blockdev-snapshot-internal-sync
672 -------------------------------
673
674 Synchronously take an internal snapshot of a block device when the format of
675 image used supports it.  If the name is an empty string, or a snapshot with
676 name already exists, the operation will fail.
677
678 Arguments:
679
680 - "device": the device name or node-name of a root node to snapshot
681             (json-string)
682 - "name": name of the new snapshot (json-string)
683
684 Example:
685
686 -> { "execute": "blockdev-snapshot-internal-sync",
687                 "arguments": { "device": "ide-hd0",
688                                "name": "snapshot0" }
689    }
690 <- { "return": {} }
691
692 blockdev-snapshot-delete-internal-sync
693 --------------------------------------
694
695 Synchronously delete an internal snapshot of a block device when the format of
696 image used supports it.  The snapshot is identified by name or id or both.  One
697 of name or id is required.  If the snapshot is not found, the operation will
698 fail.
699
700 Arguments:
701
702 - "device": the device name or node-name of a root node (json-string)
703 - "id": ID of the snapshot (json-string, optional)
704 - "name": name of the snapshot (json-string, optional)
705
706 Example:
707
708 -> { "execute": "blockdev-snapshot-delete-internal-sync",
709                 "arguments": { "device": "ide-hd0",
710                                "name": "snapshot0" }
711    }
712 <- { "return": {
713                    "id": "1",
714                    "name": "snapshot0",
715                    "vm-state-size": 0,
716                    "date-sec": 1000012,
717                    "date-nsec": 10,
718                    "vm-clock-sec": 100,
719                    "vm-clock-nsec": 20
720      }
721    }
722
723 drive-mirror
724 ------------
725
726 Start mirroring a block device's writes to a new destination. target
727 specifies the target of the new image. If the file exists, or if it is
728 a device, it will be used as the new destination for writes. If it does not
729 exist, a new file will be created. format specifies the format of the
730 mirror image, default is to probe if mode='existing', else the format
731 of the source.
732
733 Arguments:
734
735 - "job-id": Identifier for the newly-created block job. If omitted,
736             the device name will be used. (json-string, optional)
737 - "device": the device name or node-name of a root node whose writes should be
738             mirrored. (json-string)
739 - "target": name of new image file (json-string)
740 - "format": format of new image (json-string, optional)
741 - "node-name": the name of the new block driver state in the node graph
742                (json-string, optional)
743 - "replaces": the block driver node name to replace when finished
744               (json-string, optional)
745 - "mode": how an image file should be created into the target
746   file/device (NewImageMode, optional, default 'absolute-paths')
747 - "speed": maximum speed of the streaming job, in bytes per second
748   (json-int)
749 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
750 - "buf-size": maximum amount of data in flight from source to target, in bytes
751   (json-int, default 10M)
752 - "sync": what parts of the disk image should be copied to the destination;
753   possibilities include "full" for all the disk, "top" for only the sectors
754   allocated in the topmost image, or "none" to only replicate new I/O
755   (MirrorSyncMode).
756 - "on-source-error": the action to take on an error on the source
757   (BlockdevOnError, default 'report')
758 - "on-target-error": the action to take on an error on the target
759   (BlockdevOnError, default 'report')
760 - "unmap": whether the target sectors should be discarded where source has only
761   zeroes. (json-bool, optional, default true)
762
763 The default value of the granularity is the image cluster size clamped
764 between 4096 and 65536, if the image format defines one.  If the format
765 does not define a cluster size, the default value of the granularity
766 is 65536.
767
768
769 Example:
770
771 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
772                                                "target": "/some/place/my-image",
773                                                "sync": "full",
774                                                "format": "qcow2" } }
775 <- { "return": {} }
776
777 blockdev-mirror
778 ------------
779
780 Start mirroring a block device's writes to another block device. target
781 specifies the target of mirror operation.
782
783 Arguments:
784
785 - "job-id": Identifier for the newly-created block job. If omitted,
786             the device name will be used. (json-string, optional)
787 - "device": The device name or node-name of a root node whose writes should be
788             mirrored (json-string)
789 - "target": device name to mirror to (json-string)
790 - "replaces": the block driver node name to replace when finished
791               (json-string, optional)
792 - "speed": maximum speed of the streaming job, in bytes per second
793   (json-int)
794 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
795 - "buf_size": maximum amount of data in flight from source to target, in bytes
796   (json-int, default 10M)
797 - "sync": what parts of the disk image should be copied to the destination;
798   possibilities include "full" for all the disk, "top" for only the sectors
799   allocated in the topmost image, or "none" to only replicate new I/O
800   (MirrorSyncMode).
801 - "on-source-error": the action to take on an error on the source
802   (BlockdevOnError, default 'report')
803 - "on-target-error": the action to take on an error on the target
804   (BlockdevOnError, default 'report')
805
806 The default value of the granularity is the image cluster size clamped
807 between 4096 and 65536, if the image format defines one.  If the format
808 does not define a cluster size, the default value of the granularity
809 is 65536.
810
811 Example:
812
813 -> { "execute": "blockdev-mirror", "arguments": { "device": "ide-hd0",
814                                                   "target": "target0",
815                                                   "sync": "full" } }
816 <- { "return": {} }
817
818 change-backing-file
819 -------------------
820 Since: 2.1
821
822 Change the backing file in the image file metadata.  This does not cause
823 QEMU to reopen the image file to reparse the backing filename (it may,
824 however, perform a reopen to change permissions from r/o -> r/w -> r/o,
825 if needed). The new backing file string is written into the image file
826 metadata, and the QEMU internal strings are updated.
827
828 Arguments:
829
830 - "image-node-name":    The name of the block driver state node of the
831                         image to modify.  The "device" is argument is used to
832                         verify "image-node-name" is in the chain described by
833                         "device".
834                         (json-string, optional)
835
836 - "device":             The device name or node-name of the root node that owns
837                         image-node-name.
838                         (json-string)
839
840 - "backing-file":       The string to write as the backing file.  This string is
841                         not validated, so care should be taken when specifying
842                         the string or the image chain may not be able to be
843                         reopened again.
844                         (json-string)
845
846 Returns: Nothing on success
847          If "device" does not exist or cannot be determined, DeviceNotFound
848
849 getfd
850 -----
851
852 Receive a file descriptor via SCM rights and assign it a name.
853
854 Arguments:
855
856 - "fdname": file descriptor name (json-string)
857
858 Example:
859
860 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
861 <- { "return": {} }
862
863 Notes:
864
865 (1) If the name specified by the "fdname" argument already exists,
866     the file descriptor assigned to it will be closed and replaced
867     by the received file descriptor.
868 (2) The 'closefd' command can be used to explicitly close the file
869     descriptor when it is no longer needed.
870
871 closefd
872 -------
873
874 Close a file descriptor previously passed via SCM rights.
875
876 Arguments:
877
878 - "fdname": file descriptor name (json-string)
879
880 Example:
881
882 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
883 <- { "return": {} }
884
885 add-fd
886 -------
887
888 Add a file descriptor, that was passed via SCM rights, to an fd set.
889
890 Arguments:
891
892 - "fdset-id": The ID of the fd set to add the file descriptor to.
893               (json-int, optional)
894 - "opaque": A free-form string that can be used to describe the fd.
895             (json-string, optional)
896
897 Return a json-object with the following information:
898
899 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
900 - "fd": The file descriptor that was received via SCM rights and added to the
901         fd set. (json-int)
902
903 Example:
904
905 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
906 <- { "return": { "fdset-id": 1, "fd": 3 } }
907
908 Notes:
909
910 (1) The list of fd sets is shared by all monitor connections.
911 (2) If "fdset-id" is not specified, a new fd set will be created.
912
913 remove-fd
914 ---------
915
916 Remove a file descriptor from an fd set.
917
918 Arguments:
919
920 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
921               (json-int)
922 - "fd": The file descriptor that is to be removed. (json-int, optional)
923
924 Example:
925
926 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
927 <- { "return": {} }
928
929 Notes:
930
931 (1) The list of fd sets is shared by all monitor connections.
932 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
933     removed.
934
935 query-fdsets
936 -------------
937
938 Return information describing all fd sets.
939
940 Arguments: None
941
942 Example:
943
944 -> { "execute": "query-fdsets" }
945 <- { "return": [
946        {
947          "fds": [
948            {
949              "fd": 30,
950              "opaque": "rdonly:/path/to/file"
951            },
952            {
953              "fd": 24,
954              "opaque": "rdwr:/path/to/file"
955            }
956          ],
957          "fdset-id": 1
958        },
959        {
960          "fds": [
961            {
962              "fd": 28
963            },
964            {
965              "fd": 29
966            }
967          ],
968          "fdset-id": 0
969        }
970      ]
971    }
972
973 Note: The list of fd sets is shared by all monitor connections.
974
975 block_passwd
976 ------------
977
978 Set the password of encrypted block devices.
979
980 Arguments:
981
982 - "device": device name (json-string)
983 - "node-name": name in the block driver state graph (json-string)
984 - "password": password (json-string)
985
986 Example:
987
988 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
989                                                "password": "12345" } }
990 <- { "return": {} }
991
992 block_set_io_throttle
993 ------------
994
995 Change I/O throttle limits for a block drive.
996
997 Arguments:
998
999 - "device": block device name (deprecated, use @id instead)
1000             (json-string, optional)
1001 - "id": the name or QOM path of the guest device (json-string, optional)
1002 - "bps": total throughput limit in bytes per second (json-int)
1003 - "bps_rd": read throughput limit in bytes per second (json-int)
1004 - "bps_wr": write throughput limit in bytes per second (json-int)
1005 - "iops": total I/O operations per second (json-int)
1006 - "iops_rd": read I/O operations per second (json-int)
1007 - "iops_wr": write I/O operations per second (json-int)
1008 - "bps_max": total throughput limit during bursts, in bytes (json-int, optional)
1009 - "bps_rd_max": read throughput limit during bursts, in bytes (json-int, optional)
1010 - "bps_wr_max": write throughput limit during bursts, in bytes (json-int, optional)
1011 - "iops_max": total I/O operations per second during bursts (json-int, optional)
1012 - "iops_rd_max": read I/O operations per second during bursts (json-int, optional)
1013 - "iops_wr_max": write I/O operations per second during bursts (json-int, optional)
1014 - "bps_max_length": maximum length of the @bps_max burst period, in seconds (json-int, optional)
1015 - "bps_rd_max_length": maximum length of the @bps_rd_max burst period, in seconds (json-int, optional)
1016 - "bps_wr_max_length": maximum length of the @bps_wr_max burst period, in seconds (json-int, optional)
1017 - "iops_max_length": maximum length of the @iops_max burst period, in seconds (json-int, optional)
1018 - "iops_rd_max_length": maximum length of the @iops_rd_max burst period, in seconds (json-int, optional)
1019 - "iops_wr_max_length": maximum length of the @iops_wr_max burst period, in seconds (json-int, optional)
1020 - "iops_size":  I/O size in bytes when limiting (json-int, optional)
1021 - "group": throttle group name (json-string, optional)
1022
1023 Example:
1024
1025 -> { "execute": "block_set_io_throttle", "arguments": { "id": "ide0-1-0",
1026                                                "bps": 1000000,
1027                                                "bps_rd": 0,
1028                                                "bps_wr": 0,
1029                                                "iops": 0,
1030                                                "iops_rd": 0,
1031                                                "iops_wr": 0,
1032                                                "bps_max": 8000000,
1033                                                "bps_rd_max": 0,
1034                                                "bps_wr_max": 0,
1035                                                "iops_max": 0,
1036                                                "iops_rd_max": 0,
1037                                                "iops_wr_max": 0,
1038                                                "bps_max_length": 60,
1039                                                "iops_size": 0 } }
1040 <- { "return": {} }
1041
1042 qmp_capabilities
1043 ----------------
1044
1045 Enable QMP capabilities.
1046
1047 Arguments: None.
1048
1049 Example:
1050
1051 -> { "execute": "qmp_capabilities" }
1052 <- { "return": {} }
1053
1054 Note: This command must be issued before issuing any other command.
1055
1056 3. Query Commands
1057 =================
1058
1059
1060 query-version
1061 -------------
1062
1063 Show QEMU version.
1064
1065 Return a json-object with the following information:
1066
1067 - "qemu": A json-object containing three integer values:
1068     - "major": QEMU's major version (json-int)
1069     - "minor": QEMU's minor version (json-int)
1070     - "micro": QEMU's micro version (json-int)
1071 - "package": package's version (json-string)
1072
1073 Example:
1074
1075 -> { "execute": "query-version" }
1076 <- {
1077       "return":{
1078          "qemu":{
1079             "major":0,
1080             "minor":11,
1081             "micro":5
1082          },
1083          "package":""
1084       }
1085    }
1086
1087 query-commands
1088 --------------
1089
1090 List QMP available commands.
1091
1092 Each command is represented by a json-object, the returned value is a json-array
1093 of all commands.
1094
1095 Each json-object contain:
1096
1097 - "name": command's name (json-string)
1098
1099 Example:
1100
1101 -> { "execute": "query-commands" }
1102 <- {
1103       "return":[
1104          {
1105             "name":"query-balloon"
1106          },
1107          {
1108             "name":"system_powerdown"
1109          }
1110       ]
1111    }
1112
1113 Note: This example has been shortened as the real response is too long.
1114
1115 query-qmp-schema
1116 ----------------
1117
1118 Return the QMP wire schema.  The returned value is a json-array of
1119 named schema entities.  Entities are commands, events and various
1120 types.  See docs/qapi-code-gen.txt for information on their structure
1121 and intended use.
1122
1123 query-block
1124 -----------
1125
1126 Show the block devices.
1127
1128 Each block device information is stored in a json-object and the returned value
1129 is a json-array of all devices.
1130
1131 Each json-object contain the following:
1132
1133 - "device": device name (json-string)
1134 - "type": device type (json-string)
1135          - deprecated, retained for backward compatibility
1136          - Possible values: "unknown"
1137 - "removable": true if the device is removable, false otherwise (json-bool)
1138 - "locked": true if the device is locked, false otherwise (json-bool)
1139 - "tray_open": only present if removable, true if the device has a tray,
1140                and it is open (json-bool)
1141 - "inserted": only present if the device is inserted, it is a json-object
1142    containing the following:
1143          - "file": device file name (json-string)
1144          - "ro": true if read-only, false otherwise (json-bool)
1145          - "drv": driver format name (json-string)
1146              - Possible values: "blkdebug", "bochs", "cloop", "dmg",
1147                                 "file", "file", "ftp", "ftps", "host_cdrom",
1148                                 "host_device", "http", "https",
1149                                 "nbd", "parallels", "qcow", "qcow2", "raw",
1150                                 "vdi", "vmdk", "vpc", "vvfat"
1151          - "backing_file": backing file name (json-string, optional)
1152          - "backing_file_depth": number of files in the backing file chain (json-int)
1153          - "encrypted": true if encrypted, false otherwise (json-bool)
1154          - "bps": limit total bytes per second (json-int)
1155          - "bps_rd": limit read bytes per second (json-int)
1156          - "bps_wr": limit write bytes per second (json-int)
1157          - "iops": limit total I/O operations per second (json-int)
1158          - "iops_rd": limit read operations per second (json-int)
1159          - "iops_wr": limit write operations per second (json-int)
1160          - "bps_max":  total max in bytes (json-int)
1161          - "bps_rd_max":  read max in bytes (json-int)
1162          - "bps_wr_max":  write max in bytes (json-int)
1163          - "iops_max":  total I/O operations max (json-int)
1164          - "iops_rd_max":  read I/O operations max (json-int)
1165          - "iops_wr_max":  write I/O operations max (json-int)
1166          - "iops_size": I/O size when limiting by iops (json-int)
1167          - "detect_zeroes": detect and optimize zero writing (json-string)
1168              - Possible values: "off", "on", "unmap"
1169          - "write_threshold": write offset threshold in bytes, a event will be
1170                               emitted if crossed. Zero if disabled (json-int)
1171          - "image": the detail of the image, it is a json-object containing
1172             the following:
1173              - "filename": image file name (json-string)
1174              - "format": image format (json-string)
1175              - "virtual-size": image capacity in bytes (json-int)
1176              - "dirty-flag": true if image is not cleanly closed, not present
1177                              means clean (json-bool, optional)
1178              - "actual-size": actual size on disk in bytes of the image, not
1179                               present when image does not support thin
1180                               provision (json-int, optional)
1181              - "cluster-size": size of a cluster in bytes, not present if image
1182                                format does not support it (json-int, optional)
1183              - "encrypted": true if the image is encrypted, not present means
1184                             false or the image format does not support
1185                             encryption (json-bool, optional)
1186              - "backing_file": backing file name, not present means no backing
1187                                file is used or the image format does not
1188                                support backing file chain
1189                                (json-string, optional)
1190              - "full-backing-filename": full path of the backing file, not
1191                                         present if it equals backing_file or no
1192                                         backing file is used
1193                                         (json-string, optional)
1194              - "backing-filename-format": the format of the backing file, not
1195                                           present means unknown or no backing
1196                                           file (json-string, optional)
1197              - "snapshots": the internal snapshot info, it is an optional list
1198                 of json-object containing the following:
1199                  - "id": unique snapshot id (json-string)
1200                  - "name": snapshot name (json-string)
1201                  - "vm-state-size": size of the VM state in bytes (json-int)
1202                  - "date-sec": UTC date of the snapshot in seconds (json-int)
1203                  - "date-nsec": fractional part in nanoseconds to be used with
1204                                 date-sec (json-int)
1205                  - "vm-clock-sec": VM clock relative to boot in seconds
1206                                    (json-int)
1207                  - "vm-clock-nsec": fractional part in nanoseconds to be used
1208                                     with vm-clock-sec (json-int)
1209              - "backing-image": the detail of the backing image, it is an
1210                                 optional json-object only present when a
1211                                 backing image present for this image
1212
1213 - "io-status": I/O operation status, only present if the device supports it
1214                and the VM is configured to stop on errors. It's always reset
1215                to "ok" when the "cont" command is issued (json_string, optional)
1216              - Possible values: "ok", "failed", "nospace"
1217
1218 Example:
1219
1220 -> { "execute": "query-block" }
1221 <- {
1222       "return":[
1223          {
1224             "io-status": "ok",
1225             "device":"ide0-hd0",
1226             "locked":false,
1227             "removable":false,
1228             "inserted":{
1229                "ro":false,
1230                "drv":"qcow2",
1231                "encrypted":false,
1232                "file":"disks/test.qcow2",
1233                "backing_file_depth":1,
1234                "bps":1000000,
1235                "bps_rd":0,
1236                "bps_wr":0,
1237                "iops":1000000,
1238                "iops_rd":0,
1239                "iops_wr":0,
1240                "bps_max": 8000000,
1241                "bps_rd_max": 0,
1242                "bps_wr_max": 0,
1243                "iops_max": 0,
1244                "iops_rd_max": 0,
1245                "iops_wr_max": 0,
1246                "iops_size": 0,
1247                "detect_zeroes": "on",
1248                "write_threshold": 0,
1249                "image":{
1250                   "filename":"disks/test.qcow2",
1251                   "format":"qcow2",
1252                   "virtual-size":2048000,
1253                   "backing_file":"base.qcow2",
1254                   "full-backing-filename":"disks/base.qcow2",
1255                   "backing-filename-format":"qcow2",
1256                   "snapshots":[
1257                      {
1258                         "id": "1",
1259                         "name": "snapshot1",
1260                         "vm-state-size": 0,
1261                         "date-sec": 10000200,
1262                         "date-nsec": 12,
1263                         "vm-clock-sec": 206,
1264                         "vm-clock-nsec": 30
1265                      }
1266                   ],
1267                   "backing-image":{
1268                       "filename":"disks/base.qcow2",
1269                       "format":"qcow2",
1270                       "virtual-size":2048000
1271                   }
1272                }
1273             },
1274             "type":"unknown"
1275          },
1276          {
1277             "io-status": "ok",
1278             "device":"ide1-cd0",
1279             "locked":false,
1280             "removable":true,
1281             "type":"unknown"
1282          },
1283          {
1284             "device":"floppy0",
1285             "locked":false,
1286             "removable":true,
1287             "type":"unknown"
1288          },
1289          {
1290             "device":"sd0",
1291             "locked":false,
1292             "removable":true,
1293             "type":"unknown"
1294          }
1295       ]
1296    }
1297
1298 query-blockstats
1299 ----------------
1300
1301 Show block device statistics.
1302
1303 Each device statistic information is stored in a json-object and the returned
1304 value is a json-array of all devices.
1305
1306 Each json-object contain the following:
1307
1308 - "device": device name (json-string)
1309 - "stats": A json-object with the statistics information, it contains:
1310     - "rd_bytes": bytes read (json-int)
1311     - "wr_bytes": bytes written (json-int)
1312     - "rd_operations": read operations (json-int)
1313     - "wr_operations": write operations (json-int)
1314     - "flush_operations": cache flush operations (json-int)
1315     - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
1316     - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
1317     - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
1318     - "wr_highest_offset": The offset after the greatest byte written to the
1319                            BlockDriverState since it has been opened (json-int)
1320     - "rd_merged": number of read requests that have been merged into
1321                    another request (json-int)
1322     - "wr_merged": number of write requests that have been merged into
1323                    another request (json-int)
1324     - "idle_time_ns": time since the last I/O operation, in
1325                       nanoseconds. If the field is absent it means
1326                       that there haven't been any operations yet
1327                       (json-int, optional)
1328     - "failed_rd_operations": number of failed read operations
1329                               (json-int)
1330     - "failed_wr_operations": number of failed write operations
1331                               (json-int)
1332     - "failed_flush_operations": number of failed flush operations
1333                                (json-int)
1334     - "invalid_rd_operations": number of invalid read operations
1335                                (json-int)
1336     - "invalid_wr_operations": number of invalid write operations
1337                                (json-int)
1338     - "invalid_flush_operations": number of invalid flush operations
1339                                   (json-int)
1340     - "account_invalid": whether invalid operations are included in
1341                          the last access statistics (json-bool)
1342     - "account_failed": whether failed operations are included in the
1343                          latency and last access statistics
1344                          (json-bool)
1345     - "timed_stats": A json-array containing statistics collected in
1346                      specific intervals, with the following members:
1347         - "interval_length": interval used for calculating the
1348                              statistics, in seconds (json-int)
1349         - "min_rd_latency_ns": minimum latency of read operations in
1350                                the defined interval, in nanoseconds
1351                                (json-int)
1352         - "min_wr_latency_ns": minimum latency of write operations in
1353                                the defined interval, in nanoseconds
1354                                (json-int)
1355         - "min_flush_latency_ns": minimum latency of flush operations
1356                                   in the defined interval, in
1357                                   nanoseconds (json-int)
1358         - "max_rd_latency_ns": maximum latency of read operations in
1359                                the defined interval, in nanoseconds
1360                                (json-int)
1361         - "max_wr_latency_ns": maximum latency of write operations in
1362                                the defined interval, in nanoseconds
1363                                (json-int)
1364         - "max_flush_latency_ns": maximum latency of flush operations
1365                                   in the defined interval, in
1366                                   nanoseconds (json-int)
1367         - "avg_rd_latency_ns": average latency of read operations in
1368                                the defined interval, in nanoseconds
1369                                (json-int)
1370         - "avg_wr_latency_ns": average latency of write operations in
1371                                the defined interval, in nanoseconds
1372                                (json-int)
1373         - "avg_flush_latency_ns": average latency of flush operations
1374                                   in the defined interval, in
1375                                   nanoseconds (json-int)
1376         - "avg_rd_queue_depth": average number of pending read
1377                                 operations in the defined interval
1378                                 (json-number)
1379         - "avg_wr_queue_depth": average number of pending write
1380                                 operations in the defined interval
1381                                 (json-number).
1382 - "parent": Contains recursively the statistics of the underlying
1383             protocol (e.g. the host file for a qcow2 image). If there is
1384             no underlying protocol, this field is omitted
1385             (json-object, optional)
1386
1387 Example:
1388
1389 -> { "execute": "query-blockstats" }
1390 <- {
1391       "return":[
1392          {
1393             "device":"ide0-hd0",
1394             "parent":{
1395                "stats":{
1396                   "wr_highest_offset":3686448128,
1397                   "wr_bytes":9786368,
1398                   "wr_operations":751,
1399                   "rd_bytes":122567168,
1400                   "rd_operations":36772
1401                   "wr_total_times_ns":313253456
1402                   "rd_total_times_ns":3465673657
1403                   "flush_total_times_ns":49653
1404                   "flush_operations":61,
1405                   "rd_merged":0,
1406                   "wr_merged":0,
1407                   "idle_time_ns":2953431879,
1408                   "account_invalid":true,
1409                   "account_failed":false
1410                }
1411             },
1412             "stats":{
1413                "wr_highest_offset":2821110784,
1414                "wr_bytes":9786368,
1415                "wr_operations":692,
1416                "rd_bytes":122739200,
1417                "rd_operations":36604
1418                "flush_operations":51,
1419                "wr_total_times_ns":313253456
1420                "rd_total_times_ns":3465673657
1421                "flush_total_times_ns":49653,
1422                "rd_merged":0,
1423                "wr_merged":0,
1424                "idle_time_ns":2953431879,
1425                "account_invalid":true,
1426                "account_failed":false
1427             }
1428          },
1429          {
1430             "device":"ide1-cd0",
1431             "stats":{
1432                "wr_highest_offset":0,
1433                "wr_bytes":0,
1434                "wr_operations":0,
1435                "rd_bytes":0,
1436                "rd_operations":0
1437                "flush_operations":0,
1438                "wr_total_times_ns":0
1439                "rd_total_times_ns":0
1440                "flush_total_times_ns":0,
1441                "rd_merged":0,
1442                "wr_merged":0,
1443                "account_invalid":false,
1444                "account_failed":false
1445             }
1446          },
1447          {
1448             "device":"floppy0",
1449             "stats":{
1450                "wr_highest_offset":0,
1451                "wr_bytes":0,
1452                "wr_operations":0,
1453                "rd_bytes":0,
1454                "rd_operations":0
1455                "flush_operations":0,
1456                "wr_total_times_ns":0
1457                "rd_total_times_ns":0
1458                "flush_total_times_ns":0,
1459                "rd_merged":0,
1460                "wr_merged":0,
1461                "account_invalid":false,
1462                "account_failed":false
1463             }
1464          },
1465          {
1466             "device":"sd0",
1467             "stats":{
1468                "wr_highest_offset":0,
1469                "wr_bytes":0,
1470                "wr_operations":0,
1471                "rd_bytes":0,
1472                "rd_operations":0
1473                "flush_operations":0,
1474                "wr_total_times_ns":0
1475                "rd_total_times_ns":0
1476                "flush_total_times_ns":0,
1477                "rd_merged":0,
1478                "wr_merged":0,
1479                "account_invalid":false,
1480                "account_failed":false
1481             }
1482          }
1483       ]
1484    }
1485
1486 query-command-line-options
1487 --------------------------
1488
1489 Show command line option schema.
1490
1491 Return a json-array of command line option schema for all options (or for
1492 the given option), returning an error if the given option doesn't exist.
1493
1494 Each array entry contains the following:
1495
1496 - "option": option name (json-string)
1497 - "parameters": a json-array describes all parameters of the option:
1498     - "name": parameter name (json-string)
1499     - "type": parameter type (one of 'string', 'boolean', 'number',
1500               or 'size')
1501     - "help": human readable description of the parameter
1502               (json-string, optional)
1503     - "default": default value string for the parameter
1504                  (json-string, optional)
1505
1506 Example:
1507
1508 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
1509 <- { "return": [
1510         {
1511             "parameters": [
1512                 {
1513                     "name": "romfile",
1514                     "type": "string"
1515                 },
1516                 {
1517                     "name": "bootindex",
1518                     "type": "number"
1519                 }
1520             ],
1521             "option": "option-rom"
1522         }
1523      ]
1524    }
1525
1526 query-tpm
1527 ---------
1528
1529 Return information about the TPM device.
1530
1531 Arguments: None
1532
1533 Example:
1534
1535 -> { "execute": "query-tpm" }
1536 <- { "return":
1537      [
1538        { "model": "tpm-tis",
1539          "options":
1540            { "type": "passthrough",
1541              "data":
1542                { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
1543                  "path": "/dev/tpm0"
1544                }
1545            },
1546          "id": "tpm0"
1547        }
1548      ]
1549    }
1550
1551 query-tpm-models
1552 ----------------
1553
1554 Return a list of supported TPM models.
1555
1556 Arguments: None
1557
1558 Example:
1559
1560 -> { "execute": "query-tpm-models" }
1561 <- { "return": [ "tpm-tis" ] }
1562
1563 query-tpm-types
1564 ---------------
1565
1566 Return a list of supported TPM types.
1567
1568 Arguments: None
1569
1570 Example:
1571
1572 -> { "execute": "query-tpm-types" }
1573 <- { "return": [ "passthrough" ] }
1574
1575 chardev-add
1576 ----------------
1577
1578 Add a chardev.
1579
1580 Arguments:
1581
1582 - "id": the chardev's ID, must be unique (json-string)
1583 - "backend": chardev backend type + parameters
1584
1585 Examples:
1586
1587 -> { "execute" : "chardev-add",
1588      "arguments" : { "id" : "foo",
1589                      "backend" : { "type" : "null", "data" : {} } } }
1590 <- { "return": {} }
1591
1592 -> { "execute" : "chardev-add",
1593      "arguments" : { "id" : "bar",
1594                      "backend" : { "type" : "file",
1595                                    "data" : { "out" : "/tmp/bar.log" } } } }
1596 <- { "return": {} }
1597
1598 -> { "execute" : "chardev-add",
1599      "arguments" : { "id" : "baz",
1600                      "backend" : { "type" : "pty", "data" : {} } } }
1601 <- { "return": { "pty" : "/dev/pty/42" } }
1602
1603 chardev-remove
1604 --------------
1605
1606 Remove a chardev.
1607
1608 Arguments:
1609
1610 - "id": the chardev's ID, must exist and not be in use (json-string)
1611
1612 Example:
1613
1614 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
1615 <- { "return": {} }
1616
1617 query-rx-filter
1618 ---------------
1619
1620 Show rx-filter information.
1621
1622 Returns a json-array of rx-filter information for all NICs (or for the
1623 given NIC), returning an error if the given NIC doesn't exist, or
1624 given NIC doesn't support rx-filter querying, or given net client
1625 isn't a NIC.
1626
1627 The query will clear the event notification flag of each NIC, then qemu
1628 will start to emit event to QMP monitor.
1629
1630 Each array entry contains the following:
1631
1632 - "name": net client name (json-string)
1633 - "promiscuous": promiscuous mode is enabled (json-bool)
1634 - "multicast": multicast receive state (one of 'normal', 'none', 'all')
1635 - "unicast": unicast receive state  (one of 'normal', 'none', 'all')
1636 - "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
1637 - "broadcast-allowed": allow to receive broadcast (json-bool)
1638 - "multicast-overflow": multicast table is overflowed (json-bool)
1639 - "unicast-overflow": unicast table is overflowed (json-bool)
1640 - "main-mac": main macaddr string (json-string)
1641 - "vlan-table": a json-array of active vlan id
1642 - "unicast-table": a json-array of unicast macaddr string
1643 - "multicast-table": a json-array of multicast macaddr string
1644
1645 Example:
1646
1647 -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
1648 <- { "return": [
1649         {
1650             "promiscuous": true,
1651             "name": "vnet0",
1652             "main-mac": "52:54:00:12:34:56",
1653             "unicast": "normal",
1654             "vlan": "normal",
1655             "vlan-table": [
1656                 4,
1657                 0
1658             ],
1659             "unicast-table": [
1660             ],
1661             "multicast": "normal",
1662             "multicast-overflow": false,
1663             "unicast-overflow": false,
1664             "multicast-table": [
1665                 "01:00:5e:00:00:01",
1666                 "33:33:00:00:00:01",
1667                 "33:33:ff:12:34:56"
1668             ],
1669             "broadcast-allowed": false
1670         }
1671       ]
1672    }
1673
1674 blockdev-add
1675 ------------
1676
1677 Add a block device.
1678
1679 This command is still a work in progress.  It doesn't support all
1680 block drivers among other things.  Stay away from it unless you want
1681 to help with its development.
1682
1683 For the arguments, see the QAPI schema documentation of BlockdevOptions.
1684
1685 Example (1):
1686
1687 -> { "execute": "blockdev-add",
1688     "arguments": { "driver": "qcow2",
1689                    "file": { "driver": "file",
1690                              "filename": "test.qcow2" } } }
1691 <- { "return": {} }
1692
1693 Example (2):
1694
1695 -> { "execute": "blockdev-add",
1696      "arguments": {
1697          "driver": "qcow2",
1698          "node-name": "my_disk",
1699          "discard": "unmap",
1700          "cache": {
1701              "direct": true,
1702              "writeback": true
1703          },
1704          "file": {
1705              "driver": "file",
1706              "filename": "/tmp/test.qcow2"
1707          },
1708          "backing": {
1709              "driver": "raw",
1710              "file": {
1711                  "driver": "file",
1712                  "filename": "/dev/fdset/4"
1713              }
1714          }
1715        }
1716      }
1717
1718 <- { "return": {} }
1719
1720 x-blockdev-del
1721 ------------
1722 Since 2.5
1723
1724 Deletes a block device that has been added using blockdev-add.
1725 The command will fail if the node is attached to a device or is
1726 otherwise being used.
1727
1728 This command is still a work in progress and is considered
1729 experimental. Stay away from it unless you want to help with its
1730 development.
1731
1732 Arguments:
1733
1734 - "node-name": Name of the graph node to delete (json-string)
1735
1736 Example:
1737
1738 -> { "execute": "blockdev-add",
1739      "arguments": {
1740          "driver": "qcow2",
1741          "node-name": "node0",
1742          "file": {
1743              "driver": "file",
1744              "filename": "test.qcow2"
1745          }
1746      }
1747    }
1748
1749 <- { "return": {} }
1750
1751 -> { "execute": "x-blockdev-del",
1752      "arguments": { "node-name": "node0" }
1753    }
1754 <- { "return": {} }
1755
1756 blockdev-open-tray
1757 ------------------
1758
1759 Opens a block device's tray. If there is a block driver state tree inserted as a
1760 medium, it will become inaccessible to the guest (but it will remain associated
1761 to the block device, so closing the tray will make it accessible again).
1762
1763 If the tray was already open before, this will be a no-op.
1764
1765 Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in
1766 which no such event will be generated, these include:
1767 - if the guest has locked the tray, @force is false and the guest does not
1768   respond to the eject request
1769 - if the BlockBackend denoted by @device does not have a guest device attached
1770   to it
1771 - if the guest device does not have an actual tray and is empty, for instance
1772   for floppy disk drives
1773
1774 Arguments:
1775
1776 - "device": block device name (deprecated, use @id instead)
1777             (json-string, optional)
1778 - "id": the name or QOM path of the guest device (json-string, optional)
1779 - "force": if false (the default), an eject request will be sent to the guest if
1780            it has locked the tray (and the tray will not be opened immediately);
1781            if true, the tray will be opened regardless of whether it is locked
1782            (json-bool, optional)
1783
1784 Example:
1785
1786 -> { "execute": "blockdev-open-tray",
1787      "arguments": { "id": "ide0-1-0" } }
1788
1789 <- { "timestamp": { "seconds": 1418751016,
1790                     "microseconds": 716996 },
1791      "event": "DEVICE_TRAY_MOVED",
1792      "data": { "device": "ide1-cd0",
1793                "id": "ide0-1-0",
1794                "tray-open": true } }
1795
1796 <- { "return": {} }
1797
1798 blockdev-close-tray
1799 -------------------
1800
1801 Closes a block device's tray. If there is a block driver state tree associated
1802 with the block device (which is currently ejected), that tree will be loaded as
1803 the medium.
1804
1805 If the tray was already closed before, this will be a no-op.
1806
1807 Arguments:
1808
1809 - "device": block device name (deprecated, use @id instead)
1810             (json-string, optional)
1811 - "id": the name or QOM path of the guest device (json-string, optional)
1812
1813 Example:
1814
1815 -> { "execute": "blockdev-close-tray",
1816      "arguments": { "id": "ide0-1-0" } }
1817
1818 <- { "timestamp": { "seconds": 1418751345,
1819                     "microseconds": 272147 },
1820      "event": "DEVICE_TRAY_MOVED",
1821      "data": { "device": "ide1-cd0",
1822                "id": "ide0-1-0",
1823                "tray-open": false } }
1824
1825 <- { "return": {} }
1826
1827 x-blockdev-remove-medium
1828 ------------------------
1829
1830 Removes a medium (a block driver state tree) from a block device. That block
1831 device's tray must currently be open (unless there is no attached guest device).
1832
1833 If the tray is open and there is no medium inserted, this will be a no-op.
1834
1835 This command is still a work in progress and is considered experimental.
1836 Stay away from it unless you want to help with its development.
1837
1838 Arguments:
1839
1840 - "device": block device name (deprecated, use @id instead)
1841             (json-string, optional)
1842 - "id": the name or QOM path of the guest device (json-string, optional)
1843
1844 Example:
1845
1846 -> { "execute": "x-blockdev-remove-medium",
1847      "arguments": { "id": "ide0-1-0" } }
1848
1849 <- { "error": { "class": "GenericError",
1850                 "desc": "Tray of device 'ide0-1-0' is not open" } }
1851
1852 -> { "execute": "blockdev-open-tray",
1853      "arguments": { "id": "ide0-1-0" } }
1854
1855 <- { "timestamp": { "seconds": 1418751627,
1856                     "microseconds": 549958 },
1857      "event": "DEVICE_TRAY_MOVED",
1858      "data": { "device": "ide1-cd0",
1859                "id": "ide0-1-0",
1860                "tray-open": true } }
1861
1862 <- { "return": {} }
1863
1864 -> { "execute": "x-blockdev-remove-medium",
1865      "arguments": { "device": "ide0-1-0" } }
1866
1867 <- { "return": {} }
1868
1869 x-blockdev-insert-medium
1870 ------------------------
1871
1872 Inserts a medium (a block driver state tree) into a block device. That block
1873 device's tray must currently be open (unless there is no attached guest device)
1874 and there must be no medium inserted already.
1875
1876 This command is still a work in progress and is considered experimental.
1877 Stay away from it unless you want to help with its development.
1878
1879 Arguments:
1880
1881 - "device": block device name (deprecated, use @id instead)
1882             (json-string, optional)
1883 - "id": the name or QOM path of the guest device (json-string, optional)
1884 - "node-name": root node of the BDS tree to insert into the block device
1885
1886 Example:
1887
1888 -> { "execute": "blockdev-add",
1889      "arguments": { { "node-name": "node0",
1890                       "driver": "raw",
1891                       "file": { "driver": "file",
1892                                 "filename": "fedora.iso" } } }
1893
1894 <- { "return": {} }
1895
1896 -> { "execute": "x-blockdev-insert-medium",
1897      "arguments": { "id": "ide0-1-0",
1898                     "node-name": "node0" } }
1899
1900 <- { "return": {} }
1901
1902 x-blockdev-change
1903 -----------------
1904
1905 Dynamically reconfigure the block driver state graph. It can be used
1906 to add, remove, insert or replace a graph node. Currently only the
1907 Quorum driver implements this feature to add or remove its child. This
1908 is useful to fix a broken quorum child.
1909
1910 If @node is specified, it will be inserted under @parent. @child
1911 may not be specified in this case. If both @parent and @child are
1912 specified but @node is not, @child will be detached from @parent.
1913
1914 Arguments:
1915 - "parent": the id or name of the parent node (json-string)
1916 - "child": the name of a child under the given parent node (json-string, optional)
1917 - "node": the name of the node that will be added (json-string, optional)
1918
1919 Note: this command is experimental, and not a stable API. It doesn't
1920 support all kinds of operations, all kinds of children, nor all block
1921 drivers.
1922
1923 Warning: The data in a new quorum child MUST be consistent with that of
1924 the rest of the array.
1925
1926 Example:
1927
1928 Add a new node to a quorum
1929 -> { "execute": "blockdev-add",
1930      "arguments": { "driver": "raw",
1931                     "node-name": "new_node",
1932                     "file": { "driver": "file",
1933                               "filename": "test.raw" } } }
1934 <- { "return": {} }
1935 -> { "execute": "x-blockdev-change",
1936      "arguments": { "parent": "disk1",
1937                     "node": "new_node" } }
1938 <- { "return": {} }
1939
1940 Delete a quorum's node
1941 -> { "execute": "x-blockdev-change",
1942      "arguments": { "parent": "disk1",
1943                     "child": "children.1" } }
1944 <- { "return": {} }
1945
1946 query-named-block-nodes
1947 -----------------------
1948
1949 Return a list of BlockDeviceInfo for all the named block driver nodes
1950
1951 Example:
1952
1953 -> { "execute": "query-named-block-nodes" }
1954 <- { "return": [ { "ro":false,
1955                    "drv":"qcow2",
1956                    "encrypted":false,
1957                    "file":"disks/test.qcow2",
1958                    "node-name": "my-node",
1959                    "backing_file_depth":1,
1960                    "bps":1000000,
1961                    "bps_rd":0,
1962                    "bps_wr":0,
1963                    "iops":1000000,
1964                    "iops_rd":0,
1965                    "iops_wr":0,
1966                    "bps_max": 8000000,
1967                    "bps_rd_max": 0,
1968                    "bps_wr_max": 0,
1969                    "iops_max": 0,
1970                    "iops_rd_max": 0,
1971                    "iops_wr_max": 0,
1972                    "iops_size": 0,
1973                    "write_threshold": 0,
1974                    "image":{
1975                       "filename":"disks/test.qcow2",
1976                       "format":"qcow2",
1977                       "virtual-size":2048000,
1978                       "backing_file":"base.qcow2",
1979                       "full-backing-filename":"disks/base.qcow2",
1980                       "backing-filename-format":"qcow2",
1981                       "snapshots":[
1982                          {
1983                             "id": "1",
1984                             "name": "snapshot1",
1985                             "vm-state-size": 0,
1986                             "date-sec": 10000200,
1987                             "date-nsec": 12,
1988                             "vm-clock-sec": 206,
1989                             "vm-clock-nsec": 30
1990                          }
1991                       ],
1992                       "backing-image":{
1993                           "filename":"disks/base.qcow2",
1994                           "format":"qcow2",
1995                           "virtual-size":2048000
1996                       }
1997                    } } ] }
1998
1999 blockdev-change-medium
2000 ----------------------
2001
2002 Changes the medium inserted into a block device by ejecting the current medium
2003 and loading a new image file which is inserted as the new medium.
2004
2005 Arguments:
2006
2007 - "device": block device name (deprecated, use @id instead)
2008             (json-string, optional)
2009 - "id": the name or QOM path of the guest device (json-string, optional)
2010 - "filename": filename of the new image (json-string)
2011 - "format": format of the new image (json-string, optional)
2012 - "read-only-mode": new read-only mode (json-string, optional)
2013           - Possible values: "retain" (default), "read-only", "read-write"
2014
2015 Examples:
2016
2017 1. Change a removable medium
2018
2019 -> { "execute": "blockdev-change-medium",
2020              "arguments": { "id": "ide0-1-0",
2021                             "filename": "/srv/images/Fedora-12-x86_64-DVD.iso",
2022                             "format": "raw" } }
2023 <- { "return": {} }
2024
2025 2. Load a read-only medium into a writable drive
2026
2027 -> { "execute": "blockdev-change-medium",
2028              "arguments": { "id": "floppyA",
2029                             "filename": "/srv/images/ro.img",
2030                             "format": "raw",
2031                             "read-only-mode": "retain" } }
2032
2033 <- { "error":
2034      { "class": "GenericError",
2035        "desc": "Could not open '/srv/images/ro.img': Permission denied" } }
2036
2037 -> { "execute": "blockdev-change-medium",
2038              "arguments": { "id": "floppyA",
2039                             "filename": "/srv/images/ro.img",
2040                             "format": "raw",
2041                             "read-only-mode": "read-only" } }
2042
2043 <- { "return": {} }
2044
2045 query-memdev
2046 ------------
2047
2048 Show memory devices information.
2049
2050
2051 Example (1):
2052
2053 -> { "execute": "query-memdev" }
2054 <- { "return": [
2055        {
2056          "size": 536870912,
2057          "merge": false,
2058          "dump": true,
2059          "prealloc": false,
2060          "host-nodes": [0, 1],
2061          "policy": "bind"
2062        },
2063        {
2064          "id": "mem1",
2065          "size": 536870912,
2066          "merge": false,
2067          "dump": true,
2068          "prealloc": true,
2069          "host-nodes": [2, 3],
2070          "policy": "preferred"
2071        }
2072      ]
2073    }
2074
2075 query-memory-devices
2076 --------------------
2077
2078 Return a list of memory devices.
2079
2080 Example:
2081 -> { "execute": "query-memory-devices" }
2082 <- { "return": [ { "data":
2083                       { "addr": 5368709120,
2084                         "hotpluggable": true,
2085                         "hotplugged": true,
2086                         "id": "d1",
2087                         "memdev": "/objects/memX",
2088                         "node": 0,
2089                         "size": 1073741824,
2090                         "slot": 0},
2091                    "type": "dimm"
2092                  } ] }
2093
2094 query-acpi-ospm-status
2095 ----------------------
2096
2097 Return list of ACPIOSTInfo for devices that support status reporting
2098 via ACPI _OST method.
2099
2100 Example:
2101 -> { "execute": "query-acpi-ospm-status" }
2102 <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
2103                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
2104                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
2105                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
2106    ]}
2107
2108 rtc-reset-reinjection
2109 ---------------------
2110
2111 Reset the RTC interrupt reinjection backlog.
2112
2113 Arguments: None.
2114
2115 Example:
2116
2117 -> { "execute": "rtc-reset-reinjection" }
2118 <- { "return": {} }
2119
2120 trace-event-get-state
2121 ---------------------
2122
2123 Query the state of events.
2124
2125 Arguments:
2126
2127 - "name": Event name pattern (json-string).
2128 - "vcpu": The vCPU to query, any vCPU by default (json-int, optional).
2129
2130 An event is returned if:
2131 - its name matches the "name" pattern, and
2132 - if "vcpu" is given, the event has the "vcpu" property.
2133
2134 Therefore, if "vcpu" is given, the operation will only match per-vCPU events,
2135 returning their state on the specified vCPU. Special case: if "name" is an exact
2136 match, "vcpu" is given and the event does not have the "vcpu" property, an error
2137 is returned.
2138
2139 Example:
2140
2141 -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
2142 <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
2143
2144 trace-event-set-state
2145 ---------------------
2146
2147 Set the state of events.
2148
2149 Arguments:
2150
2151 - "name": Event name pattern (json-string).
2152 - "enable": Whether to enable or disable the event (json-bool).
2153 - "ignore-unavailable": Whether to ignore errors for events that cannot be
2154   changed (json-bool, optional).
2155 - "vcpu": The vCPU to act upon, all vCPUs by default (json-int, optional).
2156
2157 An event's state is modified if:
2158 - its name matches the "name" pattern, and
2159 - if "vcpu" is given, the event has the "vcpu" property.
2160
2161 Therefore, if "vcpu" is given, the operation will only match per-vCPU events,
2162 setting their state on the specified vCPU. Special case: if "name" is an exact
2163 match, "vcpu" is given and the event does not have the "vcpu" property, an error
2164 is returned.
2165
2166 Example:
2167
2168 -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
2169 <- { "return": {} }
2170
2171 input-send-event
2172 ----------------
2173
2174 Send input event to guest.
2175
2176 Arguments:
2177
2178 - "device": display device (json-string, optional)
2179 - "head": display head (json-int, optional)
2180 - "events": list of input events
2181
2182 The consoles are visible in the qom tree, under
2183 /backend/console[$index]. They have a device link and head property, so
2184 it is possible to map which console belongs to which device and display.
2185
2186 Example (1):
2187
2188 Press left mouse button.
2189
2190 -> { "execute": "input-send-event",
2191     "arguments": { "device": "video0",
2192                    "events": [ { "type": "btn",
2193                    "data" : { "down": true, "button": "left" } } ] } }
2194 <- { "return": {} }
2195
2196 -> { "execute": "input-send-event",
2197     "arguments": { "device": "video0",
2198                    "events": [ { "type": "btn",
2199                    "data" : { "down": false, "button": "left" } } ] } }
2200 <- { "return": {} }
2201
2202 Example (2):
2203
2204 Press ctrl-alt-del.
2205
2206 -> { "execute": "input-send-event",
2207      "arguments": { "events": [
2208         { "type": "key", "data" : { "down": true,
2209           "key": {"type": "qcode", "data": "ctrl" } } },
2210         { "type": "key", "data" : { "down": true,
2211           "key": {"type": "qcode", "data": "alt" } } },
2212         { "type": "key", "data" : { "down": true,
2213           "key": {"type": "qcode", "data": "delete" } } } ] } }
2214 <- { "return": {} }
2215
2216 Example (3):
2217
2218 Move mouse pointer to absolute coordinates (20000, 400).
2219
2220 -> { "execute": "input-send-event" ,
2221   "arguments": { "events": [
2222                { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
2223                { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
2224 <- { "return": {} }
2225
2226 block-set-write-threshold
2227 ------------
2228
2229 Change the write threshold for a block drive. The threshold is an offset,
2230 thus must be non-negative. Default is no write threshold.
2231 Setting the threshold to zero disables it.
2232
2233 Arguments:
2234
2235 - "node-name": the node name in the block driver state graph (json-string)
2236 - "write-threshold": the write threshold in bytes (json-int)
2237
2238 Example:
2239
2240 -> { "execute": "block-set-write-threshold",
2241   "arguments": { "node-name": "mydev",
2242                  "write-threshold": 17179869184 } }
2243 <- { "return": {} }
2244
2245 Show rocker switch
2246 ------------------
2247
2248 Arguments:
2249
2250 - "name": switch name
2251
2252 Example:
2253
2254 -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
2255 <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
2256
2257 Show rocker switch ports
2258 ------------------------
2259
2260 Arguments:
2261
2262 - "name": switch name
2263
2264 Example:
2265
2266 -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
2267 <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
2268                   "autoneg": "off", "link-up": true, "speed": 10000},
2269                  {"duplex": "full", "enabled": true, "name": "sw1.2",
2270                   "autoneg": "off", "link-up": true, "speed": 10000}
2271    ]}
2272
2273 Show rocker switch OF-DPA flow tables
2274 -------------------------------------
2275
2276 Arguments:
2277
2278 - "name": switch name
2279 - "tbl-id": (optional) flow table ID
2280
2281 Example:
2282
2283 -> { "execute": "query-rocker-of-dpa-flows", "arguments": { "name": "sw1" } }
2284 <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
2285                   "hits": 138,
2286                   "cookie": 0,
2287                   "action": {"goto-tbl": 10},
2288                   "mask": {"in-pport": 4294901760}
2289                  },
2290                  {...more...},
2291    ]}
2292
2293 Show rocker OF-DPA group tables
2294 -------------------------------
2295
2296 Arguments:
2297
2298 - "name": switch name
2299 - "type": (optional) group type
2300
2301 Example:
2302
2303 -> { "execute": "query-rocker-of-dpa-groups", "arguments": { "name": "sw1" } }
2304 <- { "return": [ {"type": 0, "out-pport": 2, "pport": 2, "vlan-id": 3841,
2305                   "pop-vlan": 1, "id": 251723778},
2306                  {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3841,
2307                   "pop-vlan": 1, "id": 251723776},
2308                  {"type": 0, "out-pport": 1, "pport": 1, "vlan-id": 3840,
2309                   "pop-vlan": 1, "id": 251658241},
2310                  {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840,
2311                   "pop-vlan": 1, "id": 251658240}
2312    ]}
2313
2314 query-gic-capabilities
2315 ---------------
2316
2317 Return a list of GICCapability objects, describing supported GIC
2318 (Generic Interrupt Controller) versions.
2319
2320 Arguments: None
2321
2322 Example:
2323
2324 -> { "execute": "query-gic-capabilities" }
2325 <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
2326                 { "version": 3, "emulated": false, "kernel": true } ] }
2327
2328 Show existing/possible CPUs
2329 ---------------------------
2330
2331 Arguments: None.
2332
2333 Example for pseries machine type started with
2334 -smp 2,cores=2,maxcpus=4 -cpu POWER8:
2335
2336 -> { "execute": "query-hotpluggable-cpus" }
2337 <- {"return": [
2338      { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
2339        "vcpus-count": 1 },
2340      { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
2341        "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
2342    ]}'
2343
2344 Example for pc machine type started with
2345 -smp 1,maxcpus=2:
2346     -> { "execute": "query-hotpluggable-cpus" }
2347     <- {"return": [
2348          {
2349             "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
2350             "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
2351          },
2352          {
2353             "qom-path": "/machine/unattached/device[0]",
2354             "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
2355             "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
2356          }
2357        ]}
This page took 0.158384 seconds and 4 git commands to generate.