5 # This document describes all commands currently supported by QMP.
7 # Most of the time their usage is exactly the same as in the user Monitor, this
8 # means that any other document which also describe commands (the manpage,
9 # QEMU's manual, etc) can and should be consulted.
11 # QMP has two types of commands: regular and query commands. Regular commands
12 # usually change the Virtual Machine's state someway, while query commands just
13 # return information. The sections below are divided accordingly.
15 # It's important to observe that all communication examples are formatted in
16 # a reader-friendly way, so that they're easier to understand. However, in real
17 # protocol usage, they're emitted as a single line.
19 # Also, the following notation is used to denote data flow:
23 # | -> data issued by the Client
24 # | <- Server data response
26 # Please, refer to the QMP specification (docs/qmp-spec.txt) for
27 # detailed information on the Server command and response formats.
29 # = Stability Considerations
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.
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.
38 # If you're planning to adopt QMP, please observe the following:
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
44 # 2. DO NOT rely on anything which is not explicit documented
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)
52 { 'pragma': { 'doc-required': true } }
54 # Whitelists to permit QAPI rule violations; think twice before you
57 # Commands allowed to return a non-dictionary:
58 'returns-whitelist': [
59 'human-monitor-command',
61 'query-migrate-cache-size',
65 'name-case-whitelist': [
66 'ACPISlotType', # DIMM, visible through query-acpi-ospm-status
67 'CpuInfoMIPS', # PC, visible through query-cpu
68 'CpuInfoTricore', # PC, visible through query-cpu
69 'QapiErrorClass', # all members, visible through errors
70 'UuidInfo', # UUID, visible through query-uuid
71 'X86CPURegister32', # all members, visible indirectly through qom-get
72 'q_obj_CpuInfo-base' # CPU, visible through query-cpu
75 # QAPI common definitions
76 { 'include': 'qapi/common.json' }
78 # QAPI crypto definitions
79 { 'include': 'qapi/crypto.json' }
81 # QAPI block definitions
82 { 'include': 'qapi/block.json' }
84 # QAPI event definitions
85 { 'include': 'qapi/event.json' }
88 { 'include': 'qapi/trace.json' }
91 { 'include': 'qapi/introspect.json' }
100 # Enable QMP capabilities.
106 # -> { "execute": "qmp_capabilities" }
107 # <- { "return": {} }
109 # Notes: This command is valid exactly when first connecting: it must be
110 # issued before any other command will be accepted, and will fail once the
111 # monitor is accepting other commands. (see qemu docs/qmp-spec.txt)
116 { 'command': 'qmp_capabilities' }
121 # Policy for handling lost ticks in timer devices.
123 # @discard: throw away the missed tick(s) and continue with future injection
124 # normally. Guest time may be delayed, unless the OS has explicit
125 # handling of lost ticks
127 # @delay: continue to deliver ticks at the normal rate. Guest time will be
128 # delayed due to the late tick
130 # @merge: merge the missed tick(s) into one tick and inject. Guest time
131 # may be delayed, depending on how the OS reacts to the merging
134 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
135 # guest time should not be delayed once catchup is complete.
139 { 'enum': 'LostTickPolicy',
140 'data': ['discard', 'delay', 'merge', 'slew' ] }
145 # Allow client connections for VNC, Spice and socket based
146 # character devices to be passed in to QEMU via SCM_RIGHTS.
148 # @protocol: protocol name. Valid names are "vnc", "spice" or the
149 # name of a character device (eg. from -chardev id=XXXX)
151 # @fdname: file descriptor name previously passed via 'getfd' command
153 # @skipauth: whether to skip authentication. Only applies
154 # to "vnc" and "spice" protocols
156 # @tls: whether to perform TLS. Only applies to the "spice"
159 # Returns: nothing on success.
165 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
166 # "fdname": "myclient" } }
167 # <- { "return": {} }
170 { 'command': 'add_client',
171 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
177 # Guest name information.
179 # @name: The name of the guest
183 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
188 # Return the name information of a guest.
190 # Returns: @NameInfo of the guest
196 # -> { "execute": "query-name" }
197 # <- { "return": { "name": "qemu-name" } }
200 { 'command': 'query-name', 'returns': 'NameInfo' }
205 # Information about support for KVM acceleration
207 # @enabled: true if KVM acceleration is active
209 # @present: true if KVM acceleration is built into this executable
213 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
218 # Returns information about KVM acceleration
226 # -> { "execute": "query-kvm" }
227 # <- { "return": { "enabled": true, "present": true } }
230 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
235 # An enumeration of VM run states.
237 # @debug: QEMU is running on a debugger
239 # @finish-migrate: guest is paused to finish the migration process
241 # @inmigrate: guest is paused waiting for an incoming migration. Note
242 # that this state does not tell whether the machine will start at the
243 # end of the migration. This depends on the command-line -S option and
244 # any invocation of 'stop' or 'cont' that has happened since QEMU was
247 # @internal-error: An internal error that prevents further guest execution
250 # @io-error: the last IOP has failed and the device is configured to pause
253 # @paused: guest has been paused via the 'stop' command
255 # @postmigrate: guest is paused following a successful 'migrate'
257 # @prelaunch: QEMU was started with -S and guest has not started
259 # @restore-vm: guest is paused to restore VM state
261 # @running: guest is actively running
263 # @save-vm: guest is paused to save the VM state
265 # @shutdown: guest is shut down (and -no-shutdown is in use)
267 # @suspended: guest is suspended (ACPI S3)
269 # @watchdog: the watchdog action is configured to pause and has been triggered
271 # @guest-panicked: guest has been panicked as a result of guest OS panic
273 # @colo: guest is paused to save/restore VM state under colo checkpoint,
274 # VM can not get into this state unless colo capability is enabled
275 # for migration. (since 2.8)
277 { 'enum': 'RunState',
278 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
279 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
280 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
281 'guest-panicked', 'colo' ] }
286 # Information about VCPU run state
288 # @running: true if all VCPUs are runnable, false if not runnable
290 # @singlestep: true if VCPUs are in single-step mode
292 # @status: the virtual machine @RunState
296 # Notes: @singlestep is enabled through the GDB stub
298 { 'struct': 'StatusInfo',
299 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
304 # Query the run status of all VCPUs
306 # Returns: @StatusInfo reflecting all VCPUs
312 # -> { "execute": "query-status" }
313 # <- { "return": { "running": true,
314 # "singlestep": false,
315 # "status": "running" } }
318 { 'command': 'query-status', 'returns': 'StatusInfo' }
323 # Guest UUID information (Universally Unique Identifier).
325 # @UUID: the UUID of the guest
329 # Notes: If no UUID was specified for the guest, a null UUID is returned.
331 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
336 # Query the guest UUID information.
338 # Returns: The @UuidInfo for the guest
344 # -> { "execute": "query-uuid" }
345 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
348 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
353 # Information about a character device.
355 # @label: the label of the character device
357 # @filename: the filename of the character device
359 # @frontend-open: shows whether the frontend device attached to this backend
360 # (eg. with the chardev=... option) is in open or closed state
363 # Notes: @filename is encoded using the QEMU command line character device
364 # encoding. See the QEMU man page for details.
368 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
370 'frontend-open': 'bool'} }
375 # Returns information about current character devices.
377 # Returns: a list of @ChardevInfo
383 # -> { "execute": "query-chardev" }
387 # "label": "charchannel0",
388 # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
389 # "frontend-open": false
392 # "label": "charmonitor",
393 # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
394 # "frontend-open": true
397 # "label": "charserial0",
398 # "filename": "pty:/dev/pts/2",
399 # "frontend-open": true
405 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
408 # @ChardevBackendInfo:
410 # Information about a character device backend
412 # @name: The backend name
416 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
419 # @query-chardev-backends:
421 # Returns information about character device backends.
423 # Returns: a list of @ChardevBackendInfo
429 # -> { "execute": "query-chardev-backends" }
448 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
453 # An enumeration of data format.
455 # @utf8: Data is a UTF-8 string (RFC 3629)
457 # @base64: Data is Base64 encoded binary (RFC 3548)
461 { 'enum': 'DataFormat',
462 'data': [ 'utf8', 'base64' ] }
467 # Write to a ring buffer character device.
469 # @device: the ring buffer character device name
471 # @data: data to write
473 # @format: data encoding (default 'utf8').
474 # - base64: data must be base64 encoded text. Its binary
475 # decoding gets written.
476 # - utf8: data's UTF-8 encoding is written
477 # - data itself is always Unicode regardless of format, like
480 # Returns: Nothing on success
486 # -> { "execute": "ringbuf-write",
487 # "arguments": { "device": "foo",
488 # "data": "abcdefgh",
489 # "format": "utf8" } }
490 # <- { "return": {} }
493 { 'command': 'ringbuf-write',
494 'data': {'device': 'str', 'data': 'str',
495 '*format': 'DataFormat'} }
500 # Read from a ring buffer character device.
502 # @device: the ring buffer character device name
504 # @size: how many bytes to read at most
506 # @format: data encoding (default 'utf8').
507 # - base64: the data read is returned in base64 encoding.
508 # - utf8: the data read is interpreted as UTF-8.
509 # Bug: can screw up when the buffer contains invalid UTF-8
510 # sequences, NUL characters, after the ring buffer lost
511 # data, and when reading stops because the size limit is
513 # - The return value is always Unicode regardless of format,
514 # like any other string.
516 # Returns: data read from the device
522 # -> { "execute": "ringbuf-read",
523 # "arguments": { "device": "foo",
525 # "format": "utf8" } }
526 # <- { "return": "abcdefgh" }
529 { 'command': 'ringbuf-read',
530 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
536 # Information about a QMP event
538 # @name: The event name
542 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
547 # Return a list of supported QMP events by this server
549 # Returns: A list of @EventInfo for all supported events
555 # -> { "execute": "query-events" }
567 # Note: This example has been shortened as the real response is too long.
570 { 'command': 'query-events', 'returns': ['EventInfo'] }
575 # Detailed migration status.
577 # @transferred: amount of bytes already transferred to the target VM
579 # @remaining: amount of bytes remaining to be transferred to the target VM
581 # @total: total amount of bytes involved in the migration process
583 # @duplicate: number of duplicate (zero) pages (since 1.2)
585 # @skipped: number of skipped zero pages (since 1.5)
587 # @normal: number of normal pages (since 1.2)
589 # @normal-bytes: number of normal bytes sent (since 1.2)
591 # @dirty-pages-rate: number of pages dirtied by second by the
594 # @mbps: throughput in megabits/sec. (since 1.6)
596 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
598 # @postcopy-requests: The number of page requests received from the destination
603 { 'struct': 'MigrationStats',
604 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
605 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
606 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
607 'mbps' : 'number', 'dirty-sync-count' : 'int',
608 'postcopy-requests' : 'int' } }
613 # Detailed XBZRLE migration cache statistics
615 # @cache-size: XBZRLE cache size
617 # @bytes: amount of bytes already transferred to the target VM
619 # @pages: amount of pages transferred to the target VM
621 # @cache-miss: number of cache miss
623 # @cache-miss-rate: rate of cache miss (since 2.1)
625 # @overflow: number of overflows
629 { 'struct': 'XBZRLECacheStats',
630 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
631 'cache-miss': 'int', 'cache-miss-rate': 'number',
632 'overflow': 'int' } }
637 # An enumeration of migration status.
639 # @none: no migration has ever happened.
641 # @setup: migration process has been initiated.
643 # @cancelling: in the process of cancelling migration.
645 # @cancelled: cancelling migration is finished.
647 # @active: in the process of doing migration.
649 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
651 # @completed: migration is finished.
653 # @failed: some error occurred during migration process.
655 # @colo: VM is in the process of fault tolerance, VM can not get into this
656 # state unless colo capability is enabled for migration. (since 2.8)
661 { 'enum': 'MigrationStatus',
662 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
663 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
668 # Information about current migration process.
670 # @status: @MigrationStatus describing the current migration status.
671 # If this field is not returned, no migration process
674 # @ram: @MigrationStats containing detailed migration
675 # status, only returned if status is 'active' or
676 # 'completed'(since 1.2)
678 # @disk: @MigrationStats containing detailed disk migration
679 # status, only returned if status is 'active' and it is a block
682 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
683 # migration statistics, only returned if XBZRLE feature is on and
684 # status is 'active' or 'completed' (since 1.2)
686 # @total-time: total amount of milliseconds since migration started.
687 # If migration has ended, it returns the total migration
690 # @downtime: only present when migration finishes correctly
691 # total downtime in milliseconds for the guest.
694 # @expected-downtime: only present while migration is active
695 # expected downtime in milliseconds for the guest in last walk
696 # of the dirty bitmap. (since 1.3)
698 # @setup-time: amount of setup time in milliseconds _before_ the
699 # iterations begin but _after_ the QMP command is issued. This is designed
700 # to provide an accounting of any activities (such as RDMA pinning) which
701 # may be expensive, but do not actually occur during the iterative
702 # migration rounds themselves. (since 1.6)
704 # @cpu-throttle-percentage: percentage of time guest cpus are being
705 # throttled during auto-converge. This is only present when auto-converge
706 # has started throttling guest cpus. (Since 2.7)
708 # @error-desc: the human readable error description string, when
709 # @status is 'failed'. Clients should not attempt to parse the
710 # error strings. (Since 2.7)
714 { 'struct': 'MigrationInfo',
715 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
716 '*disk': 'MigrationStats',
717 '*xbzrle-cache': 'XBZRLECacheStats',
718 '*total-time': 'int',
719 '*expected-downtime': 'int',
721 '*setup-time': 'int',
722 '*cpu-throttle-percentage': 'int',
723 '*error-desc': 'str'} }
728 # Returns information about current migration process. If migration
729 # is active there will be another json-object with RAM migration
730 # status and if block migration is active another one with block
733 # Returns: @MigrationInfo
739 # 1. Before the first migration
741 # -> { "execute": "query-migrate" }
742 # <- { "return": {} }
744 # 2. Migration is done and has succeeded
746 # -> { "execute": "query-migrate" }
748 # "status": "completed",
753 # "total-time":12345,
754 # "setup-time":12345,
758 # "normal-bytes":123456,
759 # "dirty-sync-count":15
764 # 3. Migration is done and has failed
766 # -> { "execute": "query-migrate" }
767 # <- { "return": { "status": "failed" } }
769 # 4. Migration is being performed and is not a block migration:
771 # -> { "execute": "query-migrate" }
779 # "total-time":12345,
780 # "setup-time":12345,
781 # "expected-downtime":12345,
784 # "normal-bytes":123456,
785 # "dirty-sync-count":15
790 # 5. Migration is being performed and is a block migration:
792 # -> { "execute": "query-migrate" }
798 # "remaining":1053304,
799 # "transferred":3720,
800 # "total-time":12345,
801 # "setup-time":12345,
802 # "expected-downtime":12345,
805 # "normal-bytes":123456,
806 # "dirty-sync-count":15
810 # "remaining":20880384,
811 # "transferred":91136
816 # 6. Migration is being performed and XBZRLE is active:
818 # -> { "execute": "query-migrate" }
822 # "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
825 # "remaining":1053304,
826 # "transferred":3720,
827 # "total-time":12345,
828 # "setup-time":12345,
829 # "expected-downtime":12345,
832 # "normal-bytes":3412992,
833 # "dirty-sync-count":15
836 # "cache-size":67108864,
840 # "cache-miss-rate":0.123,
847 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
850 # @MigrationCapability:
852 # Migration capabilities enumeration
854 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
855 # This feature allows us to minimize migration traffic for certain work
856 # loads, by sending compressed difference of the pages
858 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
859 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
860 # Disabled by default. (since 2.0)
862 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
863 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
864 # source and target VM to support this feature. To enable it is sufficient
865 # to enable the capability on the source VM. The feature is disabled by
866 # default. (since 1.6)
868 # @compress: Use multiple compression threads to accelerate live migration.
869 # This feature can help to reduce the migration traffic, by sending
870 # compressed pages. Please note that if compress and xbzrle are both
871 # on, compress only takes effect in the ram bulk stage, after that,
872 # it will be disabled and only xbzrle takes effect, this can help to
873 # minimize migration traffic. The feature is disabled by default.
876 # @events: generate events for each migration state change
879 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
880 # to speed up convergence of RAM migration. (since 1.6)
882 # @postcopy-ram: Start executing on the migration target before all of RAM has
883 # been migrated, pulling the remaining pages along as needed. NOTE: If
884 # the migration fails during postcopy the VM will fail. (since 2.6)
886 # @x-colo: If enabled, migration will never end, and the state of the VM on the
887 # primary side will be migrated continuously to the VM on secondary
888 # side, this process is called COarse-Grain LOck Stepping (COLO) for
889 # Non-stop Service. (since 2.8)
891 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
892 # during postcopy-ram migration. (since 2.9)
896 { 'enum': 'MigrationCapability',
897 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
898 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram'] }
901 # @MigrationCapabilityStatus:
903 # Migration capability information
905 # @capability: capability enum
907 # @state: capability state bool
911 { 'struct': 'MigrationCapabilityStatus',
912 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
915 # @migrate-set-capabilities:
917 # Enable/Disable the following migration capabilities (like xbzrle)
919 # @capabilities: json array of capability modifications to make
925 # -> { "execute": "migrate-set-capabilities" , "arguments":
926 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
929 { 'command': 'migrate-set-capabilities',
930 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
933 # @query-migrate-capabilities:
935 # Returns information about the current migration capabilities status
937 # Returns: @MigrationCapabilitiesStatus
943 # -> { "execute": "query-migrate-capabilities" }
945 # {"state": false, "capability": "xbzrle"},
946 # {"state": false, "capability": "rdma-pin-all"},
947 # {"state": false, "capability": "auto-converge"},
948 # {"state": false, "capability": "zero-blocks"},
949 # {"state": false, "capability": "compress"},
950 # {"state": true, "capability": "events"},
951 # {"state": false, "capability": "postcopy-ram"},
952 # {"state": false, "capability": "x-colo"}
956 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
959 # @MigrationParameter:
961 # Migration parameters enumeration
963 # @compress-level: Set the compression level to be used in live migration,
964 # the compression level is an integer between 0 and 9, where 0 means
965 # no compression, 1 means the best compression speed, and 9 means best
966 # compression ratio which will consume more CPU.
968 # @compress-threads: Set compression thread count to be used in live migration,
969 # the compression thread count is an integer between 1 and 255.
971 # @decompress-threads: Set decompression thread count to be used in live
972 # migration, the decompression thread count is an integer between 1
973 # and 255. Usually, decompression is at least 4 times as fast as
974 # compression, so set the decompress-threads to the number about 1/4
975 # of compress-threads is adequate.
977 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
978 # when migration auto-converge is activated. The
979 # default value is 20. (Since 2.7)
981 # @cpu-throttle-increment: throttle percentage increase each time
982 # auto-converge detects that migration is not making
983 # progress. The default value is 10. (Since 2.7)
985 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
986 # establishing a TLS connection over the migration data channel.
987 # On the outgoing side of the migration, the credentials must
988 # be for a 'client' endpoint, while for the incoming side the
989 # credentials must be for a 'server' endpoint. Setting this
990 # will enable TLS for all migrations. The default is unset,
991 # resulting in unsecured migration at the QEMU level. (Since 2.7)
993 # @tls-hostname: hostname of the target host for the migration. This is
994 # required when using x509 based TLS credentials and the
995 # migration URI does not already include a hostname. For
996 # example if using fd: or exec: based migration, the
997 # hostname must be provided so that the server's x509
998 # certificate identity can be validated. (Since 2.7)
1000 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1001 # bytes per second. (Since 2.8)
1003 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1004 # downtime in milliseconds (Since 2.8)
1006 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
1007 # periodic mode. (Since 2.8)
1011 { 'enum': 'MigrationParameter',
1012 'data': ['compress-level', 'compress-threads', 'decompress-threads',
1013 'cpu-throttle-initial', 'cpu-throttle-increment',
1014 'tls-creds', 'tls-hostname', 'max-bandwidth',
1015 'downtime-limit', 'x-checkpoint-delay' ] }
1018 # @migrate-set-parameters:
1020 # Set various migration parameters.
1026 # -> { "execute": "migrate-set-parameters" ,
1027 # "arguments": { "compress-level": 1 } }
1030 { 'command': 'migrate-set-parameters', 'boxed': true,
1031 'data': 'MigrationParameters' }
1034 # @MigrationParameters:
1036 # Optional members can be omitted on input ('migrate-set-parameters')
1037 # but most members will always be present on output
1038 # ('query-migrate-parameters'), with the exception of tls-creds and
1041 # @compress-level: compression level
1043 # @compress-threads: compression thread count
1045 # @decompress-threads: decompression thread count
1047 # @cpu-throttle-initial: Initial percentage of time guest cpus are
1048 # throttledwhen migration auto-converge is activated.
1049 # The default value is 20. (Since 2.7)
1051 # @cpu-throttle-increment: throttle percentage increase each time
1052 # auto-converge detects that migration is not making
1053 # progress. The default value is 10. (Since 2.7)
1055 # @tls-creds: ID of the 'tls-creds' object that provides credentials
1056 # for establishing a TLS connection over the migration data
1057 # channel. On the outgoing side of the migration, the credentials
1058 # must be for a 'client' endpoint, while for the incoming side the
1059 # credentials must be for a 'server' endpoint. Setting this
1060 # will enable TLS for all migrations. The default is unset,
1061 # resulting in unsecured migration at the QEMU level. (Since 2.7)
1062 # An empty string means that QEMU will use plain text mode for
1063 # migration, rather than TLS (Since 2.9)
1065 # @tls-hostname: hostname of the target host for the migration. This
1066 # is required when using x509 based TLS credentials and the
1067 # migration URI does not already include a hostname. For
1068 # example if using fd: or exec: based migration, the
1069 # hostname must be provided so that the server's x509
1070 # certificate identity can be validated. (Since 2.7)
1071 # An empty string means that QEMU will use the hostname
1072 # associated with the migration URI, if any. (Since 2.9)
1074 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1075 # bytes per second. (Since 2.8)
1077 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1078 # downtime in milliseconds (Since 2.8)
1080 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1084 { 'struct': 'MigrationParameters',
1085 'data': { '*compress-level': 'int',
1086 '*compress-threads': 'int',
1087 '*decompress-threads': 'int',
1088 '*cpu-throttle-initial': 'int',
1089 '*cpu-throttle-increment': 'int',
1090 '*tls-creds': 'str',
1091 '*tls-hostname': 'str',
1092 '*max-bandwidth': 'int',
1093 '*downtime-limit': 'int',
1094 '*x-checkpoint-delay': 'int'} }
1097 # @query-migrate-parameters:
1099 # Returns information about the current migration parameters
1101 # Returns: @MigrationParameters
1107 # -> { "execute": "query-migrate-parameters" }
1109 # "decompress-threads": 2,
1110 # "cpu-throttle-increment": 10,
1111 # "compress-threads": 8,
1112 # "compress-level": 1,
1113 # "cpu-throttle-initial": 20,
1114 # "max-bandwidth": 33554432,
1115 # "downtime-limit": 300
1120 { 'command': 'query-migrate-parameters',
1121 'returns': 'MigrationParameters' }
1124 # @client_migrate_info:
1126 # Set migration information for remote display. This makes the server
1127 # ask the client to automatically reconnect using the new parameters
1128 # once migration finished successfully. Only implemented for SPICE.
1130 # @protocol: must be "spice"
1131 # @hostname: migration target hostname
1132 # @port: spice tcp port for plaintext channels
1133 # @tls-port: spice tcp port for tls-secured channels
1134 # @cert-subject: server certificate subject
1140 # -> { "execute": "client_migrate_info",
1141 # "arguments": { "protocol": "spice",
1142 # "hostname": "virt42.lab.kraxel.org",
1144 # <- { "return": {} }
1147 { 'command': 'client_migrate_info',
1148 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1149 '*tls-port': 'int', '*cert-subject': 'str' } }
1152 # @migrate-start-postcopy:
1154 # Followup to a migration command to switch the migration to postcopy mode.
1155 # The postcopy-ram capability must be set before the original migration
1162 # -> { "execute": "migrate-start-postcopy" }
1163 # <- { "return": {} }
1166 { 'command': 'migrate-start-postcopy' }
1171 # The message transmission between Primary side and Secondary side.
1173 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1175 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1177 # @checkpoint-reply: SVM gets PVM's checkpoint request
1179 # @vmstate-send: VM's state will be sent by PVM.
1181 # @vmstate-size: The total size of VMstate.
1183 # @vmstate-received: VM's state has been received by SVM.
1185 # @vmstate-loaded: VM's state has been loaded by SVM.
1189 { 'enum': 'COLOMessage',
1190 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1191 'vmstate-send', 'vmstate-size', 'vmstate-received',
1192 'vmstate-loaded' ] }
1199 # @unknown: unknown mode
1201 # @primary: master side
1203 # @secondary: slave side
1207 { 'enum': 'COLOMode',
1208 'data': [ 'unknown', 'primary', 'secondary'] }
1213 # An enumeration of COLO failover status
1215 # @none: no failover has ever happened
1217 # @require: got failover requirement but not handled
1219 # @active: in the process of doing failover
1221 # @completed: finish the process of failover
1223 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1227 { 'enum': 'FailoverStatus',
1228 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1231 # @x-colo-lost-heartbeat:
1233 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1234 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1235 # If sent to the Secondary, the Secondary side will run failover work,
1236 # then takes over server operation to become the service VM.
1242 # -> { "execute": "x-colo-lost-heartbeat" }
1243 # <- { "return": {} }
1246 { 'command': 'x-colo-lost-heartbeat' }
1251 # Information about a mouse device.
1253 # @name: the name of the mouse device
1255 # @index: the index of the mouse device
1257 # @current: true if this device is currently receiving mouse events
1259 # @absolute: true if this device supports absolute coordinates as input
1263 { 'struct': 'MouseInfo',
1264 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
1265 'absolute': 'bool'} }
1270 # Returns information about each active mouse device
1272 # Returns: a list of @MouseInfo for each device
1278 # -> { "execute": "query-mice" }
1281 # "name":"QEMU Microsoft Mouse",
1287 # "name":"QEMU PS/2 Mouse",
1296 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
1301 # An enumeration of cpu types that enable additional information during
1306 { 'enum': 'CpuInfoArch',
1307 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1312 # Information about a virtual CPU
1314 # @CPU: the index of the virtual CPU
1316 # @current: this only exists for backwards compatibility and should be ignored
1318 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
1319 # to a processor specific low power mode.
1321 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1323 # @thread_id: ID of the underlying host thread
1325 # @arch: architecture of the cpu, which determines which additional fields
1326 # will be listed (since 2.6)
1330 # Notes: @halted is a transient state that changes frequently. By the time the
1331 # data is sent to the client, the guest may no longer be halted.
1333 { 'union': 'CpuInfo',
1334 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1335 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
1336 'discriminator': 'arch',
1337 'data': { 'x86': 'CpuInfoX86',
1338 'sparc': 'CpuInfoSPARC',
1339 'ppc': 'CpuInfoPPC',
1340 'mips': 'CpuInfoMIPS',
1341 'tricore': 'CpuInfoTricore',
1342 'other': 'CpuInfoOther' } }
1347 # Additional information about a virtual i386 or x86_64 CPU
1349 # @pc: the 64-bit instruction pointer
1353 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1358 # Additional information about a virtual SPARC CPU
1360 # @pc: the PC component of the instruction pointer
1362 # @npc: the NPC component of the instruction pointer
1366 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1371 # Additional information about a virtual PPC CPU
1373 # @nip: the instruction pointer
1377 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1382 # Additional information about a virtual MIPS CPU
1384 # @PC: the instruction pointer
1388 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1393 # Additional information about a virtual Tricore CPU
1395 # @PC: the instruction pointer
1399 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1404 # No additional information is available about the virtual CPU
1409 { 'struct': 'CpuInfoOther', 'data': { } }
1414 # Returns a list of information about each virtual CPU.
1416 # Returns: a list of @CpuInfo for each virtual CPU
1422 # -> { "execute": "query-cpus" }
1428 # "qom_path":"/machine/unattached/device[0]",
1437 # "qom_path":"/machine/unattached/device[2]",
1446 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1451 # Information about an iothread
1453 # @id: the identifier of the iothread
1455 # @thread-id: ID of the underlying host thread
1457 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
1460 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
1461 # configured (since 2.9)
1463 # @poll-shrink: how many ns will be removed from polling time, 0 means that
1464 # it's not configured (since 2.9)
1468 { 'struct': 'IOThreadInfo',
1469 'data': {'id': 'str',
1471 'poll-max-ns': 'int',
1473 'poll-shrink': 'int' } }
1478 # Returns a list of information about each iothread.
1480 # Note: this list excludes the QEMU main loop thread, which is not declared
1481 # using the -object iothread command-line option. It is always the main thread
1484 # Returns: a list of @IOThreadInfo for each iothread
1490 # -> { "execute": "query-iothreads" }
1504 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1507 # @NetworkAddressFamily:
1509 # The network address family
1511 # @ipv4: IPV4 family
1513 # @ipv6: IPV6 family
1515 # @unix: unix socket
1517 # @vsock: vsock family (since 2.8)
1519 # @unknown: otherwise
1523 { 'enum': 'NetworkAddressFamily',
1524 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1529 # The basic information for vnc network connection
1533 # @service: The service name of the vnc port. This may depend on the host
1534 # system's service database so symbolic names should not be relied
1537 # @family: address family
1539 # @websocket: true in case the socket is a websocket (since 2.3).
1543 { 'struct': 'VncBasicInfo',
1544 'data': { 'host': 'str',
1546 'family': 'NetworkAddressFamily',
1547 'websocket': 'bool' } }
1552 # The network connection information for server
1554 # @auth: authentication method used for
1555 # the plain (non-websocket) VNC server
1559 { 'struct': 'VncServerInfo',
1560 'base': 'VncBasicInfo',
1561 'data': { '*auth': 'str' } }
1566 # Information about a connected VNC client.
1568 # @x509_dname: If x509 authentication is in use, the Distinguished
1569 # Name of the client.
1571 # @sasl_username: If SASL authentication is in use, the SASL username
1572 # used for authentication.
1576 { 'struct': 'VncClientInfo',
1577 'base': 'VncBasicInfo',
1578 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1583 # Information about the VNC session.
1585 # @enabled: true if the VNC server is enabled, false otherwise
1587 # @host: The hostname the VNC server is bound to. This depends on
1588 # the name resolution on the host and may be an IP address.
1590 # @family: 'ipv6' if the host is listening for IPv6 connections
1591 # 'ipv4' if the host is listening for IPv4 connections
1592 # 'unix' if the host is listening on a unix domain socket
1593 # 'unknown' otherwise
1595 # @service: The service name of the server's port. This may depends
1596 # on the host system's service database so symbolic names should not
1599 # @auth: the current authentication type used by the server
1600 # 'none' if no authentication is being used
1601 # 'vnc' if VNC authentication is being used
1602 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1603 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1604 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1605 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1606 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1607 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1608 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1609 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1610 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1612 # @clients: a list of @VncClientInfo of all currently connected clients
1616 { 'struct': 'VncInfo',
1617 'data': {'enabled': 'bool', '*host': 'str',
1618 '*family': 'NetworkAddressFamily',
1619 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1624 # vnc primary authentication method.
1628 { 'enum': 'VncPrimaryAuth',
1629 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1630 'tls', 'vencrypt', 'sasl' ] }
1633 # @VncVencryptSubAuth:
1635 # vnc sub authentication method with vencrypt.
1639 { 'enum': 'VncVencryptSubAuth',
1641 'tls-none', 'x509-none',
1642 'tls-vnc', 'x509-vnc',
1643 'tls-plain', 'x509-plain',
1644 'tls-sasl', 'x509-sasl' ] }
1650 # The network connection information for server
1652 # @auth: The current authentication type used by the servers
1654 # @vencrypt: The vencrypt sub authentication type used by the
1655 # servers, only specified in case auth == vencrypt.
1659 { 'struct': 'VncServerInfo2',
1660 'base': 'VncBasicInfo',
1661 'data': { 'auth' : 'VncPrimaryAuth',
1662 '*vencrypt' : 'VncVencryptSubAuth' } }
1668 # Information about a vnc server
1670 # @id: vnc server name.
1672 # @server: A list of @VncBasincInfo describing all listening sockets.
1673 # The list can be empty (in case the vnc server is disabled).
1674 # It also may have multiple entries: normal + websocket,
1675 # possibly also ipv4 + ipv6 in the future.
1677 # @clients: A list of @VncClientInfo of all currently connected clients.
1678 # The list can be empty, for obvious reasons.
1680 # @auth: The current authentication type used by the non-websockets servers
1682 # @vencrypt: The vencrypt authentication type used by the servers,
1683 # only specified in case auth == vencrypt.
1685 # @display: The display device the vnc server is linked to.
1689 { 'struct': 'VncInfo2',
1690 'data': { 'id' : 'str',
1691 'server' : ['VncServerInfo2'],
1692 'clients' : ['VncClientInfo'],
1693 'auth' : 'VncPrimaryAuth',
1694 '*vencrypt' : 'VncVencryptSubAuth',
1695 '*display' : 'str' } }
1700 # Returns information about the current VNC server
1708 # -> { "execute": "query-vnc" }
1712 # "service":"50402",
1717 # "host":"127.0.0.1",
1718 # "service":"50401",
1726 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1729 # @query-vnc-servers:
1731 # Returns a list of vnc servers. The list can be empty.
1733 # Returns: a list of @VncInfo2
1737 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1742 # The basic information for SPICE network connection
1746 # @port: port number
1748 # @family: address family
1752 { 'struct': 'SpiceBasicInfo',
1753 'data': { 'host': 'str',
1755 'family': 'NetworkAddressFamily' } }
1760 # Information about a SPICE server
1762 # @auth: authentication method
1766 { 'struct': 'SpiceServerInfo',
1767 'base': 'SpiceBasicInfo',
1768 'data': { '*auth': 'str' } }
1773 # Information about a SPICE client channel.
1775 # @connection-id: SPICE connection id number. All channels with the same id
1776 # belong to the same SPICE session.
1778 # @channel-type: SPICE channel type number. "1" is the main control
1779 # channel, filter for this one if you want to track spice
1782 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1783 # multiple channels of the same type exist, such as multiple
1784 # display channels in a multihead setup
1786 # @tls: true if the channel is encrypted, false otherwise.
1790 { 'struct': 'SpiceChannel',
1791 'base': 'SpiceBasicInfo',
1792 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1796 # @SpiceQueryMouseMode:
1798 # An enumeration of Spice mouse states.
1800 # @client: Mouse cursor position is determined by the client.
1802 # @server: Mouse cursor position is determined by the server.
1804 # @unknown: No information is available about mouse mode used by
1807 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1811 { 'enum': 'SpiceQueryMouseMode',
1812 'data': [ 'client', 'server', 'unknown' ] }
1817 # Information about the SPICE session.
1819 # @enabled: true if the SPICE server is enabled, false otherwise
1821 # @migrated: true if the last guest migration completed and spice
1822 # migration had completed as well. false otherwise. (since 1.4)
1824 # @host: The hostname the SPICE server is bound to. This depends on
1825 # the name resolution on the host and may be an IP address.
1827 # @port: The SPICE server's port number.
1829 # @compiled-version: SPICE server version.
1831 # @tls-port: The SPICE server's TLS port number.
1833 # @auth: the current authentication type used by the server
1834 # 'none' if no authentication is being used
1835 # 'spice' uses SASL or direct TLS authentication, depending on command
1838 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1839 # be determined by the client or the server, or unknown if spice
1840 # server doesn't provide this information. (since: 1.1)
1842 # @channels: a list of @SpiceChannel for each active spice channel
1846 { 'struct': 'SpiceInfo',
1847 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1848 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1849 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1854 # Returns information about the current SPICE server
1856 # Returns: @SpiceInfo
1862 # -> { "execute": "query-spice" }
1868 # "host": "0.0.0.0",
1873 # "channel-type": 1,
1874 # "connection-id": 1804289383,
1875 # "host": "127.0.0.1",
1882 # "channel-type": 4,
1883 # "connection-id": 1804289383,
1884 # "host": "127.0.0.1",
1888 # [ ... more channels follow ... ]
1894 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1899 # Information about the guest balloon device.
1901 # @actual: the number of bytes the balloon currently contains
1906 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1911 # Return information about the balloon device.
1913 # Returns: @BalloonInfo on success
1915 # If the balloon driver is enabled but not functional because the KVM
1916 # kernel module cannot support it, KvmMissingCap
1918 # If no balloon device is present, DeviceNotActive
1924 # -> { "execute": "query-balloon" }
1926 # "actual": 1073741824,
1931 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1936 # A PCI device memory region
1938 # @base: the starting address (guest physical)
1940 # @limit: the ending address (guest physical)
1944 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1949 # Information about a PCI device I/O region.
1951 # @bar: the index of the Base Address Register for this region
1953 # @type: 'io' if the region is a PIO region
1954 # 'memory' if the region is a MMIO region
1956 # @size: memory size
1958 # @prefetch: if @type is 'memory', true if the memory is prefetchable
1960 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
1964 { 'struct': 'PciMemoryRegion',
1965 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1966 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1971 # Information about a bus of a PCI Bridge device
1973 # @number: primary bus interface number. This should be the number of the
1974 # bus the device resides on.
1976 # @secondary: secondary bus interface number. This is the number of the
1977 # main bus for the bridge
1979 # @subordinate: This is the highest number bus that resides below the
1982 # @io_range: The PIO range for all devices on this bridge
1984 # @memory_range: The MMIO range for all devices on this bridge
1986 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1991 { 'struct': 'PciBusInfo',
1992 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1993 'io_range': 'PciMemoryRange',
1994 'memory_range': 'PciMemoryRange',
1995 'prefetchable_range': 'PciMemoryRange' } }
2000 # Information about a PCI Bridge device
2002 # @bus: information about the bus the device resides on
2004 # @devices: a list of @PciDeviceInfo for each device on this bridge
2008 { 'struct': 'PciBridgeInfo',
2009 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
2014 # Information about the Class of a PCI device
2016 # @desc: a string description of the device's class
2018 # @class: the class code of the device
2022 { 'struct': 'PciDeviceClass',
2023 'data': {'*desc': 'str', 'class': 'int'} }
2028 # Information about the Id of a PCI device
2030 # @device: the PCI device id
2032 # @vendor: the PCI vendor id
2036 { 'struct': 'PciDeviceId',
2037 'data': {'device': 'int', 'vendor': 'int'} }
2042 # Information about a PCI device
2044 # @bus: the bus number of the device
2046 # @slot: the slot the device is located in
2048 # @function: the function of the slot used by the device
2050 # @class_info: the class of the device
2052 # @id: the PCI device id
2054 # @irq: if an IRQ is assigned to the device, the IRQ number
2056 # @qdev_id: the device name of the PCI device
2058 # @pci_bridge: if the device is a PCI bridge, the bridge information
2060 # @regions: a list of the PCI I/O regions associated with the device
2062 # Notes: the contents of @class_info.desc are not stable and should only be
2063 # treated as informational.
2067 { 'struct': 'PciDeviceInfo',
2068 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
2069 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
2070 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
2071 'regions': ['PciMemoryRegion']} }
2076 # Information about a PCI bus
2078 # @bus: the bus index
2080 # @devices: a list of devices on this bus
2084 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
2089 # Return information about the PCI bus topology of the guest.
2091 # Returns: a list of @PciInfo for each PCI bus. Each bus is
2092 # represented by a json-object, which has a key with a json-array of
2093 # all PCI devices attached to it. Each device is represented by a
2100 # -> { "execute": "query-pci" }
2111 # "desc": "Host bridge"
2127 # "desc": "ISA bridge"
2143 # "desc": "IDE controller"
2165 # "desc": "VGA controller"
2175 # "mem_type_64": false,
2178 # "address": 4026531840,
2182 # "prefetch": false,
2183 # "mem_type_64": false,
2186 # "address": 4060086272,
2190 # "prefetch": false,
2191 # "mem_type_64": false,
2206 # "desc": "RAM controller"
2227 # Note: This example has been shortened as the real response is too long.
2230 { 'command': 'query-pci', 'returns': ['PciInfo'] }
2235 # This command will cause the QEMU process to exit gracefully. While every
2236 # attempt is made to send the QMP response before terminating, this is not
2237 # guaranteed. When using this interface, a premature EOF would not be
2244 # -> { "execute": "quit" }
2245 # <- { "return": {} }
2247 { 'command': 'quit' }
2252 # Stop all guest VCPU execution.
2256 # Notes: This function will succeed even if the guest is already in the stopped
2257 # state. In "inmigrate" state, it will ensure that the guest
2258 # remains paused once migration finishes, as if the -S option was
2259 # passed on the command line.
2263 # -> { "execute": "stop" }
2264 # <- { "return": {} }
2267 { 'command': 'stop' }
2272 # Performs a hard reset of a guest.
2278 # -> { "execute": "system_reset" }
2279 # <- { "return": {} }
2282 { 'command': 'system_reset' }
2285 # @system_powerdown:
2287 # Requests that a guest perform a powerdown operation.
2291 # Notes: A guest may or may not respond to this command. This command
2292 # returning does not indicate that a guest has accepted the request or
2293 # that it has shut down. Many guests will respond to this command by
2294 # prompting the user in some way.
2297 # -> { "execute": "system_powerdown" }
2298 # <- { "return": {} }
2301 { 'command': 'system_powerdown' }
2306 # This command is a nop that is only provided for the purposes of compatibility.
2310 # Notes: Do not use this command.
2312 { 'command': 'cpu', 'data': {'index': 'int'} }
2317 # Adds CPU with specified ID
2319 # @id: ID of CPU to be created, valid values [0..max_cpus)
2321 # Returns: Nothing on success
2327 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
2328 # <- { "return": {} }
2331 { 'command': 'cpu-add', 'data': {'id': 'int'} }
2336 # Save a portion of guest memory to a file.
2338 # @val: the virtual address of the guest to start from
2340 # @size: the size of memory region to save
2342 # @filename: the file to save the memory to as binary data
2344 # @cpu-index: the index of the virtual CPU to use for translating the
2345 # virtual address (defaults to CPU 0)
2347 # Returns: Nothing on success
2351 # Notes: Errors were not reliably returned until 1.1
2355 # -> { "execute": "memsave",
2356 # "arguments": { "val": 10,
2358 # "filename": "/tmp/virtual-mem-dump" } }
2359 # <- { "return": {} }
2362 { 'command': 'memsave',
2363 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
2368 # Save a portion of guest physical memory to a file.
2370 # @val: the physical address of the guest to start from
2372 # @size: the size of memory region to save
2374 # @filename: the file to save the memory to as binary data
2376 # Returns: Nothing on success
2380 # Notes: Errors were not reliably returned until 1.1
2384 # -> { "execute": "pmemsave",
2385 # "arguments": { "val": 10,
2387 # "filename": "/tmp/physical-mem-dump" } }
2388 # <- { "return": {} }
2391 { 'command': 'pmemsave',
2392 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
2397 # Resume guest VCPU execution.
2401 # Returns: If successful, nothing
2402 # If QEMU was started with an encrypted block device and a key has
2403 # not yet been set, DeviceEncrypted.
2405 # Notes: This command will succeed if the guest is currently running. It
2406 # will also succeed if the guest is in the "inmigrate" state; in
2407 # this case, the effect of the command is to make sure the guest
2408 # starts once migration finishes, removing the effect of the -S
2409 # command line option if it was passed.
2413 # -> { "execute": "cont" }
2414 # <- { "return": {} }
2417 { 'command': 'cont' }
2422 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
2430 # -> { "execute": "system_wakeup" }
2431 # <- { "return": {} }
2434 { 'command': 'system_wakeup' }
2439 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
2440 # The command fails when the guest doesn't support injecting.
2442 # Returns: If successful, nothing
2446 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
2450 # -> { "execute": "inject-nmi" }
2451 # <- { "return": {} }
2454 { 'command': 'inject-nmi' }
2459 # Sets the link status of a virtual network adapter.
2461 # @name: the device name of the virtual network adapter
2463 # @up: true to set the link status to be up
2465 # Returns: Nothing on success
2466 # If @name is not a valid network device, DeviceNotFound
2470 # Notes: Not all network adapters support setting link status. This command
2471 # will succeed even if the network adapter does not support link status
2476 # -> { "execute": "set_link",
2477 # "arguments": { "name": "e1000.0", "up": false } }
2478 # <- { "return": {} }
2481 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
2486 # Request the balloon driver to change its balloon size.
2488 # @value: the target size of the balloon in bytes
2490 # Returns: Nothing on success
2491 # If the balloon driver is enabled but not functional because the KVM
2492 # kernel module cannot support it, KvmMissingCap
2493 # If no balloon device is present, DeviceNotActive
2495 # Notes: This command just issues a request to the guest. When it returns,
2496 # the balloon size may not have changed. A guest can change the balloon
2497 # size independent of this command.
2503 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
2504 # <- { "return": {} }
2507 { 'command': 'balloon', 'data': {'value': 'int'} }
2512 # This action can be used to test transaction failure.
2516 { 'struct': 'Abort',
2520 # @ActionCompletionMode:
2522 # An enumeration of Transactional completion modes.
2524 # @individual: Do not attempt to cancel any other Actions if any Actions fail
2525 # after the Transaction request succeeds. All Actions that
2526 # can complete successfully will do so without waiting on others.
2527 # This is the default.
2529 # @grouped: If any Action fails after the Transaction succeeds, cancel all
2530 # Actions. Actions do not complete until all Actions are ready to
2531 # complete. May be rejected by Actions that do not support this
2536 { 'enum': 'ActionCompletionMode',
2537 'data': [ 'individual', 'grouped' ] }
2540 # @TransactionAction:
2542 # A discriminated record of operations that can be performed with
2543 # @transaction. Action @type can be:
2545 # - @abort: since 1.6
2546 # - @block-dirty-bitmap-add: since 2.5
2547 # - @block-dirty-bitmap-clear: since 2.5
2548 # - @blockdev-backup: since 2.3
2549 # - @blockdev-snapshot: since 2.5
2550 # - @blockdev-snapshot-internal-sync: since 1.7
2551 # - @blockdev-snapshot-sync: since 1.1
2552 # - @drive-backup: since 1.6
2556 { 'union': 'TransactionAction',
2559 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
2560 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
2561 'blockdev-backup': 'BlockdevBackup',
2562 'blockdev-snapshot': 'BlockdevSnapshot',
2563 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
2564 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
2565 'drive-backup': 'DriveBackup'
2569 # @TransactionProperties:
2571 # Optional arguments to modify the behavior of a Transaction.
2573 # @completion-mode: Controls how jobs launched asynchronously by
2574 # Actions will complete or fail as a group.
2575 # See @ActionCompletionMode for details.
2579 { 'struct': 'TransactionProperties',
2581 '*completion-mode': 'ActionCompletionMode'
2588 # Executes a number of transactionable QMP commands atomically. If any
2589 # operation fails, then the entire set of actions will be abandoned and the
2590 # appropriate error returned.
2592 # For external snapshots, the dictionary contains the device, the file to use for
2593 # the new snapshot, and the format. The default format, if not specified, is
2596 # Each new snapshot defaults to being created by QEMU (wiping any
2597 # contents if the file already exists), but it is also possible to reuse
2598 # an externally-created file. In the latter case, you should ensure that
2599 # the new image file has the same contents as the current one; QEMU cannot
2600 # perform any meaningful check. Typically this is achieved by using the
2601 # current image file as the backing file for the new image.
2603 # On failure, the original disks pre-snapshot attempt will be used.
2605 # For internal snapshots, the dictionary contains the device and the snapshot's
2606 # name. If an internal snapshot matching name already exists, the request will
2607 # be rejected. Only some image formats support it, for example, qcow2, rbd,
2610 # On failure, qemu will try delete the newly created internal snapshot in the
2611 # transaction. When an I/O error occurs during deletion, the user needs to fix
2612 # it later with qemu-img or other command.
2614 # @actions: List of @TransactionAction;
2615 # information needed for the respective operations.
2617 # @properties: structure of additional options to control the
2618 # execution of the transaction. See @TransactionProperties
2619 # for additional detail.
2621 # Returns: nothing on success
2623 # Errors depend on the operations of the transaction
2625 # Note: The transaction aborts on the first failure. Therefore, there will be
2626 # information on only one failed operation returned in an error condition, and
2627 # subsequent actions will not have been attempted.
2633 # -> { "execute": "transaction",
2634 # "arguments": { "actions": [
2635 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
2636 # "snapshot-file": "/some/place/my-image",
2637 # "format": "qcow2" } },
2638 # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
2639 # "snapshot-file": "/some/place/my-image2",
2640 # "snapshot-node-name": "node3432",
2641 # "mode": "existing",
2642 # "format": "qcow2" } },
2643 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
2644 # "snapshot-file": "/some/place/my-image2",
2645 # "mode": "existing",
2646 # "format": "qcow2" } },
2647 # { "type": "blockdev-snapshot-internal-sync", "data" : {
2648 # "device": "ide-hd2",
2649 # "name": "snapshot0" } } ] } }
2650 # <- { "return": {} }
2653 { 'command': 'transaction',
2654 'data': { 'actions': [ 'TransactionAction' ],
2655 '*properties': 'TransactionProperties'
2660 # @human-monitor-command:
2662 # Execute a command on the human monitor and return the output.
2664 # @command-line: the command to execute in the human monitor
2666 # @cpu-index: The CPU to use for commands that require an implicit CPU
2668 # Returns: the output of the command as a string
2672 # Notes: This command only exists as a stop-gap. Its use is highly
2673 # discouraged. The semantics of this command are not
2674 # guaranteed: this means that command names, arguments and
2675 # responses can change or be removed at ANY time. Applications
2676 # that rely on long term stability guarantees should NOT
2679 # Known limitations:
2681 # * This command is stateless, this means that commands that depend
2682 # on state information (such as getfd) might not work
2684 # * Commands that prompt the user for data (eg. 'cont' when the block
2685 # device is encrypted) don't currently work
2689 # -> { "execute": "human-monitor-command",
2690 # "arguments": { "command-line": "info kvm" } }
2691 # <- { "return": "kvm support: enabled\r\n" }
2694 { 'command': 'human-monitor-command',
2695 'data': {'command-line': 'str', '*cpu-index': 'int'},
2701 # Cancel the current executing migration process.
2703 # Returns: nothing on success
2705 # Notes: This command succeeds even if there is no migration process running.
2711 # -> { "execute": "migrate_cancel" }
2712 # <- { "return": {} }
2715 { 'command': 'migrate_cancel' }
2718 # @migrate_set_downtime:
2720 # Set maximum tolerated downtime for migration.
2722 # @value: maximum downtime in seconds
2724 # Returns: nothing on success
2726 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2732 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
2733 # <- { "return": {} }
2736 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2739 # @migrate_set_speed:
2741 # Set maximum speed for migration.
2743 # @value: maximum speed in bytes per second.
2745 # Returns: nothing on success
2747 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2753 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
2754 # <- { "return": {} }
2757 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2760 # @migrate-set-cache-size:
2762 # Set cache size to be used by XBZRLE migration
2764 # @value: cache size in bytes
2766 # The size will be rounded down to the nearest power of 2.
2767 # The cache size can be modified before and during ongoing migration
2769 # Returns: nothing on success
2775 # -> { "execute": "migrate-set-cache-size",
2776 # "arguments": { "value": 536870912 } }
2777 # <- { "return": {} }
2780 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2783 # @query-migrate-cache-size:
2785 # Query migration XBZRLE cache size
2787 # Returns: XBZRLE cache size in bytes
2793 # -> { "execute": "query-migrate-cache-size" }
2794 # <- { "return": 67108864 }
2797 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2800 # @ObjectPropertyInfo:
2802 # @name: the name of the property
2804 # @type: the type of the property. This will typically come in one of four
2807 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2808 # These types are mapped to the appropriate JSON type.
2810 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
2811 # device type name. Child properties create the composition tree.
2813 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
2814 # device type name. Link properties form the device model graph.
2818 { 'struct': 'ObjectPropertyInfo',
2819 'data': { 'name': 'str', 'type': 'str' } }
2824 # This command will list any properties of a object given a path in the object
2827 # @path: the path within the object model. See @qom-get for a description of
2830 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2835 { 'command': 'qom-list',
2836 'data': { 'path': 'str' },
2837 'returns': [ 'ObjectPropertyInfo' ] }
2842 # This command will get a property from a object model path and return the
2845 # @path: The path within the object model. There are two forms of supported
2846 # paths--absolute and partial paths.
2848 # Absolute paths are derived from the root object and can follow child<>
2849 # or link<> properties. Since they can follow link<> properties, they
2850 # can be arbitrarily long. Absolute paths look like absolute filenames
2851 # and are prefixed with a leading slash.
2853 # Partial paths look like relative filenames. They do not begin
2854 # with a prefix. The matching rules for partial paths are subtle but
2855 # designed to make specifying objects easy. At each level of the
2856 # composition tree, the partial path is matched as an absolute path.
2857 # The first match is not returned. At least two matches are searched
2858 # for. A successful result is only returned if only one match is
2859 # found. If more than one match is found, a flag is return to
2860 # indicate that the match was ambiguous.
2862 # @property: The property name to read
2864 # Returns: The property value. The type depends on the property
2865 # type. child<> and link<> properties are returned as #str
2866 # pathnames. All integer property types (u8, u16, etc) are
2871 { 'command': 'qom-get',
2872 'data': { 'path': 'str', 'property': 'str' },
2878 # This command will set a property from a object model path.
2880 # @path: see @qom-get for a description of this parameter
2882 # @property: the property name to set
2884 # @value: a value who's type is appropriate for the property type. See @qom-get
2885 # for a description of type mapping.
2889 { 'command': 'qom-set',
2890 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2895 # Sets the password of a remote display session.
2897 # @protocol: `vnc' to modify the VNC server password
2898 # `spice' to modify the Spice server password
2900 # @password: the new password
2902 # @connected: how to handle existing clients when changing the
2903 # password. If nothing is specified, defaults to `keep'
2904 # `fail' to fail the command if clients are connected
2905 # `disconnect' to disconnect existing clients
2906 # `keep' to maintain existing clients
2908 # Returns: Nothing on success
2909 # If Spice is not enabled, DeviceNotFound
2915 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
2916 # "password": "secret" } }
2917 # <- { "return": {} }
2920 { 'command': 'set_password',
2921 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2926 # Expire the password of a remote display server.
2928 # @protocol: the name of the remote display protocol `vnc' or `spice'
2930 # @time: when to expire the password.
2931 # `now' to expire the password immediately
2932 # `never' to cancel password expiration
2933 # `+INT' where INT is the number of seconds from now (integer)
2934 # `INT' where INT is the absolute time in seconds
2936 # Returns: Nothing on success
2937 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2941 # Notes: Time is relative to the server and currently there is no way to
2942 # coordinate server time with client time. It is not recommended to
2943 # use the absolute time version of the @time parameter unless you're
2944 # sure you are on the same machine as the QEMU instance.
2948 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2950 # <- { "return": {} }
2953 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2956 # @change-vnc-password:
2958 # Change the VNC server password.
2960 # @password: the new password to use with VNC authentication
2964 # Notes: An empty password in this command will set the password to the empty
2965 # string. Existing clients are unaffected by executing this command.
2967 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2972 # This command is multiple commands multiplexed together.
2974 # @device: This is normally the name of a block device but it may also be 'vnc'.
2975 # when it's 'vnc', then sub command depends on @target
2977 # @target: If @device is a block device, then this is the new filename.
2978 # If @device is 'vnc', then if the value 'password' selects the vnc
2979 # change password command. Otherwise, this specifies a new server URI
2980 # address to listen to for VNC connections.
2982 # @arg: If @device is a block device, then this is an optional format to open
2984 # If @device is 'vnc' and @target is 'password', this is the new VNC
2985 # password to set. If this argument is an empty string, then no future
2986 # logins will be allowed.
2988 # Returns: Nothing on success.
2989 # If @device is not a valid block device, DeviceNotFound
2990 # If the new block device is encrypted, DeviceEncrypted. Note that
2991 # if this error is returned, the device has been opened successfully
2992 # and an additional call to @block_passwd is required to set the
2993 # device's password. The behavior of reads and writes to the block
2994 # device between when these calls are executed is undefined.
2996 # Notes: This interface is deprecated, and it is strongly recommended that you
2997 # avoid using it. For changing block devices, use
2998 # blockdev-change-medium; for changing VNC parameters, use
2999 # change-vnc-password.
3005 # 1. Change a removable medium
3007 # -> { "execute": "change",
3008 # "arguments": { "device": "ide1-cd0",
3009 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
3010 # <- { "return": {} }
3012 # 2. Change VNC password
3014 # -> { "execute": "change",
3015 # "arguments": { "device": "vnc", "target": "password",
3016 # "arg": "foobar1" } }
3017 # <- { "return": {} }
3020 { 'command': 'change',
3021 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
3026 # This structure describes a search result from @qom-list-types
3028 # @name: the type name found in the search
3032 # Notes: This command is experimental and may change syntax in future releases.
3034 { 'struct': 'ObjectTypeInfo',
3035 'data': { 'name': 'str' } }
3040 # This command will return a list of types given search parameters
3042 # @implements: if specified, only return types that implement this type name
3044 # @abstract: if true, include abstract types in the results
3046 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
3050 { 'command': 'qom-list-types',
3051 'data': { '*implements': 'str', '*abstract': 'bool' },
3052 'returns': [ 'ObjectTypeInfo' ] }
3055 # @DevicePropertyInfo:
3057 # Information about device properties.
3059 # @name: the name of the property
3060 # @type: the typename of the property
3061 # @description: if specified, the description of the property.
3066 { 'struct': 'DevicePropertyInfo',
3067 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
3070 # @device-list-properties:
3072 # List properties associated with a device.
3074 # @typename: the type name of a device
3076 # Returns: a list of DevicePropertyInfo describing a devices properties
3080 { 'command': 'device-list-properties',
3081 'data': { 'typename': 'str'},
3082 'returns': [ 'DevicePropertyInfo' ] }
3087 # Migrates the current running guest to another Virtual Machine.
3089 # @uri: the Uniform Resource Identifier of the destination VM
3091 # @blk: do block migration (full disk copy)
3093 # @inc: incremental disk copy migration
3095 # @detach: this argument exists only for compatibility reasons and
3096 # is ignored by QEMU
3098 # Returns: nothing on success
3104 # 1. The 'query-migrate' command should be used to check migration's progress
3105 # and final result (this information is provided by the 'status' member)
3107 # 2. All boolean arguments default to false
3109 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
3114 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
3115 # <- { "return": {} }
3118 { 'command': 'migrate',
3119 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
3122 # @migrate-incoming:
3124 # Start an incoming migration, the qemu must have been started
3125 # with -incoming defer
3127 # @uri: The Uniform Resource Identifier identifying the source or
3128 # address to listen on
3130 # Returns: nothing on success
3136 # 1. It's a bad idea to use a string for the uri, but it needs to stay
3137 # compatible with -incoming and the format of the uri is already exposed
3140 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
3143 # 3. The uri format is the same as for -incoming
3147 # -> { "execute": "migrate-incoming",
3148 # "arguments": { "uri": "tcp::4446" } }
3149 # <- { "return": {} }
3152 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
3155 # @xen-save-devices-state:
3157 # Save the state of all devices to file. The RAM and the block devices
3158 # of the VM are not saved by this command.
3160 # @filename: the file to save the state of the devices to as binary
3161 # data. See xen-save-devices-state.txt for a description of the binary
3164 # Returns: Nothing on success
3170 # -> { "execute": "xen-save-devices-state",
3171 # "arguments": { "filename": "/tmp/save" } }
3172 # <- { "return": {} }
3175 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
3178 # @xen-set-global-dirty-log:
3180 # Enable or disable the global dirty log mode.
3182 # @enable: true to enable, false to disable.
3190 # -> { "execute": "xen-set-global-dirty-log",
3191 # "arguments": { "enable": true } }
3192 # <- { "return": {} }
3195 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
3200 # @driver: the name of the new device's driver
3202 # @bus: the device's parent bus (device tree path)
3204 # @id: the device's ID, must be unique
3206 # Additional arguments depend on the type.
3211 # 1. For detailed information about this command, please refer to the
3212 # 'docs/qdev-device-use.txt' file.
3214 # 2. It's possible to list device properties by running QEMU with the
3215 # "-device DEVICE,help" command-line argument, where DEVICE is the
3220 # -> { "execute": "device_add",
3221 # "arguments": { "driver": "e1000", "id": "net1",
3223 # "mac": "52:54:00:12:34:56" } }
3224 # <- { "return": {} }
3226 # TODO: This command effectively bypasses QAPI completely due to its
3227 # "additional arguments" business. It shouldn't have been added to
3228 # the schema in this form. It should be qapified properly, or
3229 # replaced by a properly qapified command.
3233 { 'command': 'device_add',
3234 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
3235 'gen': false } # so we can get the additional arguments
3240 # Remove a device from a guest
3242 # @id: the device's ID or QOM path
3244 # Returns: Nothing on success
3245 # If @id is not a valid device, DeviceNotFound
3247 # Notes: When this command completes, the device may not be removed from the
3248 # guest. Hot removal is an operation that requires guest cooperation.
3249 # This command merely requests that the guest begin the hot removal
3250 # process. Completion of the device removal process is signaled with a
3251 # DEVICE_DELETED event. Guest reset will automatically complete removal
3258 # -> { "execute": "device_del",
3259 # "arguments": { "id": "net1" } }
3260 # <- { "return": {} }
3262 # -> { "execute": "device_del",
3263 # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
3264 # <- { "return": {} }
3267 { 'command': 'device_del', 'data': {'id': 'str'} }
3270 # @DumpGuestMemoryFormat:
3272 # An enumeration of guest-memory-dump's format.
3276 # @kdump-zlib: kdump-compressed format with zlib-compressed
3278 # @kdump-lzo: kdump-compressed format with lzo-compressed
3280 # @kdump-snappy: kdump-compressed format with snappy-compressed
3284 { 'enum': 'DumpGuestMemoryFormat',
3285 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
3288 # @dump-guest-memory:
3290 # Dump guest's memory to vmcore. It is a synchronous operation that can take
3291 # very long depending on the amount of guest memory.
3293 # @paging: if true, do paging to get guest's memory mapping. This allows
3294 # using gdb to process the core file.
3296 # IMPORTANT: this option can make QEMU allocate several gigabytes
3297 # of RAM. This can happen for a large guest, or a
3298 # malicious guest pretending to be large.
3300 # Also, paging=true has the following limitations:
3302 # 1. The guest may be in a catastrophic state or can have corrupted
3303 # memory, which cannot be trusted
3304 # 2. The guest can be in real-mode even if paging is enabled. For
3305 # example, the guest uses ACPI to sleep, and ACPI sleep state
3307 # 3. Currently only supported on i386 and x86_64.
3309 # @protocol: the filename or file descriptor of the vmcore. The supported
3312 # 1. file: the protocol starts with "file:", and the following
3313 # string is the file's path.
3314 # 2. fd: the protocol starts with "fd:", and the following string
3317 # @detach: if true, QMP will return immediately rather than
3318 # waiting for the dump to finish. The user can track progress
3319 # using "query-dump". (since 2.6).
3321 # @begin: if specified, the starting physical address.
3323 # @length: if specified, the memory size, in bytes. If you don't
3324 # want to dump all guest's memory, please specify the start @begin
3327 # @format: if specified, the format of guest memory dump. But non-elf
3328 # format is conflict with paging and filter, ie. @paging, @begin and
3329 # @length is not allowed to be specified with non-elf @format at the
3330 # same time (since 2.0)
3332 # Note: All boolean arguments default to false
3334 # Returns: nothing on success
3340 # -> { "execute": "dump-guest-memory",
3341 # "arguments": { "protocol": "fd:dump" } }
3342 # <- { "return": {} }
3345 { 'command': 'dump-guest-memory',
3346 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
3347 '*begin': 'int', '*length': 'int',
3348 '*format': 'DumpGuestMemoryFormat'} }
3353 # Describe the status of a long-running background guest memory dump.
3355 # @none: no dump-guest-memory has started yet.
3357 # @active: there is one dump running in background.
3359 # @completed: the last dump has finished successfully.
3361 # @failed: the last dump has failed.
3365 { 'enum': 'DumpStatus',
3366 'data': [ 'none', 'active', 'completed', 'failed' ] }
3371 # The result format for 'query-dump'.
3373 # @status: enum of @DumpStatus, which shows current dump status
3375 # @completed: bytes written in latest dump (uncompressed)
3377 # @total: total bytes to be written in latest dump (uncompressed)
3381 { 'struct': 'DumpQueryResult',
3382 'data': { 'status': 'DumpStatus',
3389 # Query latest dump status.
3391 # Returns: A @DumpStatus object showing the dump status.
3397 # -> { "execute": "query-dump" }
3398 # <- { "return": { "status": "active", "completed": 1024000,
3399 # "total": 2048000 } }
3402 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
3405 # @DumpGuestMemoryCapability:
3407 # A list of the available formats for dump-guest-memory
3411 { 'struct': 'DumpGuestMemoryCapability',
3413 'formats': ['DumpGuestMemoryFormat'] } }
3416 # @query-dump-guest-memory-capability:
3418 # Returns the available formats for dump-guest-memory
3420 # Returns: A @DumpGuestMemoryCapability object listing available formats for
3427 # -> { "execute": "query-dump-guest-memory-capability" }
3428 # <- { "return": { "formats":
3429 # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
3432 { 'command': 'query-dump-guest-memory-capability',
3433 'returns': 'DumpGuestMemoryCapability' }
3438 # Dump guest's storage keys
3440 # @filename: the path to the file to dump to
3442 # This command is only supported on s390 architecture.
3448 # -> { "execute": "dump-skeys",
3449 # "arguments": { "filename": "/tmp/skeys" } }
3450 # <- { "return": {} }
3453 { 'command': 'dump-skeys',
3454 'data': { 'filename': 'str' } }
3459 # Add a network backend.
3461 # @type: the type of network backend. Current valid values are 'user', 'tap',
3462 # 'vde', 'socket', 'dump' and 'bridge'
3464 # @id: the name of the new network backend
3466 # Additional arguments depend on the type.
3468 # TODO: This command effectively bypasses QAPI completely due to its
3469 # "additional arguments" business. It shouldn't have been added to
3470 # the schema in this form. It should be qapified properly, or
3471 # replaced by a properly qapified command.
3475 # Returns: Nothing on success
3476 # If @type is not a valid network backend, DeviceNotFound
3480 # -> { "execute": "netdev_add",
3481 # "arguments": { "type": "user", "id": "netdev1",
3482 # "dnssearch": "example.org" } }
3483 # <- { "return": {} }
3486 { 'command': 'netdev_add',
3487 'data': {'type': 'str', 'id': 'str'},
3488 'gen': false } # so we can get the additional arguments
3493 # Remove a network backend.
3495 # @id: the name of the network backend to remove
3497 # Returns: Nothing on success
3498 # If @id is not a valid network backend, DeviceNotFound
3504 # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
3505 # <- { "return": {} }
3508 { 'command': 'netdev_del', 'data': {'id': 'str'} }
3513 # Create a QOM object.
3515 # @qom-type: the class name for the object to be created
3517 # @id: the name of the new object
3519 # @props: a dictionary of properties to be passed to the backend
3521 # Returns: Nothing on success
3522 # Error if @qom-type is not a valid class name
3528 # -> { "execute": "object-add",
3529 # "arguments": { "qom-type": "rng-random", "id": "rng1",
3530 # "props": { "filename": "/dev/hwrng" } } }
3531 # <- { "return": {} }
3534 { 'command': 'object-add',
3535 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
3540 # Remove a QOM object.
3542 # @id: the name of the QOM object to remove
3544 # Returns: Nothing on success
3545 # Error if @id is not a valid id for a QOM object
3551 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
3552 # <- { "return": {} }
3555 { 'command': 'object-del', 'data': {'id': 'str'} }
3558 # @NetdevNoneOptions:
3560 # Use it alone to have zero network devices.
3564 { 'struct': 'NetdevNoneOptions',
3568 # @NetLegacyNicOptions:
3570 # Create a new Network Interface Card.
3572 # @netdev: id of -netdev to connect to
3574 # @macaddr: MAC address
3576 # @model: device model (e1000, rtl8139, virtio etc.)
3578 # @addr: PCI device address
3580 # @vectors: number of MSI-x vectors, 0 to disable MSI-X
3584 { 'struct': 'NetLegacyNicOptions',
3590 '*vectors': 'uint32' } }
3595 # A fat type wrapping 'str', to be embedded in lists.
3599 { 'struct': 'String',
3604 # @NetdevUserOptions:
3606 # Use the user mode network stack which requires no administrator privilege to
3609 # @hostname: client hostname reported by the builtin DHCP server
3611 # @restrict: isolate the guest from the host
3613 # @ipv4: whether to support IPv4, default true for enabled
3616 # @ipv6: whether to support IPv6, default true for enabled
3619 # @ip: legacy parameter, use net= instead
3621 # @net: IP network address that the guest will see, in the
3622 # form addr[/netmask] The netmask is optional, and can be
3623 # either in the form a.b.c.d or as a number of valid top-most
3624 # bits. Default is 10.0.2.0/24.
3626 # @host: guest-visible address of the host
3628 # @tftp: root directory of the built-in TFTP server
3630 # @bootfile: BOOTP filename, for use with tftp=
3632 # @dhcpstart: the first of the 16 IPs the built-in DHCP server can
3635 # @dns: guest-visible address of the virtual nameserver
3637 # @dnssearch: list of DNS suffixes to search, passed as DHCP option
3640 # @ipv6-prefix: IPv6 network prefix (default is fec0::) (since
3641 # 2.6). The network prefix is given in the usual
3642 # hexadecimal IPv6 address notation.
3644 # @ipv6-prefixlen: IPv6 network prefix length (default is 64)
3647 # @ipv6-host: guest-visible IPv6 address of the host (since 2.6)
3649 # @ipv6-dns: guest-visible IPv6 address of the virtual
3650 # nameserver (since 2.6)
3652 # @smb: root directory of the built-in SMB server
3654 # @smbserver: IP address of the built-in SMB server
3656 # @hostfwd: redirect incoming TCP or UDP host connections to guest
3659 # @guestfwd: forward guest TCP connections
3663 { 'struct': 'NetdevUserOptions',
3666 '*restrict': 'bool',
3674 '*dhcpstart': 'str',
3676 '*dnssearch': ['String'],
3677 '*ipv6-prefix': 'str',
3678 '*ipv6-prefixlen': 'int',
3679 '*ipv6-host': 'str',
3682 '*smbserver': 'str',
3683 '*hostfwd': ['String'],
3684 '*guestfwd': ['String'] } }
3687 # @NetdevTapOptions:
3689 # Connect the host TAP network interface name to the VLAN.
3691 # @ifname: interface name
3693 # @fd: file descriptor of an already opened tap
3695 # @fds: multiple file descriptors of already opened multiqueue capable
3698 # @script: script to initialize the interface
3700 # @downscript: script to shut down the interface
3702 # @br: bridge name (since 2.8)
3704 # @helper: command to execute to configure bridge
3706 # @sndbuf: send buffer limit. Understands [TGMKkb] suffixes.
3708 # @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface
3710 # @vhost: enable vhost-net network accelerator
3712 # @vhostfd: file descriptor of an already opened vhost net device
3714 # @vhostfds: file descriptors of multiple already opened vhost net
3717 # @vhostforce: vhost on for non-MSIX virtio guests
3719 # @queues: number of queues to be created for multiqueue capable tap
3721 # @poll-us: maximum number of microseconds that could
3722 # be spent on busy polling for tap (since 2.7)
3726 { 'struct': 'NetdevTapOptions',
3732 '*downscript': 'str',
3736 '*vnet_hdr': 'bool',
3740 '*vhostforce': 'bool',
3741 '*queues': 'uint32',
3742 '*poll-us': 'uint32'} }
3745 # @NetdevSocketOptions:
3747 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3748 # socket connection.
3750 # @fd: file descriptor of an already opened socket
3752 # @listen: port number, and optional hostname, to listen on
3754 # @connect: port number, and optional hostname, to connect to
3756 # @mcast: UDP multicast address and port number
3758 # @localaddr: source address and port for multicast and udp packets
3760 # @udp: UDP unicast address and port number
3764 { 'struct': 'NetdevSocketOptions',
3770 '*localaddr': 'str',
3774 # @NetdevL2TPv3Options:
3776 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
3778 # @src: source address
3780 # @dst: destination address
3782 # @srcport: source port - mandatory for udp, optional for ip
3784 # @dstport: destination port - mandatory for udp, optional for ip
3786 # @ipv6: force the use of ipv6
3788 # @udp: use the udp version of l2tpv3 encapsulation
3790 # @cookie64: use 64 bit coookies
3792 # @counter: have sequence counter
3794 # @pincounter: pin sequence counter to zero -
3795 # workaround for buggy implementations or
3796 # networks with packet reorder
3798 # @txcookie: 32 or 64 bit transmit cookie
3800 # @rxcookie: 32 or 64 bit receive cookie
3802 # @txsession: 32 bit transmit session
3804 # @rxsession: 32 bit receive session - if not specified
3805 # set to the same value as transmit
3807 # @offset: additional offset - allows the insertion of
3808 # additional application-specific data before the packet payload
3812 { 'struct': 'NetdevL2TPv3Options',
3820 '*cookie64': 'bool',
3822 '*pincounter': 'bool',
3823 '*txcookie': 'uint64',
3824 '*rxcookie': 'uint64',
3825 'txsession': 'uint32',
3826 '*rxsession': 'uint32',
3827 '*offset': 'uint32' } }
3830 # @NetdevVdeOptions:
3832 # Connect the VLAN to a vde switch running on the host.
3834 # @sock: socket path
3836 # @port: port number
3838 # @group: group owner of socket
3840 # @mode: permissions for socket
3844 { 'struct': 'NetdevVdeOptions',
3849 '*mode': 'uint16' } }
3852 # @NetdevDumpOptions:
3854 # Dump VLAN network traffic to a file.
3856 # @len: per-packet size limit (64k default). Understands [TGMKkb]
3859 # @file: dump file path (default is qemu-vlan0.pcap)
3863 { 'struct': 'NetdevDumpOptions',
3869 # @NetdevBridgeOptions:
3871 # Connect a host TAP network interface to a host bridge device.
3875 # @helper: command to execute to configure bridge
3879 { 'struct': 'NetdevBridgeOptions',
3882 '*helper': 'str' } }
3885 # @NetdevHubPortOptions:
3887 # Connect two or more net clients through a software hub.
3889 # @hubid: hub identifier number
3893 { 'struct': 'NetdevHubPortOptions',
3895 'hubid': 'int32' } }
3898 # @NetdevNetmapOptions:
3900 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3902 # @ifname: Either the name of an existing network interface supported by
3903 # netmap, or the name of a VALE port (created on the fly).
3904 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3905 # YYY are non-negative integers. XXX identifies a switch and
3906 # YYY identifies a port of the switch. VALE ports having the
3907 # same XXX are therefore connected to the same switch.
3909 # @devname: path of the netmap device (default: '/dev/netmap').
3913 { 'struct': 'NetdevNetmapOptions',
3916 '*devname': 'str' } }
3919 # @NetdevVhostUserOptions:
3921 # Vhost-user network backend
3923 # @chardev: name of a unix socket chardev
3925 # @vhostforce: vhost on for non-MSIX virtio guests (default: false).
3927 # @queues: number of queues to be created for multiqueue vhost-user
3928 # (default: 1) (Since 2.5)
3932 { 'struct': 'NetdevVhostUserOptions',
3935 '*vhostforce': 'bool',
3936 '*queues': 'int' } }
3941 # Available netdev drivers.
3945 { 'enum': 'NetClientDriver',
3946 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
3947 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
3952 # Captures the configuration of a network device.
3954 # @id: identifier for monitor commands.
3956 # @type: Specify the driver used for interpreting remaining arguments.
3960 # 'l2tpv3' - since 2.1
3962 { 'union': 'Netdev',
3963 'base': { 'id': 'str', 'type': 'NetClientDriver' },
3964 'discriminator': 'type',
3966 'none': 'NetdevNoneOptions',
3967 'nic': 'NetLegacyNicOptions',
3968 'user': 'NetdevUserOptions',
3969 'tap': 'NetdevTapOptions',
3970 'l2tpv3': 'NetdevL2TPv3Options',
3971 'socket': 'NetdevSocketOptions',
3972 'vde': 'NetdevVdeOptions',
3973 'dump': 'NetdevDumpOptions',
3974 'bridge': 'NetdevBridgeOptions',
3975 'hubport': 'NetdevHubPortOptions',
3976 'netmap': 'NetdevNetmapOptions',
3977 'vhost-user': 'NetdevVhostUserOptions' } }
3982 # Captures the configuration of a network device; legacy.
3984 # @vlan: vlan number
3986 # @id: identifier for monitor commands
3988 # @name: identifier for monitor commands, ignored if @id is present
3990 # @opts: device type specific properties (legacy)
3994 { 'struct': 'NetLegacy',
3999 'opts': 'NetLegacyOptions' } }
4002 # @NetLegacyOptionsType:
4006 { 'enum': 'NetLegacyOptionsType',
4007 'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
4008 'dump', 'bridge', 'netmap', 'vhost-user'] }
4011 # @NetLegacyOptions:
4013 # Like Netdev, but for use only by the legacy command line options
4017 { 'union': 'NetLegacyOptions',
4018 'base': { 'type': 'NetLegacyOptionsType' },
4019 'discriminator': 'type',
4021 'none': 'NetdevNoneOptions',
4022 'nic': 'NetLegacyNicOptions',
4023 'user': 'NetdevUserOptions',
4024 'tap': 'NetdevTapOptions',
4025 'l2tpv3': 'NetdevL2TPv3Options',
4026 'socket': 'NetdevSocketOptions',
4027 'vde': 'NetdevVdeOptions',
4028 'dump': 'NetdevDumpOptions',
4029 'bridge': 'NetdevBridgeOptions',
4030 'netmap': 'NetdevNetmapOptions',
4031 'vhost-user': 'NetdevVhostUserOptions' } }
4034 # @NetFilterDirection:
4036 # Indicates whether a netfilter is attached to a netdev's transmit queue or
4037 # receive queue or both.
4039 # @all: the filter is attached both to the receive and the transmit
4040 # queue of the netdev (default).
4042 # @rx: the filter is attached to the receive queue of the netdev,
4043 # where it will receive packets sent to the netdev.
4045 # @tx: the filter is attached to the transmit queue of the netdev,
4046 # where it will receive packets sent by the netdev.
4050 { 'enum': 'NetFilterDirection',
4051 'data': [ 'all', 'rx', 'tx' ] }
4054 # @InetSocketAddress:
4056 # Captures a socket address or address range in the Internet namespace.
4058 # @host: host part of the address
4060 # @port: port part of the address, or lowest port if @to is present
4062 # @numeric: true if the host/port are guaranteed to be numeric,
4063 # false if name resolution should be attempted. Defaults to false.
4066 # @to: highest port to try
4068 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
4070 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
4074 { 'struct': 'InetSocketAddress',
4084 # @UnixSocketAddress:
4086 # Captures a socket address in the local ("Unix socket") namespace.
4088 # @path: filesystem path to use
4092 { 'struct': 'UnixSocketAddress',
4097 # @VsockSocketAddress:
4099 # Captures a socket address in the vsock namespace.
4101 # @cid: unique host identifier
4104 # Note: string types are used to allow for possible future hostname or
4105 # service resolution support.
4109 { 'struct': 'VsockSocketAddress',
4117 # Captures the address of a socket, which could also be a named file descriptor
4121 { 'union': 'SocketAddress',
4123 'inet': 'InetSocketAddress',
4124 'unix': 'UnixSocketAddress',
4125 'vsock': 'VsockSocketAddress',
4129 # @SocketAddressFlatType:
4131 # Available SocketAddressFlat types
4133 # @inet: Internet address
4135 # @unix: Unix domain socket
4139 { 'enum': 'SocketAddressFlatType',
4140 'data': [ 'unix', 'inet' ] }
4143 # @SocketAddressFlat:
4145 # Captures the address of a socket
4147 # @type: Transport type
4149 # This is similar to SocketAddress, only distinction:
4151 # 1. SocketAddressFlat is a flat union, SocketAddress is a simple union.
4152 # A flat union is nicer than simple because it avoids nesting
4153 # (i.e. more {}) on the wire.
4155 # 2. SocketAddressFlat supports only types 'unix' and 'inet', because
4156 # that's what its current users need.
4160 { 'union': 'SocketAddressFlat',
4161 'base': { 'type': 'SocketAddressFlatType' },
4162 'discriminator': 'type',
4163 'data': { 'unix': 'UnixSocketAddress',
4164 'inet': 'InetSocketAddress' } }
4169 # Receive a file descriptor via SCM rights and assign it a name
4171 # @fdname: file descriptor name
4173 # Returns: Nothing on success
4177 # Notes: If @fdname already exists, the file descriptor assigned to
4178 # it will be closed and replaced by the received file
4181 # The 'closefd' command can be used to explicitly close the
4182 # file descriptor when it is no longer needed.
4186 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
4187 # <- { "return": {} }
4190 { 'command': 'getfd', 'data': {'fdname': 'str'} }
4195 # Close a file descriptor previously passed via SCM rights
4197 # @fdname: file descriptor name
4199 # Returns: Nothing on success
4205 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
4206 # <- { "return": {} }
4209 { 'command': 'closefd', 'data': {'fdname': 'str'} }
4214 # Information describing a machine.
4216 # @name: the name of the machine
4218 # @alias: an alias for the machine name
4220 # @is-default: whether the machine is default
4222 # @cpu-max: maximum number of CPUs supported by the machine type
4225 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
4229 { 'struct': 'MachineInfo',
4230 'data': { 'name': 'str', '*alias': 'str',
4231 '*is-default': 'bool', 'cpu-max': 'int',
4232 'hotpluggable-cpus': 'bool'} }
4237 # Return a list of supported machines
4239 # Returns: a list of MachineInfo
4243 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
4246 # @CpuDefinitionInfo:
4248 # Virtual CPU definition.
4250 # @name: the name of the CPU definition
4252 # @migration-safe: whether a CPU definition can be safely used for
4253 # migration in combination with a QEMU compatibility machine
4254 # when migrating between different QMU versions and between
4255 # hosts with different sets of (hardware or software)
4256 # capabilities. If not provided, information is not available
4257 # and callers should not assume the CPU definition to be
4258 # migration-safe. (since 2.8)
4260 # @static: whether a CPU definition is static and will not change depending on
4261 # QEMU version, machine type, machine options and accelerator options.
4262 # A static model is always migration-safe. (since 2.8)
4264 # @unavailable-features: List of properties that prevent
4265 # the CPU model from running in the current
4267 # @typename: Type name that can be used as argument to @device-list-properties,
4268 # to introspect properties configurable using -cpu or -global.
4271 # @unavailable-features is a list of QOM property names that
4272 # represent CPU model attributes that prevent the CPU from running.
4273 # If the QOM property is read-only, that means there's no known
4274 # way to make the CPU model run in the current host. Implementations
4275 # that choose not to provide specific information return the
4276 # property name "type".
4277 # If the property is read-write, it means that it MAY be possible
4278 # to run the CPU model in the current host if that property is
4279 # changed. Management software can use it as hints to suggest or
4280 # choose an alternative for the user, or just to generate meaningful
4281 # error messages explaining why the CPU model can't be used.
4282 # If @unavailable-features is an empty list, the CPU model is
4283 # runnable using the current host and machine-type.
4284 # If @unavailable-features is not present, runnability
4285 # information for the CPU is not available.
4289 { 'struct': 'CpuDefinitionInfo',
4290 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
4291 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
4294 # @query-cpu-definitions:
4296 # Return a list of supported virtual CPU definitions
4298 # Returns: a list of CpuDefInfo
4302 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
4307 # Virtual CPU model.
4309 # A CPU model consists of the name of a CPU definition, to which
4310 # delta changes are applied (e.g. features added/removed). Most magic values
4311 # that an architecture might require should be hidden behind the name.
4312 # However, if required, architectures can expose relevant properties.
4314 # @name: the name of the CPU definition the model is based on
4315 # @props: a dictionary of QOM properties to be applied
4319 { 'struct': 'CpuModelInfo',
4320 'data': { 'name': 'str',
4324 # @CpuModelExpansionType:
4326 # An enumeration of CPU model expansion types.
4328 # @static: Expand to a static CPU model, a combination of a static base
4329 # model name and property delta changes. As the static base model will
4330 # never change, the expanded CPU model will be the same, independant of
4331 # independent of QEMU version, machine type, machine options, and
4332 # accelerator options. Therefore, the resulting model can be used by
4333 # tooling without having to specify a compatibility machine - e.g. when
4334 # displaying the "host" model. static CPU models are migration-safe.
4336 # @full: Expand all properties. The produced model is not guaranteed to be
4337 # migration-safe, but allows tooling to get an insight and work with
4340 # Note: When a non-migration-safe CPU model is expanded in static mode, some
4341 # features enabled by the CPU model may be omitted, because they can't be
4342 # implemented by a static CPU model definition (e.g. cache info passthrough and
4343 # PMU passthrough in x86). If you need an accurate representation of the
4344 # features enabled by a non-migration-safe CPU model, use @full. If you need a
4345 # static representation that will keep ABI compatibility even when changing QEMU
4346 # version or machine-type, use @static (but keep in mind that some features may
4351 { 'enum': 'CpuModelExpansionType',
4352 'data': [ 'static', 'full' ] }
4356 # @CpuModelExpansionInfo:
4358 # The result of a cpu model expansion.
4360 # @model: the expanded CpuModelInfo.
4364 { 'struct': 'CpuModelExpansionInfo',
4365 'data': { 'model': 'CpuModelInfo' } }
4369 # @query-cpu-model-expansion:
4371 # Expands a given CPU model (or a combination of CPU model + additional options)
4372 # to different granularities, allowing tooling to get an understanding what a
4373 # specific CPU model looks like in QEMU under a certain configuration.
4375 # This interface can be used to query the "host" CPU model.
4377 # The data returned by this command may be affected by:
4379 # * QEMU version: CPU models may look different depending on the QEMU version.
4380 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4381 # * machine-type: CPU model may look different depending on the machine-type.
4382 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4383 # * machine options (including accelerator): in some architectures, CPU models
4384 # may look different depending on machine and accelerator options. (Except for
4385 # CPU models reported as "static" in query-cpu-definitions.)
4386 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4387 # global properties may affect expansion of CPU models. Using
4388 # query-cpu-model-expansion while using these is not advised.
4390 # Some architectures may not support all expansion types. s390x supports
4391 # "full" and "static".
4393 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
4394 # not supported, if the model cannot be expanded, if the model contains
4395 # an unknown CPU definition name, unknown properties or properties
4396 # with a wrong type. Also returns an error if an expansion type is
4401 { 'command': 'query-cpu-model-expansion',
4402 'data': { 'type': 'CpuModelExpansionType',
4403 'model': 'CpuModelInfo' },
4404 'returns': 'CpuModelExpansionInfo' }
4407 # @CpuModelCompareResult:
4409 # An enumeration of CPU model comparation results. The result is usually
4410 # calculated using e.g. CPU features or CPU generations.
4412 # @incompatible: If model A is incompatible to model B, model A is not
4413 # guaranteed to run where model B runs and the other way around.
4415 # @identical: If model A is identical to model B, model A is guaranteed to run
4416 # where model B runs and the other way around.
4418 # @superset: If model A is a superset of model B, model B is guaranteed to run
4419 # where model A runs. There are no guarantees about the other way.
4421 # @subset: If model A is a subset of model B, model A is guaranteed to run
4422 # where model B runs. There are no guarantees about the other way.
4426 { 'enum': 'CpuModelCompareResult',
4427 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
4430 # @CpuModelCompareInfo:
4432 # The result of a CPU model comparison.
4434 # @result: The result of the compare operation.
4435 # @responsible-properties: List of properties that led to the comparison result
4436 # not being identical.
4438 # @responsible-properties is a list of QOM property names that led to
4439 # both CPUs not being detected as identical. For identical models, this
4441 # If a QOM property is read-only, that means there's no known way to make the
4442 # CPU models identical. If the special property name "type" is included, the
4443 # models are by definition not identical and cannot be made identical.
4447 { 'struct': 'CpuModelCompareInfo',
4448 'data': {'result': 'CpuModelCompareResult',
4449 'responsible-properties': ['str']
4454 # @query-cpu-model-comparison:
4456 # Compares two CPU models, returning how they compare in a specific
4457 # configuration. The results indicates how both models compare regarding
4458 # runnability. This result can be used by tooling to make decisions if a
4459 # certain CPU model will run in a certain configuration or if a compatible
4460 # CPU model has to be created by baselining.
4462 # Usually, a CPU model is compared against the maximum possible CPU model
4463 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
4464 # model is identical or a subset, it will run in that configuration.
4466 # The result returned by this command may be affected by:
4468 # * QEMU version: CPU models may look different depending on the QEMU version.
4469 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4470 # * machine-type: CPU model may look different depending on the machine-type.
4471 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4472 # * machine options (including accelerator): in some architectures, CPU models
4473 # may look different depending on machine and accelerator options. (Except for
4474 # CPU models reported as "static" in query-cpu-definitions.)
4475 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4476 # global properties may affect expansion of CPU models. Using
4477 # query-cpu-model-expansion while using these is not advised.
4479 # Some architectures may not support comparing CPU models. s390x supports
4480 # comparing CPU models.
4482 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
4483 # not supported, if a model cannot be used, if a model contains
4484 # an unknown cpu definition name, unknown properties or properties
4489 { 'command': 'query-cpu-model-comparison',
4490 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
4491 'returns': 'CpuModelCompareInfo' }
4494 # @CpuModelBaselineInfo:
4496 # The result of a CPU model baseline.
4498 # @model: the baselined CpuModelInfo.
4502 { 'struct': 'CpuModelBaselineInfo',
4503 'data': { 'model': 'CpuModelInfo' } }
4506 # @query-cpu-model-baseline:
4508 # Baseline two CPU models, creating a compatible third model. The created
4509 # model will always be a static, migration-safe CPU model (see "static"
4510 # CPU model expansion for details).
4512 # This interface can be used by tooling to create a compatible CPU model out
4513 # two CPU models. The created CPU model will be identical to or a subset of
4514 # both CPU models when comparing them. Therefore, the created CPU model is
4515 # guaranteed to run where the given CPU models run.
4517 # The result returned by this command may be affected by:
4519 # * QEMU version: CPU models may look different depending on the QEMU version.
4520 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4521 # * machine-type: CPU model may look different depending on the machine-type.
4522 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4523 # * machine options (including accelerator): in some architectures, CPU models
4524 # may look different depending on machine and accelerator options. (Except for
4525 # CPU models reported as "static" in query-cpu-definitions.)
4526 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4527 # global properties may affect expansion of CPU models. Using
4528 # query-cpu-model-expansion while using these is not advised.
4530 # Some architectures may not support baselining CPU models. s390x supports
4531 # baselining CPU models.
4533 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
4534 # not supported, if a model cannot be used, if a model contains
4535 # an unknown cpu definition name, unknown properties or properties
4540 { 'command': 'query-cpu-model-baseline',
4541 'data': { 'modela': 'CpuModelInfo',
4542 'modelb': 'CpuModelInfo' },
4543 'returns': 'CpuModelBaselineInfo' }
4548 # Information about a file descriptor that was added to an fd set.
4550 # @fdset-id: The ID of the fd set that @fd was added to.
4552 # @fd: The file descriptor that was received via SCM rights and
4553 # added to the fd set.
4557 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
4562 # Add a file descriptor, that was passed via SCM rights, to an fd set.
4564 # @fdset-id: The ID of the fd set to add the file descriptor to.
4566 # @opaque: A free-form string that can be used to describe the fd.
4568 # Returns: @AddfdInfo on success
4570 # If file descriptor was not received, FdNotSupplied
4572 # If @fdset-id is a negative value, InvalidParameterValue
4574 # Notes: The list of fd sets is shared by all monitor connections.
4576 # If @fdset-id is not specified, a new fd set will be created.
4582 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
4583 # <- { "return": { "fdset-id": 1, "fd": 3 } }
4586 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
4587 'returns': 'AddfdInfo' }
4592 # Remove a file descriptor from an fd set.
4594 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
4596 # @fd: The file descriptor that is to be removed.
4598 # Returns: Nothing on success
4599 # If @fdset-id or @fd is not found, FdNotFound
4603 # Notes: The list of fd sets is shared by all monitor connections.
4605 # If @fd is not specified, all file descriptors in @fdset-id
4610 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
4611 # <- { "return": {} }
4614 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
4619 # Information about a file descriptor that belongs to an fd set.
4621 # @fd: The file descriptor value.
4623 # @opaque: A free-form string that can be used to describe the fd.
4627 { 'struct': 'FdsetFdInfo',
4628 'data': {'fd': 'int', '*opaque': 'str'} }
4633 # Information about an fd set.
4635 # @fdset-id: The ID of the fd set.
4637 # @fds: A list of file descriptors that belong to this fd set.
4641 { 'struct': 'FdsetInfo',
4642 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
4647 # Return information describing all fd sets.
4649 # Returns: A list of @FdsetInfo
4653 # Note: The list of fd sets is shared by all monitor connections.
4657 # -> { "execute": "query-fdsets" }
4663 # "opaque": "rdonly:/path/to/file"
4667 # "opaque": "rdwr:/path/to/file"
4687 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
4692 # Information describing the QEMU target.
4694 # @arch: the target architecture (eg "x86_64", "i386", etc)
4698 { 'struct': 'TargetInfo',
4699 'data': { 'arch': 'str' } }
4704 # Return information about the target for this QEMU
4706 # Returns: TargetInfo
4710 { 'command': 'query-target', 'returns': 'TargetInfo' }
4715 # An enumeration of key name.
4717 # This is used by the @send-key command.
4719 # @unmapped: since 2.0
4722 # @kp_comma: since 2.4
4723 # @kp_equals: since 2.6
4725 # @hiragana: since 2.9
4726 # @henkan: since 2.9
4732 { 'enum': 'QKeyCode',
4733 'data': [ 'unmapped',
4734 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
4735 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
4736 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
4737 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
4738 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
4739 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
4740 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
4741 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
4742 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
4743 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
4744 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
4745 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
4746 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
4747 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
4748 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
4749 'ro', 'hiragana', 'henkan', 'yen',
4750 'kp_comma', 'kp_equals', 'power' ] }
4755 # Represents a keyboard key.
4759 { 'union': 'KeyValue',
4762 'qcode': 'QKeyCode' } }
4767 # Send keys to guest.
4769 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
4770 # simultaneously sent to the guest. A @KeyValue.number value is sent
4771 # directly to the guest, while @KeyValue.qcode must be a valid
4774 # @hold-time: time to delay key up events, milliseconds. Defaults
4777 # Returns: Nothing on success
4778 # If key is unknown or redundant, InvalidParameter
4784 # -> { "execute": "send-key",
4785 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
4786 # { "type": "qcode", "data": "alt" },
4787 # { "type": "qcode", "data": "delete" } ] } }
4788 # <- { "return": {} }
4791 { 'command': 'send-key',
4792 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
4797 # Write a PPM of the VGA screen to a file.
4799 # @filename: the path of a new PPM file to store the image
4801 # Returns: Nothing on success
4807 # -> { "execute": "screendump",
4808 # "arguments": { "filename": "/tmp/image" } }
4809 # <- { "return": {} }
4812 { 'command': 'screendump', 'data': {'filename': 'str'} }
4818 # Configuration shared across all chardev backends
4820 # @logfile: The name of a logfile to save output
4821 # @logappend: true to append instead of truncate
4822 # (default to false to truncate)
4826 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
4827 '*logappend': 'bool' } }
4832 # Configuration info for file chardevs.
4834 # @in: The name of the input file
4835 # @out: The name of the output file
4836 # @append: Open the file in append mode (default false to
4837 # truncate) (Since 2.6)
4841 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
4843 '*append': 'bool' },
4844 'base': 'ChardevCommon' }
4849 # Configuration info for device and pipe chardevs.
4851 # @device: The name of the special file for the device,
4852 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
4856 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
4857 'base': 'ChardevCommon' }
4862 # Configuration info for (stream) socket chardevs.
4864 # @addr: socket address to listen on (server=true)
4865 # or connect to (server=false)
4866 # @tls-creds: the ID of the TLS credentials object (since 2.6)
4867 # @server: create server socket (default: true)
4868 # @wait: wait for incoming connection on server
4869 # sockets (default: false).
4870 # @nodelay: set TCP_NODELAY socket option (default: false)
4871 # @telnet: enable telnet protocol on server
4872 # sockets (default: false)
4873 # @reconnect: For a client socket, if a socket is disconnected,
4874 # then attempt a reconnect after the given number of seconds.
4875 # Setting this to zero disables this function. (default: 0)
4880 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
4881 '*tls-creds' : 'str',
4884 '*nodelay' : 'bool',
4886 '*reconnect' : 'int' },
4887 'base': 'ChardevCommon' }
4892 # Configuration info for datagram socket chardevs.
4894 # @remote: remote address
4895 # @local: local address
4899 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
4900 '*local' : 'SocketAddress' },
4901 'base': 'ChardevCommon' }
4906 # Configuration info for mux chardevs.
4908 # @chardev: name of the base chardev.
4912 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
4913 'base': 'ChardevCommon' }
4918 # Configuration info for stdio chardevs.
4920 # @signal: Allow signals (such as SIGINT triggered by ^C)
4921 # be delivered to qemu. Default: true in -nographic mode,
4926 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
4927 'base': 'ChardevCommon' }
4931 # @ChardevSpiceChannel:
4933 # Configuration info for spice vm channel chardevs.
4935 # @type: kind of channel (for example vdagent).
4939 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
4940 'base': 'ChardevCommon' }
4943 # @ChardevSpicePort:
4945 # Configuration info for spice port chardevs.
4947 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
4951 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
4952 'base': 'ChardevCommon' }
4957 # Configuration info for virtual console chardevs.
4959 # @width: console width, in pixels
4960 # @height: console height, in pixels
4961 # @cols: console width, in chars
4962 # @rows: console height, in chars
4966 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
4970 'base': 'ChardevCommon' }
4975 # Configuration info for ring buffer chardevs.
4977 # @size: ring buffer size, must be power of two, default is 65536
4981 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
4982 'base': 'ChardevCommon' }
4987 # Configuration info for the new chardev backend.
4989 # Since: 1.4 (testdev since 2.2, wctablet since 2.9)
4991 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
4992 'serial' : 'ChardevHostdev',
4993 'parallel': 'ChardevHostdev',
4994 'pipe' : 'ChardevHostdev',
4995 'socket' : 'ChardevSocket',
4996 'udp' : 'ChardevUdp',
4997 'pty' : 'ChardevCommon',
4998 'null' : 'ChardevCommon',
4999 'mux' : 'ChardevMux',
5000 'msmouse': 'ChardevCommon',
5001 'wctablet' : 'ChardevCommon',
5002 'braille': 'ChardevCommon',
5003 'testdev': 'ChardevCommon',
5004 'stdio' : 'ChardevStdio',
5005 'console': 'ChardevCommon',
5006 'spicevmc' : 'ChardevSpiceChannel',
5007 'spiceport' : 'ChardevSpicePort',
5009 'ringbuf': 'ChardevRingbuf',
5010 # next one is just for compatibility
5011 'memory' : 'ChardevRingbuf' } }
5016 # Return info about the chardev backend just created.
5018 # @pty: name of the slave pseudoterminal device, present if
5019 # and only if a chardev of type 'pty' was created
5023 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
5028 # Add a character device backend
5030 # @id: the chardev's ID, must be unique
5031 # @backend: backend type and parameters
5033 # Returns: ChardevReturn.
5039 # -> { "execute" : "chardev-add",
5040 # "arguments" : { "id" : "foo",
5041 # "backend" : { "type" : "null", "data" : {} } } }
5042 # <- { "return": {} }
5044 # -> { "execute" : "chardev-add",
5045 # "arguments" : { "id" : "bar",
5046 # "backend" : { "type" : "file",
5047 # "data" : { "out" : "/tmp/bar.log" } } } }
5048 # <- { "return": {} }
5050 # -> { "execute" : "chardev-add",
5051 # "arguments" : { "id" : "baz",
5052 # "backend" : { "type" : "pty", "data" : {} } } }
5053 # <- { "return": { "pty" : "/dev/pty/42" } }
5056 { 'command': 'chardev-add', 'data': {'id' : 'str',
5057 'backend' : 'ChardevBackend' },
5058 'returns': 'ChardevReturn' }
5063 # Remove a character device backend
5065 # @id: the chardev's ID, must exist and not be in use
5067 # Returns: Nothing on success
5073 # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
5074 # <- { "return": {} }
5077 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
5082 # An enumeration of TPM models
5084 # @tpm-tis: TPM TIS model
5088 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
5091 # @query-tpm-models:
5093 # Return a list of supported TPM models
5095 # Returns: a list of TpmModel
5101 # -> { "execute": "query-tpm-models" }
5102 # <- { "return": [ "tpm-tis" ] }
5105 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
5110 # An enumeration of TPM types
5112 # @passthrough: TPM passthrough type
5116 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
5121 # Return a list of supported TPM types
5123 # Returns: a list of TpmType
5129 # -> { "execute": "query-tpm-types" }
5130 # <- { "return": [ "passthrough" ] }
5133 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
5136 # @TPMPassthroughOptions:
5138 # Information about the TPM passthrough type
5140 # @path: string describing the path used for accessing the TPM device
5142 # @cancel-path: string showing the TPM's sysfs cancel file
5143 # for cancellation of TPM commands while they are executing
5147 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
5148 '*cancel-path' : 'str'} }
5153 # A union referencing different TPM backend types' configuration options
5155 # @type: 'passthrough' The configuration options for the TPM passthrough type
5159 { 'union': 'TpmTypeOptions',
5160 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
5165 # Information about the TPM
5167 # @id: The Id of the TPM
5169 # @model: The TPM frontend model
5171 # @options: The TPM (backend) type configuration options
5175 { 'struct': 'TPMInfo',
5176 'data': {'id': 'str',
5177 'model': 'TpmModel',
5178 'options': 'TpmTypeOptions' } }
5183 # Return information about the TPM device
5185 # Returns: @TPMInfo on success
5191 # -> { "execute": "query-tpm" }
5194 # { "model": "tpm-tis",
5196 # { "type": "passthrough",
5198 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
5199 # "path": "/dev/tpm0"
5208 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
5211 # @AcpiTableOptions:
5213 # Specify an ACPI table on the command line to load.
5215 # At most one of @file and @data can be specified. The list of files specified
5216 # by any one of them is loaded and concatenated in order. If both are omitted,
5219 # Other fields / optargs can be used to override fields of the generic ACPI
5220 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
5221 # Description Table Header. If a header field is not overridden, then the
5222 # corresponding value from the concatenated blob is used (in case of @file), or
5223 # it is filled in with a hard-coded value (in case of @data).
5225 # String fields are copied into the matching ACPI member from lowest address
5226 # upwards, and silently truncated / NUL-padded to length.
5228 # @sig: table signature / identifier (4 bytes)
5230 # @rev: table revision number (dependent on signature, 1 byte)
5232 # @oem_id: OEM identifier (6 bytes)
5234 # @oem_table_id: OEM table identifier (8 bytes)
5236 # @oem_rev: OEM-supplied revision number (4 bytes)
5238 # @asl_compiler_id: identifier of the utility that created the table
5241 # @asl_compiler_rev: revision number of the utility that created the
5244 # @file: colon (:) separated list of pathnames to load and
5245 # concatenate as table data. The resultant binary blob is expected to
5246 # have an ACPI table header. At least one file is required. This field
5249 # @data: colon (:) separated list of pathnames to load and
5250 # concatenate as table data. The resultant binary blob must not have an
5251 # ACPI table header. At least one file is required. This field excludes
5256 { 'struct': 'AcpiTableOptions',
5261 '*oem_table_id': 'str',
5262 '*oem_rev': 'uint32',
5263 '*asl_compiler_id': 'str',
5264 '*asl_compiler_rev': 'uint32',
5269 # @CommandLineParameterType:
5271 # Possible types for an option parameter.
5273 # @string: accepts a character string
5275 # @boolean: accepts "on" or "off"
5277 # @number: accepts a number
5279 # @size: accepts a number followed by an optional suffix (K)ilo,
5280 # (M)ega, (G)iga, (T)era
5284 { 'enum': 'CommandLineParameterType',
5285 'data': ['string', 'boolean', 'number', 'size'] }
5288 # @CommandLineParameterInfo:
5290 # Details about a single parameter of a command line option.
5292 # @name: parameter name
5294 # @type: parameter @CommandLineParameterType
5296 # @help: human readable text string, not suitable for parsing.
5298 # @default: default value string (since 2.1)
5302 { 'struct': 'CommandLineParameterInfo',
5303 'data': { 'name': 'str',
5304 'type': 'CommandLineParameterType',
5306 '*default': 'str' } }
5309 # @CommandLineOptionInfo:
5311 # Details about a command line option, including its list of parameter details
5313 # @option: option name
5315 # @parameters: an array of @CommandLineParameterInfo
5319 { 'struct': 'CommandLineOptionInfo',
5320 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
5323 # @query-command-line-options:
5325 # Query command line option schema.
5327 # @option: option name
5329 # Returns: list of @CommandLineOptionInfo for all options (or for the given
5330 # @option). Returns an error if the given @option doesn't exist.
5336 # -> { "execute": "query-command-line-options",
5337 # "arguments": { "option": "option-rom" } }
5342 # "name": "romfile",
5346 # "name": "bootindex",
5350 # "option": "option-rom"
5356 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
5357 'returns': ['CommandLineOptionInfo'] }
5360 # @X86CPURegister32:
5362 # A X86 32-bit register
5366 { 'enum': 'X86CPURegister32',
5367 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
5370 # @X86CPUFeatureWordInfo:
5372 # Information about a X86 CPU feature word
5374 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
5376 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
5379 # @cpuid-register: Output register containing the feature bits
5381 # @features: value of output register, containing the feature bits
5385 { 'struct': 'X86CPUFeatureWordInfo',
5386 'data': { 'cpuid-input-eax': 'int',
5387 '*cpuid-input-ecx': 'int',
5388 'cpuid-register': 'X86CPURegister32',
5389 'features': 'int' } }
5392 # @DummyForceArrays:
5394 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
5398 { 'struct': 'DummyForceArrays',
5399 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
5405 # Packets receiving state
5407 # @normal: filter assigned packets according to the mac-table
5409 # @none: don't receive any assigned packet
5411 # @all: receive all assigned packets
5415 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
5420 # Rx-filter information for a NIC.
5422 # @name: net client name
5424 # @promiscuous: whether promiscuous mode is enabled
5426 # @multicast: multicast receive state
5428 # @unicast: unicast receive state
5430 # @vlan: vlan receive state (Since 2.0)
5432 # @broadcast-allowed: whether to receive broadcast
5434 # @multicast-overflow: multicast table is overflowed or not
5436 # @unicast-overflow: unicast table is overflowed or not
5438 # @main-mac: the main macaddr string
5440 # @vlan-table: a list of active vlan id
5442 # @unicast-table: a list of unicast macaddr string
5444 # @multicast-table: a list of multicast macaddr string
5448 { 'struct': 'RxFilterInfo',
5451 'promiscuous': 'bool',
5452 'multicast': 'RxState',
5453 'unicast': 'RxState',
5455 'broadcast-allowed': 'bool',
5456 'multicast-overflow': 'bool',
5457 'unicast-overflow': 'bool',
5459 'vlan-table': ['int'],
5460 'unicast-table': ['str'],
5461 'multicast-table': ['str'] }}
5466 # Return rx-filter information for all NICs (or for the given NIC).
5468 # @name: net client name
5470 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
5471 # Returns an error if the given @name doesn't exist, or given
5472 # NIC doesn't support rx-filter querying, or given net client
5479 # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
5482 # "promiscuous": true,
5484 # "main-mac": "52:54:00:12:34:56",
5485 # "unicast": "normal",
5491 # "unicast-table": [
5493 # "multicast": "normal",
5494 # "multicast-overflow": false,
5495 # "unicast-overflow": false,
5496 # "multicast-table": [
5497 # "01:00:5e:00:00:01",
5498 # "33:33:00:00:00:01",
5499 # "33:33:ff:12:34:56"
5501 # "broadcast-allowed": false
5507 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
5508 'returns': ['RxFilterInfo'] }
5513 # Button of a pointer input device (mouse, tablet).
5515 # @side: front side button of a 5-button mouse (since 2.9)
5517 # @extra: rear side button of a 5-button mouse (since 2.9)
5521 { 'enum' : 'InputButton',
5522 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
5528 # Position axis of a pointer input device (mouse, tablet).
5532 { 'enum' : 'InputAxis',
5533 'data' : [ 'x', 'y' ] }
5538 # Keyboard input event.
5540 # @key: Which key this event is for.
5541 # @down: True for key-down and false for key-up events.
5545 { 'struct' : 'InputKeyEvent',
5546 'data' : { 'key' : 'KeyValue',
5552 # Pointer button input event.
5554 # @button: Which button this event is for.
5555 # @down: True for key-down and false for key-up events.
5559 { 'struct' : 'InputBtnEvent',
5560 'data' : { 'button' : 'InputButton',
5566 # Pointer motion input event.
5568 # @axis: Which axis is referenced by @value.
5569 # @value: Pointer position. For absolute coordinates the
5570 # valid range is 0 -> 0x7ffff
5574 { 'struct' : 'InputMoveEvent',
5575 'data' : { 'axis' : 'InputAxis',
5581 # Input event union.
5583 # @type: the input type, one of:
5584 # - 'key': Input event of Keyboard
5585 # - 'btn': Input event of pointer buttons
5586 # - 'rel': Input event of relative pointer motion
5587 # - 'abs': Input event of absolute pointer motion
5591 { 'union' : 'InputEvent',
5592 'data' : { 'key' : 'InputKeyEvent',
5593 'btn' : 'InputBtnEvent',
5594 'rel' : 'InputMoveEvent',
5595 'abs' : 'InputMoveEvent' } }
5598 # @input-send-event:
5600 # Send input event(s) to guest.
5602 # @device: display device to send event(s) to.
5603 # @head: head to send event(s) to, in case the
5604 # display device supports multiple scanouts.
5605 # @events: List of InputEvent union.
5607 # Returns: Nothing on success.
5609 # The @device and @head parameters can be used to send the input event
5610 # to specific input devices in case (a) multiple input devices of the
5611 # same kind are added to the virtual machine and (b) you have
5612 # configured input routing (see docs/multiseat.txt) for those input
5613 # devices. The parameters work exactly like the device and head
5614 # properties of input devices. If @device is missing, only devices
5615 # that have no input routing config are admissible. If @device is
5616 # specified, both input devices with and without input routing config
5617 # are admissible, but devices with input routing config take
5622 # Note: The consoles are visible in the qom tree, under
5623 # /backend/console[$index]. They have a device link and head property,
5624 # so it is possible to map which console belongs to which device and
5629 # 1. Press left mouse button.
5631 # -> { "execute": "input-send-event",
5632 # "arguments": { "device": "video0",
5633 # "events": [ { "type": "btn",
5634 # "data" : { "down": true, "button": "left" } } ] } }
5635 # <- { "return": {} }
5637 # -> { "execute": "input-send-event",
5638 # "arguments": { "device": "video0",
5639 # "events": [ { "type": "btn",
5640 # "data" : { "down": false, "button": "left" } } ] } }
5641 # <- { "return": {} }
5643 # 2. Press ctrl-alt-del.
5645 # -> { "execute": "input-send-event",
5646 # "arguments": { "events": [
5647 # { "type": "key", "data" : { "down": true,
5648 # "key": {"type": "qcode", "data": "ctrl" } } },
5649 # { "type": "key", "data" : { "down": true,
5650 # "key": {"type": "qcode", "data": "alt" } } },
5651 # { "type": "key", "data" : { "down": true,
5652 # "key": {"type": "qcode", "data": "delete" } } } ] } }
5653 # <- { "return": {} }
5655 # 3. Move mouse pointer to absolute coordinates (20000, 400).
5657 # -> { "execute": "input-send-event" ,
5658 # "arguments": { "events": [
5659 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
5660 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
5661 # <- { "return": {} }
5664 { 'command': 'input-send-event',
5665 'data': { '*device': 'str',
5667 'events' : [ 'InputEvent' ] } }
5674 { 'enum': 'NumaOptionsType',
5675 'data': [ 'node' ] }
5680 # A discriminated record of NUMA options. (for OptsVisitor)
5684 { 'union': 'NumaOptions',
5685 'base': { 'type': 'NumaOptionsType' },
5686 'discriminator': 'type',
5688 'node': 'NumaNodeOptions' }}
5693 # Create a guest NUMA node. (for OptsVisitor)
5695 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
5697 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
5700 # @mem: memory size of this node; mutually exclusive with @memdev.
5701 # Equally divide total memory among nodes if both @mem and @memdev are
5704 # @memdev: memory backend object. If specified for one node,
5705 # it must be specified for all nodes.
5709 { 'struct': 'NumaNodeOptions',
5711 '*nodeid': 'uint16',
5712 '*cpus': ['uint16'],
5719 # Host memory policy types
5721 # @default: restore default policy, remove any nondefault policy
5723 # @preferred: set the preferred host nodes for allocation
5725 # @bind: a strict policy that restricts memory allocation to the
5726 # host nodes specified
5728 # @interleave: memory allocations are interleaved across the set
5729 # of host nodes specified
5733 { 'enum': 'HostMemPolicy',
5734 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
5739 # Information about memory backend
5741 # @id: backend's ID if backend has 'id' property (since 2.9)
5743 # @size: memory backend size
5745 # @merge: enables or disables memory merge support
5747 # @dump: includes memory backend's memory in a core dump or not
5749 # @prealloc: enables or disables memory preallocation
5751 # @host-nodes: host nodes for its memory policy
5753 # @policy: memory policy of memory backend
5757 { 'struct': 'Memdev',
5764 'host-nodes': ['uint16'],
5765 'policy': 'HostMemPolicy' }}
5770 # Returns information for all memory backends.
5772 # Returns: a list of @Memdev.
5778 # -> { "execute": "query-memdev" }
5782 # "size": 536870912,
5785 # "prealloc": false,
5786 # "host-nodes": [0, 1],
5790 # "size": 536870912,
5794 # "host-nodes": [2, 3],
5795 # "policy": "preferred"
5801 { 'command': 'query-memdev', 'returns': ['Memdev'] }
5804 # @PCDIMMDeviceInfo:
5806 # PCDIMMDevice state information
5810 # @addr: physical address, where device is mapped
5812 # @size: size of memory that the device provides
5814 # @slot: slot number at which device is plugged in
5816 # @node: NUMA node number where device is plugged in
5818 # @memdev: memory backend linked with device
5820 # @hotplugged: true if device was hotplugged
5822 # @hotpluggable: true if device if could be added/removed while machine is running
5826 { 'struct': 'PCDIMMDeviceInfo',
5827 'data': { '*id': 'str',
5833 'hotplugged': 'bool',
5834 'hotpluggable': 'bool'
5839 # @MemoryDeviceInfo:
5841 # Union containing information about a memory device
5845 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
5848 # @query-memory-devices:
5850 # Lists available memory devices and their state
5856 # -> { "execute": "query-memory-devices" }
5857 # <- { "return": [ { "data":
5858 # { "addr": 5368709120,
5859 # "hotpluggable": true,
5860 # "hotplugged": true,
5862 # "memdev": "/objects/memX",
5864 # "size": 1073741824,
5870 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
5875 # @DIMM: memory slot
5876 # @CPU: logical CPU slot (since 2.7)
5878 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
5883 # OSPM Status Indication for a device
5884 # For description of possible values of @source and @status fields
5885 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
5887 # @device: device ID associated with slot
5889 # @slot: slot ID, unique per slot of a given @slot-type
5891 # @slot-type: type of the slot
5893 # @source: an integer containing the source event
5895 # @status: an integer containing the status code
5899 { 'struct': 'ACPIOSTInfo',
5900 'data' : { '*device': 'str',
5902 'slot-type': 'ACPISlotType',
5907 # @query-acpi-ospm-status:
5909 # Return a list of ACPIOSTInfo for devices that support status
5910 # reporting via ACPI _OST method.
5916 # -> { "execute": "query-acpi-ospm-status" }
5917 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
5918 # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
5919 # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
5920 # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
5924 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
5927 # @WatchdogExpirationAction:
5929 # An enumeration of the actions taken when the watchdog device's timer is
5932 # @reset: system resets
5934 # @shutdown: system shutdown, note that it is similar to @powerdown, which
5935 # tries to set to system status and notify guest
5937 # @poweroff: system poweroff, the emulator program exits
5939 # @pause: system pauses, similar to @stop
5941 # @debug: system enters debug state
5943 # @none: nothing is done
5945 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
5946 # VCPUS on x86) (since 2.4)
5950 { 'enum': 'WatchdogExpirationAction',
5951 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
5957 # An enumeration of the I/O operation types
5959 # @read: read operation
5961 # @write: write operation
5965 { 'enum': 'IoOperationType',
5966 'data': [ 'read', 'write' ] }
5969 # @GuestPanicAction:
5971 # An enumeration of the actions taken when guest OS panic is detected
5973 # @pause: system pauses
5975 # Since: 2.1 (poweroff since 2.8)
5977 { 'enum': 'GuestPanicAction',
5978 'data': [ 'pause', 'poweroff' ] }
5981 # @GuestPanicInformationType:
5983 # An enumeration of the guest panic information types
5987 { 'enum': 'GuestPanicInformationType',
5988 'data': [ 'hyper-v'] }
5991 # @GuestPanicInformation:
5993 # Information about a guest panic
5997 {'union': 'GuestPanicInformation',
5998 'base': {'type': 'GuestPanicInformationType'},
5999 'discriminator': 'type',
6000 'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }
6003 # @GuestPanicInformationHyperV:
6005 # Hyper-V specific guest panic information (HV crash MSRs)
6009 {'struct': 'GuestPanicInformationHyperV',
6010 'data': { 'arg1': 'uint64',
6014 'arg5': 'uint64' } }
6017 # @rtc-reset-reinjection:
6019 # This command will reset the RTC interrupt reinjection backlog.
6020 # Can be used if another mechanism to synchronize guest time
6021 # is in effect, for example QEMU guest agent's guest-set-time
6028 # -> { "execute": "rtc-reset-reinjection" }
6029 # <- { "return": {} }
6032 { 'command': 'rtc-reset-reinjection' }
6034 # Rocker ethernet network switch
6035 { 'include': 'qapi/rocker.json' }
6040 # Mode of the replay subsystem.
6042 # @none: normal execution mode. Replay or record are not enabled.
6044 # @record: record mode. All non-deterministic data is written into the
6047 # @play: replay mode. Non-deterministic data required for system execution
6048 # is read from the log.
6052 { 'enum': 'ReplayMode',
6053 'data': [ 'none', 'record', 'play' ] }
6056 # @xen-load-devices-state:
6058 # Load the state of all devices from file. The RAM and the block devices
6059 # of the VM are not loaded by this command.
6061 # @filename: the file to load the state of the devices from as binary
6062 # data. See xen-save-devices-state.txt for a description of the binary
6069 # -> { "execute": "xen-load-devices-state",
6070 # "arguments": { "filename": "/tmp/resume" } }
6071 # <- { "return": {} }
6074 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
6077 # @xen-set-replication:
6079 # Enable or disable replication.
6081 # @enable: true to enable, false to disable.
6083 # @primary: true for primary or false for secondary.
6085 # @failover: true to do failover, false to stop. but cannot be
6086 # specified if 'enable' is true. default value is false.
6092 # -> { "execute": "xen-set-replication",
6093 # "arguments": {"enable": true, "primary": false} }
6094 # <- { "return": {} }
6098 { 'command': 'xen-set-replication',
6099 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
6102 # @ReplicationStatus:
6104 # The result format for 'query-xen-replication-status'.
6106 # @error: true if an error happened, false if replication is normal.
6108 # @desc: the human readable error description string, when
6113 { 'struct': 'ReplicationStatus',
6114 'data': { 'error': 'bool', '*desc': 'str' } }
6117 # @query-xen-replication-status:
6119 # Query replication status while the vm is running.
6121 # Returns: A @ReplicationResult object showing the status.
6125 # -> { "execute": "query-xen-replication-status" }
6126 # <- { "return": { "error": false } }
6130 { 'command': 'query-xen-replication-status',
6131 'returns': 'ReplicationStatus' }
6134 # @xen-colo-do-checkpoint:
6136 # Xen uses this command to notify replication to trigger a checkpoint.
6142 # -> { "execute": "xen-colo-do-checkpoint" }
6143 # <- { "return": {} }
6147 { 'command': 'xen-colo-do-checkpoint' }
6152 # The struct describes capability for a specific GIC (Generic
6153 # Interrupt Controller) version. These bits are not only decided by
6154 # QEMU/KVM software version, but also decided by the hardware that
6155 # the program is running upon.
6157 # @version: version of GIC to be described. Currently, only 2 and 3
6160 # @emulated: whether current QEMU/hardware supports emulated GIC
6161 # device in user space.
6163 # @kernel: whether current QEMU/hardware supports hardware
6164 # accelerated GIC device in kernel.
6168 { 'struct': 'GICCapability',
6169 'data': { 'version': 'int',
6171 'kernel': 'bool' } }
6174 # @query-gic-capabilities:
6176 # This command is ARM-only. It will return a list of GICCapability
6177 # objects that describe its capability bits.
6179 # Returns: a list of GICCapability objects.
6185 # -> { "execute": "query-gic-capabilities" }
6186 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
6187 # { "version": 3, "emulated": false, "kernel": true } ] }
6190 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
6193 # @CpuInstanceProperties:
6195 # List of properties to be used for hotplugging a CPU instance,
6196 # it should be passed by management with device_add command when
6197 # a CPU is being hotplugged.
6199 # @node-id: NUMA node ID the CPU belongs to
6200 # @socket-id: socket number within node/board the CPU belongs to
6201 # @core-id: core number within socket the CPU belongs to
6202 # @thread-id: thread number within core the CPU belongs to
6204 # Note: currently there are 4 properties that could be present
6205 # but management should be prepared to pass through other
6206 # properties with device_add command to allow for future
6207 # interface extension. This also requires the filed names to be kept in
6208 # sync with the properties passed to -device/device_add.
6212 { 'struct': 'CpuInstanceProperties',
6213 'data': { '*node-id': 'int',
6214 '*socket-id': 'int',
6223 # @type: CPU object type for usage with device_add command
6224 # @props: list of properties to be used for hotplugging CPU
6225 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
6226 # @qom-path: link to existing CPU object if CPU is present or
6227 # omitted if CPU is not present.
6231 { 'struct': 'HotpluggableCPU',
6232 'data': { 'type': 'str',
6233 'vcpus-count': 'int',
6234 'props': 'CpuInstanceProperties',
6240 # @query-hotpluggable-cpus:
6242 # Returns: a list of HotpluggableCPU objects.
6248 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
6250 # -> { "execute": "query-hotpluggable-cpus" }
6252 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
6253 # "vcpus-count": 1 },
6254 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
6255 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
6258 # For pc machine type started with -smp 1,maxcpus=2:
6260 # -> { "execute": "query-hotpluggable-cpus" }
6263 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6264 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
6267 # "qom-path": "/machine/unattached/device[0]",
6268 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6269 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
6274 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
6281 # @guid: the globally unique identifier
6285 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
6288 # @query-vm-generation-id:
6290 # Show Virtual Machine Generation ID
6294 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }