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
601 # @page-size: The number of bytes per page for the various page-based
602 # statistics (since 2.10)
606 { 'struct': 'MigrationStats',
607 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
608 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
609 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
610 'mbps' : 'number', 'dirty-sync-count' : 'int',
611 'postcopy-requests' : 'int', 'page-size' : 'int' } }
616 # Detailed XBZRLE migration cache statistics
618 # @cache-size: XBZRLE cache size
620 # @bytes: amount of bytes already transferred to the target VM
622 # @pages: amount of pages transferred to the target VM
624 # @cache-miss: number of cache miss
626 # @cache-miss-rate: rate of cache miss (since 2.1)
628 # @overflow: number of overflows
632 { 'struct': 'XBZRLECacheStats',
633 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
634 'cache-miss': 'int', 'cache-miss-rate': 'number',
635 'overflow': 'int' } }
640 # An enumeration of migration status.
642 # @none: no migration has ever happened.
644 # @setup: migration process has been initiated.
646 # @cancelling: in the process of cancelling migration.
648 # @cancelled: cancelling migration is finished.
650 # @active: in the process of doing migration.
652 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
654 # @completed: migration is finished.
656 # @failed: some error occurred during migration process.
658 # @colo: VM is in the process of fault tolerance, VM can not get into this
659 # state unless colo capability is enabled for migration. (since 2.8)
664 { 'enum': 'MigrationStatus',
665 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
666 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
671 # Information about current migration process.
673 # @status: @MigrationStatus describing the current migration status.
674 # If this field is not returned, no migration process
677 # @ram: @MigrationStats containing detailed migration
678 # status, only returned if status is 'active' or
679 # 'completed'(since 1.2)
681 # @disk: @MigrationStats containing detailed disk migration
682 # status, only returned if status is 'active' and it is a block
685 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
686 # migration statistics, only returned if XBZRLE feature is on and
687 # status is 'active' or 'completed' (since 1.2)
689 # @total-time: total amount of milliseconds since migration started.
690 # If migration has ended, it returns the total migration
693 # @downtime: only present when migration finishes correctly
694 # total downtime in milliseconds for the guest.
697 # @expected-downtime: only present while migration is active
698 # expected downtime in milliseconds for the guest in last walk
699 # of the dirty bitmap. (since 1.3)
701 # @setup-time: amount of setup time in milliseconds _before_ the
702 # iterations begin but _after_ the QMP command is issued. This is designed
703 # to provide an accounting of any activities (such as RDMA pinning) which
704 # may be expensive, but do not actually occur during the iterative
705 # migration rounds themselves. (since 1.6)
707 # @cpu-throttle-percentage: percentage of time guest cpus are being
708 # throttled during auto-converge. This is only present when auto-converge
709 # has started throttling guest cpus. (Since 2.7)
711 # @error-desc: the human readable error description string, when
712 # @status is 'failed'. Clients should not attempt to parse the
713 # error strings. (Since 2.7)
717 { 'struct': 'MigrationInfo',
718 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
719 '*disk': 'MigrationStats',
720 '*xbzrle-cache': 'XBZRLECacheStats',
721 '*total-time': 'int',
722 '*expected-downtime': 'int',
724 '*setup-time': 'int',
725 '*cpu-throttle-percentage': 'int',
726 '*error-desc': 'str'} }
731 # Returns information about current migration process. If migration
732 # is active there will be another json-object with RAM migration
733 # status and if block migration is active another one with block
736 # Returns: @MigrationInfo
742 # 1. Before the first migration
744 # -> { "execute": "query-migrate" }
745 # <- { "return": {} }
747 # 2. Migration is done and has succeeded
749 # -> { "execute": "query-migrate" }
751 # "status": "completed",
756 # "total-time":12345,
757 # "setup-time":12345,
761 # "normal-bytes":123456,
762 # "dirty-sync-count":15
767 # 3. Migration is done and has failed
769 # -> { "execute": "query-migrate" }
770 # <- { "return": { "status": "failed" } }
772 # 4. Migration is being performed and is not a block migration:
774 # -> { "execute": "query-migrate" }
782 # "total-time":12345,
783 # "setup-time":12345,
784 # "expected-downtime":12345,
787 # "normal-bytes":123456,
788 # "dirty-sync-count":15
793 # 5. Migration is being performed and is a block migration:
795 # -> { "execute": "query-migrate" }
801 # "remaining":1053304,
802 # "transferred":3720,
803 # "total-time":12345,
804 # "setup-time":12345,
805 # "expected-downtime":12345,
808 # "normal-bytes":123456,
809 # "dirty-sync-count":15
813 # "remaining":20880384,
814 # "transferred":91136
819 # 6. Migration is being performed and XBZRLE is active:
821 # -> { "execute": "query-migrate" }
825 # "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
828 # "remaining":1053304,
829 # "transferred":3720,
830 # "total-time":12345,
831 # "setup-time":12345,
832 # "expected-downtime":12345,
835 # "normal-bytes":3412992,
836 # "dirty-sync-count":15
839 # "cache-size":67108864,
843 # "cache-miss-rate":0.123,
850 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
853 # @MigrationCapability:
855 # Migration capabilities enumeration
857 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
858 # This feature allows us to minimize migration traffic for certain work
859 # loads, by sending compressed difference of the pages
861 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
862 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
863 # Disabled by default. (since 2.0)
865 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
866 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
867 # source and target VM to support this feature. To enable it is sufficient
868 # to enable the capability on the source VM. The feature is disabled by
869 # default. (since 1.6)
871 # @compress: Use multiple compression threads to accelerate live migration.
872 # This feature can help to reduce the migration traffic, by sending
873 # compressed pages. Please note that if compress and xbzrle are both
874 # on, compress only takes effect in the ram bulk stage, after that,
875 # it will be disabled and only xbzrle takes effect, this can help to
876 # minimize migration traffic. The feature is disabled by default.
879 # @events: generate events for each migration state change
882 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
883 # to speed up convergence of RAM migration. (since 1.6)
885 # @postcopy-ram: Start executing on the migration target before all of RAM has
886 # been migrated, pulling the remaining pages along as needed. NOTE: If
887 # the migration fails during postcopy the VM will fail. (since 2.6)
889 # @x-colo: If enabled, migration will never end, and the state of the VM on the
890 # primary side will be migrated continuously to the VM on secondary
891 # side, this process is called COarse-Grain LOck Stepping (COLO) for
892 # Non-stop Service. (since 2.8)
894 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
895 # during postcopy-ram migration. (since 2.9)
897 # @block: If enabled, QEMU will also migrate the contents of all block
898 # devices. Default is disabled. A possible alternative uses
899 # mirror jobs to a builtin NBD server on the destination, which
900 # offers more flexibility.
903 # @return-path: If enabled, migration will use the return path even
904 # for precopy. (since 2.10)
908 { 'enum': 'MigrationCapability',
909 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
910 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
911 'block', 'return-path' ] }
914 # @MigrationCapabilityStatus:
916 # Migration capability information
918 # @capability: capability enum
920 # @state: capability state bool
924 { 'struct': 'MigrationCapabilityStatus',
925 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
928 # @migrate-set-capabilities:
930 # Enable/Disable the following migration capabilities (like xbzrle)
932 # @capabilities: json array of capability modifications to make
938 # -> { "execute": "migrate-set-capabilities" , "arguments":
939 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
942 { 'command': 'migrate-set-capabilities',
943 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
946 # @query-migrate-capabilities:
948 # Returns information about the current migration capabilities status
950 # Returns: @MigrationCapabilitiesStatus
956 # -> { "execute": "query-migrate-capabilities" }
958 # {"state": false, "capability": "xbzrle"},
959 # {"state": false, "capability": "rdma-pin-all"},
960 # {"state": false, "capability": "auto-converge"},
961 # {"state": false, "capability": "zero-blocks"},
962 # {"state": false, "capability": "compress"},
963 # {"state": true, "capability": "events"},
964 # {"state": false, "capability": "postcopy-ram"},
965 # {"state": false, "capability": "x-colo"}
969 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
972 # @MigrationParameter:
974 # Migration parameters enumeration
976 # @compress-level: Set the compression level to be used in live migration,
977 # the compression level is an integer between 0 and 9, where 0 means
978 # no compression, 1 means the best compression speed, and 9 means best
979 # compression ratio which will consume more CPU.
981 # @compress-threads: Set compression thread count to be used in live migration,
982 # the compression thread count is an integer between 1 and 255.
984 # @decompress-threads: Set decompression thread count to be used in live
985 # migration, the decompression thread count is an integer between 1
986 # and 255. Usually, decompression is at least 4 times as fast as
987 # compression, so set the decompress-threads to the number about 1/4
988 # of compress-threads is adequate.
990 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
991 # when migration auto-converge is activated. The
992 # default value is 20. (Since 2.7)
994 # @cpu-throttle-increment: throttle percentage increase each time
995 # auto-converge detects that migration is not making
996 # progress. The default value is 10. (Since 2.7)
998 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
999 # establishing a TLS connection over the migration data channel.
1000 # On the outgoing side of the migration, the credentials must
1001 # be for a 'client' endpoint, while for the incoming side the
1002 # credentials must be for a 'server' endpoint. Setting this
1003 # will enable TLS for all migrations. The default is unset,
1004 # resulting in unsecured migration at the QEMU level. (Since 2.7)
1006 # @tls-hostname: hostname of the target host for the migration. This is
1007 # required when using x509 based TLS credentials and the
1008 # migration URI does not already include a hostname. For
1009 # example if using fd: or exec: based migration, the
1010 # hostname must be provided so that the server's x509
1011 # certificate identity can be validated. (Since 2.7)
1013 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1014 # bytes per second. (Since 2.8)
1016 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1017 # downtime in milliseconds (Since 2.8)
1019 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
1020 # periodic mode. (Since 2.8)
1022 # @block-incremental: Affects how much storage is migrated when the
1023 # block migration capability is enabled. When false, the entire
1024 # storage backing chain is migrated into a flattened image at
1025 # the destination; when true, only the active qcow2 layer is
1026 # migrated and the destination must already have access to the
1027 # same backing chain as was used on the source. (since 2.10)
1031 { 'enum': 'MigrationParameter',
1032 'data': ['compress-level', 'compress-threads', 'decompress-threads',
1033 'cpu-throttle-initial', 'cpu-throttle-increment',
1034 'tls-creds', 'tls-hostname', 'max-bandwidth',
1035 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] }
1038 # @MigrateSetParameters:
1040 # @compress-level: compression level
1042 # @compress-threads: compression thread count
1044 # @decompress-threads: decompression thread count
1046 # @cpu-throttle-initial: Initial percentage of time guest cpus are
1047 # throttled when migration auto-converge is activated.
1048 # The default value is 20. (Since 2.7)
1050 # @cpu-throttle-increment: throttle percentage increase each time
1051 # auto-converge detects that migration is not making
1052 # progress. The default value is 10. (Since 2.7)
1054 # @tls-creds: ID of the 'tls-creds' object that provides credentials
1055 # for establishing a TLS connection over the migration data
1056 # channel. On the outgoing side of the migration, the credentials
1057 # must be for a 'client' endpoint, while for the incoming side the
1058 # credentials must be for a 'server' endpoint. Setting this
1059 # to a non-empty string enables TLS for all migrations.
1060 # An empty string means that QEMU will use plain text mode for
1061 # migration, rather than TLS (Since 2.9)
1062 # Previously (since 2.7), this was reported by omitting
1063 # tls-creds instead.
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)
1073 # Previously (since 2.7), this was reported by omitting
1074 # tls-hostname instead.
1076 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1077 # bytes per second. (Since 2.8)
1079 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1080 # downtime in milliseconds (Since 2.8)
1082 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1084 # @block-incremental: Affects how much storage is migrated when the
1085 # block migration capability is enabled. When false, the entire
1086 # storage backing chain is migrated into a flattened image at
1087 # the destination; when true, only the active qcow2 layer is
1088 # migrated and the destination must already have access to the
1089 # same backing chain as was used on the source. (since 2.10)
1093 # TODO either fuse back into MigrationParameters, or make
1094 # MigrationParameters members mandatory
1095 { 'struct': 'MigrateSetParameters',
1096 'data': { '*compress-level': 'int',
1097 '*compress-threads': 'int',
1098 '*decompress-threads': 'int',
1099 '*cpu-throttle-initial': 'int',
1100 '*cpu-throttle-increment': 'int',
1101 '*tls-creds': 'str',
1102 '*tls-hostname': 'str',
1103 '*max-bandwidth': 'int',
1104 '*downtime-limit': 'int',
1105 '*x-checkpoint-delay': 'int',
1106 '*block-incremental': 'bool' } }
1109 # @migrate-set-parameters:
1111 # Set various migration parameters.
1117 # -> { "execute": "migrate-set-parameters" ,
1118 # "arguments": { "compress-level": 1 } }
1121 { 'command': 'migrate-set-parameters', 'boxed': true,
1122 'data': 'MigrateSetParameters' }
1125 # @MigrationParameters:
1127 # The optional members aren't actually optional.
1129 # @compress-level: compression level
1131 # @compress-threads: compression thread count
1133 # @decompress-threads: decompression thread count
1135 # @cpu-throttle-initial: Initial percentage of time guest cpus are
1136 # throttled when migration auto-converge is activated.
1139 # @cpu-throttle-increment: throttle percentage increase each time
1140 # auto-converge detects that migration is not making
1141 # progress. (Since 2.7)
1143 # @tls-creds: ID of the 'tls-creds' object that provides credentials
1144 # for establishing a TLS connection over the migration data
1145 # channel. On the outgoing side of the migration, the credentials
1146 # must be for a 'client' endpoint, while for the incoming side the
1147 # credentials must be for a 'server' endpoint.
1148 # An empty string means that QEMU will use plain text mode for
1149 # migration, rather than TLS (Since 2.7)
1150 # Note: 2.8 reports this by omitting tls-creds instead.
1152 # @tls-hostname: hostname of the target host for the migration. This
1153 # is required when using x509 based TLS credentials and the
1154 # migration URI does not already include a hostname. For
1155 # example if using fd: or exec: based migration, the
1156 # hostname must be provided so that the server's x509
1157 # certificate identity can be validated. (Since 2.7)
1158 # An empty string means that QEMU will use the hostname
1159 # associated with the migration URI, if any. (Since 2.9)
1160 # Note: 2.8 reports this by omitting tls-hostname instead.
1162 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1163 # bytes per second. (Since 2.8)
1165 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1166 # downtime in milliseconds (Since 2.8)
1168 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1170 # @block-incremental: Affects how much storage is migrated when the
1171 # block migration capability is enabled. When false, the entire
1172 # storage backing chain is migrated into a flattened image at
1173 # the destination; when true, only the active qcow2 layer is
1174 # migrated and the destination must already have access to the
1175 # same backing chain as was used on the source. (since 2.10)
1179 { 'struct': 'MigrationParameters',
1180 'data': { '*compress-level': 'int',
1181 '*compress-threads': 'int',
1182 '*decompress-threads': 'int',
1183 '*cpu-throttle-initial': 'int',
1184 '*cpu-throttle-increment': 'int',
1185 '*tls-creds': 'str',
1186 '*tls-hostname': 'str',
1187 '*max-bandwidth': 'int',
1188 '*downtime-limit': 'int',
1189 '*x-checkpoint-delay': 'int',
1190 '*block-incremental': 'bool' } }
1193 # @query-migrate-parameters:
1195 # Returns information about the current migration parameters
1197 # Returns: @MigrationParameters
1203 # -> { "execute": "query-migrate-parameters" }
1205 # "decompress-threads": 2,
1206 # "cpu-throttle-increment": 10,
1207 # "compress-threads": 8,
1208 # "compress-level": 1,
1209 # "cpu-throttle-initial": 20,
1210 # "max-bandwidth": 33554432,
1211 # "downtime-limit": 300
1216 { 'command': 'query-migrate-parameters',
1217 'returns': 'MigrationParameters' }
1220 # @client_migrate_info:
1222 # Set migration information for remote display. This makes the server
1223 # ask the client to automatically reconnect using the new parameters
1224 # once migration finished successfully. Only implemented for SPICE.
1226 # @protocol: must be "spice"
1227 # @hostname: migration target hostname
1228 # @port: spice tcp port for plaintext channels
1229 # @tls-port: spice tcp port for tls-secured channels
1230 # @cert-subject: server certificate subject
1236 # -> { "execute": "client_migrate_info",
1237 # "arguments": { "protocol": "spice",
1238 # "hostname": "virt42.lab.kraxel.org",
1240 # <- { "return": {} }
1243 { 'command': 'client_migrate_info',
1244 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1245 '*tls-port': 'int', '*cert-subject': 'str' } }
1248 # @migrate-start-postcopy:
1250 # Followup to a migration command to switch the migration to postcopy mode.
1251 # The postcopy-ram capability must be set before the original migration
1258 # -> { "execute": "migrate-start-postcopy" }
1259 # <- { "return": {} }
1262 { 'command': 'migrate-start-postcopy' }
1267 # The message transmission between Primary side and Secondary side.
1269 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1271 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1273 # @checkpoint-reply: SVM gets PVM's checkpoint request
1275 # @vmstate-send: VM's state will be sent by PVM.
1277 # @vmstate-size: The total size of VMstate.
1279 # @vmstate-received: VM's state has been received by SVM.
1281 # @vmstate-loaded: VM's state has been loaded by SVM.
1285 { 'enum': 'COLOMessage',
1286 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1287 'vmstate-send', 'vmstate-size', 'vmstate-received',
1288 'vmstate-loaded' ] }
1295 # @unknown: unknown mode
1297 # @primary: master side
1299 # @secondary: slave side
1303 { 'enum': 'COLOMode',
1304 'data': [ 'unknown', 'primary', 'secondary'] }
1309 # An enumeration of COLO failover status
1311 # @none: no failover has ever happened
1313 # @require: got failover requirement but not handled
1315 # @active: in the process of doing failover
1317 # @completed: finish the process of failover
1319 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1323 { 'enum': 'FailoverStatus',
1324 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1327 # @x-colo-lost-heartbeat:
1329 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1330 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1331 # If sent to the Secondary, the Secondary side will run failover work,
1332 # then takes over server operation to become the service VM.
1338 # -> { "execute": "x-colo-lost-heartbeat" }
1339 # <- { "return": {} }
1342 { 'command': 'x-colo-lost-heartbeat' }
1347 # Information about a mouse device.
1349 # @name: the name of the mouse device
1351 # @index: the index of the mouse device
1353 # @current: true if this device is currently receiving mouse events
1355 # @absolute: true if this device supports absolute coordinates as input
1359 { 'struct': 'MouseInfo',
1360 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
1361 'absolute': 'bool'} }
1366 # Returns information about each active mouse device
1368 # Returns: a list of @MouseInfo for each device
1374 # -> { "execute": "query-mice" }
1377 # "name":"QEMU Microsoft Mouse",
1383 # "name":"QEMU PS/2 Mouse",
1392 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
1397 # An enumeration of cpu types that enable additional information during
1402 { 'enum': 'CpuInfoArch',
1403 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1408 # Information about a virtual CPU
1410 # @CPU: the index of the virtual CPU
1412 # @current: this only exists for backwards compatibility and should be ignored
1414 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
1415 # to a processor specific low power mode.
1417 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1419 # @thread_id: ID of the underlying host thread
1421 # @props: properties describing to which node/socket/core/thread
1422 # virtual CPU belongs to, provided if supported by board (since 2.10)
1424 # @arch: architecture of the cpu, which determines which additional fields
1425 # will be listed (since 2.6)
1429 # Notes: @halted is a transient state that changes frequently. By the time the
1430 # data is sent to the client, the guest may no longer be halted.
1432 { 'union': 'CpuInfo',
1433 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1434 'qom_path': 'str', 'thread_id': 'int',
1435 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
1436 'discriminator': 'arch',
1437 'data': { 'x86': 'CpuInfoX86',
1438 'sparc': 'CpuInfoSPARC',
1439 'ppc': 'CpuInfoPPC',
1440 'mips': 'CpuInfoMIPS',
1441 'tricore': 'CpuInfoTricore',
1442 'other': 'CpuInfoOther' } }
1447 # Additional information about a virtual i386 or x86_64 CPU
1449 # @pc: the 64-bit instruction pointer
1453 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1458 # Additional information about a virtual SPARC CPU
1460 # @pc: the PC component of the instruction pointer
1462 # @npc: the NPC component of the instruction pointer
1466 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1471 # Additional information about a virtual PPC CPU
1473 # @nip: the instruction pointer
1477 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1482 # Additional information about a virtual MIPS CPU
1484 # @PC: the instruction pointer
1488 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1493 # Additional information about a virtual Tricore CPU
1495 # @PC: the instruction pointer
1499 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1504 # No additional information is available about the virtual CPU
1509 { 'struct': 'CpuInfoOther', 'data': { } }
1514 # Returns a list of information about each virtual CPU.
1516 # Returns: a list of @CpuInfo for each virtual CPU
1522 # -> { "execute": "query-cpus" }
1528 # "qom_path":"/machine/unattached/device[0]",
1537 # "qom_path":"/machine/unattached/device[2]",
1546 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1551 # Information about an iothread
1553 # @id: the identifier of the iothread
1555 # @thread-id: ID of the underlying host thread
1557 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
1560 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
1561 # configured (since 2.9)
1563 # @poll-shrink: how many ns will be removed from polling time, 0 means that
1564 # it's not configured (since 2.9)
1568 { 'struct': 'IOThreadInfo',
1569 'data': {'id': 'str',
1571 'poll-max-ns': 'int',
1573 'poll-shrink': 'int' } }
1578 # Returns a list of information about each iothread.
1580 # Note: this list excludes the QEMU main loop thread, which is not declared
1581 # using the -object iothread command-line option. It is always the main thread
1584 # Returns: a list of @IOThreadInfo for each iothread
1590 # -> { "execute": "query-iothreads" }
1604 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1607 # @NetworkAddressFamily:
1609 # The network address family
1611 # @ipv4: IPV4 family
1613 # @ipv6: IPV6 family
1615 # @unix: unix socket
1617 # @vsock: vsock family (since 2.8)
1619 # @unknown: otherwise
1623 { 'enum': 'NetworkAddressFamily',
1624 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1629 # The basic information for vnc network connection
1633 # @service: The service name of the vnc port. This may depend on the host
1634 # system's service database so symbolic names should not be relied
1637 # @family: address family
1639 # @websocket: true in case the socket is a websocket (since 2.3).
1643 { 'struct': 'VncBasicInfo',
1644 'data': { 'host': 'str',
1646 'family': 'NetworkAddressFamily',
1647 'websocket': 'bool' } }
1652 # The network connection information for server
1654 # @auth: authentication method used for
1655 # the plain (non-websocket) VNC server
1659 { 'struct': 'VncServerInfo',
1660 'base': 'VncBasicInfo',
1661 'data': { '*auth': 'str' } }
1666 # Information about a connected VNC client.
1668 # @x509_dname: If x509 authentication is in use, the Distinguished
1669 # Name of the client.
1671 # @sasl_username: If SASL authentication is in use, the SASL username
1672 # used for authentication.
1676 { 'struct': 'VncClientInfo',
1677 'base': 'VncBasicInfo',
1678 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1683 # Information about the VNC session.
1685 # @enabled: true if the VNC server is enabled, false otherwise
1687 # @host: The hostname the VNC server is bound to. This depends on
1688 # the name resolution on the host and may be an IP address.
1690 # @family: 'ipv6' if the host is listening for IPv6 connections
1691 # 'ipv4' if the host is listening for IPv4 connections
1692 # 'unix' if the host is listening on a unix domain socket
1693 # 'unknown' otherwise
1695 # @service: The service name of the server's port. This may depends
1696 # on the host system's service database so symbolic names should not
1699 # @auth: the current authentication type used by the server
1700 # 'none' if no authentication is being used
1701 # 'vnc' if VNC authentication is being used
1702 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1703 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1704 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1705 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1706 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1707 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1708 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1709 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1710 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1712 # @clients: a list of @VncClientInfo of all currently connected clients
1716 { 'struct': 'VncInfo',
1717 'data': {'enabled': 'bool', '*host': 'str',
1718 '*family': 'NetworkAddressFamily',
1719 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1724 # vnc primary authentication method.
1728 { 'enum': 'VncPrimaryAuth',
1729 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1730 'tls', 'vencrypt', 'sasl' ] }
1733 # @VncVencryptSubAuth:
1735 # vnc sub authentication method with vencrypt.
1739 { 'enum': 'VncVencryptSubAuth',
1741 'tls-none', 'x509-none',
1742 'tls-vnc', 'x509-vnc',
1743 'tls-plain', 'x509-plain',
1744 'tls-sasl', 'x509-sasl' ] }
1750 # The network connection information for server
1752 # @auth: The current authentication type used by the servers
1754 # @vencrypt: The vencrypt sub authentication type used by the
1755 # servers, only specified in case auth == vencrypt.
1759 { 'struct': 'VncServerInfo2',
1760 'base': 'VncBasicInfo',
1761 'data': { 'auth' : 'VncPrimaryAuth',
1762 '*vencrypt' : 'VncVencryptSubAuth' } }
1768 # Information about a vnc server
1770 # @id: vnc server name.
1772 # @server: A list of @VncBasincInfo describing all listening sockets.
1773 # The list can be empty (in case the vnc server is disabled).
1774 # It also may have multiple entries: normal + websocket,
1775 # possibly also ipv4 + ipv6 in the future.
1777 # @clients: A list of @VncClientInfo of all currently connected clients.
1778 # The list can be empty, for obvious reasons.
1780 # @auth: The current authentication type used by the non-websockets servers
1782 # @vencrypt: The vencrypt authentication type used by the servers,
1783 # only specified in case auth == vencrypt.
1785 # @display: The display device the vnc server is linked to.
1789 { 'struct': 'VncInfo2',
1790 'data': { 'id' : 'str',
1791 'server' : ['VncServerInfo2'],
1792 'clients' : ['VncClientInfo'],
1793 'auth' : 'VncPrimaryAuth',
1794 '*vencrypt' : 'VncVencryptSubAuth',
1795 '*display' : 'str' } }
1800 # Returns information about the current VNC server
1808 # -> { "execute": "query-vnc" }
1812 # "service":"50402",
1817 # "host":"127.0.0.1",
1818 # "service":"50401",
1826 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1829 # @query-vnc-servers:
1831 # Returns a list of vnc servers. The list can be empty.
1833 # Returns: a list of @VncInfo2
1837 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1842 # The basic information for SPICE network connection
1846 # @port: port number
1848 # @family: address family
1852 { 'struct': 'SpiceBasicInfo',
1853 'data': { 'host': 'str',
1855 'family': 'NetworkAddressFamily' } }
1860 # Information about a SPICE server
1862 # @auth: authentication method
1866 { 'struct': 'SpiceServerInfo',
1867 'base': 'SpiceBasicInfo',
1868 'data': { '*auth': 'str' } }
1873 # Information about a SPICE client channel.
1875 # @connection-id: SPICE connection id number. All channels with the same id
1876 # belong to the same SPICE session.
1878 # @channel-type: SPICE channel type number. "1" is the main control
1879 # channel, filter for this one if you want to track spice
1882 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1883 # multiple channels of the same type exist, such as multiple
1884 # display channels in a multihead setup
1886 # @tls: true if the channel is encrypted, false otherwise.
1890 { 'struct': 'SpiceChannel',
1891 'base': 'SpiceBasicInfo',
1892 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1896 # @SpiceQueryMouseMode:
1898 # An enumeration of Spice mouse states.
1900 # @client: Mouse cursor position is determined by the client.
1902 # @server: Mouse cursor position is determined by the server.
1904 # @unknown: No information is available about mouse mode used by
1907 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1911 { 'enum': 'SpiceQueryMouseMode',
1912 'data': [ 'client', 'server', 'unknown' ] }
1917 # Information about the SPICE session.
1919 # @enabled: true if the SPICE server is enabled, false otherwise
1921 # @migrated: true if the last guest migration completed and spice
1922 # migration had completed as well. false otherwise. (since 1.4)
1924 # @host: The hostname the SPICE server is bound to. This depends on
1925 # the name resolution on the host and may be an IP address.
1927 # @port: The SPICE server's port number.
1929 # @compiled-version: SPICE server version.
1931 # @tls-port: The SPICE server's TLS port number.
1933 # @auth: the current authentication type used by the server
1934 # 'none' if no authentication is being used
1935 # 'spice' uses SASL or direct TLS authentication, depending on command
1938 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1939 # be determined by the client or the server, or unknown if spice
1940 # server doesn't provide this information. (since: 1.1)
1942 # @channels: a list of @SpiceChannel for each active spice channel
1946 { 'struct': 'SpiceInfo',
1947 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1948 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1949 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1954 # Returns information about the current SPICE server
1956 # Returns: @SpiceInfo
1962 # -> { "execute": "query-spice" }
1968 # "host": "0.0.0.0",
1973 # "channel-type": 1,
1974 # "connection-id": 1804289383,
1975 # "host": "127.0.0.1",
1982 # "channel-type": 4,
1983 # "connection-id": 1804289383,
1984 # "host": "127.0.0.1",
1988 # [ ... more channels follow ... ]
1994 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1999 # Information about the guest balloon device.
2001 # @actual: the number of bytes the balloon currently contains
2006 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
2011 # Return information about the balloon device.
2013 # Returns: @BalloonInfo on success
2015 # If the balloon driver is enabled but not functional because the KVM
2016 # kernel module cannot support it, KvmMissingCap
2018 # If no balloon device is present, DeviceNotActive
2024 # -> { "execute": "query-balloon" }
2026 # "actual": 1073741824,
2031 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
2036 # A PCI device memory region
2038 # @base: the starting address (guest physical)
2040 # @limit: the ending address (guest physical)
2044 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
2049 # Information about a PCI device I/O region.
2051 # @bar: the index of the Base Address Register for this region
2053 # @type: 'io' if the region is a PIO region
2054 # 'memory' if the region is a MMIO region
2056 # @size: memory size
2058 # @prefetch: if @type is 'memory', true if the memory is prefetchable
2060 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
2064 { 'struct': 'PciMemoryRegion',
2065 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
2066 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
2071 # Information about a bus of a PCI Bridge device
2073 # @number: primary bus interface number. This should be the number of the
2074 # bus the device resides on.
2076 # @secondary: secondary bus interface number. This is the number of the
2077 # main bus for the bridge
2079 # @subordinate: This is the highest number bus that resides below the
2082 # @io_range: The PIO range for all devices on this bridge
2084 # @memory_range: The MMIO range for all devices on this bridge
2086 # @prefetchable_range: The range of prefetchable MMIO for all devices on
2091 { 'struct': 'PciBusInfo',
2092 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
2093 'io_range': 'PciMemoryRange',
2094 'memory_range': 'PciMemoryRange',
2095 'prefetchable_range': 'PciMemoryRange' } }
2100 # Information about a PCI Bridge device
2102 # @bus: information about the bus the device resides on
2104 # @devices: a list of @PciDeviceInfo for each device on this bridge
2108 { 'struct': 'PciBridgeInfo',
2109 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
2114 # Information about the Class of a PCI device
2116 # @desc: a string description of the device's class
2118 # @class: the class code of the device
2122 { 'struct': 'PciDeviceClass',
2123 'data': {'*desc': 'str', 'class': 'int'} }
2128 # Information about the Id of a PCI device
2130 # @device: the PCI device id
2132 # @vendor: the PCI vendor id
2136 { 'struct': 'PciDeviceId',
2137 'data': {'device': 'int', 'vendor': 'int'} }
2142 # Information about a PCI device
2144 # @bus: the bus number of the device
2146 # @slot: the slot the device is located in
2148 # @function: the function of the slot used by the device
2150 # @class_info: the class of the device
2152 # @id: the PCI device id
2154 # @irq: if an IRQ is assigned to the device, the IRQ number
2156 # @qdev_id: the device name of the PCI device
2158 # @pci_bridge: if the device is a PCI bridge, the bridge information
2160 # @regions: a list of the PCI I/O regions associated with the device
2162 # Notes: the contents of @class_info.desc are not stable and should only be
2163 # treated as informational.
2167 { 'struct': 'PciDeviceInfo',
2168 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
2169 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
2170 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
2171 'regions': ['PciMemoryRegion']} }
2176 # Information about a PCI bus
2178 # @bus: the bus index
2180 # @devices: a list of devices on this bus
2184 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
2189 # Return information about the PCI bus topology of the guest.
2191 # Returns: a list of @PciInfo for each PCI bus. Each bus is
2192 # represented by a json-object, which has a key with a json-array of
2193 # all PCI devices attached to it. Each device is represented by a
2200 # -> { "execute": "query-pci" }
2211 # "desc": "Host bridge"
2227 # "desc": "ISA bridge"
2243 # "desc": "IDE controller"
2265 # "desc": "VGA controller"
2275 # "mem_type_64": false,
2278 # "address": 4026531840,
2282 # "prefetch": false,
2283 # "mem_type_64": false,
2286 # "address": 4060086272,
2290 # "prefetch": false,
2291 # "mem_type_64": false,
2306 # "desc": "RAM controller"
2327 # Note: This example has been shortened as the real response is too long.
2330 { 'command': 'query-pci', 'returns': ['PciInfo'] }
2335 # This command will cause the QEMU process to exit gracefully. While every
2336 # attempt is made to send the QMP response before terminating, this is not
2337 # guaranteed. When using this interface, a premature EOF would not be
2344 # -> { "execute": "quit" }
2345 # <- { "return": {} }
2347 { 'command': 'quit' }
2352 # Stop all guest VCPU execution.
2356 # Notes: This function will succeed even if the guest is already in the stopped
2357 # state. In "inmigrate" state, it will ensure that the guest
2358 # remains paused once migration finishes, as if the -S option was
2359 # passed on the command line.
2363 # -> { "execute": "stop" }
2364 # <- { "return": {} }
2367 { 'command': 'stop' }
2372 # Performs a hard reset of a guest.
2378 # -> { "execute": "system_reset" }
2379 # <- { "return": {} }
2382 { 'command': 'system_reset' }
2385 # @system_powerdown:
2387 # Requests that a guest perform a powerdown operation.
2391 # Notes: A guest may or may not respond to this command. This command
2392 # returning does not indicate that a guest has accepted the request or
2393 # that it has shut down. Many guests will respond to this command by
2394 # prompting the user in some way.
2397 # -> { "execute": "system_powerdown" }
2398 # <- { "return": {} }
2401 { 'command': 'system_powerdown' }
2406 # This command is a nop that is only provided for the purposes of compatibility.
2410 # Notes: Do not use this command.
2412 { 'command': 'cpu', 'data': {'index': 'int'} }
2417 # Adds CPU with specified ID
2419 # @id: ID of CPU to be created, valid values [0..max_cpus)
2421 # Returns: Nothing on success
2427 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
2428 # <- { "return": {} }
2431 { 'command': 'cpu-add', 'data': {'id': 'int'} }
2436 # Save a portion of guest memory to a file.
2438 # @val: the virtual address of the guest to start from
2440 # @size: the size of memory region to save
2442 # @filename: the file to save the memory to as binary data
2444 # @cpu-index: the index of the virtual CPU to use for translating the
2445 # virtual address (defaults to CPU 0)
2447 # Returns: Nothing on success
2451 # Notes: Errors were not reliably returned until 1.1
2455 # -> { "execute": "memsave",
2456 # "arguments": { "val": 10,
2458 # "filename": "/tmp/virtual-mem-dump" } }
2459 # <- { "return": {} }
2462 { 'command': 'memsave',
2463 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
2468 # Save a portion of guest physical memory to a file.
2470 # @val: the physical address of the guest to start from
2472 # @size: the size of memory region to save
2474 # @filename: the file to save the memory to as binary data
2476 # Returns: Nothing on success
2480 # Notes: Errors were not reliably returned until 1.1
2484 # -> { "execute": "pmemsave",
2485 # "arguments": { "val": 10,
2487 # "filename": "/tmp/physical-mem-dump" } }
2488 # <- { "return": {} }
2491 { 'command': 'pmemsave',
2492 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
2497 # Resume guest VCPU execution.
2501 # Returns: If successful, nothing
2503 # Notes: This command will succeed if the guest is currently running. It
2504 # will also succeed if the guest is in the "inmigrate" state; in
2505 # this case, the effect of the command is to make sure the guest
2506 # starts once migration finishes, removing the effect of the -S
2507 # command line option if it was passed.
2511 # -> { "execute": "cont" }
2512 # <- { "return": {} }
2515 { 'command': 'cont' }
2520 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
2528 # -> { "execute": "system_wakeup" }
2529 # <- { "return": {} }
2532 { 'command': 'system_wakeup' }
2537 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
2538 # The command fails when the guest doesn't support injecting.
2540 # Returns: If successful, nothing
2544 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
2548 # -> { "execute": "inject-nmi" }
2549 # <- { "return": {} }
2552 { 'command': 'inject-nmi' }
2557 # Sets the link status of a virtual network adapter.
2559 # @name: the device name of the virtual network adapter
2561 # @up: true to set the link status to be up
2563 # Returns: Nothing on success
2564 # If @name is not a valid network device, DeviceNotFound
2568 # Notes: Not all network adapters support setting link status. This command
2569 # will succeed even if the network adapter does not support link status
2574 # -> { "execute": "set_link",
2575 # "arguments": { "name": "e1000.0", "up": false } }
2576 # <- { "return": {} }
2579 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
2584 # Request the balloon driver to change its balloon size.
2586 # @value: the target size of the balloon in bytes
2588 # Returns: Nothing on success
2589 # If the balloon driver is enabled but not functional because the KVM
2590 # kernel module cannot support it, KvmMissingCap
2591 # If no balloon device is present, DeviceNotActive
2593 # Notes: This command just issues a request to the guest. When it returns,
2594 # the balloon size may not have changed. A guest can change the balloon
2595 # size independent of this command.
2601 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
2602 # <- { "return": {} }
2605 { 'command': 'balloon', 'data': {'value': 'int'} }
2610 # This action can be used to test transaction failure.
2614 { 'struct': 'Abort',
2618 # @ActionCompletionMode:
2620 # An enumeration of Transactional completion modes.
2622 # @individual: Do not attempt to cancel any other Actions if any Actions fail
2623 # after the Transaction request succeeds. All Actions that
2624 # can complete successfully will do so without waiting on others.
2625 # This is the default.
2627 # @grouped: If any Action fails after the Transaction succeeds, cancel all
2628 # Actions. Actions do not complete until all Actions are ready to
2629 # complete. May be rejected by Actions that do not support this
2634 { 'enum': 'ActionCompletionMode',
2635 'data': [ 'individual', 'grouped' ] }
2638 # @TransactionAction:
2640 # A discriminated record of operations that can be performed with
2641 # @transaction. Action @type can be:
2643 # - @abort: since 1.6
2644 # - @block-dirty-bitmap-add: since 2.5
2645 # - @block-dirty-bitmap-clear: since 2.5
2646 # - @blockdev-backup: since 2.3
2647 # - @blockdev-snapshot: since 2.5
2648 # - @blockdev-snapshot-internal-sync: since 1.7
2649 # - @blockdev-snapshot-sync: since 1.1
2650 # - @drive-backup: since 1.6
2654 { 'union': 'TransactionAction',
2657 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
2658 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
2659 'blockdev-backup': 'BlockdevBackup',
2660 'blockdev-snapshot': 'BlockdevSnapshot',
2661 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
2662 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
2663 'drive-backup': 'DriveBackup'
2667 # @TransactionProperties:
2669 # Optional arguments to modify the behavior of a Transaction.
2671 # @completion-mode: Controls how jobs launched asynchronously by
2672 # Actions will complete or fail as a group.
2673 # See @ActionCompletionMode for details.
2677 { 'struct': 'TransactionProperties',
2679 '*completion-mode': 'ActionCompletionMode'
2686 # Executes a number of transactionable QMP commands atomically. If any
2687 # operation fails, then the entire set of actions will be abandoned and the
2688 # appropriate error returned.
2690 # For external snapshots, the dictionary contains the device, the file to use for
2691 # the new snapshot, and the format. The default format, if not specified, is
2694 # Each new snapshot defaults to being created by QEMU (wiping any
2695 # contents if the file already exists), but it is also possible to reuse
2696 # an externally-created file. In the latter case, you should ensure that
2697 # the new image file has the same contents as the current one; QEMU cannot
2698 # perform any meaningful check. Typically this is achieved by using the
2699 # current image file as the backing file for the new image.
2701 # On failure, the original disks pre-snapshot attempt will be used.
2703 # For internal snapshots, the dictionary contains the device and the snapshot's
2704 # name. If an internal snapshot matching name already exists, the request will
2705 # be rejected. Only some image formats support it, for example, qcow2, rbd,
2708 # On failure, qemu will try delete the newly created internal snapshot in the
2709 # transaction. When an I/O error occurs during deletion, the user needs to fix
2710 # it later with qemu-img or other command.
2712 # @actions: List of @TransactionAction;
2713 # information needed for the respective operations.
2715 # @properties: structure of additional options to control the
2716 # execution of the transaction. See @TransactionProperties
2717 # for additional detail.
2719 # Returns: nothing on success
2721 # Errors depend on the operations of the transaction
2723 # Note: The transaction aborts on the first failure. Therefore, there will be
2724 # information on only one failed operation returned in an error condition, and
2725 # subsequent actions will not have been attempted.
2731 # -> { "execute": "transaction",
2732 # "arguments": { "actions": [
2733 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
2734 # "snapshot-file": "/some/place/my-image",
2735 # "format": "qcow2" } },
2736 # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
2737 # "snapshot-file": "/some/place/my-image2",
2738 # "snapshot-node-name": "node3432",
2739 # "mode": "existing",
2740 # "format": "qcow2" } },
2741 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
2742 # "snapshot-file": "/some/place/my-image2",
2743 # "mode": "existing",
2744 # "format": "qcow2" } },
2745 # { "type": "blockdev-snapshot-internal-sync", "data" : {
2746 # "device": "ide-hd2",
2747 # "name": "snapshot0" } } ] } }
2748 # <- { "return": {} }
2751 { 'command': 'transaction',
2752 'data': { 'actions': [ 'TransactionAction' ],
2753 '*properties': 'TransactionProperties'
2758 # @human-monitor-command:
2760 # Execute a command on the human monitor and return the output.
2762 # @command-line: the command to execute in the human monitor
2764 # @cpu-index: The CPU to use for commands that require an implicit CPU
2766 # Returns: the output of the command as a string
2770 # Notes: This command only exists as a stop-gap. Its use is highly
2771 # discouraged. The semantics of this command are not
2772 # guaranteed: this means that command names, arguments and
2773 # responses can change or be removed at ANY time. Applications
2774 # that rely on long term stability guarantees should NOT
2777 # Known limitations:
2779 # * This command is stateless, this means that commands that depend
2780 # on state information (such as getfd) might not work
2782 # * Commands that prompt the user for data don't currently work
2786 # -> { "execute": "human-monitor-command",
2787 # "arguments": { "command-line": "info kvm" } }
2788 # <- { "return": "kvm support: enabled\r\n" }
2791 { 'command': 'human-monitor-command',
2792 'data': {'command-line': 'str', '*cpu-index': 'int'},
2798 # Cancel the current executing migration process.
2800 # Returns: nothing on success
2802 # Notes: This command succeeds even if there is no migration process running.
2808 # -> { "execute": "migrate_cancel" }
2809 # <- { "return": {} }
2812 { 'command': 'migrate_cancel' }
2815 # @migrate_set_downtime:
2817 # Set maximum tolerated downtime for migration.
2819 # @value: maximum downtime in seconds
2821 # Returns: nothing on success
2823 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2829 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
2830 # <- { "return": {} }
2833 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2836 # @migrate_set_speed:
2838 # Set maximum speed for migration.
2840 # @value: maximum speed in bytes per second.
2842 # Returns: nothing on success
2844 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2850 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
2851 # <- { "return": {} }
2854 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2857 # @migrate-set-cache-size:
2859 # Set cache size to be used by XBZRLE migration
2861 # @value: cache size in bytes
2863 # The size will be rounded down to the nearest power of 2.
2864 # The cache size can be modified before and during ongoing migration
2866 # Returns: nothing on success
2872 # -> { "execute": "migrate-set-cache-size",
2873 # "arguments": { "value": 536870912 } }
2874 # <- { "return": {} }
2877 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2880 # @query-migrate-cache-size:
2882 # Query migration XBZRLE cache size
2884 # Returns: XBZRLE cache size in bytes
2890 # -> { "execute": "query-migrate-cache-size" }
2891 # <- { "return": 67108864 }
2894 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2897 # @ObjectPropertyInfo:
2899 # @name: the name of the property
2901 # @type: the type of the property. This will typically come in one of four
2904 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2905 # These types are mapped to the appropriate JSON type.
2907 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
2908 # device type name. Child properties create the composition tree.
2910 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
2911 # device type name. Link properties form the device model graph.
2915 { 'struct': 'ObjectPropertyInfo',
2916 'data': { 'name': 'str', 'type': 'str' } }
2921 # This command will list any properties of a object given a path in the object
2924 # @path: the path within the object model. See @qom-get for a description of
2927 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2932 { 'command': 'qom-list',
2933 'data': { 'path': 'str' },
2934 'returns': [ 'ObjectPropertyInfo' ] }
2939 # This command will get a property from a object model path and return the
2942 # @path: The path within the object model. There are two forms of supported
2943 # paths--absolute and partial paths.
2945 # Absolute paths are derived from the root object and can follow child<>
2946 # or link<> properties. Since they can follow link<> properties, they
2947 # can be arbitrarily long. Absolute paths look like absolute filenames
2948 # and are prefixed with a leading slash.
2950 # Partial paths look like relative filenames. They do not begin
2951 # with a prefix. The matching rules for partial paths are subtle but
2952 # designed to make specifying objects easy. At each level of the
2953 # composition tree, the partial path is matched as an absolute path.
2954 # The first match is not returned. At least two matches are searched
2955 # for. A successful result is only returned if only one match is
2956 # found. If more than one match is found, a flag is return to
2957 # indicate that the match was ambiguous.
2959 # @property: The property name to read
2961 # Returns: The property value. The type depends on the property
2962 # type. child<> and link<> properties are returned as #str
2963 # pathnames. All integer property types (u8, u16, etc) are
2968 { 'command': 'qom-get',
2969 'data': { 'path': 'str', 'property': 'str' },
2975 # This command will set a property from a object model path.
2977 # @path: see @qom-get for a description of this parameter
2979 # @property: the property name to set
2981 # @value: a value who's type is appropriate for the property type. See @qom-get
2982 # for a description of type mapping.
2986 { 'command': 'qom-set',
2987 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2992 # Sets the password of a remote display session.
2994 # @protocol: `vnc' to modify the VNC server password
2995 # `spice' to modify the Spice server password
2997 # @password: the new password
2999 # @connected: how to handle existing clients when changing the
3000 # password. If nothing is specified, defaults to `keep'
3001 # `fail' to fail the command if clients are connected
3002 # `disconnect' to disconnect existing clients
3003 # `keep' to maintain existing clients
3005 # Returns: Nothing on success
3006 # If Spice is not enabled, DeviceNotFound
3012 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
3013 # "password": "secret" } }
3014 # <- { "return": {} }
3017 { 'command': 'set_password',
3018 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
3023 # Expire the password of a remote display server.
3025 # @protocol: the name of the remote display protocol `vnc' or `spice'
3027 # @time: when to expire the password.
3028 # `now' to expire the password immediately
3029 # `never' to cancel password expiration
3030 # `+INT' where INT is the number of seconds from now (integer)
3031 # `INT' where INT is the absolute time in seconds
3033 # Returns: Nothing on success
3034 # If @protocol is `spice' and Spice is not active, DeviceNotFound
3038 # Notes: Time is relative to the server and currently there is no way to
3039 # coordinate server time with client time. It is not recommended to
3040 # use the absolute time version of the @time parameter unless you're
3041 # sure you are on the same machine as the QEMU instance.
3045 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
3047 # <- { "return": {} }
3050 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
3053 # @change-vnc-password:
3055 # Change the VNC server password.
3057 # @password: the new password to use with VNC authentication
3061 # Notes: An empty password in this command will set the password to the empty
3062 # string. Existing clients are unaffected by executing this command.
3064 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
3069 # This command is multiple commands multiplexed together.
3071 # @device: This is normally the name of a block device but it may also be 'vnc'.
3072 # when it's 'vnc', then sub command depends on @target
3074 # @target: If @device is a block device, then this is the new filename.
3075 # If @device is 'vnc', then if the value 'password' selects the vnc
3076 # change password command. Otherwise, this specifies a new server URI
3077 # address to listen to for VNC connections.
3079 # @arg: If @device is a block device, then this is an optional format to open
3081 # If @device is 'vnc' and @target is 'password', this is the new VNC
3082 # password to set. See change-vnc-password for additional notes.
3084 # Returns: Nothing on success.
3085 # If @device is not a valid block device, DeviceNotFound
3087 # Notes: This interface is deprecated, and it is strongly recommended that you
3088 # avoid using it. For changing block devices, use
3089 # blockdev-change-medium; for changing VNC parameters, use
3090 # change-vnc-password.
3096 # 1. Change a removable medium
3098 # -> { "execute": "change",
3099 # "arguments": { "device": "ide1-cd0",
3100 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
3101 # <- { "return": {} }
3103 # 2. Change VNC password
3105 # -> { "execute": "change",
3106 # "arguments": { "device": "vnc", "target": "password",
3107 # "arg": "foobar1" } }
3108 # <- { "return": {} }
3111 { 'command': 'change',
3112 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
3117 # This structure describes a search result from @qom-list-types
3119 # @name: the type name found in the search
3121 # @abstract: the type is abstract and can't be directly instantiated.
3122 # Omitted if false. (since 2.10)
3124 # @parent: Name of parent type, if any (since 2.10)
3128 { 'struct': 'ObjectTypeInfo',
3129 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } }
3134 # This command will return a list of types given search parameters
3136 # @implements: if specified, only return types that implement this type name
3138 # @abstract: if true, include abstract types in the results
3140 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
3144 { 'command': 'qom-list-types',
3145 'data': { '*implements': 'str', '*abstract': 'bool' },
3146 'returns': [ 'ObjectTypeInfo' ] }
3149 # @DevicePropertyInfo:
3151 # Information about device properties.
3153 # @name: the name of the property
3154 # @type: the typename of the property
3155 # @description: if specified, the description of the property.
3160 { 'struct': 'DevicePropertyInfo',
3161 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
3164 # @device-list-properties:
3166 # List properties associated with a device.
3168 # @typename: the type name of a device
3170 # Returns: a list of DevicePropertyInfo describing a devices properties
3174 { 'command': 'device-list-properties',
3175 'data': { 'typename': 'str'},
3176 'returns': [ 'DevicePropertyInfo' ] }
3181 # Migrates the current running guest to another Virtual Machine.
3183 # @uri: the Uniform Resource Identifier of the destination VM
3185 # @blk: do block migration (full disk copy)
3187 # @inc: incremental disk copy migration
3189 # @detach: this argument exists only for compatibility reasons and
3190 # is ignored by QEMU
3192 # Returns: nothing on success
3198 # 1. The 'query-migrate' command should be used to check migration's progress
3199 # and final result (this information is provided by the 'status' member)
3201 # 2. All boolean arguments default to false
3203 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
3208 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
3209 # <- { "return": {} }
3212 { 'command': 'migrate',
3213 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
3216 # @migrate-incoming:
3218 # Start an incoming migration, the qemu must have been started
3219 # with -incoming defer
3221 # @uri: The Uniform Resource Identifier identifying the source or
3222 # address to listen on
3224 # Returns: nothing on success
3230 # 1. It's a bad idea to use a string for the uri, but it needs to stay
3231 # compatible with -incoming and the format of the uri is already exposed
3234 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
3237 # 3. The uri format is the same as for -incoming
3241 # -> { "execute": "migrate-incoming",
3242 # "arguments": { "uri": "tcp::4446" } }
3243 # <- { "return": {} }
3246 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
3249 # @xen-save-devices-state:
3251 # Save the state of all devices to file. The RAM and the block devices
3252 # of the VM are not saved by this command.
3254 # @filename: the file to save the state of the devices to as binary
3255 # data. See xen-save-devices-state.txt for a description of the binary
3258 # Returns: Nothing on success
3264 # -> { "execute": "xen-save-devices-state",
3265 # "arguments": { "filename": "/tmp/save" } }
3266 # <- { "return": {} }
3269 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
3272 # @xen-set-global-dirty-log:
3274 # Enable or disable the global dirty log mode.
3276 # @enable: true to enable, false to disable.
3284 # -> { "execute": "xen-set-global-dirty-log",
3285 # "arguments": { "enable": true } }
3286 # <- { "return": {} }
3289 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
3294 # @driver: the name of the new device's driver
3296 # @bus: the device's parent bus (device tree path)
3298 # @id: the device's ID, must be unique
3300 # Additional arguments depend on the type.
3305 # 1. For detailed information about this command, please refer to the
3306 # 'docs/qdev-device-use.txt' file.
3308 # 2. It's possible to list device properties by running QEMU with the
3309 # "-device DEVICE,help" command-line argument, where DEVICE is the
3314 # -> { "execute": "device_add",
3315 # "arguments": { "driver": "e1000", "id": "net1",
3317 # "mac": "52:54:00:12:34:56" } }
3318 # <- { "return": {} }
3320 # TODO: This command effectively bypasses QAPI completely due to its
3321 # "additional arguments" business. It shouldn't have been added to
3322 # the schema in this form. It should be qapified properly, or
3323 # replaced by a properly qapified command.
3327 { 'command': 'device_add',
3328 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
3329 'gen': false } # so we can get the additional arguments
3334 # Remove a device from a guest
3336 # @id: the device's ID or QOM path
3338 # Returns: Nothing on success
3339 # If @id is not a valid device, DeviceNotFound
3341 # Notes: When this command completes, the device may not be removed from the
3342 # guest. Hot removal is an operation that requires guest cooperation.
3343 # This command merely requests that the guest begin the hot removal
3344 # process. Completion of the device removal process is signaled with a
3345 # DEVICE_DELETED event. Guest reset will automatically complete removal
3352 # -> { "execute": "device_del",
3353 # "arguments": { "id": "net1" } }
3354 # <- { "return": {} }
3356 # -> { "execute": "device_del",
3357 # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
3358 # <- { "return": {} }
3361 { 'command': 'device_del', 'data': {'id': 'str'} }
3364 # @DumpGuestMemoryFormat:
3366 # An enumeration of guest-memory-dump's format.
3370 # @kdump-zlib: kdump-compressed format with zlib-compressed
3372 # @kdump-lzo: kdump-compressed format with lzo-compressed
3374 # @kdump-snappy: kdump-compressed format with snappy-compressed
3378 { 'enum': 'DumpGuestMemoryFormat',
3379 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
3382 # @dump-guest-memory:
3384 # Dump guest's memory to vmcore. It is a synchronous operation that can take
3385 # very long depending on the amount of guest memory.
3387 # @paging: if true, do paging to get guest's memory mapping. This allows
3388 # using gdb to process the core file.
3390 # IMPORTANT: this option can make QEMU allocate several gigabytes
3391 # of RAM. This can happen for a large guest, or a
3392 # malicious guest pretending to be large.
3394 # Also, paging=true has the following limitations:
3396 # 1. The guest may be in a catastrophic state or can have corrupted
3397 # memory, which cannot be trusted
3398 # 2. The guest can be in real-mode even if paging is enabled. For
3399 # example, the guest uses ACPI to sleep, and ACPI sleep state
3401 # 3. Currently only supported on i386 and x86_64.
3403 # @protocol: the filename or file descriptor of the vmcore. The supported
3406 # 1. file: the protocol starts with "file:", and the following
3407 # string is the file's path.
3408 # 2. fd: the protocol starts with "fd:", and the following string
3411 # @detach: if true, QMP will return immediately rather than
3412 # waiting for the dump to finish. The user can track progress
3413 # using "query-dump". (since 2.6).
3415 # @begin: if specified, the starting physical address.
3417 # @length: if specified, the memory size, in bytes. If you don't
3418 # want to dump all guest's memory, please specify the start @begin
3421 # @format: if specified, the format of guest memory dump. But non-elf
3422 # format is conflict with paging and filter, ie. @paging, @begin and
3423 # @length is not allowed to be specified with non-elf @format at the
3424 # same time (since 2.0)
3426 # Note: All boolean arguments default to false
3428 # Returns: nothing on success
3434 # -> { "execute": "dump-guest-memory",
3435 # "arguments": { "protocol": "fd:dump" } }
3436 # <- { "return": {} }
3439 { 'command': 'dump-guest-memory',
3440 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
3441 '*begin': 'int', '*length': 'int',
3442 '*format': 'DumpGuestMemoryFormat'} }
3447 # Describe the status of a long-running background guest memory dump.
3449 # @none: no dump-guest-memory has started yet.
3451 # @active: there is one dump running in background.
3453 # @completed: the last dump has finished successfully.
3455 # @failed: the last dump has failed.
3459 { 'enum': 'DumpStatus',
3460 'data': [ 'none', 'active', 'completed', 'failed' ] }
3465 # The result format for 'query-dump'.
3467 # @status: enum of @DumpStatus, which shows current dump status
3469 # @completed: bytes written in latest dump (uncompressed)
3471 # @total: total bytes to be written in latest dump (uncompressed)
3475 { 'struct': 'DumpQueryResult',
3476 'data': { 'status': 'DumpStatus',
3483 # Query latest dump status.
3485 # Returns: A @DumpStatus object showing the dump status.
3491 # -> { "execute": "query-dump" }
3492 # <- { "return": { "status": "active", "completed": 1024000,
3493 # "total": 2048000 } }
3496 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
3499 # @DumpGuestMemoryCapability:
3501 # A list of the available formats for dump-guest-memory
3505 { 'struct': 'DumpGuestMemoryCapability',
3507 'formats': ['DumpGuestMemoryFormat'] } }
3510 # @query-dump-guest-memory-capability:
3512 # Returns the available formats for dump-guest-memory
3514 # Returns: A @DumpGuestMemoryCapability object listing available formats for
3521 # -> { "execute": "query-dump-guest-memory-capability" }
3522 # <- { "return": { "formats":
3523 # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
3526 { 'command': 'query-dump-guest-memory-capability',
3527 'returns': 'DumpGuestMemoryCapability' }
3532 # Dump guest's storage keys
3534 # @filename: the path to the file to dump to
3536 # This command is only supported on s390 architecture.
3542 # -> { "execute": "dump-skeys",
3543 # "arguments": { "filename": "/tmp/skeys" } }
3544 # <- { "return": {} }
3547 { 'command': 'dump-skeys',
3548 'data': { 'filename': 'str' } }
3553 # Add a network backend.
3555 # @type: the type of network backend. Current valid values are 'user', 'tap',
3556 # 'vde', 'socket', 'dump' and 'bridge'
3558 # @id: the name of the new network backend
3560 # Additional arguments depend on the type.
3562 # TODO: This command effectively bypasses QAPI completely due to its
3563 # "additional arguments" business. It shouldn't have been added to
3564 # the schema in this form. It should be qapified properly, or
3565 # replaced by a properly qapified command.
3569 # Returns: Nothing on success
3570 # If @type is not a valid network backend, DeviceNotFound
3574 # -> { "execute": "netdev_add",
3575 # "arguments": { "type": "user", "id": "netdev1",
3576 # "dnssearch": "example.org" } }
3577 # <- { "return": {} }
3580 { 'command': 'netdev_add',
3581 'data': {'type': 'str', 'id': 'str'},
3582 'gen': false } # so we can get the additional arguments
3587 # Remove a network backend.
3589 # @id: the name of the network backend to remove
3591 # Returns: Nothing on success
3592 # If @id is not a valid network backend, DeviceNotFound
3598 # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
3599 # <- { "return": {} }
3602 { 'command': 'netdev_del', 'data': {'id': 'str'} }
3607 # Create a QOM object.
3609 # @qom-type: the class name for the object to be created
3611 # @id: the name of the new object
3613 # @props: a dictionary of properties to be passed to the backend
3615 # Returns: Nothing on success
3616 # Error if @qom-type is not a valid class name
3622 # -> { "execute": "object-add",
3623 # "arguments": { "qom-type": "rng-random", "id": "rng1",
3624 # "props": { "filename": "/dev/hwrng" } } }
3625 # <- { "return": {} }
3628 { 'command': 'object-add',
3629 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
3634 # Remove a QOM object.
3636 # @id: the name of the QOM object to remove
3638 # Returns: Nothing on success
3639 # Error if @id is not a valid id for a QOM object
3645 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
3646 # <- { "return": {} }
3649 { 'command': 'object-del', 'data': {'id': 'str'} }
3652 # @NetdevNoneOptions:
3654 # Use it alone to have zero network devices.
3658 { 'struct': 'NetdevNoneOptions',
3662 # @NetLegacyNicOptions:
3664 # Create a new Network Interface Card.
3666 # @netdev: id of -netdev to connect to
3668 # @macaddr: MAC address
3670 # @model: device model (e1000, rtl8139, virtio etc.)
3672 # @addr: PCI device address
3674 # @vectors: number of MSI-x vectors, 0 to disable MSI-X
3678 { 'struct': 'NetLegacyNicOptions',
3684 '*vectors': 'uint32' } }
3689 # A fat type wrapping 'str', to be embedded in lists.
3693 { 'struct': 'String',
3698 # @NetdevUserOptions:
3700 # Use the user mode network stack which requires no administrator privilege to
3703 # @hostname: client hostname reported by the builtin DHCP server
3705 # @restrict: isolate the guest from the host
3707 # @ipv4: whether to support IPv4, default true for enabled
3710 # @ipv6: whether to support IPv6, default true for enabled
3713 # @ip: legacy parameter, use net= instead
3715 # @net: IP network address that the guest will see, in the
3716 # form addr[/netmask] The netmask is optional, and can be
3717 # either in the form a.b.c.d or as a number of valid top-most
3718 # bits. Default is 10.0.2.0/24.
3720 # @host: guest-visible address of the host
3722 # @tftp: root directory of the built-in TFTP server
3724 # @bootfile: BOOTP filename, for use with tftp=
3726 # @dhcpstart: the first of the 16 IPs the built-in DHCP server can
3729 # @dns: guest-visible address of the virtual nameserver
3731 # @dnssearch: list of DNS suffixes to search, passed as DHCP option
3734 # @ipv6-prefix: IPv6 network prefix (default is fec0::) (since
3735 # 2.6). The network prefix is given in the usual
3736 # hexadecimal IPv6 address notation.
3738 # @ipv6-prefixlen: IPv6 network prefix length (default is 64)
3741 # @ipv6-host: guest-visible IPv6 address of the host (since 2.6)
3743 # @ipv6-dns: guest-visible IPv6 address of the virtual
3744 # nameserver (since 2.6)
3746 # @smb: root directory of the built-in SMB server
3748 # @smbserver: IP address of the built-in SMB server
3750 # @hostfwd: redirect incoming TCP or UDP host connections to guest
3753 # @guestfwd: forward guest TCP connections
3757 { 'struct': 'NetdevUserOptions',
3760 '*restrict': 'bool',
3768 '*dhcpstart': 'str',
3770 '*dnssearch': ['String'],
3771 '*ipv6-prefix': 'str',
3772 '*ipv6-prefixlen': 'int',
3773 '*ipv6-host': 'str',
3776 '*smbserver': 'str',
3777 '*hostfwd': ['String'],
3778 '*guestfwd': ['String'] } }
3781 # @NetdevTapOptions:
3783 # Connect the host TAP network interface name to the VLAN.
3785 # @ifname: interface name
3787 # @fd: file descriptor of an already opened tap
3789 # @fds: multiple file descriptors of already opened multiqueue capable
3792 # @script: script to initialize the interface
3794 # @downscript: script to shut down the interface
3796 # @br: bridge name (since 2.8)
3798 # @helper: command to execute to configure bridge
3800 # @sndbuf: send buffer limit. Understands [TGMKkb] suffixes.
3802 # @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface
3804 # @vhost: enable vhost-net network accelerator
3806 # @vhostfd: file descriptor of an already opened vhost net device
3808 # @vhostfds: file descriptors of multiple already opened vhost net
3811 # @vhostforce: vhost on for non-MSIX virtio guests
3813 # @queues: number of queues to be created for multiqueue capable tap
3815 # @poll-us: maximum number of microseconds that could
3816 # be spent on busy polling for tap (since 2.7)
3820 { 'struct': 'NetdevTapOptions',
3826 '*downscript': 'str',
3830 '*vnet_hdr': 'bool',
3834 '*vhostforce': 'bool',
3835 '*queues': 'uint32',
3836 '*poll-us': 'uint32'} }
3839 # @NetdevSocketOptions:
3841 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3842 # socket connection.
3844 # @fd: file descriptor of an already opened socket
3846 # @listen: port number, and optional hostname, to listen on
3848 # @connect: port number, and optional hostname, to connect to
3850 # @mcast: UDP multicast address and port number
3852 # @localaddr: source address and port for multicast and udp packets
3854 # @udp: UDP unicast address and port number
3858 { 'struct': 'NetdevSocketOptions',
3864 '*localaddr': 'str',
3868 # @NetdevL2TPv3Options:
3870 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
3872 # @src: source address
3874 # @dst: destination address
3876 # @srcport: source port - mandatory for udp, optional for ip
3878 # @dstport: destination port - mandatory for udp, optional for ip
3880 # @ipv6: force the use of ipv6
3882 # @udp: use the udp version of l2tpv3 encapsulation
3884 # @cookie64: use 64 bit coookies
3886 # @counter: have sequence counter
3888 # @pincounter: pin sequence counter to zero -
3889 # workaround for buggy implementations or
3890 # networks with packet reorder
3892 # @txcookie: 32 or 64 bit transmit cookie
3894 # @rxcookie: 32 or 64 bit receive cookie
3896 # @txsession: 32 bit transmit session
3898 # @rxsession: 32 bit receive session - if not specified
3899 # set to the same value as transmit
3901 # @offset: additional offset - allows the insertion of
3902 # additional application-specific data before the packet payload
3906 { 'struct': 'NetdevL2TPv3Options',
3914 '*cookie64': 'bool',
3916 '*pincounter': 'bool',
3917 '*txcookie': 'uint64',
3918 '*rxcookie': 'uint64',
3919 'txsession': 'uint32',
3920 '*rxsession': 'uint32',
3921 '*offset': 'uint32' } }
3924 # @NetdevVdeOptions:
3926 # Connect the VLAN to a vde switch running on the host.
3928 # @sock: socket path
3930 # @port: port number
3932 # @group: group owner of socket
3934 # @mode: permissions for socket
3938 { 'struct': 'NetdevVdeOptions',
3943 '*mode': 'uint16' } }
3946 # @NetdevDumpOptions:
3948 # Dump VLAN network traffic to a file.
3950 # @len: per-packet size limit (64k default). Understands [TGMKkb]
3953 # @file: dump file path (default is qemu-vlan0.pcap)
3957 { 'struct': 'NetdevDumpOptions',
3963 # @NetdevBridgeOptions:
3965 # Connect a host TAP network interface to a host bridge device.
3969 # @helper: command to execute to configure bridge
3973 { 'struct': 'NetdevBridgeOptions',
3976 '*helper': 'str' } }
3979 # @NetdevHubPortOptions:
3981 # Connect two or more net clients through a software hub.
3983 # @hubid: hub identifier number
3987 { 'struct': 'NetdevHubPortOptions',
3989 'hubid': 'int32' } }
3992 # @NetdevNetmapOptions:
3994 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3996 # @ifname: Either the name of an existing network interface supported by
3997 # netmap, or the name of a VALE port (created on the fly).
3998 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3999 # YYY are non-negative integers. XXX identifies a switch and
4000 # YYY identifies a port of the switch. VALE ports having the
4001 # same XXX are therefore connected to the same switch.
4003 # @devname: path of the netmap device (default: '/dev/netmap').
4007 { 'struct': 'NetdevNetmapOptions',
4010 '*devname': 'str' } }
4013 # @NetdevVhostUserOptions:
4015 # Vhost-user network backend
4017 # @chardev: name of a unix socket chardev
4019 # @vhostforce: vhost on for non-MSIX virtio guests (default: false).
4021 # @queues: number of queues to be created for multiqueue vhost-user
4022 # (default: 1) (Since 2.5)
4026 { 'struct': 'NetdevVhostUserOptions',
4029 '*vhostforce': 'bool',
4030 '*queues': 'int' } }
4035 # Available netdev drivers.
4039 { 'enum': 'NetClientDriver',
4040 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
4041 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
4046 # Captures the configuration of a network device.
4048 # @id: identifier for monitor commands.
4050 # @type: Specify the driver used for interpreting remaining arguments.
4054 # 'l2tpv3' - since 2.1
4056 { 'union': 'Netdev',
4057 'base': { 'id': 'str', 'type': 'NetClientDriver' },
4058 'discriminator': 'type',
4060 'none': 'NetdevNoneOptions',
4061 'nic': 'NetLegacyNicOptions',
4062 'user': 'NetdevUserOptions',
4063 'tap': 'NetdevTapOptions',
4064 'l2tpv3': 'NetdevL2TPv3Options',
4065 'socket': 'NetdevSocketOptions',
4066 'vde': 'NetdevVdeOptions',
4067 'dump': 'NetdevDumpOptions',
4068 'bridge': 'NetdevBridgeOptions',
4069 'hubport': 'NetdevHubPortOptions',
4070 'netmap': 'NetdevNetmapOptions',
4071 'vhost-user': 'NetdevVhostUserOptions' } }
4076 # Captures the configuration of a network device; legacy.
4078 # @vlan: vlan number
4080 # @id: identifier for monitor commands
4082 # @name: identifier for monitor commands, ignored if @id is present
4084 # @opts: device type specific properties (legacy)
4088 { 'struct': 'NetLegacy',
4093 'opts': 'NetLegacyOptions' } }
4096 # @NetLegacyOptionsType:
4100 { 'enum': 'NetLegacyOptionsType',
4101 'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
4102 'dump', 'bridge', 'netmap', 'vhost-user'] }
4105 # @NetLegacyOptions:
4107 # Like Netdev, but for use only by the legacy command line options
4111 { 'union': 'NetLegacyOptions',
4112 'base': { 'type': 'NetLegacyOptionsType' },
4113 'discriminator': 'type',
4115 'none': 'NetdevNoneOptions',
4116 'nic': 'NetLegacyNicOptions',
4117 'user': 'NetdevUserOptions',
4118 'tap': 'NetdevTapOptions',
4119 'l2tpv3': 'NetdevL2TPv3Options',
4120 'socket': 'NetdevSocketOptions',
4121 'vde': 'NetdevVdeOptions',
4122 'dump': 'NetdevDumpOptions',
4123 'bridge': 'NetdevBridgeOptions',
4124 'netmap': 'NetdevNetmapOptions',
4125 'vhost-user': 'NetdevVhostUserOptions' } }
4128 # @NetFilterDirection:
4130 # Indicates whether a netfilter is attached to a netdev's transmit queue or
4131 # receive queue or both.
4133 # @all: the filter is attached both to the receive and the transmit
4134 # queue of the netdev (default).
4136 # @rx: the filter is attached to the receive queue of the netdev,
4137 # where it will receive packets sent to the netdev.
4139 # @tx: the filter is attached to the transmit queue of the netdev,
4140 # where it will receive packets sent by the netdev.
4144 { 'enum': 'NetFilterDirection',
4145 'data': [ 'all', 'rx', 'tx' ] }
4148 # @InetSocketAddressBase:
4150 # @host: host part of the address
4151 # @port: port part of the address
4153 { 'struct': 'InetSocketAddressBase',
4159 # @InetSocketAddress:
4161 # Captures a socket address or address range in the Internet namespace.
4163 # @numeric: true if the host/port are guaranteed to be numeric,
4164 # false if name resolution should be attempted. Defaults to false.
4167 # @to: If present, this is range of possible addresses, with port
4168 # between @port and @to.
4170 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
4172 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
4176 { 'struct': 'InetSocketAddress',
4177 'base': 'InetSocketAddressBase',
4185 # @UnixSocketAddress:
4187 # Captures a socket address in the local ("Unix socket") namespace.
4189 # @path: filesystem path to use
4193 { 'struct': 'UnixSocketAddress',
4198 # @VsockSocketAddress:
4200 # Captures a socket address in the vsock namespace.
4202 # @cid: unique host identifier
4205 # Note: string types are used to allow for possible future hostname or
4206 # service resolution support.
4210 { 'struct': 'VsockSocketAddress',
4216 # @SocketAddressLegacy:
4218 # Captures the address of a socket, which could also be a named file descriptor
4220 # Note: This type is deprecated in favor of SocketAddress. The
4221 # difference between SocketAddressLegacy and SocketAddress is that the
4222 # latter is a flat union rather than a simple union. Flat is nicer
4223 # because it avoids nesting on the wire, i.e. that form has fewer {}.
4228 { 'union': 'SocketAddressLegacy',
4230 'inet': 'InetSocketAddress',
4231 'unix': 'UnixSocketAddress',
4232 'vsock': 'VsockSocketAddress',
4236 # @SocketAddressType:
4238 # Available SocketAddress types
4240 # @inet: Internet address
4242 # @unix: Unix domain socket
4246 { 'enum': 'SocketAddressType',
4247 'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
4252 # Captures the address of a socket, which could also be a named file
4255 # @type: Transport type
4259 { 'union': 'SocketAddress',
4260 'base': { 'type': 'SocketAddressType' },
4261 'discriminator': 'type',
4262 'data': { 'inet': 'InetSocketAddress',
4263 'unix': 'UnixSocketAddress',
4264 'vsock': 'VsockSocketAddress',
4270 # Receive a file descriptor via SCM rights and assign it a name
4272 # @fdname: file descriptor name
4274 # Returns: Nothing on success
4278 # Notes: If @fdname already exists, the file descriptor assigned to
4279 # it will be closed and replaced by the received file
4282 # The 'closefd' command can be used to explicitly close the
4283 # file descriptor when it is no longer needed.
4287 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
4288 # <- { "return": {} }
4291 { 'command': 'getfd', 'data': {'fdname': 'str'} }
4296 # Close a file descriptor previously passed via SCM rights
4298 # @fdname: file descriptor name
4300 # Returns: Nothing on success
4306 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
4307 # <- { "return": {} }
4310 { 'command': 'closefd', 'data': {'fdname': 'str'} }
4315 # Information describing a machine.
4317 # @name: the name of the machine
4319 # @alias: an alias for the machine name
4321 # @is-default: whether the machine is default
4323 # @cpu-max: maximum number of CPUs supported by the machine type
4326 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
4330 { 'struct': 'MachineInfo',
4331 'data': { 'name': 'str', '*alias': 'str',
4332 '*is-default': 'bool', 'cpu-max': 'int',
4333 'hotpluggable-cpus': 'bool'} }
4338 # Return a list of supported machines
4340 # Returns: a list of MachineInfo
4344 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
4347 # @CpuDefinitionInfo:
4349 # Virtual CPU definition.
4351 # @name: the name of the CPU definition
4353 # @migration-safe: whether a CPU definition can be safely used for
4354 # migration in combination with a QEMU compatibility machine
4355 # when migrating between different QMU versions and between
4356 # hosts with different sets of (hardware or software)
4357 # capabilities. If not provided, information is not available
4358 # and callers should not assume the CPU definition to be
4359 # migration-safe. (since 2.8)
4361 # @static: whether a CPU definition is static and will not change depending on
4362 # QEMU version, machine type, machine options and accelerator options.
4363 # A static model is always migration-safe. (since 2.8)
4365 # @unavailable-features: List of properties that prevent
4366 # the CPU model from running in the current
4368 # @typename: Type name that can be used as argument to @device-list-properties,
4369 # to introspect properties configurable using -cpu or -global.
4372 # @unavailable-features is a list of QOM property names that
4373 # represent CPU model attributes that prevent the CPU from running.
4374 # If the QOM property is read-only, that means there's no known
4375 # way to make the CPU model run in the current host. Implementations
4376 # that choose not to provide specific information return the
4377 # property name "type".
4378 # If the property is read-write, it means that it MAY be possible
4379 # to run the CPU model in the current host if that property is
4380 # changed. Management software can use it as hints to suggest or
4381 # choose an alternative for the user, or just to generate meaningful
4382 # error messages explaining why the CPU model can't be used.
4383 # If @unavailable-features is an empty list, the CPU model is
4384 # runnable using the current host and machine-type.
4385 # If @unavailable-features is not present, runnability
4386 # information for the CPU is not available.
4390 { 'struct': 'CpuDefinitionInfo',
4391 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
4392 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
4395 # @query-cpu-definitions:
4397 # Return a list of supported virtual CPU definitions
4399 # Returns: a list of CpuDefInfo
4403 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
4408 # Virtual CPU model.
4410 # A CPU model consists of the name of a CPU definition, to which
4411 # delta changes are applied (e.g. features added/removed). Most magic values
4412 # that an architecture might require should be hidden behind the name.
4413 # However, if required, architectures can expose relevant properties.
4415 # @name: the name of the CPU definition the model is based on
4416 # @props: a dictionary of QOM properties to be applied
4420 { 'struct': 'CpuModelInfo',
4421 'data': { 'name': 'str',
4425 # @CpuModelExpansionType:
4427 # An enumeration of CPU model expansion types.
4429 # @static: Expand to a static CPU model, a combination of a static base
4430 # model name and property delta changes. As the static base model will
4431 # never change, the expanded CPU model will be the same, independant of
4432 # independent of QEMU version, machine type, machine options, and
4433 # accelerator options. Therefore, the resulting model can be used by
4434 # tooling without having to specify a compatibility machine - e.g. when
4435 # displaying the "host" model. static CPU models are migration-safe.
4437 # @full: Expand all properties. The produced model is not guaranteed to be
4438 # migration-safe, but allows tooling to get an insight and work with
4441 # Note: When a non-migration-safe CPU model is expanded in static mode, some
4442 # features enabled by the CPU model may be omitted, because they can't be
4443 # implemented by a static CPU model definition (e.g. cache info passthrough and
4444 # PMU passthrough in x86). If you need an accurate representation of the
4445 # features enabled by a non-migration-safe CPU model, use @full. If you need a
4446 # static representation that will keep ABI compatibility even when changing QEMU
4447 # version or machine-type, use @static (but keep in mind that some features may
4452 { 'enum': 'CpuModelExpansionType',
4453 'data': [ 'static', 'full' ] }
4457 # @CpuModelExpansionInfo:
4459 # The result of a cpu model expansion.
4461 # @model: the expanded CpuModelInfo.
4465 { 'struct': 'CpuModelExpansionInfo',
4466 'data': { 'model': 'CpuModelInfo' } }
4470 # @query-cpu-model-expansion:
4472 # Expands a given CPU model (or a combination of CPU model + additional options)
4473 # to different granularities, allowing tooling to get an understanding what a
4474 # specific CPU model looks like in QEMU under a certain configuration.
4476 # This interface can be used to query the "host" CPU model.
4478 # The data returned by this command may be affected by:
4480 # * QEMU version: CPU models may look different depending on the QEMU version.
4481 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4482 # * machine-type: CPU model may look different depending on the machine-type.
4483 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4484 # * machine options (including accelerator): in some architectures, CPU models
4485 # may look different depending on machine and accelerator options. (Except for
4486 # CPU models reported as "static" in query-cpu-definitions.)
4487 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4488 # global properties may affect expansion of CPU models. Using
4489 # query-cpu-model-expansion while using these is not advised.
4491 # Some architectures may not support all expansion types. s390x supports
4492 # "full" and "static".
4494 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
4495 # not supported, if the model cannot be expanded, if the model contains
4496 # an unknown CPU definition name, unknown properties or properties
4497 # with a wrong type. Also returns an error if an expansion type is
4502 { 'command': 'query-cpu-model-expansion',
4503 'data': { 'type': 'CpuModelExpansionType',
4504 'model': 'CpuModelInfo' },
4505 'returns': 'CpuModelExpansionInfo' }
4508 # @CpuModelCompareResult:
4510 # An enumeration of CPU model comparation results. The result is usually
4511 # calculated using e.g. CPU features or CPU generations.
4513 # @incompatible: If model A is incompatible to model B, model A is not
4514 # guaranteed to run where model B runs and the other way around.
4516 # @identical: If model A is identical to model B, model A is guaranteed to run
4517 # where model B runs and the other way around.
4519 # @superset: If model A is a superset of model B, model B is guaranteed to run
4520 # where model A runs. There are no guarantees about the other way.
4522 # @subset: If model A is a subset of model B, model A is guaranteed to run
4523 # where model B runs. There are no guarantees about the other way.
4527 { 'enum': 'CpuModelCompareResult',
4528 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
4531 # @CpuModelCompareInfo:
4533 # The result of a CPU model comparison.
4535 # @result: The result of the compare operation.
4536 # @responsible-properties: List of properties that led to the comparison result
4537 # not being identical.
4539 # @responsible-properties is a list of QOM property names that led to
4540 # both CPUs not being detected as identical. For identical models, this
4542 # If a QOM property is read-only, that means there's no known way to make the
4543 # CPU models identical. If the special property name "type" is included, the
4544 # models are by definition not identical and cannot be made identical.
4548 { 'struct': 'CpuModelCompareInfo',
4549 'data': {'result': 'CpuModelCompareResult',
4550 'responsible-properties': ['str']
4555 # @query-cpu-model-comparison:
4557 # Compares two CPU models, returning how they compare in a specific
4558 # configuration. The results indicates how both models compare regarding
4559 # runnability. This result can be used by tooling to make decisions if a
4560 # certain CPU model will run in a certain configuration or if a compatible
4561 # CPU model has to be created by baselining.
4563 # Usually, a CPU model is compared against the maximum possible CPU model
4564 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
4565 # model is identical or a subset, it will run in that configuration.
4567 # The result returned by this command may be affected by:
4569 # * QEMU version: CPU models may look different depending on the QEMU version.
4570 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4571 # * machine-type: CPU model may look different depending on the machine-type.
4572 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4573 # * machine options (including accelerator): in some architectures, CPU models
4574 # may look different depending on machine and accelerator options. (Except for
4575 # CPU models reported as "static" in query-cpu-definitions.)
4576 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4577 # global properties may affect expansion of CPU models. Using
4578 # query-cpu-model-expansion while using these is not advised.
4580 # Some architectures may not support comparing CPU models. s390x supports
4581 # comparing CPU models.
4583 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
4584 # not supported, if a model cannot be used, if a model contains
4585 # an unknown cpu definition name, unknown properties or properties
4590 { 'command': 'query-cpu-model-comparison',
4591 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
4592 'returns': 'CpuModelCompareInfo' }
4595 # @CpuModelBaselineInfo:
4597 # The result of a CPU model baseline.
4599 # @model: the baselined CpuModelInfo.
4603 { 'struct': 'CpuModelBaselineInfo',
4604 'data': { 'model': 'CpuModelInfo' } }
4607 # @query-cpu-model-baseline:
4609 # Baseline two CPU models, creating a compatible third model. The created
4610 # model will always be a static, migration-safe CPU model (see "static"
4611 # CPU model expansion for details).
4613 # This interface can be used by tooling to create a compatible CPU model out
4614 # two CPU models. The created CPU model will be identical to or a subset of
4615 # both CPU models when comparing them. Therefore, the created CPU model is
4616 # guaranteed to run where the given CPU models run.
4618 # The result returned by this command may be affected by:
4620 # * QEMU version: CPU models may look different depending on the QEMU version.
4621 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4622 # * machine-type: CPU model may look different depending on the machine-type.
4623 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4624 # * machine options (including accelerator): in some architectures, CPU models
4625 # may look different depending on machine and accelerator options. (Except for
4626 # CPU models reported as "static" in query-cpu-definitions.)
4627 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4628 # global properties may affect expansion of CPU models. Using
4629 # query-cpu-model-expansion while using these is not advised.
4631 # Some architectures may not support baselining CPU models. s390x supports
4632 # baselining CPU models.
4634 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
4635 # not supported, if a model cannot be used, if a model contains
4636 # an unknown cpu definition name, unknown properties or properties
4641 { 'command': 'query-cpu-model-baseline',
4642 'data': { 'modela': 'CpuModelInfo',
4643 'modelb': 'CpuModelInfo' },
4644 'returns': 'CpuModelBaselineInfo' }
4649 # Information about a file descriptor that was added to an fd set.
4651 # @fdset-id: The ID of the fd set that @fd was added to.
4653 # @fd: The file descriptor that was received via SCM rights and
4654 # added to the fd set.
4658 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
4663 # Add a file descriptor, that was passed via SCM rights, to an fd set.
4665 # @fdset-id: The ID of the fd set to add the file descriptor to.
4667 # @opaque: A free-form string that can be used to describe the fd.
4669 # Returns: @AddfdInfo on success
4671 # If file descriptor was not received, FdNotSupplied
4673 # If @fdset-id is a negative value, InvalidParameterValue
4675 # Notes: The list of fd sets is shared by all monitor connections.
4677 # If @fdset-id is not specified, a new fd set will be created.
4683 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
4684 # <- { "return": { "fdset-id": 1, "fd": 3 } }
4687 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
4688 'returns': 'AddfdInfo' }
4693 # Remove a file descriptor from an fd set.
4695 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
4697 # @fd: The file descriptor that is to be removed.
4699 # Returns: Nothing on success
4700 # If @fdset-id or @fd is not found, FdNotFound
4704 # Notes: The list of fd sets is shared by all monitor connections.
4706 # If @fd is not specified, all file descriptors in @fdset-id
4711 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
4712 # <- { "return": {} }
4715 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
4720 # Information about a file descriptor that belongs to an fd set.
4722 # @fd: The file descriptor value.
4724 # @opaque: A free-form string that can be used to describe the fd.
4728 { 'struct': 'FdsetFdInfo',
4729 'data': {'fd': 'int', '*opaque': 'str'} }
4734 # Information about an fd set.
4736 # @fdset-id: The ID of the fd set.
4738 # @fds: A list of file descriptors that belong to this fd set.
4742 { 'struct': 'FdsetInfo',
4743 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
4748 # Return information describing all fd sets.
4750 # Returns: A list of @FdsetInfo
4754 # Note: The list of fd sets is shared by all monitor connections.
4758 # -> { "execute": "query-fdsets" }
4764 # "opaque": "rdonly:/path/to/file"
4768 # "opaque": "rdwr:/path/to/file"
4788 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
4793 # Information describing the QEMU target.
4795 # @arch: the target architecture (eg "x86_64", "i386", etc)
4799 { 'struct': 'TargetInfo',
4800 'data': { 'arch': 'str' } }
4805 # Return information about the target for this QEMU
4807 # Returns: TargetInfo
4811 { 'command': 'query-target', 'returns': 'TargetInfo' }
4816 # An enumeration of key name.
4818 # This is used by the @send-key command.
4820 # @unmapped: since 2.0
4823 # @kp_comma: since 2.4
4824 # @kp_equals: since 2.6
4826 # @hiragana: since 2.9
4827 # @henkan: since 2.9
4833 { 'enum': 'QKeyCode',
4834 'data': [ 'unmapped',
4835 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
4836 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
4837 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
4838 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
4839 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
4840 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
4841 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
4842 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
4843 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
4844 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
4845 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
4846 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
4847 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
4848 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
4849 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
4850 'ro', 'hiragana', 'henkan', 'yen',
4851 'kp_comma', 'kp_equals', 'power' ] }
4856 # Represents a keyboard key.
4860 { 'union': 'KeyValue',
4863 'qcode': 'QKeyCode' } }
4868 # Send keys to guest.
4870 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
4871 # simultaneously sent to the guest. A @KeyValue.number value is sent
4872 # directly to the guest, while @KeyValue.qcode must be a valid
4875 # @hold-time: time to delay key up events, milliseconds. Defaults
4878 # Returns: Nothing on success
4879 # If key is unknown or redundant, InvalidParameter
4885 # -> { "execute": "send-key",
4886 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
4887 # { "type": "qcode", "data": "alt" },
4888 # { "type": "qcode", "data": "delete" } ] } }
4889 # <- { "return": {} }
4892 { 'command': 'send-key',
4893 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
4898 # Write a PPM of the VGA screen to a file.
4900 # @filename: the path of a new PPM file to store the image
4902 # Returns: Nothing on success
4908 # -> { "execute": "screendump",
4909 # "arguments": { "filename": "/tmp/image" } }
4910 # <- { "return": {} }
4913 { 'command': 'screendump', 'data': {'filename': 'str'} }
4919 # Configuration shared across all chardev backends
4921 # @logfile: The name of a logfile to save output
4922 # @logappend: true to append instead of truncate
4923 # (default to false to truncate)
4927 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
4928 '*logappend': 'bool' } }
4933 # Configuration info for file chardevs.
4935 # @in: The name of the input file
4936 # @out: The name of the output file
4937 # @append: Open the file in append mode (default false to
4938 # truncate) (Since 2.6)
4942 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
4944 '*append': 'bool' },
4945 'base': 'ChardevCommon' }
4950 # Configuration info for device and pipe chardevs.
4952 # @device: The name of the special file for the device,
4953 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
4957 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
4958 'base': 'ChardevCommon' }
4963 # Configuration info for (stream) socket chardevs.
4965 # @addr: socket address to listen on (server=true)
4966 # or connect to (server=false)
4967 # @tls-creds: the ID of the TLS credentials object (since 2.6)
4968 # @server: create server socket (default: true)
4969 # @wait: wait for incoming connection on server
4970 # sockets (default: false).
4971 # @nodelay: set TCP_NODELAY socket option (default: false)
4972 # @telnet: enable telnet protocol on server
4973 # sockets (default: false)
4974 # @tn3270: enable tn3270 protocol on server
4975 # sockets (default: false) (Since: 2.10)
4976 # @reconnect: For a client socket, if a socket is disconnected,
4977 # then attempt a reconnect after the given number of seconds.
4978 # Setting this to zero disables this function. (default: 0)
4983 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddressLegacy',
4984 '*tls-creds' : 'str',
4987 '*nodelay' : 'bool',
4990 '*reconnect' : 'int' },
4991 'base': 'ChardevCommon' }
4996 # Configuration info for datagram socket chardevs.
4998 # @remote: remote address
4999 # @local: local address
5003 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddressLegacy',
5004 '*local' : 'SocketAddressLegacy' },
5005 'base': 'ChardevCommon' }
5010 # Configuration info for mux chardevs.
5012 # @chardev: name of the base chardev.
5016 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
5017 'base': 'ChardevCommon' }
5022 # Configuration info for stdio chardevs.
5024 # @signal: Allow signals (such as SIGINT triggered by ^C)
5025 # be delivered to qemu. Default: true in -nographic mode,
5030 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
5031 'base': 'ChardevCommon' }
5035 # @ChardevSpiceChannel:
5037 # Configuration info for spice vm channel chardevs.
5039 # @type: kind of channel (for example vdagent).
5043 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
5044 'base': 'ChardevCommon' }
5047 # @ChardevSpicePort:
5049 # Configuration info for spice port chardevs.
5051 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
5055 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
5056 'base': 'ChardevCommon' }
5061 # Configuration info for virtual console chardevs.
5063 # @width: console width, in pixels
5064 # @height: console height, in pixels
5065 # @cols: console width, in chars
5066 # @rows: console height, in chars
5070 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
5074 'base': 'ChardevCommon' }
5079 # Configuration info for ring buffer chardevs.
5081 # @size: ring buffer size, must be power of two, default is 65536
5085 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
5086 'base': 'ChardevCommon' }
5091 # Configuration info for the new chardev backend.
5093 # Since: 1.4 (testdev since 2.2, wctablet since 2.9)
5095 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
5096 'serial' : 'ChardevHostdev',
5097 'parallel': 'ChardevHostdev',
5098 'pipe' : 'ChardevHostdev',
5099 'socket' : 'ChardevSocket',
5100 'udp' : 'ChardevUdp',
5101 'pty' : 'ChardevCommon',
5102 'null' : 'ChardevCommon',
5103 'mux' : 'ChardevMux',
5104 'msmouse': 'ChardevCommon',
5105 'wctablet' : 'ChardevCommon',
5106 'braille': 'ChardevCommon',
5107 'testdev': 'ChardevCommon',
5108 'stdio' : 'ChardevStdio',
5109 'console': 'ChardevCommon',
5110 'spicevmc' : 'ChardevSpiceChannel',
5111 'spiceport' : 'ChardevSpicePort',
5113 'ringbuf': 'ChardevRingbuf',
5114 # next one is just for compatibility
5115 'memory' : 'ChardevRingbuf' } }
5120 # Return info about the chardev backend just created.
5122 # @pty: name of the slave pseudoterminal device, present if
5123 # and only if a chardev of type 'pty' was created
5127 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
5132 # Add a character device backend
5134 # @id: the chardev's ID, must be unique
5135 # @backend: backend type and parameters
5137 # Returns: ChardevReturn.
5143 # -> { "execute" : "chardev-add",
5144 # "arguments" : { "id" : "foo",
5145 # "backend" : { "type" : "null", "data" : {} } } }
5146 # <- { "return": {} }
5148 # -> { "execute" : "chardev-add",
5149 # "arguments" : { "id" : "bar",
5150 # "backend" : { "type" : "file",
5151 # "data" : { "out" : "/tmp/bar.log" } } } }
5152 # <- { "return": {} }
5154 # -> { "execute" : "chardev-add",
5155 # "arguments" : { "id" : "baz",
5156 # "backend" : { "type" : "pty", "data" : {} } } }
5157 # <- { "return": { "pty" : "/dev/pty/42" } }
5160 { 'command': 'chardev-add', 'data': {'id' : 'str',
5161 'backend' : 'ChardevBackend' },
5162 'returns': 'ChardevReturn' }
5167 # Change a character device backend
5169 # @id: the chardev's ID, must exist
5170 # @backend: new backend type and parameters
5172 # Returns: ChardevReturn.
5178 # -> { "execute" : "chardev-change",
5179 # "arguments" : { "id" : "baz",
5180 # "backend" : { "type" : "pty", "data" : {} } } }
5181 # <- { "return": { "pty" : "/dev/pty/42" } }
5183 # -> {"execute" : "chardev-change",
5185 # "id" : "charchannel2",
5187 # "type" : "socket",
5192 # "path" : "/tmp/charchannel2.socket"
5196 # "wait" : false }}}}
5200 { 'command': 'chardev-change', 'data': {'id' : 'str',
5201 'backend' : 'ChardevBackend' },
5202 'returns': 'ChardevReturn' }
5207 # Remove a character device backend
5209 # @id: the chardev's ID, must exist and not be in use
5211 # Returns: Nothing on success
5217 # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
5218 # <- { "return": {} }
5221 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
5224 # @chardev-send-break:
5226 # Send a break to a character device
5228 # @id: the chardev's ID, must exist
5230 # Returns: Nothing on success
5236 # -> { "execute": "chardev-send-break", "arguments": { "id" : "foo" } }
5237 # <- { "return": {} }
5240 { 'command': 'chardev-send-break', 'data': {'id': 'str'} }
5246 # An enumeration of TPM models
5248 # @tpm-tis: TPM TIS model
5252 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
5255 # @query-tpm-models:
5257 # Return a list of supported TPM models
5259 # Returns: a list of TpmModel
5265 # -> { "execute": "query-tpm-models" }
5266 # <- { "return": [ "tpm-tis" ] }
5269 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
5274 # An enumeration of TPM types
5276 # @passthrough: TPM passthrough type
5280 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
5285 # Return a list of supported TPM types
5287 # Returns: a list of TpmType
5293 # -> { "execute": "query-tpm-types" }
5294 # <- { "return": [ "passthrough" ] }
5297 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
5300 # @TPMPassthroughOptions:
5302 # Information about the TPM passthrough type
5304 # @path: string describing the path used for accessing the TPM device
5306 # @cancel-path: string showing the TPM's sysfs cancel file
5307 # for cancellation of TPM commands while they are executing
5311 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
5312 '*cancel-path' : 'str'} }
5317 # A union referencing different TPM backend types' configuration options
5319 # @type: 'passthrough' The configuration options for the TPM passthrough type
5323 { 'union': 'TpmTypeOptions',
5324 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
5329 # Information about the TPM
5331 # @id: The Id of the TPM
5333 # @model: The TPM frontend model
5335 # @options: The TPM (backend) type configuration options
5339 { 'struct': 'TPMInfo',
5340 'data': {'id': 'str',
5341 'model': 'TpmModel',
5342 'options': 'TpmTypeOptions' } }
5347 # Return information about the TPM device
5349 # Returns: @TPMInfo on success
5355 # -> { "execute": "query-tpm" }
5358 # { "model": "tpm-tis",
5360 # { "type": "passthrough",
5362 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
5363 # "path": "/dev/tpm0"
5372 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
5375 # @AcpiTableOptions:
5377 # Specify an ACPI table on the command line to load.
5379 # At most one of @file and @data can be specified. The list of files specified
5380 # by any one of them is loaded and concatenated in order. If both are omitted,
5383 # Other fields / optargs can be used to override fields of the generic ACPI
5384 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
5385 # Description Table Header. If a header field is not overridden, then the
5386 # corresponding value from the concatenated blob is used (in case of @file), or
5387 # it is filled in with a hard-coded value (in case of @data).
5389 # String fields are copied into the matching ACPI member from lowest address
5390 # upwards, and silently truncated / NUL-padded to length.
5392 # @sig: table signature / identifier (4 bytes)
5394 # @rev: table revision number (dependent on signature, 1 byte)
5396 # @oem_id: OEM identifier (6 bytes)
5398 # @oem_table_id: OEM table identifier (8 bytes)
5400 # @oem_rev: OEM-supplied revision number (4 bytes)
5402 # @asl_compiler_id: identifier of the utility that created the table
5405 # @asl_compiler_rev: revision number of the utility that created the
5408 # @file: colon (:) separated list of pathnames to load and
5409 # concatenate as table data. The resultant binary blob is expected to
5410 # have an ACPI table header. At least one file is required. This field
5413 # @data: colon (:) separated list of pathnames to load and
5414 # concatenate as table data. The resultant binary blob must not have an
5415 # ACPI table header. At least one file is required. This field excludes
5420 { 'struct': 'AcpiTableOptions',
5425 '*oem_table_id': 'str',
5426 '*oem_rev': 'uint32',
5427 '*asl_compiler_id': 'str',
5428 '*asl_compiler_rev': 'uint32',
5433 # @CommandLineParameterType:
5435 # Possible types for an option parameter.
5437 # @string: accepts a character string
5439 # @boolean: accepts "on" or "off"
5441 # @number: accepts a number
5443 # @size: accepts a number followed by an optional suffix (K)ilo,
5444 # (M)ega, (G)iga, (T)era
5448 { 'enum': 'CommandLineParameterType',
5449 'data': ['string', 'boolean', 'number', 'size'] }
5452 # @CommandLineParameterInfo:
5454 # Details about a single parameter of a command line option.
5456 # @name: parameter name
5458 # @type: parameter @CommandLineParameterType
5460 # @help: human readable text string, not suitable for parsing.
5462 # @default: default value string (since 2.1)
5466 { 'struct': 'CommandLineParameterInfo',
5467 'data': { 'name': 'str',
5468 'type': 'CommandLineParameterType',
5470 '*default': 'str' } }
5473 # @CommandLineOptionInfo:
5475 # Details about a command line option, including its list of parameter details
5477 # @option: option name
5479 # @parameters: an array of @CommandLineParameterInfo
5483 { 'struct': 'CommandLineOptionInfo',
5484 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
5487 # @query-command-line-options:
5489 # Query command line option schema.
5491 # @option: option name
5493 # Returns: list of @CommandLineOptionInfo for all options (or for the given
5494 # @option). Returns an error if the given @option doesn't exist.
5500 # -> { "execute": "query-command-line-options",
5501 # "arguments": { "option": "option-rom" } }
5506 # "name": "romfile",
5510 # "name": "bootindex",
5514 # "option": "option-rom"
5520 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
5521 'returns': ['CommandLineOptionInfo'] }
5524 # @X86CPURegister32:
5526 # A X86 32-bit register
5530 { 'enum': 'X86CPURegister32',
5531 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
5534 # @X86CPUFeatureWordInfo:
5536 # Information about a X86 CPU feature word
5538 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
5540 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
5543 # @cpuid-register: Output register containing the feature bits
5545 # @features: value of output register, containing the feature bits
5549 { 'struct': 'X86CPUFeatureWordInfo',
5550 'data': { 'cpuid-input-eax': 'int',
5551 '*cpuid-input-ecx': 'int',
5552 'cpuid-register': 'X86CPURegister32',
5553 'features': 'int' } }
5556 # @DummyForceArrays:
5558 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
5562 { 'struct': 'DummyForceArrays',
5563 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
5569 # Packets receiving state
5571 # @normal: filter assigned packets according to the mac-table
5573 # @none: don't receive any assigned packet
5575 # @all: receive all assigned packets
5579 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
5584 # Rx-filter information for a NIC.
5586 # @name: net client name
5588 # @promiscuous: whether promiscuous mode is enabled
5590 # @multicast: multicast receive state
5592 # @unicast: unicast receive state
5594 # @vlan: vlan receive state (Since 2.0)
5596 # @broadcast-allowed: whether to receive broadcast
5598 # @multicast-overflow: multicast table is overflowed or not
5600 # @unicast-overflow: unicast table is overflowed or not
5602 # @main-mac: the main macaddr string
5604 # @vlan-table: a list of active vlan id
5606 # @unicast-table: a list of unicast macaddr string
5608 # @multicast-table: a list of multicast macaddr string
5612 { 'struct': 'RxFilterInfo',
5615 'promiscuous': 'bool',
5616 'multicast': 'RxState',
5617 'unicast': 'RxState',
5619 'broadcast-allowed': 'bool',
5620 'multicast-overflow': 'bool',
5621 'unicast-overflow': 'bool',
5623 'vlan-table': ['int'],
5624 'unicast-table': ['str'],
5625 'multicast-table': ['str'] }}
5630 # Return rx-filter information for all NICs (or for the given NIC).
5632 # @name: net client name
5634 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
5635 # Returns an error if the given @name doesn't exist, or given
5636 # NIC doesn't support rx-filter querying, or given net client
5643 # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
5646 # "promiscuous": true,
5648 # "main-mac": "52:54:00:12:34:56",
5649 # "unicast": "normal",
5655 # "unicast-table": [
5657 # "multicast": "normal",
5658 # "multicast-overflow": false,
5659 # "unicast-overflow": false,
5660 # "multicast-table": [
5661 # "01:00:5e:00:00:01",
5662 # "33:33:00:00:00:01",
5663 # "33:33:ff:12:34:56"
5665 # "broadcast-allowed": false
5671 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
5672 'returns': ['RxFilterInfo'] }
5677 # Button of a pointer input device (mouse, tablet).
5679 # @side: front side button of a 5-button mouse (since 2.9)
5681 # @extra: rear side button of a 5-button mouse (since 2.9)
5685 { 'enum' : 'InputButton',
5686 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
5692 # Position axis of a pointer input device (mouse, tablet).
5696 { 'enum' : 'InputAxis',
5697 'data' : [ 'x', 'y' ] }
5702 # Keyboard input event.
5704 # @key: Which key this event is for.
5705 # @down: True for key-down and false for key-up events.
5709 { 'struct' : 'InputKeyEvent',
5710 'data' : { 'key' : 'KeyValue',
5716 # Pointer button input event.
5718 # @button: Which button this event is for.
5719 # @down: True for key-down and false for key-up events.
5723 { 'struct' : 'InputBtnEvent',
5724 'data' : { 'button' : 'InputButton',
5730 # Pointer motion input event.
5732 # @axis: Which axis is referenced by @value.
5733 # @value: Pointer position. For absolute coordinates the
5734 # valid range is 0 -> 0x7ffff
5738 { 'struct' : 'InputMoveEvent',
5739 'data' : { 'axis' : 'InputAxis',
5745 # Input event union.
5747 # @type: the input type, one of:
5748 # - 'key': Input event of Keyboard
5749 # - 'btn': Input event of pointer buttons
5750 # - 'rel': Input event of relative pointer motion
5751 # - 'abs': Input event of absolute pointer motion
5755 { 'union' : 'InputEvent',
5756 'data' : { 'key' : 'InputKeyEvent',
5757 'btn' : 'InputBtnEvent',
5758 'rel' : 'InputMoveEvent',
5759 'abs' : 'InputMoveEvent' } }
5762 # @input-send-event:
5764 # Send input event(s) to guest.
5766 # @device: display device to send event(s) to.
5767 # @head: head to send event(s) to, in case the
5768 # display device supports multiple scanouts.
5769 # @events: List of InputEvent union.
5771 # Returns: Nothing on success.
5773 # The @device and @head parameters can be used to send the input event
5774 # to specific input devices in case (a) multiple input devices of the
5775 # same kind are added to the virtual machine and (b) you have
5776 # configured input routing (see docs/multiseat.txt) for those input
5777 # devices. The parameters work exactly like the device and head
5778 # properties of input devices. If @device is missing, only devices
5779 # that have no input routing config are admissible. If @device is
5780 # specified, both input devices with and without input routing config
5781 # are admissible, but devices with input routing config take
5786 # Note: The consoles are visible in the qom tree, under
5787 # /backend/console[$index]. They have a device link and head property,
5788 # so it is possible to map which console belongs to which device and
5793 # 1. Press left mouse button.
5795 # -> { "execute": "input-send-event",
5796 # "arguments": { "device": "video0",
5797 # "events": [ { "type": "btn",
5798 # "data" : { "down": true, "button": "left" } } ] } }
5799 # <- { "return": {} }
5801 # -> { "execute": "input-send-event",
5802 # "arguments": { "device": "video0",
5803 # "events": [ { "type": "btn",
5804 # "data" : { "down": false, "button": "left" } } ] } }
5805 # <- { "return": {} }
5807 # 2. Press ctrl-alt-del.
5809 # -> { "execute": "input-send-event",
5810 # "arguments": { "events": [
5811 # { "type": "key", "data" : { "down": true,
5812 # "key": {"type": "qcode", "data": "ctrl" } } },
5813 # { "type": "key", "data" : { "down": true,
5814 # "key": {"type": "qcode", "data": "alt" } } },
5815 # { "type": "key", "data" : { "down": true,
5816 # "key": {"type": "qcode", "data": "delete" } } } ] } }
5817 # <- { "return": {} }
5819 # 3. Move mouse pointer to absolute coordinates (20000, 400).
5821 # -> { "execute": "input-send-event" ,
5822 # "arguments": { "events": [
5823 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
5824 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
5825 # <- { "return": {} }
5828 { 'command': 'input-send-event',
5829 'data': { '*device': 'str',
5831 'events' : [ 'InputEvent' ] } }
5836 # @node: NUMA nodes configuration
5838 # @dist: NUMA distance configuration (since 2.10)
5840 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
5844 { 'enum': 'NumaOptionsType',
5845 'data': [ 'node', 'dist', 'cpu' ] }
5850 # A discriminated record of NUMA options. (for OptsVisitor)
5854 { 'union': 'NumaOptions',
5855 'base': { 'type': 'NumaOptionsType' },
5856 'discriminator': 'type',
5858 'node': 'NumaNodeOptions',
5859 'dist': 'NumaDistOptions',
5860 'cpu': 'NumaCpuOptions' }}
5865 # Create a guest NUMA node. (for OptsVisitor)
5867 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
5869 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
5872 # @mem: memory size of this node; mutually exclusive with @memdev.
5873 # Equally divide total memory among nodes if both @mem and @memdev are
5876 # @memdev: memory backend object. If specified for one node,
5877 # it must be specified for all nodes.
5881 { 'struct': 'NumaNodeOptions',
5883 '*nodeid': 'uint16',
5884 '*cpus': ['uint16'],
5891 # Set the distance between 2 NUMA nodes.
5893 # @src: source NUMA node.
5895 # @dst: destination NUMA node.
5897 # @val: NUMA distance from source node to destination node.
5898 # When a node is unreachable from another node, set the distance
5899 # between them to 255.
5903 { 'struct': 'NumaDistOptions',
5912 # Option "-numa cpu" overrides default cpu to node mapping.
5913 # It accepts the same set of cpu properties as returned by
5914 # query-hotpluggable-cpus[].props, where node-id could be used to
5915 # override default node mapping.
5919 { 'struct': 'NumaCpuOptions',
5920 'base': 'CpuInstanceProperties',
5926 # Host memory policy types
5928 # @default: restore default policy, remove any nondefault policy
5930 # @preferred: set the preferred host nodes for allocation
5932 # @bind: a strict policy that restricts memory allocation to the
5933 # host nodes specified
5935 # @interleave: memory allocations are interleaved across the set
5936 # of host nodes specified
5940 { 'enum': 'HostMemPolicy',
5941 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
5946 # Information about memory backend
5948 # @id: backend's ID if backend has 'id' property (since 2.9)
5950 # @size: memory backend size
5952 # @merge: enables or disables memory merge support
5954 # @dump: includes memory backend's memory in a core dump or not
5956 # @prealloc: enables or disables memory preallocation
5958 # @host-nodes: host nodes for its memory policy
5960 # @policy: memory policy of memory backend
5964 { 'struct': 'Memdev',
5971 'host-nodes': ['uint16'],
5972 'policy': 'HostMemPolicy' }}
5977 # Returns information for all memory backends.
5979 # Returns: a list of @Memdev.
5985 # -> { "execute": "query-memdev" }
5989 # "size": 536870912,
5992 # "prealloc": false,
5993 # "host-nodes": [0, 1],
5997 # "size": 536870912,
6001 # "host-nodes": [2, 3],
6002 # "policy": "preferred"
6008 { 'command': 'query-memdev', 'returns': ['Memdev'] }
6011 # @PCDIMMDeviceInfo:
6013 # PCDIMMDevice state information
6017 # @addr: physical address, where device is mapped
6019 # @size: size of memory that the device provides
6021 # @slot: slot number at which device is plugged in
6023 # @node: NUMA node number where device is plugged in
6025 # @memdev: memory backend linked with device
6027 # @hotplugged: true if device was hotplugged
6029 # @hotpluggable: true if device if could be added/removed while machine is running
6033 { 'struct': 'PCDIMMDeviceInfo',
6034 'data': { '*id': 'str',
6040 'hotplugged': 'bool',
6041 'hotpluggable': 'bool'
6046 # @MemoryDeviceInfo:
6048 # Union containing information about a memory device
6052 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
6055 # @query-memory-devices:
6057 # Lists available memory devices and their state
6063 # -> { "execute": "query-memory-devices" }
6064 # <- { "return": [ { "data":
6065 # { "addr": 5368709120,
6066 # "hotpluggable": true,
6067 # "hotplugged": true,
6069 # "memdev": "/objects/memX",
6071 # "size": 1073741824,
6077 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
6082 # @DIMM: memory slot
6083 # @CPU: logical CPU slot (since 2.7)
6085 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
6090 # OSPM Status Indication for a device
6091 # For description of possible values of @source and @status fields
6092 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
6094 # @device: device ID associated with slot
6096 # @slot: slot ID, unique per slot of a given @slot-type
6098 # @slot-type: type of the slot
6100 # @source: an integer containing the source event
6102 # @status: an integer containing the status code
6106 { 'struct': 'ACPIOSTInfo',
6107 'data' : { '*device': 'str',
6109 'slot-type': 'ACPISlotType',
6114 # @query-acpi-ospm-status:
6116 # Return a list of ACPIOSTInfo for devices that support status
6117 # reporting via ACPI _OST method.
6123 # -> { "execute": "query-acpi-ospm-status" }
6124 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
6125 # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
6126 # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
6127 # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
6131 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
6134 # @WatchdogExpirationAction:
6136 # An enumeration of the actions taken when the watchdog device's timer is
6139 # @reset: system resets
6141 # @shutdown: system shutdown, note that it is similar to @powerdown, which
6142 # tries to set to system status and notify guest
6144 # @poweroff: system poweroff, the emulator program exits
6146 # @pause: system pauses, similar to @stop
6148 # @debug: system enters debug state
6150 # @none: nothing is done
6152 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
6153 # VCPUS on x86) (since 2.4)
6157 { 'enum': 'WatchdogExpirationAction',
6158 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
6164 # An enumeration of the I/O operation types
6166 # @read: read operation
6168 # @write: write operation
6172 { 'enum': 'IoOperationType',
6173 'data': [ 'read', 'write' ] }
6176 # @GuestPanicAction:
6178 # An enumeration of the actions taken when guest OS panic is detected
6180 # @pause: system pauses
6182 # Since: 2.1 (poweroff since 2.8)
6184 { 'enum': 'GuestPanicAction',
6185 'data': [ 'pause', 'poweroff' ] }
6188 # @GuestPanicInformationType:
6190 # An enumeration of the guest panic information types
6194 { 'enum': 'GuestPanicInformationType',
6195 'data': [ 'hyper-v'] }
6198 # @GuestPanicInformation:
6200 # Information about a guest panic
6204 {'union': 'GuestPanicInformation',
6205 'base': {'type': 'GuestPanicInformationType'},
6206 'discriminator': 'type',
6207 'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }
6210 # @GuestPanicInformationHyperV:
6212 # Hyper-V specific guest panic information (HV crash MSRs)
6216 {'struct': 'GuestPanicInformationHyperV',
6217 'data': { 'arg1': 'uint64',
6221 'arg5': 'uint64' } }
6224 # @rtc-reset-reinjection:
6226 # This command will reset the RTC interrupt reinjection backlog.
6227 # Can be used if another mechanism to synchronize guest time
6228 # is in effect, for example QEMU guest agent's guest-set-time
6235 # -> { "execute": "rtc-reset-reinjection" }
6236 # <- { "return": {} }
6239 { 'command': 'rtc-reset-reinjection' }
6241 # Rocker ethernet network switch
6242 { 'include': 'qapi/rocker.json' }
6247 # Mode of the replay subsystem.
6249 # @none: normal execution mode. Replay or record are not enabled.
6251 # @record: record mode. All non-deterministic data is written into the
6254 # @play: replay mode. Non-deterministic data required for system execution
6255 # is read from the log.
6259 { 'enum': 'ReplayMode',
6260 'data': [ 'none', 'record', 'play' ] }
6263 # @xen-load-devices-state:
6265 # Load the state of all devices from file. The RAM and the block devices
6266 # of the VM are not loaded by this command.
6268 # @filename: the file to load the state of the devices from as binary
6269 # data. See xen-save-devices-state.txt for a description of the binary
6276 # -> { "execute": "xen-load-devices-state",
6277 # "arguments": { "filename": "/tmp/resume" } }
6278 # <- { "return": {} }
6281 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
6284 # @xen-set-replication:
6286 # Enable or disable replication.
6288 # @enable: true to enable, false to disable.
6290 # @primary: true for primary or false for secondary.
6292 # @failover: true to do failover, false to stop. but cannot be
6293 # specified if 'enable' is true. default value is false.
6299 # -> { "execute": "xen-set-replication",
6300 # "arguments": {"enable": true, "primary": false} }
6301 # <- { "return": {} }
6305 { 'command': 'xen-set-replication',
6306 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
6309 # @ReplicationStatus:
6311 # The result format for 'query-xen-replication-status'.
6313 # @error: true if an error happened, false if replication is normal.
6315 # @desc: the human readable error description string, when
6320 { 'struct': 'ReplicationStatus',
6321 'data': { 'error': 'bool', '*desc': 'str' } }
6324 # @query-xen-replication-status:
6326 # Query replication status while the vm is running.
6328 # Returns: A @ReplicationResult object showing the status.
6332 # -> { "execute": "query-xen-replication-status" }
6333 # <- { "return": { "error": false } }
6337 { 'command': 'query-xen-replication-status',
6338 'returns': 'ReplicationStatus' }
6341 # @xen-colo-do-checkpoint:
6343 # Xen uses this command to notify replication to trigger a checkpoint.
6349 # -> { "execute": "xen-colo-do-checkpoint" }
6350 # <- { "return": {} }
6354 { 'command': 'xen-colo-do-checkpoint' }
6359 # The struct describes capability for a specific GIC (Generic
6360 # Interrupt Controller) version. These bits are not only decided by
6361 # QEMU/KVM software version, but also decided by the hardware that
6362 # the program is running upon.
6364 # @version: version of GIC to be described. Currently, only 2 and 3
6367 # @emulated: whether current QEMU/hardware supports emulated GIC
6368 # device in user space.
6370 # @kernel: whether current QEMU/hardware supports hardware
6371 # accelerated GIC device in kernel.
6375 { 'struct': 'GICCapability',
6376 'data': { 'version': 'int',
6378 'kernel': 'bool' } }
6381 # @query-gic-capabilities:
6383 # This command is ARM-only. It will return a list of GICCapability
6384 # objects that describe its capability bits.
6386 # Returns: a list of GICCapability objects.
6392 # -> { "execute": "query-gic-capabilities" }
6393 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
6394 # { "version": 3, "emulated": false, "kernel": true } ] }
6397 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
6400 # @CpuInstanceProperties:
6402 # List of properties to be used for hotplugging a CPU instance,
6403 # it should be passed by management with device_add command when
6404 # a CPU is being hotplugged.
6406 # @node-id: NUMA node ID the CPU belongs to
6407 # @socket-id: socket number within node/board the CPU belongs to
6408 # @core-id: core number within socket the CPU belongs to
6409 # @thread-id: thread number within core the CPU belongs to
6411 # Note: currently there are 4 properties that could be present
6412 # but management should be prepared to pass through other
6413 # properties with device_add command to allow for future
6414 # interface extension. This also requires the filed names to be kept in
6415 # sync with the properties passed to -device/device_add.
6419 { 'struct': 'CpuInstanceProperties',
6420 'data': { '*node-id': 'int',
6421 '*socket-id': 'int',
6430 # @type: CPU object type for usage with device_add command
6431 # @props: list of properties to be used for hotplugging CPU
6432 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
6433 # @qom-path: link to existing CPU object if CPU is present or
6434 # omitted if CPU is not present.
6438 { 'struct': 'HotpluggableCPU',
6439 'data': { 'type': 'str',
6440 'vcpus-count': 'int',
6441 'props': 'CpuInstanceProperties',
6447 # @query-hotpluggable-cpus:
6449 # Returns: a list of HotpluggableCPU objects.
6455 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
6457 # -> { "execute": "query-hotpluggable-cpus" }
6459 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
6460 # "vcpus-count": 1 },
6461 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
6462 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
6465 # For pc machine type started with -smp 1,maxcpus=2:
6467 # -> { "execute": "query-hotpluggable-cpus" }
6470 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6471 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
6474 # "qom-path": "/machine/unattached/device[0]",
6475 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6476 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
6481 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
6488 # @guid: the globally unique identifier
6492 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
6495 # @query-vm-generation-id:
6497 # Show Virtual Machine Generation ID
6501 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }