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.
905 { 'enum': 'MigrationCapability',
906 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
907 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
911 # @MigrationCapabilityStatus:
913 # Migration capability information
915 # @capability: capability enum
917 # @state: capability state bool
921 { 'struct': 'MigrationCapabilityStatus',
922 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
925 # @migrate-set-capabilities:
927 # Enable/Disable the following migration capabilities (like xbzrle)
929 # @capabilities: json array of capability modifications to make
935 # -> { "execute": "migrate-set-capabilities" , "arguments":
936 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
939 { 'command': 'migrate-set-capabilities',
940 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
943 # @query-migrate-capabilities:
945 # Returns information about the current migration capabilities status
947 # Returns: @MigrationCapabilitiesStatus
953 # -> { "execute": "query-migrate-capabilities" }
955 # {"state": false, "capability": "xbzrle"},
956 # {"state": false, "capability": "rdma-pin-all"},
957 # {"state": false, "capability": "auto-converge"},
958 # {"state": false, "capability": "zero-blocks"},
959 # {"state": false, "capability": "compress"},
960 # {"state": true, "capability": "events"},
961 # {"state": false, "capability": "postcopy-ram"},
962 # {"state": false, "capability": "x-colo"}
966 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
969 # @MigrationParameter:
971 # Migration parameters enumeration
973 # @compress-level: Set the compression level to be used in live migration,
974 # the compression level is an integer between 0 and 9, where 0 means
975 # no compression, 1 means the best compression speed, and 9 means best
976 # compression ratio which will consume more CPU.
978 # @compress-threads: Set compression thread count to be used in live migration,
979 # the compression thread count is an integer between 1 and 255.
981 # @decompress-threads: Set decompression thread count to be used in live
982 # migration, the decompression thread count is an integer between 1
983 # and 255. Usually, decompression is at least 4 times as fast as
984 # compression, so set the decompress-threads to the number about 1/4
985 # of compress-threads is adequate.
987 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
988 # when migration auto-converge is activated. The
989 # default value is 20. (Since 2.7)
991 # @cpu-throttle-increment: throttle percentage increase each time
992 # auto-converge detects that migration is not making
993 # progress. The default value is 10. (Since 2.7)
995 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
996 # establishing a TLS connection over the migration data channel.
997 # On the outgoing side of the migration, the credentials must
998 # be for a 'client' endpoint, while for the incoming side the
999 # credentials must be for a 'server' endpoint. Setting this
1000 # will enable TLS for all migrations. The default is unset,
1001 # resulting in unsecured migration at the QEMU level. (Since 2.7)
1003 # @tls-hostname: hostname of the target host for the migration. This is
1004 # required when using x509 based TLS credentials and the
1005 # migration URI does not already include a hostname. For
1006 # example if using fd: or exec: based migration, the
1007 # hostname must be provided so that the server's x509
1008 # certificate identity can be validated. (Since 2.7)
1010 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1011 # bytes per second. (Since 2.8)
1013 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1014 # downtime in milliseconds (Since 2.8)
1016 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
1017 # periodic mode. (Since 2.8)
1019 # @block-incremental: Affects how much storage is migrated when the
1020 # block migration capability is enabled. When false, the entire
1021 # storage backing chain is migrated into a flattened image at
1022 # the destination; when true, only the active qcow2 layer is
1023 # migrated and the destination must already have access to the
1024 # same backing chain as was used on the source. (since 2.10)
1028 { 'enum': 'MigrationParameter',
1029 'data': ['compress-level', 'compress-threads', 'decompress-threads',
1030 'cpu-throttle-initial', 'cpu-throttle-increment',
1031 'tls-creds', 'tls-hostname', 'max-bandwidth',
1032 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] }
1035 # @migrate-set-parameters:
1037 # Set various migration parameters.
1043 # -> { "execute": "migrate-set-parameters" ,
1044 # "arguments": { "compress-level": 1 } }
1047 { 'command': 'migrate-set-parameters', 'boxed': true,
1048 'data': 'MigrationParameters' }
1051 # @MigrationParameters:
1053 # Optional members can be omitted on input ('migrate-set-parameters')
1054 # but most members will always be present on output
1055 # ('query-migrate-parameters'), with the exception of tls-creds and
1058 # @compress-level: compression level
1060 # @compress-threads: compression thread count
1062 # @decompress-threads: decompression thread count
1064 # @cpu-throttle-initial: Initial percentage of time guest cpus are
1065 # throttledwhen migration auto-converge is activated.
1066 # The default value is 20. (Since 2.7)
1068 # @cpu-throttle-increment: throttle percentage increase each time
1069 # auto-converge detects that migration is not making
1070 # progress. The default value is 10. (Since 2.7)
1072 # @tls-creds: ID of the 'tls-creds' object that provides credentials
1073 # for establishing a TLS connection over the migration data
1074 # channel. On the outgoing side of the migration, the credentials
1075 # must be for a 'client' endpoint, while for the incoming side the
1076 # credentials must be for a 'server' endpoint. Setting this
1077 # will enable TLS for all migrations. The default is unset,
1078 # resulting in unsecured migration at the QEMU level. (Since 2.7)
1079 # An empty string means that QEMU will use plain text mode for
1080 # migration, rather than TLS (Since 2.9)
1082 # @tls-hostname: hostname of the target host for the migration. This
1083 # is required when using x509 based TLS credentials and the
1084 # migration URI does not already include a hostname. For
1085 # example if using fd: or exec: based migration, the
1086 # hostname must be provided so that the server's x509
1087 # certificate identity can be validated. (Since 2.7)
1088 # An empty string means that QEMU will use the hostname
1089 # associated with the migration URI, if any. (Since 2.9)
1091 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1092 # bytes per second. (Since 2.8)
1094 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1095 # downtime in milliseconds (Since 2.8)
1097 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1099 # @block-incremental: Affects how much storage is migrated when the
1100 # block migration capability is enabled. When false, the entire
1101 # storage backing chain is migrated into a flattened image at
1102 # the destination; when true, only the active qcow2 layer is
1103 # migrated and the destination must already have access to the
1104 # same backing chain as was used on the source. (since 2.10)
1108 { 'struct': 'MigrationParameters',
1109 'data': { '*compress-level': 'int',
1110 '*compress-threads': 'int',
1111 '*decompress-threads': 'int',
1112 '*cpu-throttle-initial': 'int',
1113 '*cpu-throttle-increment': 'int',
1114 '*tls-creds': 'str',
1115 '*tls-hostname': 'str',
1116 '*max-bandwidth': 'int',
1117 '*downtime-limit': 'int',
1118 '*x-checkpoint-delay': 'int',
1119 '*block-incremental': 'bool' } }
1122 # @query-migrate-parameters:
1124 # Returns information about the current migration parameters
1126 # Returns: @MigrationParameters
1132 # -> { "execute": "query-migrate-parameters" }
1134 # "decompress-threads": 2,
1135 # "cpu-throttle-increment": 10,
1136 # "compress-threads": 8,
1137 # "compress-level": 1,
1138 # "cpu-throttle-initial": 20,
1139 # "max-bandwidth": 33554432,
1140 # "downtime-limit": 300
1145 { 'command': 'query-migrate-parameters',
1146 'returns': 'MigrationParameters' }
1149 # @client_migrate_info:
1151 # Set migration information for remote display. This makes the server
1152 # ask the client to automatically reconnect using the new parameters
1153 # once migration finished successfully. Only implemented for SPICE.
1155 # @protocol: must be "spice"
1156 # @hostname: migration target hostname
1157 # @port: spice tcp port for plaintext channels
1158 # @tls-port: spice tcp port for tls-secured channels
1159 # @cert-subject: server certificate subject
1165 # -> { "execute": "client_migrate_info",
1166 # "arguments": { "protocol": "spice",
1167 # "hostname": "virt42.lab.kraxel.org",
1169 # <- { "return": {} }
1172 { 'command': 'client_migrate_info',
1173 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1174 '*tls-port': 'int', '*cert-subject': 'str' } }
1177 # @migrate-start-postcopy:
1179 # Followup to a migration command to switch the migration to postcopy mode.
1180 # The postcopy-ram capability must be set before the original migration
1187 # -> { "execute": "migrate-start-postcopy" }
1188 # <- { "return": {} }
1191 { 'command': 'migrate-start-postcopy' }
1196 # The message transmission between Primary side and Secondary side.
1198 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1200 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1202 # @checkpoint-reply: SVM gets PVM's checkpoint request
1204 # @vmstate-send: VM's state will be sent by PVM.
1206 # @vmstate-size: The total size of VMstate.
1208 # @vmstate-received: VM's state has been received by SVM.
1210 # @vmstate-loaded: VM's state has been loaded by SVM.
1214 { 'enum': 'COLOMessage',
1215 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1216 'vmstate-send', 'vmstate-size', 'vmstate-received',
1217 'vmstate-loaded' ] }
1224 # @unknown: unknown mode
1226 # @primary: master side
1228 # @secondary: slave side
1232 { 'enum': 'COLOMode',
1233 'data': [ 'unknown', 'primary', 'secondary'] }
1238 # An enumeration of COLO failover status
1240 # @none: no failover has ever happened
1242 # @require: got failover requirement but not handled
1244 # @active: in the process of doing failover
1246 # @completed: finish the process of failover
1248 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1252 { 'enum': 'FailoverStatus',
1253 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1256 # @x-colo-lost-heartbeat:
1258 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1259 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1260 # If sent to the Secondary, the Secondary side will run failover work,
1261 # then takes over server operation to become the service VM.
1267 # -> { "execute": "x-colo-lost-heartbeat" }
1268 # <- { "return": {} }
1271 { 'command': 'x-colo-lost-heartbeat' }
1276 # Information about a mouse device.
1278 # @name: the name of the mouse device
1280 # @index: the index of the mouse device
1282 # @current: true if this device is currently receiving mouse events
1284 # @absolute: true if this device supports absolute coordinates as input
1288 { 'struct': 'MouseInfo',
1289 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
1290 'absolute': 'bool'} }
1295 # Returns information about each active mouse device
1297 # Returns: a list of @MouseInfo for each device
1303 # -> { "execute": "query-mice" }
1306 # "name":"QEMU Microsoft Mouse",
1312 # "name":"QEMU PS/2 Mouse",
1321 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
1326 # An enumeration of cpu types that enable additional information during
1331 { 'enum': 'CpuInfoArch',
1332 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1337 # Information about a virtual CPU
1339 # @CPU: the index of the virtual CPU
1341 # @current: this only exists for backwards compatibility and should be ignored
1343 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
1344 # to a processor specific low power mode.
1346 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1348 # @thread_id: ID of the underlying host thread
1350 # @props: properties describing to which node/socket/core/thread
1351 # virtual CPU belongs to, provided if supported by board (since 2.10)
1353 # @arch: architecture of the cpu, which determines which additional fields
1354 # will be listed (since 2.6)
1358 # Notes: @halted is a transient state that changes frequently. By the time the
1359 # data is sent to the client, the guest may no longer be halted.
1361 { 'union': 'CpuInfo',
1362 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1363 'qom_path': 'str', 'thread_id': 'int',
1364 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
1365 'discriminator': 'arch',
1366 'data': { 'x86': 'CpuInfoX86',
1367 'sparc': 'CpuInfoSPARC',
1368 'ppc': 'CpuInfoPPC',
1369 'mips': 'CpuInfoMIPS',
1370 'tricore': 'CpuInfoTricore',
1371 'other': 'CpuInfoOther' } }
1376 # Additional information about a virtual i386 or x86_64 CPU
1378 # @pc: the 64-bit instruction pointer
1382 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1387 # Additional information about a virtual SPARC CPU
1389 # @pc: the PC component of the instruction pointer
1391 # @npc: the NPC component of the instruction pointer
1395 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1400 # Additional information about a virtual PPC CPU
1402 # @nip: the instruction pointer
1406 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1411 # Additional information about a virtual MIPS CPU
1413 # @PC: the instruction pointer
1417 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1422 # Additional information about a virtual Tricore CPU
1424 # @PC: the instruction pointer
1428 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1433 # No additional information is available about the virtual CPU
1438 { 'struct': 'CpuInfoOther', 'data': { } }
1443 # Returns a list of information about each virtual CPU.
1445 # Returns: a list of @CpuInfo for each virtual CPU
1451 # -> { "execute": "query-cpus" }
1457 # "qom_path":"/machine/unattached/device[0]",
1466 # "qom_path":"/machine/unattached/device[2]",
1475 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1480 # Information about an iothread
1482 # @id: the identifier of the iothread
1484 # @thread-id: ID of the underlying host thread
1486 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
1489 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
1490 # configured (since 2.9)
1492 # @poll-shrink: how many ns will be removed from polling time, 0 means that
1493 # it's not configured (since 2.9)
1497 { 'struct': 'IOThreadInfo',
1498 'data': {'id': 'str',
1500 'poll-max-ns': 'int',
1502 'poll-shrink': 'int' } }
1507 # Returns a list of information about each iothread.
1509 # Note: this list excludes the QEMU main loop thread, which is not declared
1510 # using the -object iothread command-line option. It is always the main thread
1513 # Returns: a list of @IOThreadInfo for each iothread
1519 # -> { "execute": "query-iothreads" }
1533 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1536 # @NetworkAddressFamily:
1538 # The network address family
1540 # @ipv4: IPV4 family
1542 # @ipv6: IPV6 family
1544 # @unix: unix socket
1546 # @vsock: vsock family (since 2.8)
1548 # @unknown: otherwise
1552 { 'enum': 'NetworkAddressFamily',
1553 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1558 # The basic information for vnc network connection
1562 # @service: The service name of the vnc port. This may depend on the host
1563 # system's service database so symbolic names should not be relied
1566 # @family: address family
1568 # @websocket: true in case the socket is a websocket (since 2.3).
1572 { 'struct': 'VncBasicInfo',
1573 'data': { 'host': 'str',
1575 'family': 'NetworkAddressFamily',
1576 'websocket': 'bool' } }
1581 # The network connection information for server
1583 # @auth: authentication method used for
1584 # the plain (non-websocket) VNC server
1588 { 'struct': 'VncServerInfo',
1589 'base': 'VncBasicInfo',
1590 'data': { '*auth': 'str' } }
1595 # Information about a connected VNC client.
1597 # @x509_dname: If x509 authentication is in use, the Distinguished
1598 # Name of the client.
1600 # @sasl_username: If SASL authentication is in use, the SASL username
1601 # used for authentication.
1605 { 'struct': 'VncClientInfo',
1606 'base': 'VncBasicInfo',
1607 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1612 # Information about the VNC session.
1614 # @enabled: true if the VNC server is enabled, false otherwise
1616 # @host: The hostname the VNC server is bound to. This depends on
1617 # the name resolution on the host and may be an IP address.
1619 # @family: 'ipv6' if the host is listening for IPv6 connections
1620 # 'ipv4' if the host is listening for IPv4 connections
1621 # 'unix' if the host is listening on a unix domain socket
1622 # 'unknown' otherwise
1624 # @service: The service name of the server's port. This may depends
1625 # on the host system's service database so symbolic names should not
1628 # @auth: the current authentication type used by the server
1629 # 'none' if no authentication is being used
1630 # 'vnc' if VNC authentication is being used
1631 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1632 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1633 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1634 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1635 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1636 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1637 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1638 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1639 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1641 # @clients: a list of @VncClientInfo of all currently connected clients
1645 { 'struct': 'VncInfo',
1646 'data': {'enabled': 'bool', '*host': 'str',
1647 '*family': 'NetworkAddressFamily',
1648 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1653 # vnc primary authentication method.
1657 { 'enum': 'VncPrimaryAuth',
1658 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1659 'tls', 'vencrypt', 'sasl' ] }
1662 # @VncVencryptSubAuth:
1664 # vnc sub authentication method with vencrypt.
1668 { 'enum': 'VncVencryptSubAuth',
1670 'tls-none', 'x509-none',
1671 'tls-vnc', 'x509-vnc',
1672 'tls-plain', 'x509-plain',
1673 'tls-sasl', 'x509-sasl' ] }
1679 # The network connection information for server
1681 # @auth: The current authentication type used by the servers
1683 # @vencrypt: The vencrypt sub authentication type used by the
1684 # servers, only specified in case auth == vencrypt.
1688 { 'struct': 'VncServerInfo2',
1689 'base': 'VncBasicInfo',
1690 'data': { 'auth' : 'VncPrimaryAuth',
1691 '*vencrypt' : 'VncVencryptSubAuth' } }
1697 # Information about a vnc server
1699 # @id: vnc server name.
1701 # @server: A list of @VncBasincInfo describing all listening sockets.
1702 # The list can be empty (in case the vnc server is disabled).
1703 # It also may have multiple entries: normal + websocket,
1704 # possibly also ipv4 + ipv6 in the future.
1706 # @clients: A list of @VncClientInfo of all currently connected clients.
1707 # The list can be empty, for obvious reasons.
1709 # @auth: The current authentication type used by the non-websockets servers
1711 # @vencrypt: The vencrypt authentication type used by the servers,
1712 # only specified in case auth == vencrypt.
1714 # @display: The display device the vnc server is linked to.
1718 { 'struct': 'VncInfo2',
1719 'data': { 'id' : 'str',
1720 'server' : ['VncServerInfo2'],
1721 'clients' : ['VncClientInfo'],
1722 'auth' : 'VncPrimaryAuth',
1723 '*vencrypt' : 'VncVencryptSubAuth',
1724 '*display' : 'str' } }
1729 # Returns information about the current VNC server
1737 # -> { "execute": "query-vnc" }
1741 # "service":"50402",
1746 # "host":"127.0.0.1",
1747 # "service":"50401",
1755 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1758 # @query-vnc-servers:
1760 # Returns a list of vnc servers. The list can be empty.
1762 # Returns: a list of @VncInfo2
1766 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1771 # The basic information for SPICE network connection
1775 # @port: port number
1777 # @family: address family
1781 { 'struct': 'SpiceBasicInfo',
1782 'data': { 'host': 'str',
1784 'family': 'NetworkAddressFamily' } }
1789 # Information about a SPICE server
1791 # @auth: authentication method
1795 { 'struct': 'SpiceServerInfo',
1796 'base': 'SpiceBasicInfo',
1797 'data': { '*auth': 'str' } }
1802 # Information about a SPICE client channel.
1804 # @connection-id: SPICE connection id number. All channels with the same id
1805 # belong to the same SPICE session.
1807 # @channel-type: SPICE channel type number. "1" is the main control
1808 # channel, filter for this one if you want to track spice
1811 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1812 # multiple channels of the same type exist, such as multiple
1813 # display channels in a multihead setup
1815 # @tls: true if the channel is encrypted, false otherwise.
1819 { 'struct': 'SpiceChannel',
1820 'base': 'SpiceBasicInfo',
1821 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1825 # @SpiceQueryMouseMode:
1827 # An enumeration of Spice mouse states.
1829 # @client: Mouse cursor position is determined by the client.
1831 # @server: Mouse cursor position is determined by the server.
1833 # @unknown: No information is available about mouse mode used by
1836 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1840 { 'enum': 'SpiceQueryMouseMode',
1841 'data': [ 'client', 'server', 'unknown' ] }
1846 # Information about the SPICE session.
1848 # @enabled: true if the SPICE server is enabled, false otherwise
1850 # @migrated: true if the last guest migration completed and spice
1851 # migration had completed as well. false otherwise. (since 1.4)
1853 # @host: The hostname the SPICE server is bound to. This depends on
1854 # the name resolution on the host and may be an IP address.
1856 # @port: The SPICE server's port number.
1858 # @compiled-version: SPICE server version.
1860 # @tls-port: The SPICE server's TLS port number.
1862 # @auth: the current authentication type used by the server
1863 # 'none' if no authentication is being used
1864 # 'spice' uses SASL or direct TLS authentication, depending on command
1867 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1868 # be determined by the client or the server, or unknown if spice
1869 # server doesn't provide this information. (since: 1.1)
1871 # @channels: a list of @SpiceChannel for each active spice channel
1875 { 'struct': 'SpiceInfo',
1876 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1877 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1878 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1883 # Returns information about the current SPICE server
1885 # Returns: @SpiceInfo
1891 # -> { "execute": "query-spice" }
1897 # "host": "0.0.0.0",
1902 # "channel-type": 1,
1903 # "connection-id": 1804289383,
1904 # "host": "127.0.0.1",
1911 # "channel-type": 4,
1912 # "connection-id": 1804289383,
1913 # "host": "127.0.0.1",
1917 # [ ... more channels follow ... ]
1923 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1928 # Information about the guest balloon device.
1930 # @actual: the number of bytes the balloon currently contains
1935 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1940 # Return information about the balloon device.
1942 # Returns: @BalloonInfo on success
1944 # If the balloon driver is enabled but not functional because the KVM
1945 # kernel module cannot support it, KvmMissingCap
1947 # If no balloon device is present, DeviceNotActive
1953 # -> { "execute": "query-balloon" }
1955 # "actual": 1073741824,
1960 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1965 # A PCI device memory region
1967 # @base: the starting address (guest physical)
1969 # @limit: the ending address (guest physical)
1973 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1978 # Information about a PCI device I/O region.
1980 # @bar: the index of the Base Address Register for this region
1982 # @type: 'io' if the region is a PIO region
1983 # 'memory' if the region is a MMIO region
1985 # @size: memory size
1987 # @prefetch: if @type is 'memory', true if the memory is prefetchable
1989 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
1993 { 'struct': 'PciMemoryRegion',
1994 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1995 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
2000 # Information about a bus of a PCI Bridge device
2002 # @number: primary bus interface number. This should be the number of the
2003 # bus the device resides on.
2005 # @secondary: secondary bus interface number. This is the number of the
2006 # main bus for the bridge
2008 # @subordinate: This is the highest number bus that resides below the
2011 # @io_range: The PIO range for all devices on this bridge
2013 # @memory_range: The MMIO range for all devices on this bridge
2015 # @prefetchable_range: The range of prefetchable MMIO for all devices on
2020 { 'struct': 'PciBusInfo',
2021 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
2022 'io_range': 'PciMemoryRange',
2023 'memory_range': 'PciMemoryRange',
2024 'prefetchable_range': 'PciMemoryRange' } }
2029 # Information about a PCI Bridge device
2031 # @bus: information about the bus the device resides on
2033 # @devices: a list of @PciDeviceInfo for each device on this bridge
2037 { 'struct': 'PciBridgeInfo',
2038 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
2043 # Information about the Class of a PCI device
2045 # @desc: a string description of the device's class
2047 # @class: the class code of the device
2051 { 'struct': 'PciDeviceClass',
2052 'data': {'*desc': 'str', 'class': 'int'} }
2057 # Information about the Id of a PCI device
2059 # @device: the PCI device id
2061 # @vendor: the PCI vendor id
2065 { 'struct': 'PciDeviceId',
2066 'data': {'device': 'int', 'vendor': 'int'} }
2071 # Information about a PCI device
2073 # @bus: the bus number of the device
2075 # @slot: the slot the device is located in
2077 # @function: the function of the slot used by the device
2079 # @class_info: the class of the device
2081 # @id: the PCI device id
2083 # @irq: if an IRQ is assigned to the device, the IRQ number
2085 # @qdev_id: the device name of the PCI device
2087 # @pci_bridge: if the device is a PCI bridge, the bridge information
2089 # @regions: a list of the PCI I/O regions associated with the device
2091 # Notes: the contents of @class_info.desc are not stable and should only be
2092 # treated as informational.
2096 { 'struct': 'PciDeviceInfo',
2097 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
2098 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
2099 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
2100 'regions': ['PciMemoryRegion']} }
2105 # Information about a PCI bus
2107 # @bus: the bus index
2109 # @devices: a list of devices on this bus
2113 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
2118 # Return information about the PCI bus topology of the guest.
2120 # Returns: a list of @PciInfo for each PCI bus. Each bus is
2121 # represented by a json-object, which has a key with a json-array of
2122 # all PCI devices attached to it. Each device is represented by a
2129 # -> { "execute": "query-pci" }
2140 # "desc": "Host bridge"
2156 # "desc": "ISA bridge"
2172 # "desc": "IDE controller"
2194 # "desc": "VGA controller"
2204 # "mem_type_64": false,
2207 # "address": 4026531840,
2211 # "prefetch": false,
2212 # "mem_type_64": false,
2215 # "address": 4060086272,
2219 # "prefetch": false,
2220 # "mem_type_64": false,
2235 # "desc": "RAM controller"
2256 # Note: This example has been shortened as the real response is too long.
2259 { 'command': 'query-pci', 'returns': ['PciInfo'] }
2264 # This command will cause the QEMU process to exit gracefully. While every
2265 # attempt is made to send the QMP response before terminating, this is not
2266 # guaranteed. When using this interface, a premature EOF would not be
2273 # -> { "execute": "quit" }
2274 # <- { "return": {} }
2276 { 'command': 'quit' }
2281 # Stop all guest VCPU execution.
2285 # Notes: This function will succeed even if the guest is already in the stopped
2286 # state. In "inmigrate" state, it will ensure that the guest
2287 # remains paused once migration finishes, as if the -S option was
2288 # passed on the command line.
2292 # -> { "execute": "stop" }
2293 # <- { "return": {} }
2296 { 'command': 'stop' }
2301 # Performs a hard reset of a guest.
2307 # -> { "execute": "system_reset" }
2308 # <- { "return": {} }
2311 { 'command': 'system_reset' }
2314 # @system_powerdown:
2316 # Requests that a guest perform a powerdown operation.
2320 # Notes: A guest may or may not respond to this command. This command
2321 # returning does not indicate that a guest has accepted the request or
2322 # that it has shut down. Many guests will respond to this command by
2323 # prompting the user in some way.
2326 # -> { "execute": "system_powerdown" }
2327 # <- { "return": {} }
2330 { 'command': 'system_powerdown' }
2335 # This command is a nop that is only provided for the purposes of compatibility.
2339 # Notes: Do not use this command.
2341 { 'command': 'cpu', 'data': {'index': 'int'} }
2346 # Adds CPU with specified ID
2348 # @id: ID of CPU to be created, valid values [0..max_cpus)
2350 # Returns: Nothing on success
2356 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
2357 # <- { "return": {} }
2360 { 'command': 'cpu-add', 'data': {'id': 'int'} }
2365 # Save a portion of guest memory to a file.
2367 # @val: the virtual address of the guest to start from
2369 # @size: the size of memory region to save
2371 # @filename: the file to save the memory to as binary data
2373 # @cpu-index: the index of the virtual CPU to use for translating the
2374 # virtual address (defaults to CPU 0)
2376 # Returns: Nothing on success
2380 # Notes: Errors were not reliably returned until 1.1
2384 # -> { "execute": "memsave",
2385 # "arguments": { "val": 10,
2387 # "filename": "/tmp/virtual-mem-dump" } }
2388 # <- { "return": {} }
2391 { 'command': 'memsave',
2392 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
2397 # Save a portion of guest physical memory to a file.
2399 # @val: the physical address of the guest to start from
2401 # @size: the size of memory region to save
2403 # @filename: the file to save the memory to as binary data
2405 # Returns: Nothing on success
2409 # Notes: Errors were not reliably returned until 1.1
2413 # -> { "execute": "pmemsave",
2414 # "arguments": { "val": 10,
2416 # "filename": "/tmp/physical-mem-dump" } }
2417 # <- { "return": {} }
2420 { 'command': 'pmemsave',
2421 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
2426 # Resume guest VCPU execution.
2430 # Returns: If successful, nothing
2431 # If QEMU was started with an encrypted block device and a key has
2432 # not yet been set, DeviceEncrypted.
2434 # Notes: This command will succeed if the guest is currently running. It
2435 # will also succeed if the guest is in the "inmigrate" state; in
2436 # this case, the effect of the command is to make sure the guest
2437 # starts once migration finishes, removing the effect of the -S
2438 # command line option if it was passed.
2442 # -> { "execute": "cont" }
2443 # <- { "return": {} }
2446 { 'command': 'cont' }
2451 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
2459 # -> { "execute": "system_wakeup" }
2460 # <- { "return": {} }
2463 { 'command': 'system_wakeup' }
2468 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
2469 # The command fails when the guest doesn't support injecting.
2471 # Returns: If successful, nothing
2475 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
2479 # -> { "execute": "inject-nmi" }
2480 # <- { "return": {} }
2483 { 'command': 'inject-nmi' }
2488 # Sets the link status of a virtual network adapter.
2490 # @name: the device name of the virtual network adapter
2492 # @up: true to set the link status to be up
2494 # Returns: Nothing on success
2495 # If @name is not a valid network device, DeviceNotFound
2499 # Notes: Not all network adapters support setting link status. This command
2500 # will succeed even if the network adapter does not support link status
2505 # -> { "execute": "set_link",
2506 # "arguments": { "name": "e1000.0", "up": false } }
2507 # <- { "return": {} }
2510 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
2515 # Request the balloon driver to change its balloon size.
2517 # @value: the target size of the balloon in bytes
2519 # Returns: Nothing on success
2520 # If the balloon driver is enabled but not functional because the KVM
2521 # kernel module cannot support it, KvmMissingCap
2522 # If no balloon device is present, DeviceNotActive
2524 # Notes: This command just issues a request to the guest. When it returns,
2525 # the balloon size may not have changed. A guest can change the balloon
2526 # size independent of this command.
2532 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
2533 # <- { "return": {} }
2536 { 'command': 'balloon', 'data': {'value': 'int'} }
2541 # This action can be used to test transaction failure.
2545 { 'struct': 'Abort',
2549 # @ActionCompletionMode:
2551 # An enumeration of Transactional completion modes.
2553 # @individual: Do not attempt to cancel any other Actions if any Actions fail
2554 # after the Transaction request succeeds. All Actions that
2555 # can complete successfully will do so without waiting on others.
2556 # This is the default.
2558 # @grouped: If any Action fails after the Transaction succeeds, cancel all
2559 # Actions. Actions do not complete until all Actions are ready to
2560 # complete. May be rejected by Actions that do not support this
2565 { 'enum': 'ActionCompletionMode',
2566 'data': [ 'individual', 'grouped' ] }
2569 # @TransactionAction:
2571 # A discriminated record of operations that can be performed with
2572 # @transaction. Action @type can be:
2574 # - @abort: since 1.6
2575 # - @block-dirty-bitmap-add: since 2.5
2576 # - @block-dirty-bitmap-clear: since 2.5
2577 # - @blockdev-backup: since 2.3
2578 # - @blockdev-snapshot: since 2.5
2579 # - @blockdev-snapshot-internal-sync: since 1.7
2580 # - @blockdev-snapshot-sync: since 1.1
2581 # - @drive-backup: since 1.6
2585 { 'union': 'TransactionAction',
2588 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
2589 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
2590 'blockdev-backup': 'BlockdevBackup',
2591 'blockdev-snapshot': 'BlockdevSnapshot',
2592 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
2593 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
2594 'drive-backup': 'DriveBackup'
2598 # @TransactionProperties:
2600 # Optional arguments to modify the behavior of a Transaction.
2602 # @completion-mode: Controls how jobs launched asynchronously by
2603 # Actions will complete or fail as a group.
2604 # See @ActionCompletionMode for details.
2608 { 'struct': 'TransactionProperties',
2610 '*completion-mode': 'ActionCompletionMode'
2617 # Executes a number of transactionable QMP commands atomically. If any
2618 # operation fails, then the entire set of actions will be abandoned and the
2619 # appropriate error returned.
2621 # For external snapshots, the dictionary contains the device, the file to use for
2622 # the new snapshot, and the format. The default format, if not specified, is
2625 # Each new snapshot defaults to being created by QEMU (wiping any
2626 # contents if the file already exists), but it is also possible to reuse
2627 # an externally-created file. In the latter case, you should ensure that
2628 # the new image file has the same contents as the current one; QEMU cannot
2629 # perform any meaningful check. Typically this is achieved by using the
2630 # current image file as the backing file for the new image.
2632 # On failure, the original disks pre-snapshot attempt will be used.
2634 # For internal snapshots, the dictionary contains the device and the snapshot's
2635 # name. If an internal snapshot matching name already exists, the request will
2636 # be rejected. Only some image formats support it, for example, qcow2, rbd,
2639 # On failure, qemu will try delete the newly created internal snapshot in the
2640 # transaction. When an I/O error occurs during deletion, the user needs to fix
2641 # it later with qemu-img or other command.
2643 # @actions: List of @TransactionAction;
2644 # information needed for the respective operations.
2646 # @properties: structure of additional options to control the
2647 # execution of the transaction. See @TransactionProperties
2648 # for additional detail.
2650 # Returns: nothing on success
2652 # Errors depend on the operations of the transaction
2654 # Note: The transaction aborts on the first failure. Therefore, there will be
2655 # information on only one failed operation returned in an error condition, and
2656 # subsequent actions will not have been attempted.
2662 # -> { "execute": "transaction",
2663 # "arguments": { "actions": [
2664 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
2665 # "snapshot-file": "/some/place/my-image",
2666 # "format": "qcow2" } },
2667 # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
2668 # "snapshot-file": "/some/place/my-image2",
2669 # "snapshot-node-name": "node3432",
2670 # "mode": "existing",
2671 # "format": "qcow2" } },
2672 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
2673 # "snapshot-file": "/some/place/my-image2",
2674 # "mode": "existing",
2675 # "format": "qcow2" } },
2676 # { "type": "blockdev-snapshot-internal-sync", "data" : {
2677 # "device": "ide-hd2",
2678 # "name": "snapshot0" } } ] } }
2679 # <- { "return": {} }
2682 { 'command': 'transaction',
2683 'data': { 'actions': [ 'TransactionAction' ],
2684 '*properties': 'TransactionProperties'
2689 # @human-monitor-command:
2691 # Execute a command on the human monitor and return the output.
2693 # @command-line: the command to execute in the human monitor
2695 # @cpu-index: The CPU to use for commands that require an implicit CPU
2697 # Returns: the output of the command as a string
2701 # Notes: This command only exists as a stop-gap. Its use is highly
2702 # discouraged. The semantics of this command are not
2703 # guaranteed: this means that command names, arguments and
2704 # responses can change or be removed at ANY time. Applications
2705 # that rely on long term stability guarantees should NOT
2708 # Known limitations:
2710 # * This command is stateless, this means that commands that depend
2711 # on state information (such as getfd) might not work
2713 # * Commands that prompt the user for data (eg. 'cont' when the block
2714 # device is encrypted) don't currently work
2718 # -> { "execute": "human-monitor-command",
2719 # "arguments": { "command-line": "info kvm" } }
2720 # <- { "return": "kvm support: enabled\r\n" }
2723 { 'command': 'human-monitor-command',
2724 'data': {'command-line': 'str', '*cpu-index': 'int'},
2730 # Cancel the current executing migration process.
2732 # Returns: nothing on success
2734 # Notes: This command succeeds even if there is no migration process running.
2740 # -> { "execute": "migrate_cancel" }
2741 # <- { "return": {} }
2744 { 'command': 'migrate_cancel' }
2747 # @migrate_set_downtime:
2749 # Set maximum tolerated downtime for migration.
2751 # @value: maximum downtime in seconds
2753 # Returns: nothing on success
2755 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2761 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
2762 # <- { "return": {} }
2765 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2768 # @migrate_set_speed:
2770 # Set maximum speed for migration.
2772 # @value: maximum speed in bytes per second.
2774 # Returns: nothing on success
2776 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2782 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
2783 # <- { "return": {} }
2786 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2789 # @migrate-set-cache-size:
2791 # Set cache size to be used by XBZRLE migration
2793 # @value: cache size in bytes
2795 # The size will be rounded down to the nearest power of 2.
2796 # The cache size can be modified before and during ongoing migration
2798 # Returns: nothing on success
2804 # -> { "execute": "migrate-set-cache-size",
2805 # "arguments": { "value": 536870912 } }
2806 # <- { "return": {} }
2809 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2812 # @query-migrate-cache-size:
2814 # Query migration XBZRLE cache size
2816 # Returns: XBZRLE cache size in bytes
2822 # -> { "execute": "query-migrate-cache-size" }
2823 # <- { "return": 67108864 }
2826 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2829 # @ObjectPropertyInfo:
2831 # @name: the name of the property
2833 # @type: the type of the property. This will typically come in one of four
2836 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2837 # These types are mapped to the appropriate JSON type.
2839 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
2840 # device type name. Child properties create the composition tree.
2842 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
2843 # device type name. Link properties form the device model graph.
2847 { 'struct': 'ObjectPropertyInfo',
2848 'data': { 'name': 'str', 'type': 'str' } }
2853 # This command will list any properties of a object given a path in the object
2856 # @path: the path within the object model. See @qom-get for a description of
2859 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2864 { 'command': 'qom-list',
2865 'data': { 'path': 'str' },
2866 'returns': [ 'ObjectPropertyInfo' ] }
2871 # This command will get a property from a object model path and return the
2874 # @path: The path within the object model. There are two forms of supported
2875 # paths--absolute and partial paths.
2877 # Absolute paths are derived from the root object and can follow child<>
2878 # or link<> properties. Since they can follow link<> properties, they
2879 # can be arbitrarily long. Absolute paths look like absolute filenames
2880 # and are prefixed with a leading slash.
2882 # Partial paths look like relative filenames. They do not begin
2883 # with a prefix. The matching rules for partial paths are subtle but
2884 # designed to make specifying objects easy. At each level of the
2885 # composition tree, the partial path is matched as an absolute path.
2886 # The first match is not returned. At least two matches are searched
2887 # for. A successful result is only returned if only one match is
2888 # found. If more than one match is found, a flag is return to
2889 # indicate that the match was ambiguous.
2891 # @property: The property name to read
2893 # Returns: The property value. The type depends on the property
2894 # type. child<> and link<> properties are returned as #str
2895 # pathnames. All integer property types (u8, u16, etc) are
2900 { 'command': 'qom-get',
2901 'data': { 'path': 'str', 'property': 'str' },
2907 # This command will set a property from a object model path.
2909 # @path: see @qom-get for a description of this parameter
2911 # @property: the property name to set
2913 # @value: a value who's type is appropriate for the property type. See @qom-get
2914 # for a description of type mapping.
2918 { 'command': 'qom-set',
2919 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2924 # Sets the password of a remote display session.
2926 # @protocol: `vnc' to modify the VNC server password
2927 # `spice' to modify the Spice server password
2929 # @password: the new password
2931 # @connected: how to handle existing clients when changing the
2932 # password. If nothing is specified, defaults to `keep'
2933 # `fail' to fail the command if clients are connected
2934 # `disconnect' to disconnect existing clients
2935 # `keep' to maintain existing clients
2937 # Returns: Nothing on success
2938 # If Spice is not enabled, DeviceNotFound
2944 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
2945 # "password": "secret" } }
2946 # <- { "return": {} }
2949 { 'command': 'set_password',
2950 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2955 # Expire the password of a remote display server.
2957 # @protocol: the name of the remote display protocol `vnc' or `spice'
2959 # @time: when to expire the password.
2960 # `now' to expire the password immediately
2961 # `never' to cancel password expiration
2962 # `+INT' where INT is the number of seconds from now (integer)
2963 # `INT' where INT is the absolute time in seconds
2965 # Returns: Nothing on success
2966 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2970 # Notes: Time is relative to the server and currently there is no way to
2971 # coordinate server time with client time. It is not recommended to
2972 # use the absolute time version of the @time parameter unless you're
2973 # sure you are on the same machine as the QEMU instance.
2977 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2979 # <- { "return": {} }
2982 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2985 # @change-vnc-password:
2987 # Change the VNC server password.
2989 # @password: the new password to use with VNC authentication
2993 # Notes: An empty password in this command will set the password to the empty
2994 # string. Existing clients are unaffected by executing this command.
2996 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
3001 # This command is multiple commands multiplexed together.
3003 # @device: This is normally the name of a block device but it may also be 'vnc'.
3004 # when it's 'vnc', then sub command depends on @target
3006 # @target: If @device is a block device, then this is the new filename.
3007 # If @device is 'vnc', then if the value 'password' selects the vnc
3008 # change password command. Otherwise, this specifies a new server URI
3009 # address to listen to for VNC connections.
3011 # @arg: If @device is a block device, then this is an optional format to open
3013 # If @device is 'vnc' and @target is 'password', this is the new VNC
3014 # password to set. If this argument is an empty string, then no future
3015 # logins will be allowed.
3017 # Returns: Nothing on success.
3018 # If @device is not a valid block device, DeviceNotFound
3019 # If the new block device is encrypted, DeviceEncrypted. Note that
3020 # if this error is returned, the device has been opened successfully
3021 # and an additional call to @block_passwd is required to set the
3022 # device's password. The behavior of reads and writes to the block
3023 # device between when these calls are executed is undefined.
3025 # Notes: This interface is deprecated, and it is strongly recommended that you
3026 # avoid using it. For changing block devices, use
3027 # blockdev-change-medium; for changing VNC parameters, use
3028 # change-vnc-password.
3034 # 1. Change a removable medium
3036 # -> { "execute": "change",
3037 # "arguments": { "device": "ide1-cd0",
3038 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
3039 # <- { "return": {} }
3041 # 2. Change VNC password
3043 # -> { "execute": "change",
3044 # "arguments": { "device": "vnc", "target": "password",
3045 # "arg": "foobar1" } }
3046 # <- { "return": {} }
3049 { 'command': 'change',
3050 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
3055 # This structure describes a search result from @qom-list-types
3057 # @name: the type name found in the search
3061 { 'struct': 'ObjectTypeInfo',
3062 'data': { 'name': 'str' } }
3067 # This command will return a list of types given search parameters
3069 # @implements: if specified, only return types that implement this type name
3071 # @abstract: if true, include abstract types in the results
3073 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
3077 { 'command': 'qom-list-types',
3078 'data': { '*implements': 'str', '*abstract': 'bool' },
3079 'returns': [ 'ObjectTypeInfo' ] }
3082 # @DevicePropertyInfo:
3084 # Information about device properties.
3086 # @name: the name of the property
3087 # @type: the typename of the property
3088 # @description: if specified, the description of the property.
3093 { 'struct': 'DevicePropertyInfo',
3094 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
3097 # @device-list-properties:
3099 # List properties associated with a device.
3101 # @typename: the type name of a device
3103 # Returns: a list of DevicePropertyInfo describing a devices properties
3107 { 'command': 'device-list-properties',
3108 'data': { 'typename': 'str'},
3109 'returns': [ 'DevicePropertyInfo' ] }
3114 # Migrates the current running guest to another Virtual Machine.
3116 # @uri: the Uniform Resource Identifier of the destination VM
3118 # @blk: do block migration (full disk copy)
3120 # @inc: incremental disk copy migration
3122 # @detach: this argument exists only for compatibility reasons and
3123 # is ignored by QEMU
3125 # Returns: nothing on success
3131 # 1. The 'query-migrate' command should be used to check migration's progress
3132 # and final result (this information is provided by the 'status' member)
3134 # 2. All boolean arguments default to false
3136 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
3141 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
3142 # <- { "return": {} }
3145 { 'command': 'migrate',
3146 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
3149 # @migrate-incoming:
3151 # Start an incoming migration, the qemu must have been started
3152 # with -incoming defer
3154 # @uri: The Uniform Resource Identifier identifying the source or
3155 # address to listen on
3157 # Returns: nothing on success
3163 # 1. It's a bad idea to use a string for the uri, but it needs to stay
3164 # compatible with -incoming and the format of the uri is already exposed
3167 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
3170 # 3. The uri format is the same as for -incoming
3174 # -> { "execute": "migrate-incoming",
3175 # "arguments": { "uri": "tcp::4446" } }
3176 # <- { "return": {} }
3179 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
3182 # @xen-save-devices-state:
3184 # Save the state of all devices to file. The RAM and the block devices
3185 # of the VM are not saved by this command.
3187 # @filename: the file to save the state of the devices to as binary
3188 # data. See xen-save-devices-state.txt for a description of the binary
3191 # Returns: Nothing on success
3197 # -> { "execute": "xen-save-devices-state",
3198 # "arguments": { "filename": "/tmp/save" } }
3199 # <- { "return": {} }
3202 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
3205 # @xen-set-global-dirty-log:
3207 # Enable or disable the global dirty log mode.
3209 # @enable: true to enable, false to disable.
3217 # -> { "execute": "xen-set-global-dirty-log",
3218 # "arguments": { "enable": true } }
3219 # <- { "return": {} }
3222 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
3227 # @driver: the name of the new device's driver
3229 # @bus: the device's parent bus (device tree path)
3231 # @id: the device's ID, must be unique
3233 # Additional arguments depend on the type.
3238 # 1. For detailed information about this command, please refer to the
3239 # 'docs/qdev-device-use.txt' file.
3241 # 2. It's possible to list device properties by running QEMU with the
3242 # "-device DEVICE,help" command-line argument, where DEVICE is the
3247 # -> { "execute": "device_add",
3248 # "arguments": { "driver": "e1000", "id": "net1",
3250 # "mac": "52:54:00:12:34:56" } }
3251 # <- { "return": {} }
3253 # TODO: This command effectively bypasses QAPI completely due to its
3254 # "additional arguments" business. It shouldn't have been added to
3255 # the schema in this form. It should be qapified properly, or
3256 # replaced by a properly qapified command.
3260 { 'command': 'device_add',
3261 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
3262 'gen': false } # so we can get the additional arguments
3267 # Remove a device from a guest
3269 # @id: the device's ID or QOM path
3271 # Returns: Nothing on success
3272 # If @id is not a valid device, DeviceNotFound
3274 # Notes: When this command completes, the device may not be removed from the
3275 # guest. Hot removal is an operation that requires guest cooperation.
3276 # This command merely requests that the guest begin the hot removal
3277 # process. Completion of the device removal process is signaled with a
3278 # DEVICE_DELETED event. Guest reset will automatically complete removal
3285 # -> { "execute": "device_del",
3286 # "arguments": { "id": "net1" } }
3287 # <- { "return": {} }
3289 # -> { "execute": "device_del",
3290 # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
3291 # <- { "return": {} }
3294 { 'command': 'device_del', 'data': {'id': 'str'} }
3297 # @DumpGuestMemoryFormat:
3299 # An enumeration of guest-memory-dump's format.
3303 # @kdump-zlib: kdump-compressed format with zlib-compressed
3305 # @kdump-lzo: kdump-compressed format with lzo-compressed
3307 # @kdump-snappy: kdump-compressed format with snappy-compressed
3311 { 'enum': 'DumpGuestMemoryFormat',
3312 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
3315 # @dump-guest-memory:
3317 # Dump guest's memory to vmcore. It is a synchronous operation that can take
3318 # very long depending on the amount of guest memory.
3320 # @paging: if true, do paging to get guest's memory mapping. This allows
3321 # using gdb to process the core file.
3323 # IMPORTANT: this option can make QEMU allocate several gigabytes
3324 # of RAM. This can happen for a large guest, or a
3325 # malicious guest pretending to be large.
3327 # Also, paging=true has the following limitations:
3329 # 1. The guest may be in a catastrophic state or can have corrupted
3330 # memory, which cannot be trusted
3331 # 2. The guest can be in real-mode even if paging is enabled. For
3332 # example, the guest uses ACPI to sleep, and ACPI sleep state
3334 # 3. Currently only supported on i386 and x86_64.
3336 # @protocol: the filename or file descriptor of the vmcore. The supported
3339 # 1. file: the protocol starts with "file:", and the following
3340 # string is the file's path.
3341 # 2. fd: the protocol starts with "fd:", and the following string
3344 # @detach: if true, QMP will return immediately rather than
3345 # waiting for the dump to finish. The user can track progress
3346 # using "query-dump". (since 2.6).
3348 # @begin: if specified, the starting physical address.
3350 # @length: if specified, the memory size, in bytes. If you don't
3351 # want to dump all guest's memory, please specify the start @begin
3354 # @format: if specified, the format of guest memory dump. But non-elf
3355 # format is conflict with paging and filter, ie. @paging, @begin and
3356 # @length is not allowed to be specified with non-elf @format at the
3357 # same time (since 2.0)
3359 # Note: All boolean arguments default to false
3361 # Returns: nothing on success
3367 # -> { "execute": "dump-guest-memory",
3368 # "arguments": { "protocol": "fd:dump" } }
3369 # <- { "return": {} }
3372 { 'command': 'dump-guest-memory',
3373 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
3374 '*begin': 'int', '*length': 'int',
3375 '*format': 'DumpGuestMemoryFormat'} }
3380 # Describe the status of a long-running background guest memory dump.
3382 # @none: no dump-guest-memory has started yet.
3384 # @active: there is one dump running in background.
3386 # @completed: the last dump has finished successfully.
3388 # @failed: the last dump has failed.
3392 { 'enum': 'DumpStatus',
3393 'data': [ 'none', 'active', 'completed', 'failed' ] }
3398 # The result format for 'query-dump'.
3400 # @status: enum of @DumpStatus, which shows current dump status
3402 # @completed: bytes written in latest dump (uncompressed)
3404 # @total: total bytes to be written in latest dump (uncompressed)
3408 { 'struct': 'DumpQueryResult',
3409 'data': { 'status': 'DumpStatus',
3416 # Query latest dump status.
3418 # Returns: A @DumpStatus object showing the dump status.
3424 # -> { "execute": "query-dump" }
3425 # <- { "return": { "status": "active", "completed": 1024000,
3426 # "total": 2048000 } }
3429 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
3432 # @DumpGuestMemoryCapability:
3434 # A list of the available formats for dump-guest-memory
3438 { 'struct': 'DumpGuestMemoryCapability',
3440 'formats': ['DumpGuestMemoryFormat'] } }
3443 # @query-dump-guest-memory-capability:
3445 # Returns the available formats for dump-guest-memory
3447 # Returns: A @DumpGuestMemoryCapability object listing available formats for
3454 # -> { "execute": "query-dump-guest-memory-capability" }
3455 # <- { "return": { "formats":
3456 # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
3459 { 'command': 'query-dump-guest-memory-capability',
3460 'returns': 'DumpGuestMemoryCapability' }
3465 # Dump guest's storage keys
3467 # @filename: the path to the file to dump to
3469 # This command is only supported on s390 architecture.
3475 # -> { "execute": "dump-skeys",
3476 # "arguments": { "filename": "/tmp/skeys" } }
3477 # <- { "return": {} }
3480 { 'command': 'dump-skeys',
3481 'data': { 'filename': 'str' } }
3486 # Add a network backend.
3488 # @type: the type of network backend. Current valid values are 'user', 'tap',
3489 # 'vde', 'socket', 'dump' and 'bridge'
3491 # @id: the name of the new network backend
3493 # Additional arguments depend on the type.
3495 # TODO: This command effectively bypasses QAPI completely due to its
3496 # "additional arguments" business. It shouldn't have been added to
3497 # the schema in this form. It should be qapified properly, or
3498 # replaced by a properly qapified command.
3502 # Returns: Nothing on success
3503 # If @type is not a valid network backend, DeviceNotFound
3507 # -> { "execute": "netdev_add",
3508 # "arguments": { "type": "user", "id": "netdev1",
3509 # "dnssearch": "example.org" } }
3510 # <- { "return": {} }
3513 { 'command': 'netdev_add',
3514 'data': {'type': 'str', 'id': 'str'},
3515 'gen': false } # so we can get the additional arguments
3520 # Remove a network backend.
3522 # @id: the name of the network backend to remove
3524 # Returns: Nothing on success
3525 # If @id is not a valid network backend, DeviceNotFound
3531 # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
3532 # <- { "return": {} }
3535 { 'command': 'netdev_del', 'data': {'id': 'str'} }
3540 # Create a QOM object.
3542 # @qom-type: the class name for the object to be created
3544 # @id: the name of the new object
3546 # @props: a dictionary of properties to be passed to the backend
3548 # Returns: Nothing on success
3549 # Error if @qom-type is not a valid class name
3555 # -> { "execute": "object-add",
3556 # "arguments": { "qom-type": "rng-random", "id": "rng1",
3557 # "props": { "filename": "/dev/hwrng" } } }
3558 # <- { "return": {} }
3561 { 'command': 'object-add',
3562 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
3567 # Remove a QOM object.
3569 # @id: the name of the QOM object to remove
3571 # Returns: Nothing on success
3572 # Error if @id is not a valid id for a QOM object
3578 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
3579 # <- { "return": {} }
3582 { 'command': 'object-del', 'data': {'id': 'str'} }
3585 # @NetdevNoneOptions:
3587 # Use it alone to have zero network devices.
3591 { 'struct': 'NetdevNoneOptions',
3595 # @NetLegacyNicOptions:
3597 # Create a new Network Interface Card.
3599 # @netdev: id of -netdev to connect to
3601 # @macaddr: MAC address
3603 # @model: device model (e1000, rtl8139, virtio etc.)
3605 # @addr: PCI device address
3607 # @vectors: number of MSI-x vectors, 0 to disable MSI-X
3611 { 'struct': 'NetLegacyNicOptions',
3617 '*vectors': 'uint32' } }
3622 # A fat type wrapping 'str', to be embedded in lists.
3626 { 'struct': 'String',
3631 # @NetdevUserOptions:
3633 # Use the user mode network stack which requires no administrator privilege to
3636 # @hostname: client hostname reported by the builtin DHCP server
3638 # @restrict: isolate the guest from the host
3640 # @ipv4: whether to support IPv4, default true for enabled
3643 # @ipv6: whether to support IPv6, default true for enabled
3646 # @ip: legacy parameter, use net= instead
3648 # @net: IP network address that the guest will see, in the
3649 # form addr[/netmask] The netmask is optional, and can be
3650 # either in the form a.b.c.d or as a number of valid top-most
3651 # bits. Default is 10.0.2.0/24.
3653 # @host: guest-visible address of the host
3655 # @tftp: root directory of the built-in TFTP server
3657 # @bootfile: BOOTP filename, for use with tftp=
3659 # @dhcpstart: the first of the 16 IPs the built-in DHCP server can
3662 # @dns: guest-visible address of the virtual nameserver
3664 # @dnssearch: list of DNS suffixes to search, passed as DHCP option
3667 # @ipv6-prefix: IPv6 network prefix (default is fec0::) (since
3668 # 2.6). The network prefix is given in the usual
3669 # hexadecimal IPv6 address notation.
3671 # @ipv6-prefixlen: IPv6 network prefix length (default is 64)
3674 # @ipv6-host: guest-visible IPv6 address of the host (since 2.6)
3676 # @ipv6-dns: guest-visible IPv6 address of the virtual
3677 # nameserver (since 2.6)
3679 # @smb: root directory of the built-in SMB server
3681 # @smbserver: IP address of the built-in SMB server
3683 # @hostfwd: redirect incoming TCP or UDP host connections to guest
3686 # @guestfwd: forward guest TCP connections
3690 { 'struct': 'NetdevUserOptions',
3693 '*restrict': 'bool',
3701 '*dhcpstart': 'str',
3703 '*dnssearch': ['String'],
3704 '*ipv6-prefix': 'str',
3705 '*ipv6-prefixlen': 'int',
3706 '*ipv6-host': 'str',
3709 '*smbserver': 'str',
3710 '*hostfwd': ['String'],
3711 '*guestfwd': ['String'] } }
3714 # @NetdevTapOptions:
3716 # Connect the host TAP network interface name to the VLAN.
3718 # @ifname: interface name
3720 # @fd: file descriptor of an already opened tap
3722 # @fds: multiple file descriptors of already opened multiqueue capable
3725 # @script: script to initialize the interface
3727 # @downscript: script to shut down the interface
3729 # @br: bridge name (since 2.8)
3731 # @helper: command to execute to configure bridge
3733 # @sndbuf: send buffer limit. Understands [TGMKkb] suffixes.
3735 # @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface
3737 # @vhost: enable vhost-net network accelerator
3739 # @vhostfd: file descriptor of an already opened vhost net device
3741 # @vhostfds: file descriptors of multiple already opened vhost net
3744 # @vhostforce: vhost on for non-MSIX virtio guests
3746 # @queues: number of queues to be created for multiqueue capable tap
3748 # @poll-us: maximum number of microseconds that could
3749 # be spent on busy polling for tap (since 2.7)
3753 { 'struct': 'NetdevTapOptions',
3759 '*downscript': 'str',
3763 '*vnet_hdr': 'bool',
3767 '*vhostforce': 'bool',
3768 '*queues': 'uint32',
3769 '*poll-us': 'uint32'} }
3772 # @NetdevSocketOptions:
3774 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3775 # socket connection.
3777 # @fd: file descriptor of an already opened socket
3779 # @listen: port number, and optional hostname, to listen on
3781 # @connect: port number, and optional hostname, to connect to
3783 # @mcast: UDP multicast address and port number
3785 # @localaddr: source address and port for multicast and udp packets
3787 # @udp: UDP unicast address and port number
3791 { 'struct': 'NetdevSocketOptions',
3797 '*localaddr': 'str',
3801 # @NetdevL2TPv3Options:
3803 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
3805 # @src: source address
3807 # @dst: destination address
3809 # @srcport: source port - mandatory for udp, optional for ip
3811 # @dstport: destination port - mandatory for udp, optional for ip
3813 # @ipv6: force the use of ipv6
3815 # @udp: use the udp version of l2tpv3 encapsulation
3817 # @cookie64: use 64 bit coookies
3819 # @counter: have sequence counter
3821 # @pincounter: pin sequence counter to zero -
3822 # workaround for buggy implementations or
3823 # networks with packet reorder
3825 # @txcookie: 32 or 64 bit transmit cookie
3827 # @rxcookie: 32 or 64 bit receive cookie
3829 # @txsession: 32 bit transmit session
3831 # @rxsession: 32 bit receive session - if not specified
3832 # set to the same value as transmit
3834 # @offset: additional offset - allows the insertion of
3835 # additional application-specific data before the packet payload
3839 { 'struct': 'NetdevL2TPv3Options',
3847 '*cookie64': 'bool',
3849 '*pincounter': 'bool',
3850 '*txcookie': 'uint64',
3851 '*rxcookie': 'uint64',
3852 'txsession': 'uint32',
3853 '*rxsession': 'uint32',
3854 '*offset': 'uint32' } }
3857 # @NetdevVdeOptions:
3859 # Connect the VLAN to a vde switch running on the host.
3861 # @sock: socket path
3863 # @port: port number
3865 # @group: group owner of socket
3867 # @mode: permissions for socket
3871 { 'struct': 'NetdevVdeOptions',
3876 '*mode': 'uint16' } }
3879 # @NetdevDumpOptions:
3881 # Dump VLAN network traffic to a file.
3883 # @len: per-packet size limit (64k default). Understands [TGMKkb]
3886 # @file: dump file path (default is qemu-vlan0.pcap)
3890 { 'struct': 'NetdevDumpOptions',
3896 # @NetdevBridgeOptions:
3898 # Connect a host TAP network interface to a host bridge device.
3902 # @helper: command to execute to configure bridge
3906 { 'struct': 'NetdevBridgeOptions',
3909 '*helper': 'str' } }
3912 # @NetdevHubPortOptions:
3914 # Connect two or more net clients through a software hub.
3916 # @hubid: hub identifier number
3920 { 'struct': 'NetdevHubPortOptions',
3922 'hubid': 'int32' } }
3925 # @NetdevNetmapOptions:
3927 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3929 # @ifname: Either the name of an existing network interface supported by
3930 # netmap, or the name of a VALE port (created on the fly).
3931 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3932 # YYY are non-negative integers. XXX identifies a switch and
3933 # YYY identifies a port of the switch. VALE ports having the
3934 # same XXX are therefore connected to the same switch.
3936 # @devname: path of the netmap device (default: '/dev/netmap').
3940 { 'struct': 'NetdevNetmapOptions',
3943 '*devname': 'str' } }
3946 # @NetdevVhostUserOptions:
3948 # Vhost-user network backend
3950 # @chardev: name of a unix socket chardev
3952 # @vhostforce: vhost on for non-MSIX virtio guests (default: false).
3954 # @queues: number of queues to be created for multiqueue vhost-user
3955 # (default: 1) (Since 2.5)
3959 { 'struct': 'NetdevVhostUserOptions',
3962 '*vhostforce': 'bool',
3963 '*queues': 'int' } }
3968 # Available netdev drivers.
3972 { 'enum': 'NetClientDriver',
3973 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
3974 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
3979 # Captures the configuration of a network device.
3981 # @id: identifier for monitor commands.
3983 # @type: Specify the driver used for interpreting remaining arguments.
3987 # 'l2tpv3' - since 2.1
3989 { 'union': 'Netdev',
3990 'base': { 'id': 'str', 'type': 'NetClientDriver' },
3991 'discriminator': 'type',
3993 'none': 'NetdevNoneOptions',
3994 'nic': 'NetLegacyNicOptions',
3995 'user': 'NetdevUserOptions',
3996 'tap': 'NetdevTapOptions',
3997 'l2tpv3': 'NetdevL2TPv3Options',
3998 'socket': 'NetdevSocketOptions',
3999 'vde': 'NetdevVdeOptions',
4000 'dump': 'NetdevDumpOptions',
4001 'bridge': 'NetdevBridgeOptions',
4002 'hubport': 'NetdevHubPortOptions',
4003 'netmap': 'NetdevNetmapOptions',
4004 'vhost-user': 'NetdevVhostUserOptions' } }
4009 # Captures the configuration of a network device; legacy.
4011 # @vlan: vlan number
4013 # @id: identifier for monitor commands
4015 # @name: identifier for monitor commands, ignored if @id is present
4017 # @opts: device type specific properties (legacy)
4021 { 'struct': 'NetLegacy',
4026 'opts': 'NetLegacyOptions' } }
4029 # @NetLegacyOptionsType:
4033 { 'enum': 'NetLegacyOptionsType',
4034 'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
4035 'dump', 'bridge', 'netmap', 'vhost-user'] }
4038 # @NetLegacyOptions:
4040 # Like Netdev, but for use only by the legacy command line options
4044 { 'union': 'NetLegacyOptions',
4045 'base': { 'type': 'NetLegacyOptionsType' },
4046 'discriminator': 'type',
4048 'none': 'NetdevNoneOptions',
4049 'nic': 'NetLegacyNicOptions',
4050 'user': 'NetdevUserOptions',
4051 'tap': 'NetdevTapOptions',
4052 'l2tpv3': 'NetdevL2TPv3Options',
4053 'socket': 'NetdevSocketOptions',
4054 'vde': 'NetdevVdeOptions',
4055 'dump': 'NetdevDumpOptions',
4056 'bridge': 'NetdevBridgeOptions',
4057 'netmap': 'NetdevNetmapOptions',
4058 'vhost-user': 'NetdevVhostUserOptions' } }
4061 # @NetFilterDirection:
4063 # Indicates whether a netfilter is attached to a netdev's transmit queue or
4064 # receive queue or both.
4066 # @all: the filter is attached both to the receive and the transmit
4067 # queue of the netdev (default).
4069 # @rx: the filter is attached to the receive queue of the netdev,
4070 # where it will receive packets sent to the netdev.
4072 # @tx: the filter is attached to the transmit queue of the netdev,
4073 # where it will receive packets sent by the netdev.
4077 { 'enum': 'NetFilterDirection',
4078 'data': [ 'all', 'rx', 'tx' ] }
4081 # @InetSocketAddressBase:
4083 # @host: host part of the address
4084 # @port: port part of the address
4086 { 'struct': 'InetSocketAddressBase',
4092 # @InetSocketAddress:
4094 # Captures a socket address or address range in the Internet namespace.
4096 # @numeric: true if the host/port are guaranteed to be numeric,
4097 # false if name resolution should be attempted. Defaults to false.
4100 # @to: If present, this is range of possible addresses, with port
4101 # between @port and @to.
4103 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
4105 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
4109 { 'struct': 'InetSocketAddress',
4110 'base': 'InetSocketAddressBase',
4118 # @UnixSocketAddress:
4120 # Captures a socket address in the local ("Unix socket") namespace.
4122 # @path: filesystem path to use
4126 { 'struct': 'UnixSocketAddress',
4131 # @VsockSocketAddress:
4133 # Captures a socket address in the vsock namespace.
4135 # @cid: unique host identifier
4138 # Note: string types are used to allow for possible future hostname or
4139 # service resolution support.
4143 { 'struct': 'VsockSocketAddress',
4149 # @SocketAddressLegacy:
4151 # Captures the address of a socket, which could also be a named file descriptor
4153 # Note: This type is deprecated in favor of SocketAddress. The
4154 # difference between SocketAddressLegacy and SocketAddress is that the
4155 # latter is a flat union rather than a simple union. Flat is nicer
4156 # because it avoids nesting on the wire, i.e. that form has fewer {}.
4161 { 'union': 'SocketAddressLegacy',
4163 'inet': 'InetSocketAddress',
4164 'unix': 'UnixSocketAddress',
4165 'vsock': 'VsockSocketAddress',
4169 # @SocketAddressType:
4171 # Available SocketAddress types
4173 # @inet: Internet address
4175 # @unix: Unix domain socket
4179 { 'enum': 'SocketAddressType',
4180 'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
4185 # Captures the address of a socket, which could also be a named file
4188 # @type: Transport type
4192 { 'union': 'SocketAddress',
4193 'base': { 'type': 'SocketAddressType' },
4194 'discriminator': 'type',
4195 'data': { 'inet': 'InetSocketAddress',
4196 'unix': 'UnixSocketAddress',
4197 'vsock': 'VsockSocketAddress',
4203 # Receive a file descriptor via SCM rights and assign it a name
4205 # @fdname: file descriptor name
4207 # Returns: Nothing on success
4211 # Notes: If @fdname already exists, the file descriptor assigned to
4212 # it will be closed and replaced by the received file
4215 # The 'closefd' command can be used to explicitly close the
4216 # file descriptor when it is no longer needed.
4220 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
4221 # <- { "return": {} }
4224 { 'command': 'getfd', 'data': {'fdname': 'str'} }
4229 # Close a file descriptor previously passed via SCM rights
4231 # @fdname: file descriptor name
4233 # Returns: Nothing on success
4239 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
4240 # <- { "return": {} }
4243 { 'command': 'closefd', 'data': {'fdname': 'str'} }
4248 # Information describing a machine.
4250 # @name: the name of the machine
4252 # @alias: an alias for the machine name
4254 # @is-default: whether the machine is default
4256 # @cpu-max: maximum number of CPUs supported by the machine type
4259 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
4263 { 'struct': 'MachineInfo',
4264 'data': { 'name': 'str', '*alias': 'str',
4265 '*is-default': 'bool', 'cpu-max': 'int',
4266 'hotpluggable-cpus': 'bool'} }
4271 # Return a list of supported machines
4273 # Returns: a list of MachineInfo
4277 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
4280 # @CpuDefinitionInfo:
4282 # Virtual CPU definition.
4284 # @name: the name of the CPU definition
4286 # @migration-safe: whether a CPU definition can be safely used for
4287 # migration in combination with a QEMU compatibility machine
4288 # when migrating between different QMU versions and between
4289 # hosts with different sets of (hardware or software)
4290 # capabilities. If not provided, information is not available
4291 # and callers should not assume the CPU definition to be
4292 # migration-safe. (since 2.8)
4294 # @static: whether a CPU definition is static and will not change depending on
4295 # QEMU version, machine type, machine options and accelerator options.
4296 # A static model is always migration-safe. (since 2.8)
4298 # @unavailable-features: List of properties that prevent
4299 # the CPU model from running in the current
4301 # @typename: Type name that can be used as argument to @device-list-properties,
4302 # to introspect properties configurable using -cpu or -global.
4305 # @unavailable-features is a list of QOM property names that
4306 # represent CPU model attributes that prevent the CPU from running.
4307 # If the QOM property is read-only, that means there's no known
4308 # way to make the CPU model run in the current host. Implementations
4309 # that choose not to provide specific information return the
4310 # property name "type".
4311 # If the property is read-write, it means that it MAY be possible
4312 # to run the CPU model in the current host if that property is
4313 # changed. Management software can use it as hints to suggest or
4314 # choose an alternative for the user, or just to generate meaningful
4315 # error messages explaining why the CPU model can't be used.
4316 # If @unavailable-features is an empty list, the CPU model is
4317 # runnable using the current host and machine-type.
4318 # If @unavailable-features is not present, runnability
4319 # information for the CPU is not available.
4323 { 'struct': 'CpuDefinitionInfo',
4324 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
4325 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
4328 # @query-cpu-definitions:
4330 # Return a list of supported virtual CPU definitions
4332 # Returns: a list of CpuDefInfo
4336 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
4341 # Virtual CPU model.
4343 # A CPU model consists of the name of a CPU definition, to which
4344 # delta changes are applied (e.g. features added/removed). Most magic values
4345 # that an architecture might require should be hidden behind the name.
4346 # However, if required, architectures can expose relevant properties.
4348 # @name: the name of the CPU definition the model is based on
4349 # @props: a dictionary of QOM properties to be applied
4353 { 'struct': 'CpuModelInfo',
4354 'data': { 'name': 'str',
4358 # @CpuModelExpansionType:
4360 # An enumeration of CPU model expansion types.
4362 # @static: Expand to a static CPU model, a combination of a static base
4363 # model name and property delta changes. As the static base model will
4364 # never change, the expanded CPU model will be the same, independant of
4365 # independent of QEMU version, machine type, machine options, and
4366 # accelerator options. Therefore, the resulting model can be used by
4367 # tooling without having to specify a compatibility machine - e.g. when
4368 # displaying the "host" model. static CPU models are migration-safe.
4370 # @full: Expand all properties. The produced model is not guaranteed to be
4371 # migration-safe, but allows tooling to get an insight and work with
4374 # Note: When a non-migration-safe CPU model is expanded in static mode, some
4375 # features enabled by the CPU model may be omitted, because they can't be
4376 # implemented by a static CPU model definition (e.g. cache info passthrough and
4377 # PMU passthrough in x86). If you need an accurate representation of the
4378 # features enabled by a non-migration-safe CPU model, use @full. If you need a
4379 # static representation that will keep ABI compatibility even when changing QEMU
4380 # version or machine-type, use @static (but keep in mind that some features may
4385 { 'enum': 'CpuModelExpansionType',
4386 'data': [ 'static', 'full' ] }
4390 # @CpuModelExpansionInfo:
4392 # The result of a cpu model expansion.
4394 # @model: the expanded CpuModelInfo.
4398 { 'struct': 'CpuModelExpansionInfo',
4399 'data': { 'model': 'CpuModelInfo' } }
4403 # @query-cpu-model-expansion:
4405 # Expands a given CPU model (or a combination of CPU model + additional options)
4406 # to different granularities, allowing tooling to get an understanding what a
4407 # specific CPU model looks like in QEMU under a certain configuration.
4409 # This interface can be used to query the "host" CPU model.
4411 # The data returned by this command may be affected by:
4413 # * QEMU version: CPU models may look different depending on the QEMU version.
4414 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4415 # * machine-type: CPU model may look different depending on the machine-type.
4416 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4417 # * machine options (including accelerator): in some architectures, CPU models
4418 # may look different depending on machine and accelerator options. (Except for
4419 # CPU models reported as "static" in query-cpu-definitions.)
4420 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4421 # global properties may affect expansion of CPU models. Using
4422 # query-cpu-model-expansion while using these is not advised.
4424 # Some architectures may not support all expansion types. s390x supports
4425 # "full" and "static".
4427 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
4428 # not supported, if the model cannot be expanded, if the model contains
4429 # an unknown CPU definition name, unknown properties or properties
4430 # with a wrong type. Also returns an error if an expansion type is
4435 { 'command': 'query-cpu-model-expansion',
4436 'data': { 'type': 'CpuModelExpansionType',
4437 'model': 'CpuModelInfo' },
4438 'returns': 'CpuModelExpansionInfo' }
4441 # @CpuModelCompareResult:
4443 # An enumeration of CPU model comparation results. The result is usually
4444 # calculated using e.g. CPU features or CPU generations.
4446 # @incompatible: If model A is incompatible to model B, model A is not
4447 # guaranteed to run where model B runs and the other way around.
4449 # @identical: If model A is identical to model B, model A is guaranteed to run
4450 # where model B runs and the other way around.
4452 # @superset: If model A is a superset of model B, model B is guaranteed to run
4453 # where model A runs. There are no guarantees about the other way.
4455 # @subset: If model A is a subset of model B, model A is guaranteed to run
4456 # where model B runs. There are no guarantees about the other way.
4460 { 'enum': 'CpuModelCompareResult',
4461 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
4464 # @CpuModelCompareInfo:
4466 # The result of a CPU model comparison.
4468 # @result: The result of the compare operation.
4469 # @responsible-properties: List of properties that led to the comparison result
4470 # not being identical.
4472 # @responsible-properties is a list of QOM property names that led to
4473 # both CPUs not being detected as identical. For identical models, this
4475 # If a QOM property is read-only, that means there's no known way to make the
4476 # CPU models identical. If the special property name "type" is included, the
4477 # models are by definition not identical and cannot be made identical.
4481 { 'struct': 'CpuModelCompareInfo',
4482 'data': {'result': 'CpuModelCompareResult',
4483 'responsible-properties': ['str']
4488 # @query-cpu-model-comparison:
4490 # Compares two CPU models, returning how they compare in a specific
4491 # configuration. The results indicates how both models compare regarding
4492 # runnability. This result can be used by tooling to make decisions if a
4493 # certain CPU model will run in a certain configuration or if a compatible
4494 # CPU model has to be created by baselining.
4496 # Usually, a CPU model is compared against the maximum possible CPU model
4497 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
4498 # model is identical or a subset, it will run in that configuration.
4500 # The result returned by this command may be affected by:
4502 # * QEMU version: CPU models may look different depending on the QEMU version.
4503 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4504 # * machine-type: CPU model may look different depending on the machine-type.
4505 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4506 # * machine options (including accelerator): in some architectures, CPU models
4507 # may look different depending on machine and accelerator options. (Except for
4508 # CPU models reported as "static" in query-cpu-definitions.)
4509 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4510 # global properties may affect expansion of CPU models. Using
4511 # query-cpu-model-expansion while using these is not advised.
4513 # Some architectures may not support comparing CPU models. s390x supports
4514 # comparing CPU models.
4516 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
4517 # not supported, if a model cannot be used, if a model contains
4518 # an unknown cpu definition name, unknown properties or properties
4523 { 'command': 'query-cpu-model-comparison',
4524 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
4525 'returns': 'CpuModelCompareInfo' }
4528 # @CpuModelBaselineInfo:
4530 # The result of a CPU model baseline.
4532 # @model: the baselined CpuModelInfo.
4536 { 'struct': 'CpuModelBaselineInfo',
4537 'data': { 'model': 'CpuModelInfo' } }
4540 # @query-cpu-model-baseline:
4542 # Baseline two CPU models, creating a compatible third model. The created
4543 # model will always be a static, migration-safe CPU model (see "static"
4544 # CPU model expansion for details).
4546 # This interface can be used by tooling to create a compatible CPU model out
4547 # two CPU models. The created CPU model will be identical to or a subset of
4548 # both CPU models when comparing them. Therefore, the created CPU model is
4549 # guaranteed to run where the given CPU models run.
4551 # The result returned by this command may be affected by:
4553 # * QEMU version: CPU models may look different depending on the QEMU version.
4554 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4555 # * machine-type: CPU model may look different depending on the machine-type.
4556 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4557 # * machine options (including accelerator): in some architectures, CPU models
4558 # may look different depending on machine and accelerator options. (Except for
4559 # CPU models reported as "static" in query-cpu-definitions.)
4560 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4561 # global properties may affect expansion of CPU models. Using
4562 # query-cpu-model-expansion while using these is not advised.
4564 # Some architectures may not support baselining CPU models. s390x supports
4565 # baselining CPU models.
4567 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
4568 # not supported, if a model cannot be used, if a model contains
4569 # an unknown cpu definition name, unknown properties or properties
4574 { 'command': 'query-cpu-model-baseline',
4575 'data': { 'modela': 'CpuModelInfo',
4576 'modelb': 'CpuModelInfo' },
4577 'returns': 'CpuModelBaselineInfo' }
4582 # Information about a file descriptor that was added to an fd set.
4584 # @fdset-id: The ID of the fd set that @fd was added to.
4586 # @fd: The file descriptor that was received via SCM rights and
4587 # added to the fd set.
4591 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
4596 # Add a file descriptor, that was passed via SCM rights, to an fd set.
4598 # @fdset-id: The ID of the fd set to add the file descriptor to.
4600 # @opaque: A free-form string that can be used to describe the fd.
4602 # Returns: @AddfdInfo on success
4604 # If file descriptor was not received, FdNotSupplied
4606 # If @fdset-id is a negative value, InvalidParameterValue
4608 # Notes: The list of fd sets is shared by all monitor connections.
4610 # If @fdset-id is not specified, a new fd set will be created.
4616 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
4617 # <- { "return": { "fdset-id": 1, "fd": 3 } }
4620 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
4621 'returns': 'AddfdInfo' }
4626 # Remove a file descriptor from an fd set.
4628 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
4630 # @fd: The file descriptor that is to be removed.
4632 # Returns: Nothing on success
4633 # If @fdset-id or @fd is not found, FdNotFound
4637 # Notes: The list of fd sets is shared by all monitor connections.
4639 # If @fd is not specified, all file descriptors in @fdset-id
4644 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
4645 # <- { "return": {} }
4648 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
4653 # Information about a file descriptor that belongs to an fd set.
4655 # @fd: The file descriptor value.
4657 # @opaque: A free-form string that can be used to describe the fd.
4661 { 'struct': 'FdsetFdInfo',
4662 'data': {'fd': 'int', '*opaque': 'str'} }
4667 # Information about an fd set.
4669 # @fdset-id: The ID of the fd set.
4671 # @fds: A list of file descriptors that belong to this fd set.
4675 { 'struct': 'FdsetInfo',
4676 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
4681 # Return information describing all fd sets.
4683 # Returns: A list of @FdsetInfo
4687 # Note: The list of fd sets is shared by all monitor connections.
4691 # -> { "execute": "query-fdsets" }
4697 # "opaque": "rdonly:/path/to/file"
4701 # "opaque": "rdwr:/path/to/file"
4721 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
4726 # Information describing the QEMU target.
4728 # @arch: the target architecture (eg "x86_64", "i386", etc)
4732 { 'struct': 'TargetInfo',
4733 'data': { 'arch': 'str' } }
4738 # Return information about the target for this QEMU
4740 # Returns: TargetInfo
4744 { 'command': 'query-target', 'returns': 'TargetInfo' }
4749 # An enumeration of key name.
4751 # This is used by the @send-key command.
4753 # @unmapped: since 2.0
4756 # @kp_comma: since 2.4
4757 # @kp_equals: since 2.6
4759 # @hiragana: since 2.9
4760 # @henkan: since 2.9
4766 { 'enum': 'QKeyCode',
4767 'data': [ 'unmapped',
4768 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
4769 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
4770 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
4771 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
4772 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
4773 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
4774 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
4775 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
4776 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
4777 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
4778 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
4779 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
4780 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
4781 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
4782 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
4783 'ro', 'hiragana', 'henkan', 'yen',
4784 'kp_comma', 'kp_equals', 'power' ] }
4789 # Represents a keyboard key.
4793 { 'union': 'KeyValue',
4796 'qcode': 'QKeyCode' } }
4801 # Send keys to guest.
4803 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
4804 # simultaneously sent to the guest. A @KeyValue.number value is sent
4805 # directly to the guest, while @KeyValue.qcode must be a valid
4808 # @hold-time: time to delay key up events, milliseconds. Defaults
4811 # Returns: Nothing on success
4812 # If key is unknown or redundant, InvalidParameter
4818 # -> { "execute": "send-key",
4819 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
4820 # { "type": "qcode", "data": "alt" },
4821 # { "type": "qcode", "data": "delete" } ] } }
4822 # <- { "return": {} }
4825 { 'command': 'send-key',
4826 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
4831 # Write a PPM of the VGA screen to a file.
4833 # @filename: the path of a new PPM file to store the image
4835 # Returns: Nothing on success
4841 # -> { "execute": "screendump",
4842 # "arguments": { "filename": "/tmp/image" } }
4843 # <- { "return": {} }
4846 { 'command': 'screendump', 'data': {'filename': 'str'} }
4852 # Configuration shared across all chardev backends
4854 # @logfile: The name of a logfile to save output
4855 # @logappend: true to append instead of truncate
4856 # (default to false to truncate)
4860 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
4861 '*logappend': 'bool' } }
4866 # Configuration info for file chardevs.
4868 # @in: The name of the input file
4869 # @out: The name of the output file
4870 # @append: Open the file in append mode (default false to
4871 # truncate) (Since 2.6)
4875 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
4877 '*append': 'bool' },
4878 'base': 'ChardevCommon' }
4883 # Configuration info for device and pipe chardevs.
4885 # @device: The name of the special file for the device,
4886 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
4890 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
4891 'base': 'ChardevCommon' }
4896 # Configuration info for (stream) socket chardevs.
4898 # @addr: socket address to listen on (server=true)
4899 # or connect to (server=false)
4900 # @tls-creds: the ID of the TLS credentials object (since 2.6)
4901 # @server: create server socket (default: true)
4902 # @wait: wait for incoming connection on server
4903 # sockets (default: false).
4904 # @nodelay: set TCP_NODELAY socket option (default: false)
4905 # @telnet: enable telnet protocol on server
4906 # sockets (default: false)
4907 # @tn3270: enable tn3270 protocol on server
4908 # sockets (default: false) (Since: 2.10)
4909 # @reconnect: For a client socket, if a socket is disconnected,
4910 # then attempt a reconnect after the given number of seconds.
4911 # Setting this to zero disables this function. (default: 0)
4916 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddressLegacy',
4917 '*tls-creds' : 'str',
4920 '*nodelay' : 'bool',
4923 '*reconnect' : 'int' },
4924 'base': 'ChardevCommon' }
4929 # Configuration info for datagram socket chardevs.
4931 # @remote: remote address
4932 # @local: local address
4936 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddressLegacy',
4937 '*local' : 'SocketAddressLegacy' },
4938 'base': 'ChardevCommon' }
4943 # Configuration info for mux chardevs.
4945 # @chardev: name of the base chardev.
4949 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
4950 'base': 'ChardevCommon' }
4955 # Configuration info for stdio chardevs.
4957 # @signal: Allow signals (such as SIGINT triggered by ^C)
4958 # be delivered to qemu. Default: true in -nographic mode,
4963 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
4964 'base': 'ChardevCommon' }
4968 # @ChardevSpiceChannel:
4970 # Configuration info for spice vm channel chardevs.
4972 # @type: kind of channel (for example vdagent).
4976 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
4977 'base': 'ChardevCommon' }
4980 # @ChardevSpicePort:
4982 # Configuration info for spice port chardevs.
4984 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
4988 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
4989 'base': 'ChardevCommon' }
4994 # Configuration info for virtual console chardevs.
4996 # @width: console width, in pixels
4997 # @height: console height, in pixels
4998 # @cols: console width, in chars
4999 # @rows: console height, in chars
5003 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
5007 'base': 'ChardevCommon' }
5012 # Configuration info for ring buffer chardevs.
5014 # @size: ring buffer size, must be power of two, default is 65536
5018 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
5019 'base': 'ChardevCommon' }
5024 # Configuration info for the new chardev backend.
5026 # Since: 1.4 (testdev since 2.2, wctablet since 2.9)
5028 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
5029 'serial' : 'ChardevHostdev',
5030 'parallel': 'ChardevHostdev',
5031 'pipe' : 'ChardevHostdev',
5032 'socket' : 'ChardevSocket',
5033 'udp' : 'ChardevUdp',
5034 'pty' : 'ChardevCommon',
5035 'null' : 'ChardevCommon',
5036 'mux' : 'ChardevMux',
5037 'msmouse': 'ChardevCommon',
5038 'wctablet' : 'ChardevCommon',
5039 'braille': 'ChardevCommon',
5040 'testdev': 'ChardevCommon',
5041 'stdio' : 'ChardevStdio',
5042 'console': 'ChardevCommon',
5043 'spicevmc' : 'ChardevSpiceChannel',
5044 'spiceport' : 'ChardevSpicePort',
5046 'ringbuf': 'ChardevRingbuf',
5047 # next one is just for compatibility
5048 'memory' : 'ChardevRingbuf' } }
5053 # Return info about the chardev backend just created.
5055 # @pty: name of the slave pseudoterminal device, present if
5056 # and only if a chardev of type 'pty' was created
5060 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
5065 # Add a character device backend
5067 # @id: the chardev's ID, must be unique
5068 # @backend: backend type and parameters
5070 # Returns: ChardevReturn.
5076 # -> { "execute" : "chardev-add",
5077 # "arguments" : { "id" : "foo",
5078 # "backend" : { "type" : "null", "data" : {} } } }
5079 # <- { "return": {} }
5081 # -> { "execute" : "chardev-add",
5082 # "arguments" : { "id" : "bar",
5083 # "backend" : { "type" : "file",
5084 # "data" : { "out" : "/tmp/bar.log" } } } }
5085 # <- { "return": {} }
5087 # -> { "execute" : "chardev-add",
5088 # "arguments" : { "id" : "baz",
5089 # "backend" : { "type" : "pty", "data" : {} } } }
5090 # <- { "return": { "pty" : "/dev/pty/42" } }
5093 { 'command': 'chardev-add', 'data': {'id' : 'str',
5094 'backend' : 'ChardevBackend' },
5095 'returns': 'ChardevReturn' }
5100 # Remove a character device backend
5102 # @id: the chardev's ID, must exist and not be in use
5104 # Returns: Nothing on success
5110 # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
5111 # <- { "return": {} }
5114 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
5119 # An enumeration of TPM models
5121 # @tpm-tis: TPM TIS model
5125 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
5128 # @query-tpm-models:
5130 # Return a list of supported TPM models
5132 # Returns: a list of TpmModel
5138 # -> { "execute": "query-tpm-models" }
5139 # <- { "return": [ "tpm-tis" ] }
5142 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
5147 # An enumeration of TPM types
5149 # @passthrough: TPM passthrough type
5153 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
5158 # Return a list of supported TPM types
5160 # Returns: a list of TpmType
5166 # -> { "execute": "query-tpm-types" }
5167 # <- { "return": [ "passthrough" ] }
5170 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
5173 # @TPMPassthroughOptions:
5175 # Information about the TPM passthrough type
5177 # @path: string describing the path used for accessing the TPM device
5179 # @cancel-path: string showing the TPM's sysfs cancel file
5180 # for cancellation of TPM commands while they are executing
5184 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
5185 '*cancel-path' : 'str'} }
5190 # A union referencing different TPM backend types' configuration options
5192 # @type: 'passthrough' The configuration options for the TPM passthrough type
5196 { 'union': 'TpmTypeOptions',
5197 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
5202 # Information about the TPM
5204 # @id: The Id of the TPM
5206 # @model: The TPM frontend model
5208 # @options: The TPM (backend) type configuration options
5212 { 'struct': 'TPMInfo',
5213 'data': {'id': 'str',
5214 'model': 'TpmModel',
5215 'options': 'TpmTypeOptions' } }
5220 # Return information about the TPM device
5222 # Returns: @TPMInfo on success
5228 # -> { "execute": "query-tpm" }
5231 # { "model": "tpm-tis",
5233 # { "type": "passthrough",
5235 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
5236 # "path": "/dev/tpm0"
5245 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
5248 # @AcpiTableOptions:
5250 # Specify an ACPI table on the command line to load.
5252 # At most one of @file and @data can be specified. The list of files specified
5253 # by any one of them is loaded and concatenated in order. If both are omitted,
5256 # Other fields / optargs can be used to override fields of the generic ACPI
5257 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
5258 # Description Table Header. If a header field is not overridden, then the
5259 # corresponding value from the concatenated blob is used (in case of @file), or
5260 # it is filled in with a hard-coded value (in case of @data).
5262 # String fields are copied into the matching ACPI member from lowest address
5263 # upwards, and silently truncated / NUL-padded to length.
5265 # @sig: table signature / identifier (4 bytes)
5267 # @rev: table revision number (dependent on signature, 1 byte)
5269 # @oem_id: OEM identifier (6 bytes)
5271 # @oem_table_id: OEM table identifier (8 bytes)
5273 # @oem_rev: OEM-supplied revision number (4 bytes)
5275 # @asl_compiler_id: identifier of the utility that created the table
5278 # @asl_compiler_rev: revision number of the utility that created the
5281 # @file: colon (:) separated list of pathnames to load and
5282 # concatenate as table data. The resultant binary blob is expected to
5283 # have an ACPI table header. At least one file is required. This field
5286 # @data: colon (:) separated list of pathnames to load and
5287 # concatenate as table data. The resultant binary blob must not have an
5288 # ACPI table header. At least one file is required. This field excludes
5293 { 'struct': 'AcpiTableOptions',
5298 '*oem_table_id': 'str',
5299 '*oem_rev': 'uint32',
5300 '*asl_compiler_id': 'str',
5301 '*asl_compiler_rev': 'uint32',
5306 # @CommandLineParameterType:
5308 # Possible types for an option parameter.
5310 # @string: accepts a character string
5312 # @boolean: accepts "on" or "off"
5314 # @number: accepts a number
5316 # @size: accepts a number followed by an optional suffix (K)ilo,
5317 # (M)ega, (G)iga, (T)era
5321 { 'enum': 'CommandLineParameterType',
5322 'data': ['string', 'boolean', 'number', 'size'] }
5325 # @CommandLineParameterInfo:
5327 # Details about a single parameter of a command line option.
5329 # @name: parameter name
5331 # @type: parameter @CommandLineParameterType
5333 # @help: human readable text string, not suitable for parsing.
5335 # @default: default value string (since 2.1)
5339 { 'struct': 'CommandLineParameterInfo',
5340 'data': { 'name': 'str',
5341 'type': 'CommandLineParameterType',
5343 '*default': 'str' } }
5346 # @CommandLineOptionInfo:
5348 # Details about a command line option, including its list of parameter details
5350 # @option: option name
5352 # @parameters: an array of @CommandLineParameterInfo
5356 { 'struct': 'CommandLineOptionInfo',
5357 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
5360 # @query-command-line-options:
5362 # Query command line option schema.
5364 # @option: option name
5366 # Returns: list of @CommandLineOptionInfo for all options (or for the given
5367 # @option). Returns an error if the given @option doesn't exist.
5373 # -> { "execute": "query-command-line-options",
5374 # "arguments": { "option": "option-rom" } }
5379 # "name": "romfile",
5383 # "name": "bootindex",
5387 # "option": "option-rom"
5393 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
5394 'returns': ['CommandLineOptionInfo'] }
5397 # @X86CPURegister32:
5399 # A X86 32-bit register
5403 { 'enum': 'X86CPURegister32',
5404 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
5407 # @X86CPUFeatureWordInfo:
5409 # Information about a X86 CPU feature word
5411 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
5413 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
5416 # @cpuid-register: Output register containing the feature bits
5418 # @features: value of output register, containing the feature bits
5422 { 'struct': 'X86CPUFeatureWordInfo',
5423 'data': { 'cpuid-input-eax': 'int',
5424 '*cpuid-input-ecx': 'int',
5425 'cpuid-register': 'X86CPURegister32',
5426 'features': 'int' } }
5429 # @DummyForceArrays:
5431 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
5435 { 'struct': 'DummyForceArrays',
5436 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
5442 # Packets receiving state
5444 # @normal: filter assigned packets according to the mac-table
5446 # @none: don't receive any assigned packet
5448 # @all: receive all assigned packets
5452 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
5457 # Rx-filter information for a NIC.
5459 # @name: net client name
5461 # @promiscuous: whether promiscuous mode is enabled
5463 # @multicast: multicast receive state
5465 # @unicast: unicast receive state
5467 # @vlan: vlan receive state (Since 2.0)
5469 # @broadcast-allowed: whether to receive broadcast
5471 # @multicast-overflow: multicast table is overflowed or not
5473 # @unicast-overflow: unicast table is overflowed or not
5475 # @main-mac: the main macaddr string
5477 # @vlan-table: a list of active vlan id
5479 # @unicast-table: a list of unicast macaddr string
5481 # @multicast-table: a list of multicast macaddr string
5485 { 'struct': 'RxFilterInfo',
5488 'promiscuous': 'bool',
5489 'multicast': 'RxState',
5490 'unicast': 'RxState',
5492 'broadcast-allowed': 'bool',
5493 'multicast-overflow': 'bool',
5494 'unicast-overflow': 'bool',
5496 'vlan-table': ['int'],
5497 'unicast-table': ['str'],
5498 'multicast-table': ['str'] }}
5503 # Return rx-filter information for all NICs (or for the given NIC).
5505 # @name: net client name
5507 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
5508 # Returns an error if the given @name doesn't exist, or given
5509 # NIC doesn't support rx-filter querying, or given net client
5516 # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
5519 # "promiscuous": true,
5521 # "main-mac": "52:54:00:12:34:56",
5522 # "unicast": "normal",
5528 # "unicast-table": [
5530 # "multicast": "normal",
5531 # "multicast-overflow": false,
5532 # "unicast-overflow": false,
5533 # "multicast-table": [
5534 # "01:00:5e:00:00:01",
5535 # "33:33:00:00:00:01",
5536 # "33:33:ff:12:34:56"
5538 # "broadcast-allowed": false
5544 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
5545 'returns': ['RxFilterInfo'] }
5550 # Button of a pointer input device (mouse, tablet).
5552 # @side: front side button of a 5-button mouse (since 2.9)
5554 # @extra: rear side button of a 5-button mouse (since 2.9)
5558 { 'enum' : 'InputButton',
5559 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
5565 # Position axis of a pointer input device (mouse, tablet).
5569 { 'enum' : 'InputAxis',
5570 'data' : [ 'x', 'y' ] }
5575 # Keyboard input event.
5577 # @key: Which key this event is for.
5578 # @down: True for key-down and false for key-up events.
5582 { 'struct' : 'InputKeyEvent',
5583 'data' : { 'key' : 'KeyValue',
5589 # Pointer button input event.
5591 # @button: Which button this event is for.
5592 # @down: True for key-down and false for key-up events.
5596 { 'struct' : 'InputBtnEvent',
5597 'data' : { 'button' : 'InputButton',
5603 # Pointer motion input event.
5605 # @axis: Which axis is referenced by @value.
5606 # @value: Pointer position. For absolute coordinates the
5607 # valid range is 0 -> 0x7ffff
5611 { 'struct' : 'InputMoveEvent',
5612 'data' : { 'axis' : 'InputAxis',
5618 # Input event union.
5620 # @type: the input type, one of:
5621 # - 'key': Input event of Keyboard
5622 # - 'btn': Input event of pointer buttons
5623 # - 'rel': Input event of relative pointer motion
5624 # - 'abs': Input event of absolute pointer motion
5628 { 'union' : 'InputEvent',
5629 'data' : { 'key' : 'InputKeyEvent',
5630 'btn' : 'InputBtnEvent',
5631 'rel' : 'InputMoveEvent',
5632 'abs' : 'InputMoveEvent' } }
5635 # @input-send-event:
5637 # Send input event(s) to guest.
5639 # @device: display device to send event(s) to.
5640 # @head: head to send event(s) to, in case the
5641 # display device supports multiple scanouts.
5642 # @events: List of InputEvent union.
5644 # Returns: Nothing on success.
5646 # The @device and @head parameters can be used to send the input event
5647 # to specific input devices in case (a) multiple input devices of the
5648 # same kind are added to the virtual machine and (b) you have
5649 # configured input routing (see docs/multiseat.txt) for those input
5650 # devices. The parameters work exactly like the device and head
5651 # properties of input devices. If @device is missing, only devices
5652 # that have no input routing config are admissible. If @device is
5653 # specified, both input devices with and without input routing config
5654 # are admissible, but devices with input routing config take
5659 # Note: The consoles are visible in the qom tree, under
5660 # /backend/console[$index]. They have a device link and head property,
5661 # so it is possible to map which console belongs to which device and
5666 # 1. Press left mouse button.
5668 # -> { "execute": "input-send-event",
5669 # "arguments": { "device": "video0",
5670 # "events": [ { "type": "btn",
5671 # "data" : { "down": true, "button": "left" } } ] } }
5672 # <- { "return": {} }
5674 # -> { "execute": "input-send-event",
5675 # "arguments": { "device": "video0",
5676 # "events": [ { "type": "btn",
5677 # "data" : { "down": false, "button": "left" } } ] } }
5678 # <- { "return": {} }
5680 # 2. Press ctrl-alt-del.
5682 # -> { "execute": "input-send-event",
5683 # "arguments": { "events": [
5684 # { "type": "key", "data" : { "down": true,
5685 # "key": {"type": "qcode", "data": "ctrl" } } },
5686 # { "type": "key", "data" : { "down": true,
5687 # "key": {"type": "qcode", "data": "alt" } } },
5688 # { "type": "key", "data" : { "down": true,
5689 # "key": {"type": "qcode", "data": "delete" } } } ] } }
5690 # <- { "return": {} }
5692 # 3. Move mouse pointer to absolute coordinates (20000, 400).
5694 # -> { "execute": "input-send-event" ,
5695 # "arguments": { "events": [
5696 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
5697 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
5698 # <- { "return": {} }
5701 { 'command': 'input-send-event',
5702 'data': { '*device': 'str',
5704 'events' : [ 'InputEvent' ] } }
5709 # @node: NUMA nodes configuration
5711 # @dist: NUMA distance configuration (since 2.10)
5713 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
5717 { 'enum': 'NumaOptionsType',
5718 'data': [ 'node', 'dist', 'cpu' ] }
5723 # A discriminated record of NUMA options. (for OptsVisitor)
5727 { 'union': 'NumaOptions',
5728 'base': { 'type': 'NumaOptionsType' },
5729 'discriminator': 'type',
5731 'node': 'NumaNodeOptions',
5732 'dist': 'NumaDistOptions',
5733 'cpu': 'NumaCpuOptions' }}
5738 # Create a guest NUMA node. (for OptsVisitor)
5740 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
5742 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
5745 # @mem: memory size of this node; mutually exclusive with @memdev.
5746 # Equally divide total memory among nodes if both @mem and @memdev are
5749 # @memdev: memory backend object. If specified for one node,
5750 # it must be specified for all nodes.
5754 { 'struct': 'NumaNodeOptions',
5756 '*nodeid': 'uint16',
5757 '*cpus': ['uint16'],
5764 # Set the distance between 2 NUMA nodes.
5766 # @src: source NUMA node.
5768 # @dst: destination NUMA node.
5770 # @val: NUMA distance from source node to destination node.
5771 # When a node is unreachable from another node, set the distance
5772 # between them to 255.
5776 { 'struct': 'NumaDistOptions',
5785 # Option "-numa cpu" overrides default cpu to node mapping.
5786 # It accepts the same set of cpu properties as returned by
5787 # query-hotpluggable-cpus[].props, where node-id could be used to
5788 # override default node mapping.
5792 { 'struct': 'NumaCpuOptions',
5793 'base': 'CpuInstanceProperties',
5799 # Host memory policy types
5801 # @default: restore default policy, remove any nondefault policy
5803 # @preferred: set the preferred host nodes for allocation
5805 # @bind: a strict policy that restricts memory allocation to the
5806 # host nodes specified
5808 # @interleave: memory allocations are interleaved across the set
5809 # of host nodes specified
5813 { 'enum': 'HostMemPolicy',
5814 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
5819 # Information about memory backend
5821 # @id: backend's ID if backend has 'id' property (since 2.9)
5823 # @size: memory backend size
5825 # @merge: enables or disables memory merge support
5827 # @dump: includes memory backend's memory in a core dump or not
5829 # @prealloc: enables or disables memory preallocation
5831 # @host-nodes: host nodes for its memory policy
5833 # @policy: memory policy of memory backend
5837 { 'struct': 'Memdev',
5844 'host-nodes': ['uint16'],
5845 'policy': 'HostMemPolicy' }}
5850 # Returns information for all memory backends.
5852 # Returns: a list of @Memdev.
5858 # -> { "execute": "query-memdev" }
5862 # "size": 536870912,
5865 # "prealloc": false,
5866 # "host-nodes": [0, 1],
5870 # "size": 536870912,
5874 # "host-nodes": [2, 3],
5875 # "policy": "preferred"
5881 { 'command': 'query-memdev', 'returns': ['Memdev'] }
5884 # @PCDIMMDeviceInfo:
5886 # PCDIMMDevice state information
5890 # @addr: physical address, where device is mapped
5892 # @size: size of memory that the device provides
5894 # @slot: slot number at which device is plugged in
5896 # @node: NUMA node number where device is plugged in
5898 # @memdev: memory backend linked with device
5900 # @hotplugged: true if device was hotplugged
5902 # @hotpluggable: true if device if could be added/removed while machine is running
5906 { 'struct': 'PCDIMMDeviceInfo',
5907 'data': { '*id': 'str',
5913 'hotplugged': 'bool',
5914 'hotpluggable': 'bool'
5919 # @MemoryDeviceInfo:
5921 # Union containing information about a memory device
5925 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
5928 # @query-memory-devices:
5930 # Lists available memory devices and their state
5936 # -> { "execute": "query-memory-devices" }
5937 # <- { "return": [ { "data":
5938 # { "addr": 5368709120,
5939 # "hotpluggable": true,
5940 # "hotplugged": true,
5942 # "memdev": "/objects/memX",
5944 # "size": 1073741824,
5950 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
5955 # @DIMM: memory slot
5956 # @CPU: logical CPU slot (since 2.7)
5958 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
5963 # OSPM Status Indication for a device
5964 # For description of possible values of @source and @status fields
5965 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
5967 # @device: device ID associated with slot
5969 # @slot: slot ID, unique per slot of a given @slot-type
5971 # @slot-type: type of the slot
5973 # @source: an integer containing the source event
5975 # @status: an integer containing the status code
5979 { 'struct': 'ACPIOSTInfo',
5980 'data' : { '*device': 'str',
5982 'slot-type': 'ACPISlotType',
5987 # @query-acpi-ospm-status:
5989 # Return a list of ACPIOSTInfo for devices that support status
5990 # reporting via ACPI _OST method.
5996 # -> { "execute": "query-acpi-ospm-status" }
5997 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
5998 # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
5999 # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
6000 # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
6004 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
6007 # @WatchdogExpirationAction:
6009 # An enumeration of the actions taken when the watchdog device's timer is
6012 # @reset: system resets
6014 # @shutdown: system shutdown, note that it is similar to @powerdown, which
6015 # tries to set to system status and notify guest
6017 # @poweroff: system poweroff, the emulator program exits
6019 # @pause: system pauses, similar to @stop
6021 # @debug: system enters debug state
6023 # @none: nothing is done
6025 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
6026 # VCPUS on x86) (since 2.4)
6030 { 'enum': 'WatchdogExpirationAction',
6031 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
6037 # An enumeration of the I/O operation types
6039 # @read: read operation
6041 # @write: write operation
6045 { 'enum': 'IoOperationType',
6046 'data': [ 'read', 'write' ] }
6049 # @GuestPanicAction:
6051 # An enumeration of the actions taken when guest OS panic is detected
6053 # @pause: system pauses
6055 # Since: 2.1 (poweroff since 2.8)
6057 { 'enum': 'GuestPanicAction',
6058 'data': [ 'pause', 'poweroff' ] }
6061 # @GuestPanicInformationType:
6063 # An enumeration of the guest panic information types
6067 { 'enum': 'GuestPanicInformationType',
6068 'data': [ 'hyper-v'] }
6071 # @GuestPanicInformation:
6073 # Information about a guest panic
6077 {'union': 'GuestPanicInformation',
6078 'base': {'type': 'GuestPanicInformationType'},
6079 'discriminator': 'type',
6080 'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }
6083 # @GuestPanicInformationHyperV:
6085 # Hyper-V specific guest panic information (HV crash MSRs)
6089 {'struct': 'GuestPanicInformationHyperV',
6090 'data': { 'arg1': 'uint64',
6094 'arg5': 'uint64' } }
6097 # @rtc-reset-reinjection:
6099 # This command will reset the RTC interrupt reinjection backlog.
6100 # Can be used if another mechanism to synchronize guest time
6101 # is in effect, for example QEMU guest agent's guest-set-time
6108 # -> { "execute": "rtc-reset-reinjection" }
6109 # <- { "return": {} }
6112 { 'command': 'rtc-reset-reinjection' }
6114 # Rocker ethernet network switch
6115 { 'include': 'qapi/rocker.json' }
6120 # Mode of the replay subsystem.
6122 # @none: normal execution mode. Replay or record are not enabled.
6124 # @record: record mode. All non-deterministic data is written into the
6127 # @play: replay mode. Non-deterministic data required for system execution
6128 # is read from the log.
6132 { 'enum': 'ReplayMode',
6133 'data': [ 'none', 'record', 'play' ] }
6136 # @xen-load-devices-state:
6138 # Load the state of all devices from file. The RAM and the block devices
6139 # of the VM are not loaded by this command.
6141 # @filename: the file to load the state of the devices from as binary
6142 # data. See xen-save-devices-state.txt for a description of the binary
6149 # -> { "execute": "xen-load-devices-state",
6150 # "arguments": { "filename": "/tmp/resume" } }
6151 # <- { "return": {} }
6154 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
6157 # @xen-set-replication:
6159 # Enable or disable replication.
6161 # @enable: true to enable, false to disable.
6163 # @primary: true for primary or false for secondary.
6165 # @failover: true to do failover, false to stop. but cannot be
6166 # specified if 'enable' is true. default value is false.
6172 # -> { "execute": "xen-set-replication",
6173 # "arguments": {"enable": true, "primary": false} }
6174 # <- { "return": {} }
6178 { 'command': 'xen-set-replication',
6179 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
6182 # @ReplicationStatus:
6184 # The result format for 'query-xen-replication-status'.
6186 # @error: true if an error happened, false if replication is normal.
6188 # @desc: the human readable error description string, when
6193 { 'struct': 'ReplicationStatus',
6194 'data': { 'error': 'bool', '*desc': 'str' } }
6197 # @query-xen-replication-status:
6199 # Query replication status while the vm is running.
6201 # Returns: A @ReplicationResult object showing the status.
6205 # -> { "execute": "query-xen-replication-status" }
6206 # <- { "return": { "error": false } }
6210 { 'command': 'query-xen-replication-status',
6211 'returns': 'ReplicationStatus' }
6214 # @xen-colo-do-checkpoint:
6216 # Xen uses this command to notify replication to trigger a checkpoint.
6222 # -> { "execute": "xen-colo-do-checkpoint" }
6223 # <- { "return": {} }
6227 { 'command': 'xen-colo-do-checkpoint' }
6232 # The struct describes capability for a specific GIC (Generic
6233 # Interrupt Controller) version. These bits are not only decided by
6234 # QEMU/KVM software version, but also decided by the hardware that
6235 # the program is running upon.
6237 # @version: version of GIC to be described. Currently, only 2 and 3
6240 # @emulated: whether current QEMU/hardware supports emulated GIC
6241 # device in user space.
6243 # @kernel: whether current QEMU/hardware supports hardware
6244 # accelerated GIC device in kernel.
6248 { 'struct': 'GICCapability',
6249 'data': { 'version': 'int',
6251 'kernel': 'bool' } }
6254 # @query-gic-capabilities:
6256 # This command is ARM-only. It will return a list of GICCapability
6257 # objects that describe its capability bits.
6259 # Returns: a list of GICCapability objects.
6265 # -> { "execute": "query-gic-capabilities" }
6266 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
6267 # { "version": 3, "emulated": false, "kernel": true } ] }
6270 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
6273 # @CpuInstanceProperties:
6275 # List of properties to be used for hotplugging a CPU instance,
6276 # it should be passed by management with device_add command when
6277 # a CPU is being hotplugged.
6279 # @node-id: NUMA node ID the CPU belongs to
6280 # @socket-id: socket number within node/board the CPU belongs to
6281 # @core-id: core number within socket the CPU belongs to
6282 # @thread-id: thread number within core the CPU belongs to
6284 # Note: currently there are 4 properties that could be present
6285 # but management should be prepared to pass through other
6286 # properties with device_add command to allow for future
6287 # interface extension. This also requires the filed names to be kept in
6288 # sync with the properties passed to -device/device_add.
6292 { 'struct': 'CpuInstanceProperties',
6293 'data': { '*node-id': 'int',
6294 '*socket-id': 'int',
6303 # @type: CPU object type for usage with device_add command
6304 # @props: list of properties to be used for hotplugging CPU
6305 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
6306 # @qom-path: link to existing CPU object if CPU is present or
6307 # omitted if CPU is not present.
6311 { 'struct': 'HotpluggableCPU',
6312 'data': { 'type': 'str',
6313 'vcpus-count': 'int',
6314 'props': 'CpuInstanceProperties',
6320 # @query-hotpluggable-cpus:
6322 # Returns: a list of HotpluggableCPU objects.
6328 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
6330 # -> { "execute": "query-hotpluggable-cpus" }
6332 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
6333 # "vcpus-count": 1 },
6334 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
6335 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
6338 # For pc machine type started with -smp 1,maxcpus=2:
6340 # -> { "execute": "query-hotpluggable-cpus" }
6343 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6344 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
6347 # "qom-path": "/machine/unattached/device[0]",
6348 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6349 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
6354 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
6361 # @guid: the globally unique identifier
6365 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
6368 # @query-vm-generation-id:
6370 # Show Virtual Machine Generation ID
6374 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }