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 # QAPI common definitions
55 { 'include': 'qapi/common.json' }
57 # QAPI crypto definitions
58 { 'include': 'qapi/crypto.json' }
60 # QAPI block definitions
61 { 'include': 'qapi/block.json' }
63 # QAPI event definitions
64 { 'include': 'qapi/event.json' }
67 { 'include': 'qapi/trace.json' }
70 { 'include': 'qapi/introspect.json' }
79 # Enable QMP capabilities.
85 # -> { "execute": "qmp_capabilities" }
88 # Notes: This command is valid exactly when first connecting: it must be
89 # issued before any other command will be accepted, and will fail once the
90 # monitor is accepting other commands. (see qemu docs/qmp-spec.txt)
95 { 'command': 'qmp_capabilities' }
100 # Policy for handling lost ticks in timer devices.
102 # @discard: throw away the missed tick(s) and continue with future injection
103 # normally. Guest time may be delayed, unless the OS has explicit
104 # handling of lost ticks
106 # @delay: continue to deliver ticks at the normal rate. Guest time will be
107 # delayed due to the late tick
109 # @merge: merge the missed tick(s) into one tick and inject. Guest time
110 # may be delayed, depending on how the OS reacts to the merging
113 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
114 # guest time should not be delayed once catchup is complete.
118 { 'enum': 'LostTickPolicy',
119 'data': ['discard', 'delay', 'merge', 'slew' ] }
124 # Allow client connections for VNC, Spice and socket based
125 # character devices to be passed in to QEMU via SCM_RIGHTS.
127 # @protocol: protocol name. Valid names are "vnc", "spice" or the
128 # name of a character device (eg. from -chardev id=XXXX)
130 # @fdname: file descriptor name previously passed via 'getfd' command
132 # @skipauth: #optional whether to skip authentication. Only applies
133 # to "vnc" and "spice" protocols
135 # @tls: #optional whether to perform TLS. Only applies to the "spice"
138 # Returns: nothing on success.
144 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
145 # "fdname": "myclient" } }
146 # <- { "return": {} }
149 { 'command': 'add_client',
150 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
156 # Guest name information.
158 # @name: #optional The name of the guest
162 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
167 # Return the name information of a guest.
169 # Returns: @NameInfo of the guest
175 # -> { "execute": "query-name" }
176 # <- { "return": { "name": "qemu-name" } }
179 { 'command': 'query-name', 'returns': 'NameInfo' }
184 # Information about support for KVM acceleration
186 # @enabled: true if KVM acceleration is active
188 # @present: true if KVM acceleration is built into this executable
192 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
197 # Returns information about KVM acceleration
205 # -> { "execute": "query-kvm" }
206 # <- { "return": { "enabled": true, "present": true } }
209 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
214 # An enumeration of VM run states.
216 # @debug: QEMU is running on a debugger
218 # @finish-migrate: guest is paused to finish the migration process
220 # @inmigrate: guest is paused waiting for an incoming migration. Note
221 # that this state does not tell whether the machine will start at the
222 # end of the migration. This depends on the command-line -S option and
223 # any invocation of 'stop' or 'cont' that has happened since QEMU was
226 # @internal-error: An internal error that prevents further guest execution
229 # @io-error: the last IOP has failed and the device is configured to pause
232 # @paused: guest has been paused via the 'stop' command
234 # @postmigrate: guest is paused following a successful 'migrate'
236 # @prelaunch: QEMU was started with -S and guest has not started
238 # @restore-vm: guest is paused to restore VM state
240 # @running: guest is actively running
242 # @save-vm: guest is paused to save the VM state
244 # @shutdown: guest is shut down (and -no-shutdown is in use)
246 # @suspended: guest is suspended (ACPI S3)
248 # @watchdog: the watchdog action is configured to pause and has been triggered
250 # @guest-panicked: guest has been panicked as a result of guest OS panic
252 # @colo: guest is paused to save/restore VM state under colo checkpoint,
253 # VM can not get into this state unless colo capability is enabled
254 # for migration. (since 2.8)
256 { 'enum': 'RunState',
257 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
258 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
259 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
260 'guest-panicked', 'colo' ] }
265 # Information about VCPU run state
267 # @running: true if all VCPUs are runnable, false if not runnable
269 # @singlestep: true if VCPUs are in single-step mode
271 # @status: the virtual machine @RunState
275 # Notes: @singlestep is enabled through the GDB stub
277 { 'struct': 'StatusInfo',
278 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
283 # Query the run status of all VCPUs
285 # Returns: @StatusInfo reflecting all VCPUs
291 # -> { "execute": "query-status" }
292 # <- { "return": { "running": true,
293 # "singlestep": false,
294 # "status": "running" } }
297 { 'command': 'query-status', 'returns': 'StatusInfo' }
302 # Guest UUID information (Universally Unique Identifier).
304 # @UUID: the UUID of the guest
308 # Notes: If no UUID was specified for the guest, a null UUID is returned.
310 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
315 # Query the guest UUID information.
317 # Returns: The @UuidInfo for the guest
323 # -> { "execute": "query-uuid" }
324 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
327 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
332 # Information about a character device.
334 # @label: the label of the character device
336 # @filename: the filename of the character device
338 # @frontend-open: shows whether the frontend device attached to this backend
339 # (eg. with the chardev=... option) is in open or closed state
342 # Notes: @filename is encoded using the QEMU command line character device
343 # encoding. See the QEMU man page for details.
347 { 'struct': 'ChardevInfo', 'data': {'label': 'str',
349 'frontend-open': 'bool'} }
354 # Returns information about current character devices.
356 # Returns: a list of @ChardevInfo
362 # -> { "execute": "query-chardev" }
366 # "label": "charchannel0",
367 # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
368 # "frontend-open": false
371 # "label": "charmonitor",
372 # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
373 # "frontend-open": true
376 # "label": "charserial0",
377 # "filename": "pty:/dev/pts/2",
378 # "frontend-open": true
384 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
387 # @ChardevBackendInfo:
389 # Information about a character device backend
391 # @name: The backend name
395 { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
398 # @query-chardev-backends:
400 # Returns information about character device backends.
402 # Returns: a list of @ChardevBackendInfo
408 # -> { "execute": "query-chardev-backends" }
427 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
432 # An enumeration of data format.
434 # @utf8: Data is a UTF-8 string (RFC 3629)
436 # @base64: Data is Base64 encoded binary (RFC 3548)
440 { 'enum': 'DataFormat',
441 'data': [ 'utf8', 'base64' ] }
446 # Write to a ring buffer character device.
448 # @device: the ring buffer character device name
450 # @data: data to write
452 # @format: #optional data encoding (default 'utf8').
453 # - base64: data must be base64 encoded text. Its binary
454 # decoding gets written.
455 # - utf8: data's UTF-8 encoding is written
456 # - data itself is always Unicode regardless of format, like
459 # Returns: Nothing on success
465 # -> { "execute": "ringbuf-write",
466 # "arguments": { "device": "foo",
467 # "data": "abcdefgh",
468 # "format": "utf8" } }
469 # <- { "return": {} }
472 { 'command': 'ringbuf-write',
473 'data': {'device': 'str', 'data': 'str',
474 '*format': 'DataFormat'} }
479 # Read from a ring buffer character device.
481 # @device: the ring buffer character device name
483 # @size: how many bytes to read at most
485 # @format: #optional data encoding (default 'utf8').
486 # - base64: the data read is returned in base64 encoding.
487 # - utf8: the data read is interpreted as UTF-8.
488 # Bug: can screw up when the buffer contains invalid UTF-8
489 # sequences, NUL characters, after the ring buffer lost
490 # data, and when reading stops because the size limit is
492 # - The return value is always Unicode regardless of format,
493 # like any other string.
495 # Returns: data read from the device
501 # -> { "execute": "ringbuf-read",
502 # "arguments": { "device": "foo",
504 # "format": "utf8" } }
505 # <- { "return": "abcdefgh" }
508 { 'command': 'ringbuf-read',
509 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
515 # Information about a QMP event
517 # @name: The event name
521 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
526 # Return a list of supported QMP events by this server
528 # Returns: A list of @EventInfo for all supported events
534 # -> { "execute": "query-events" }
546 # Note: This example has been shortened as the real response is too long.
549 { 'command': 'query-events', 'returns': ['EventInfo'] }
554 # Detailed migration status.
556 # @transferred: amount of bytes already transferred to the target VM
558 # @remaining: amount of bytes remaining to be transferred to the target VM
560 # @total: total amount of bytes involved in the migration process
562 # @duplicate: number of duplicate (zero) pages (since 1.2)
564 # @skipped: number of skipped zero pages (since 1.5)
566 # @normal: number of normal pages (since 1.2)
568 # @normal-bytes: number of normal bytes sent (since 1.2)
570 # @dirty-pages-rate: number of pages dirtied by second by the
573 # @mbps: throughput in megabits/sec. (since 1.6)
575 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
577 # @postcopy-requests: The number of page requests received from the destination
582 { 'struct': 'MigrationStats',
583 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
584 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
585 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
586 'mbps' : 'number', 'dirty-sync-count' : 'int',
587 'postcopy-requests' : 'int' } }
592 # Detailed XBZRLE migration cache statistics
594 # @cache-size: XBZRLE cache size
596 # @bytes: amount of bytes already transferred to the target VM
598 # @pages: amount of pages transferred to the target VM
600 # @cache-miss: number of cache miss
602 # @cache-miss-rate: rate of cache miss (since 2.1)
604 # @overflow: number of overflows
608 { 'struct': 'XBZRLECacheStats',
609 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
610 'cache-miss': 'int', 'cache-miss-rate': 'number',
611 'overflow': 'int' } }
616 # An enumeration of migration status.
618 # @none: no migration has ever happened.
620 # @setup: migration process has been initiated.
622 # @cancelling: in the process of cancelling migration.
624 # @cancelled: cancelling migration is finished.
626 # @active: in the process of doing migration.
628 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
630 # @completed: migration is finished.
632 # @failed: some error occurred during migration process.
634 # @colo: VM is in the process of fault tolerance, VM can not get into this
635 # state unless colo capability is enabled for migration. (since 2.8)
640 { 'enum': 'MigrationStatus',
641 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
642 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
647 # Information about current migration process.
649 # @status: #optional @MigrationStatus describing the current migration status.
650 # If this field is not returned, no migration process
653 # @ram: #optional @MigrationStats containing detailed migration
654 # status, only returned if status is 'active' or
655 # 'completed'(since 1.2)
657 # @disk: #optional @MigrationStats containing detailed disk migration
658 # status, only returned if status is 'active' and it is a block
661 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
662 # migration statistics, only returned if XBZRLE feature is on and
663 # status is 'active' or 'completed' (since 1.2)
665 # @total-time: #optional total amount of milliseconds since migration started.
666 # If migration has ended, it returns the total migration
669 # @downtime: #optional only present when migration finishes correctly
670 # total downtime in milliseconds for the guest.
673 # @expected-downtime: #optional only present while migration is active
674 # expected downtime in milliseconds for the guest in last walk
675 # of the dirty bitmap. (since 1.3)
677 # @setup-time: #optional amount of setup time in milliseconds _before_ the
678 # iterations begin but _after_ the QMP command is issued. This is designed
679 # to provide an accounting of any activities (such as RDMA pinning) which
680 # may be expensive, but do not actually occur during the iterative
681 # migration rounds themselves. (since 1.6)
683 # @cpu-throttle-percentage: #optional percentage of time guest cpus are being
684 # throttled during auto-converge. This is only present when auto-converge
685 # has started throttling guest cpus. (Since 2.7)
687 # @error-desc: #optional the human readable error description string, when
688 # @status is 'failed'. Clients should not attempt to parse the
689 # error strings. (Since 2.7)
693 { 'struct': 'MigrationInfo',
694 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
695 '*disk': 'MigrationStats',
696 '*xbzrle-cache': 'XBZRLECacheStats',
697 '*total-time': 'int',
698 '*expected-downtime': 'int',
700 '*setup-time': 'int',
701 '*cpu-throttle-percentage': 'int',
702 '*error-desc': 'str'} }
707 # Returns information about current migration process. If migration
708 # is active there will be another json-object with RAM migration
709 # status and if block migration is active another one with block
712 # Returns: @MigrationInfo
718 # 1. Before the first migration
720 # -> { "execute": "query-migrate" }
721 # <- { "return": {} }
723 # 2. Migration is done and has succeeded
725 # -> { "execute": "query-migrate" }
727 # "status": "completed",
732 # "total-time":12345,
733 # "setup-time":12345,
737 # "normal-bytes":123456,
738 # "dirty-sync-count":15
743 # 3. Migration is done and has failed
745 # -> { "execute": "query-migrate" }
746 # <- { "return": { "status": "failed" } }
748 # 4. Migration is being performed and is not a block migration:
750 # -> { "execute": "query-migrate" }
758 # "total-time":12345,
759 # "setup-time":12345,
760 # "expected-downtime":12345,
763 # "normal-bytes":123456,
764 # "dirty-sync-count":15
769 # 5. Migration is being performed and is a block migration:
771 # -> { "execute": "query-migrate" }
777 # "remaining":1053304,
778 # "transferred":3720,
779 # "total-time":12345,
780 # "setup-time":12345,
781 # "expected-downtime":12345,
784 # "normal-bytes":123456,
785 # "dirty-sync-count":15
789 # "remaining":20880384,
790 # "transferred":91136
795 # 6. Migration is being performed and XBZRLE is active:
797 # -> { "execute": "query-migrate" }
801 # "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
804 # "remaining":1053304,
805 # "transferred":3720,
806 # "total-time":12345,
807 # "setup-time":12345,
808 # "expected-downtime":12345,
811 # "normal-bytes":3412992,
812 # "dirty-sync-count":15
815 # "cache-size":67108864,
819 # "cache-miss-rate":0.123,
826 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
829 # @MigrationCapability:
831 # Migration capabilities enumeration
833 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
834 # This feature allows us to minimize migration traffic for certain work
835 # loads, by sending compressed difference of the pages
837 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
838 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
839 # Disabled by default. (since 2.0)
841 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
842 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
843 # source and target VM to support this feature. To enable it is sufficient
844 # to enable the capability on the source VM. The feature is disabled by
845 # default. (since 1.6)
847 # @compress: Use multiple compression threads to accelerate live migration.
848 # This feature can help to reduce the migration traffic, by sending
849 # compressed pages. Please note that if compress and xbzrle are both
850 # on, compress only takes effect in the ram bulk stage, after that,
851 # it will be disabled and only xbzrle takes effect, this can help to
852 # minimize migration traffic. The feature is disabled by default.
855 # @events: generate events for each migration state change
858 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
859 # to speed up convergence of RAM migration. (since 1.6)
861 # @postcopy-ram: Start executing on the migration target before all of RAM has
862 # been migrated, pulling the remaining pages along as needed. NOTE: If
863 # the migration fails during postcopy the VM will fail. (since 2.6)
865 # @x-colo: If enabled, migration will never end, and the state of the VM on the
866 # primary side will be migrated continuously to the VM on secondary
867 # side, this process is called COarse-Grain LOck Stepping (COLO) for
868 # Non-stop Service. (since 2.8)
870 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
871 # during postcopy-ram migration. (since 2.9)
875 { 'enum': 'MigrationCapability',
876 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
877 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram'] }
880 # @MigrationCapabilityStatus:
882 # Migration capability information
884 # @capability: capability enum
886 # @state: capability state bool
890 { 'struct': 'MigrationCapabilityStatus',
891 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
894 # @migrate-set-capabilities:
896 # Enable/Disable the following migration capabilities (like xbzrle)
898 # @capabilities: json array of capability modifications to make
904 # -> { "execute": "migrate-set-capabilities" , "arguments":
905 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
908 { 'command': 'migrate-set-capabilities',
909 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
912 # @query-migrate-capabilities:
914 # Returns information about the current migration capabilities status
916 # Returns: @MigrationCapabilitiesStatus
922 # -> { "execute": "query-migrate-capabilities" }
924 # {"state": false, "capability": "xbzrle"},
925 # {"state": false, "capability": "rdma-pin-all"},
926 # {"state": false, "capability": "auto-converge"},
927 # {"state": false, "capability": "zero-blocks"},
928 # {"state": false, "capability": "compress"},
929 # {"state": true, "capability": "events"},
930 # {"state": false, "capability": "postcopy-ram"},
931 # {"state": false, "capability": "x-colo"}
935 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
938 # @MigrationParameter:
940 # Migration parameters enumeration
942 # @compress-level: Set the compression level to be used in live migration,
943 # the compression level is an integer between 0 and 9, where 0 means
944 # no compression, 1 means the best compression speed, and 9 means best
945 # compression ratio which will consume more CPU.
947 # @compress-threads: Set compression thread count to be used in live migration,
948 # the compression thread count is an integer between 1 and 255.
950 # @decompress-threads: Set decompression thread count to be used in live
951 # migration, the decompression thread count is an integer between 1
952 # and 255. Usually, decompression is at least 4 times as fast as
953 # compression, so set the decompress-threads to the number about 1/4
954 # of compress-threads is adequate.
956 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
957 # when migration auto-converge is activated. The
958 # default value is 20. (Since 2.7)
960 # @cpu-throttle-increment: throttle percentage increase each time
961 # auto-converge detects that migration is not making
962 # progress. The default value is 10. (Since 2.7)
964 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
965 # establishing a TLS connection over the migration data channel.
966 # On the outgoing side of the migration, the credentials must
967 # be for a 'client' endpoint, while for the incoming side the
968 # credentials must be for a 'server' endpoint. Setting this
969 # will enable TLS for all migrations. The default is unset,
970 # resulting in unsecured migration at the QEMU level. (Since 2.7)
972 # @tls-hostname: hostname of the target host for the migration. This is
973 # required when using x509 based TLS credentials and the
974 # migration URI does not already include a hostname. For
975 # example if using fd: or exec: based migration, the
976 # hostname must be provided so that the server's x509
977 # certificate identity can be validated. (Since 2.7)
979 # @max-bandwidth: to set maximum speed for migration. maximum speed in
980 # bytes per second. (Since 2.8)
982 # @downtime-limit: set maximum tolerated downtime for migration. maximum
983 # downtime in milliseconds (Since 2.8)
985 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
986 # periodic mode. (Since 2.8)
990 { 'enum': 'MigrationParameter',
991 'data': ['compress-level', 'compress-threads', 'decompress-threads',
992 'cpu-throttle-initial', 'cpu-throttle-increment',
993 'tls-creds', 'tls-hostname', 'max-bandwidth',
994 'downtime-limit', 'x-checkpoint-delay' ] }
997 # @migrate-set-parameters:
999 # Set various migration parameters. See MigrationParameters for details.
1005 # -> { "execute": "migrate-set-parameters" ,
1006 # "arguments": { "compress-level": 1 } }
1009 { 'command': 'migrate-set-parameters', 'boxed': true,
1010 'data': 'MigrationParameters' }
1013 # @MigrationParameters:
1015 # Optional members can be omitted on input ('migrate-set-parameters')
1016 # but most members will always be present on output
1017 # ('query-migrate-parameters'), with the exception of tls-creds and
1020 # @compress-level: #optional compression level
1022 # @compress-threads: #optional compression thread count
1024 # @decompress-threads: #optional decompression thread count
1026 # @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
1027 # throttledwhen migration auto-converge is activated.
1028 # The default value is 20. (Since 2.7)
1030 # @cpu-throttle-increment: #optional throttle percentage increase each time
1031 # auto-converge detects that migration is not making
1032 # progress. The default value is 10. (Since 2.7)
1034 # @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
1035 # for establishing a TLS connection over the migration data
1036 # channel. On the outgoing side of the migration, the credentials
1037 # must be for a 'client' endpoint, while for the incoming side the
1038 # credentials must be for a 'server' endpoint. Setting this
1039 # will enable TLS for all migrations. The default is unset,
1040 # resulting in unsecured migration at the QEMU level. (Since 2.7)
1042 # @tls-hostname: #optional hostname of the target host for the migration. This
1043 # is required when using x509 based TLS credentials and the
1044 # migration URI does not already include a hostname. For
1045 # example if using fd: or exec: based migration, the
1046 # hostname must be provided so that the server's x509
1047 # certificate identity can be validated. (Since 2.7)
1049 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1050 # bytes per second. (Since 2.8)
1052 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1053 # downtime in milliseconds (Since 2.8)
1055 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1059 { 'struct': 'MigrationParameters',
1060 'data': { '*compress-level': 'int',
1061 '*compress-threads': 'int',
1062 '*decompress-threads': 'int',
1063 '*cpu-throttle-initial': 'int',
1064 '*cpu-throttle-increment': 'int',
1065 '*tls-creds': 'str',
1066 '*tls-hostname': 'str',
1067 '*max-bandwidth': 'int',
1068 '*downtime-limit': 'int',
1069 '*x-checkpoint-delay': 'int'} }
1072 # @query-migrate-parameters:
1074 # Returns information about the current migration parameters
1076 # Returns: @MigrationParameters
1082 # -> { "execute": "query-migrate-parameters" }
1084 # "decompress-threads": 2,
1085 # "cpu-throttle-increment": 10,
1086 # "compress-threads": 8,
1087 # "compress-level": 1,
1088 # "cpu-throttle-initial": 20,
1089 # "max-bandwidth": 33554432,
1090 # "downtime-limit": 300
1095 { 'command': 'query-migrate-parameters',
1096 'returns': 'MigrationParameters' }
1099 # @client_migrate_info:
1101 # Set migration information for remote display. This makes the server
1102 # ask the client to automatically reconnect using the new parameters
1103 # once migration finished successfully. Only implemented for SPICE.
1105 # @protocol: must be "spice"
1106 # @hostname: migration target hostname
1107 # @port: #optional spice tcp port for plaintext channels
1108 # @tls-port: #optional spice tcp port for tls-secured channels
1109 # @cert-subject: #optional server certificate subject
1115 # -> { "execute": "client_migrate_info",
1116 # "arguments": { "protocol": "spice",
1117 # "hostname": "virt42.lab.kraxel.org",
1119 # <- { "return": {} }
1122 { 'command': 'client_migrate_info',
1123 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1124 '*tls-port': 'int', '*cert-subject': 'str' } }
1127 # @migrate-start-postcopy:
1129 # Followup to a migration command to switch the migration to postcopy mode.
1130 # The postcopy-ram capability must be set before the original migration
1137 # -> { "execute": "migrate-start-postcopy" }
1138 # <- { "return": {} }
1141 { 'command': 'migrate-start-postcopy' }
1146 # The message transmission between Primary side and Secondary side.
1148 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1150 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1152 # @checkpoint-reply: SVM gets PVM's checkpoint request
1154 # @vmstate-send: VM's state will be sent by PVM.
1156 # @vmstate-size: The total size of VMstate.
1158 # @vmstate-received: VM's state has been received by SVM.
1160 # @vmstate-loaded: VM's state has been loaded by SVM.
1164 { 'enum': 'COLOMessage',
1165 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1166 'vmstate-send', 'vmstate-size', 'vmstate-received',
1167 'vmstate-loaded' ] }
1174 # @unknown: unknown mode
1176 # @primary: master side
1178 # @secondary: slave side
1182 { 'enum': 'COLOMode',
1183 'data': [ 'unknown', 'primary', 'secondary'] }
1188 # An enumeration of COLO failover status
1190 # @none: no failover has ever happened
1192 # @require: got failover requirement but not handled
1194 # @active: in the process of doing failover
1196 # @completed: finish the process of failover
1198 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1202 { 'enum': 'FailoverStatus',
1203 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1206 # @x-colo-lost-heartbeat:
1208 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1209 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1210 # If sent to the Secondary, the Secondary side will run failover work,
1211 # then takes over server operation to become the service VM.
1217 # -> { "execute": "x-colo-lost-heartbeat" }
1218 # <- { "return": {} }
1221 { 'command': 'x-colo-lost-heartbeat' }
1226 # Information about a mouse device.
1228 # @name: the name of the mouse device
1230 # @index: the index of the mouse device
1232 # @current: true if this device is currently receiving mouse events
1234 # @absolute: true if this device supports absolute coordinates as input
1238 { 'struct': 'MouseInfo',
1239 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
1240 'absolute': 'bool'} }
1245 # Returns information about each active mouse device
1247 # Returns: a list of @MouseInfo for each device
1253 # -> { "execute": "query-mice" }
1256 # "name":"QEMU Microsoft Mouse",
1262 # "name":"QEMU PS/2 Mouse",
1271 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
1276 # An enumeration of cpu types that enable additional information during
1281 { 'enum': 'CpuInfoArch',
1282 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1287 # Information about a virtual CPU
1289 # @CPU: the index of the virtual CPU
1291 # @current: this only exists for backwards compatibility and should be ignored
1293 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
1294 # to a processor specific low power mode.
1296 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1298 # @thread_id: ID of the underlying host thread
1300 # @arch: architecture of the cpu, which determines which additional fields
1301 # will be listed (since 2.6)
1305 # Notes: @halted is a transient state that changes frequently. By the time the
1306 # data is sent to the client, the guest may no longer be halted.
1308 { 'union': 'CpuInfo',
1309 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1310 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
1311 'discriminator': 'arch',
1312 'data': { 'x86': 'CpuInfoX86',
1313 'sparc': 'CpuInfoSPARC',
1314 'ppc': 'CpuInfoPPC',
1315 'mips': 'CpuInfoMIPS',
1316 'tricore': 'CpuInfoTricore',
1317 'other': 'CpuInfoOther' } }
1322 # Additional information about a virtual i386 or x86_64 CPU
1324 # @pc: the 64-bit instruction pointer
1328 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1333 # Additional information about a virtual SPARC CPU
1335 # @pc: the PC component of the instruction pointer
1337 # @npc: the NPC component of the instruction pointer
1341 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1346 # Additional information about a virtual PPC CPU
1348 # @nip: the instruction pointer
1352 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1357 # Additional information about a virtual MIPS CPU
1359 # @PC: the instruction pointer
1363 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1368 # Additional information about a virtual Tricore CPU
1370 # @PC: the instruction pointer
1374 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1379 # No additional information is available about the virtual CPU
1384 { 'struct': 'CpuInfoOther', 'data': { } }
1389 # Returns a list of information about each virtual CPU.
1391 # Returns: a list of @CpuInfo for each virtual CPU
1397 # -> { "execute": "query-cpus" }
1403 # "qom_path":"/machine/unattached/device[0]",
1412 # "qom_path":"/machine/unattached/device[2]",
1421 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1426 # Information about an iothread
1428 # @id: the identifier of the iothread
1430 # @thread-id: ID of the underlying host thread
1432 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
1435 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
1436 # configured (since 2.9)
1438 # @poll-shrink: how many ns will be removed from polling time, 0 means that
1439 # it's not configured (since 2.9)
1443 { 'struct': 'IOThreadInfo',
1444 'data': {'id': 'str',
1446 'poll-max-ns': 'int',
1448 'poll-shrink': 'int' } }
1453 # Returns a list of information about each iothread.
1455 # Note: this list excludes the QEMU main loop thread, which is not declared
1456 # using the -object iothread command-line option. It is always the main thread
1459 # Returns: a list of @IOThreadInfo for each iothread
1465 # -> { "execute": "query-iothreads" }
1479 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1482 # @NetworkAddressFamily:
1484 # The network address family
1486 # @ipv4: IPV4 family
1488 # @ipv6: IPV6 family
1490 # @unix: unix socket
1492 # @vsock: vsock family (since 2.8)
1494 # @unknown: otherwise
1498 { 'enum': 'NetworkAddressFamily',
1499 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1504 # The basic information for vnc network connection
1508 # @service: The service name of the vnc port. This may depend on the host
1509 # system's service database so symbolic names should not be relied
1512 # @family: address family
1514 # @websocket: true in case the socket is a websocket (since 2.3).
1518 { 'struct': 'VncBasicInfo',
1519 'data': { 'host': 'str',
1521 'family': 'NetworkAddressFamily',
1522 'websocket': 'bool' } }
1527 # The network connection information for server
1529 # @auth: #optional authentication method used for
1530 # the plain (non-websocket) VNC server
1534 { 'struct': 'VncServerInfo',
1535 'base': 'VncBasicInfo',
1536 'data': { '*auth': 'str' } }
1541 # Information about a connected VNC client.
1543 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1544 # Name of the client.
1546 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1547 # used for authentication.
1551 { 'struct': 'VncClientInfo',
1552 'base': 'VncBasicInfo',
1553 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1558 # Information about the VNC session.
1560 # @enabled: true if the VNC server is enabled, false otherwise
1562 # @host: #optional The hostname the VNC server is bound to. This depends on
1563 # the name resolution on the host and may be an IP address.
1565 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1566 # 'ipv4' if the host is listening for IPv4 connections
1567 # 'unix' if the host is listening on a unix domain socket
1568 # 'unknown' otherwise
1570 # @service: #optional The service name of the server's port. This may depends
1571 # on the host system's service database so symbolic names should not
1574 # @auth: #optional the current authentication type used by the server
1575 # 'none' if no authentication is being used
1576 # 'vnc' if VNC authentication is being used
1577 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1578 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1579 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1580 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1581 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1582 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1583 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1584 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1585 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1587 # @clients: a list of @VncClientInfo of all currently connected clients
1591 { 'struct': 'VncInfo',
1592 'data': {'enabled': 'bool', '*host': 'str',
1593 '*family': 'NetworkAddressFamily',
1594 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1599 # vnc primary authentication method.
1603 { 'enum': 'VncPrimaryAuth',
1604 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1605 'tls', 'vencrypt', 'sasl' ] }
1608 # @VncVencryptSubAuth:
1610 # vnc sub authentication method with vencrypt.
1614 { 'enum': 'VncVencryptSubAuth',
1616 'tls-none', 'x509-none',
1617 'tls-vnc', 'x509-vnc',
1618 'tls-plain', 'x509-plain',
1619 'tls-sasl', 'x509-sasl' ] }
1625 # The network connection information for server
1627 # @auth: The current authentication type used by the servers
1629 # @vencrypt: #optional The vencrypt sub authentication type used by the
1630 # servers, only specified in case auth == vencrypt.
1634 { 'struct': 'VncServerInfo2',
1635 'base': 'VncBasicInfo',
1636 'data': { 'auth' : 'VncPrimaryAuth',
1637 '*vencrypt' : 'VncVencryptSubAuth' } }
1643 # Information about a vnc server
1645 # @id: vnc server name.
1647 # @server: A list of @VncBasincInfo describing all listening sockets.
1648 # The list can be empty (in case the vnc server is disabled).
1649 # It also may have multiple entries: normal + websocket,
1650 # possibly also ipv4 + ipv6 in the future.
1652 # @clients: A list of @VncClientInfo of all currently connected clients.
1653 # The list can be empty, for obvious reasons.
1655 # @auth: The current authentication type used by the non-websockets servers
1657 # @vencrypt: #optional The vencrypt authentication type used by the servers,
1658 # only specified in case auth == vencrypt.
1660 # @display: #optional The display device the vnc server is linked to.
1664 { 'struct': 'VncInfo2',
1665 'data': { 'id' : 'str',
1666 'server' : ['VncServerInfo2'],
1667 'clients' : ['VncClientInfo'],
1668 'auth' : 'VncPrimaryAuth',
1669 '*vencrypt' : 'VncVencryptSubAuth',
1670 '*display' : 'str' } }
1675 # Returns information about the current VNC server
1683 # -> { "execute": "query-vnc" }
1687 # "service":"50402",
1692 # "host":"127.0.0.1",
1693 # "service":"50401",
1701 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1704 # @query-vnc-servers:
1706 # Returns a list of vnc servers. The list can be empty.
1708 # Returns: a list of @VncInfo2
1712 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1717 # The basic information for SPICE network connection
1721 # @port: port number
1723 # @family: address family
1727 { 'struct': 'SpiceBasicInfo',
1728 'data': { 'host': 'str',
1730 'family': 'NetworkAddressFamily' } }
1735 # Information about a SPICE server
1737 # @auth: #optional authentication method
1741 { 'struct': 'SpiceServerInfo',
1742 'base': 'SpiceBasicInfo',
1743 'data': { '*auth': 'str' } }
1748 # Information about a SPICE client channel.
1750 # @connection-id: SPICE connection id number. All channels with the same id
1751 # belong to the same SPICE session.
1753 # @channel-type: SPICE channel type number. "1" is the main control
1754 # channel, filter for this one if you want to track spice
1757 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1758 # multiple channels of the same type exist, such as multiple
1759 # display channels in a multihead setup
1761 # @tls: true if the channel is encrypted, false otherwise.
1765 { 'struct': 'SpiceChannel',
1766 'base': 'SpiceBasicInfo',
1767 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1771 # @SpiceQueryMouseMode:
1773 # An enumeration of Spice mouse states.
1775 # @client: Mouse cursor position is determined by the client.
1777 # @server: Mouse cursor position is determined by the server.
1779 # @unknown: No information is available about mouse mode used by
1782 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1786 { 'enum': 'SpiceQueryMouseMode',
1787 'data': [ 'client', 'server', 'unknown' ] }
1792 # Information about the SPICE session.
1794 # @enabled: true if the SPICE server is enabled, false otherwise
1796 # @migrated: true if the last guest migration completed and spice
1797 # migration had completed as well. false otherwise. (since 1.4)
1799 # @host: #optional The hostname the SPICE server is bound to. This depends on
1800 # the name resolution on the host and may be an IP address.
1802 # @port: #optional The SPICE server's port number.
1804 # @compiled-version: #optional SPICE server version.
1806 # @tls-port: #optional The SPICE server's TLS port number.
1808 # @auth: #optional the current authentication type used by the server
1809 # 'none' if no authentication is being used
1810 # 'spice' uses SASL or direct TLS authentication, depending on command
1813 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1814 # be determined by the client or the server, or unknown if spice
1815 # server doesn't provide this information. (since: 1.1)
1817 # @channels: a list of @SpiceChannel for each active spice channel
1821 { 'struct': 'SpiceInfo',
1822 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1823 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1824 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1829 # Returns information about the current SPICE server
1831 # Returns: @SpiceInfo
1837 # -> { "execute": "query-spice" }
1843 # "host": "0.0.0.0",
1848 # "channel-type": 1,
1849 # "connection-id": 1804289383,
1850 # "host": "127.0.0.1",
1857 # "channel-type": 4,
1858 # "connection-id": 1804289383,
1859 # "host": "127.0.0.1",
1863 # [ ... more channels follow ... ]
1869 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1874 # Information about the guest balloon device.
1876 # @actual: the number of bytes the balloon currently contains
1881 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1886 # Return information about the balloon device.
1888 # Returns: @BalloonInfo on success
1890 # If the balloon driver is enabled but not functional because the KVM
1891 # kernel module cannot support it, KvmMissingCap
1893 # If no balloon device is present, DeviceNotActive
1899 # -> { "execute": "query-balloon" }
1901 # "actual": 1073741824,
1906 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1911 # A PCI device memory region
1913 # @base: the starting address (guest physical)
1915 # @limit: the ending address (guest physical)
1919 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1924 # Information about a PCI device I/O region.
1926 # @bar: the index of the Base Address Register for this region
1928 # @type: 'io' if the region is a PIO region
1929 # 'memory' if the region is a MMIO region
1931 # @size: memory size
1933 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1935 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1939 { 'struct': 'PciMemoryRegion',
1940 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1941 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1946 # Information about a bus of a PCI Bridge device
1948 # @number: primary bus interface number. This should be the number of the
1949 # bus the device resides on.
1951 # @secondary: secondary bus interface number. This is the number of the
1952 # main bus for the bridge
1954 # @subordinate: This is the highest number bus that resides below the
1957 # @io_range: The PIO range for all devices on this bridge
1959 # @memory_range: The MMIO range for all devices on this bridge
1961 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1966 { 'struct': 'PciBusInfo',
1967 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1968 'io_range': 'PciMemoryRange',
1969 'memory_range': 'PciMemoryRange',
1970 'prefetchable_range': 'PciMemoryRange' } }
1975 # Information about a PCI Bridge device
1977 # @bus: information about the bus the device resides on
1979 # @devices: a list of @PciDeviceInfo for each device on this bridge
1983 { 'struct': 'PciBridgeInfo',
1984 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1989 # Information about the Class of a PCI device
1991 # @desc: #optional a string description of the device's class
1993 # @class: the class code of the device
1997 { 'struct': 'PciDeviceClass',
1998 'data': {'*desc': 'str', 'class': 'int'} }
2003 # Information about the Id of a PCI device
2005 # @device: the PCI device id
2007 # @vendor: the PCI vendor id
2011 { 'struct': 'PciDeviceId',
2012 'data': {'device': 'int', 'vendor': 'int'} }
2017 # Information about a PCI device
2019 # @bus: the bus number of the device
2021 # @slot: the slot the device is located in
2023 # @function: the function of the slot used by the device
2025 # @class_info: the class of the device
2027 # @id: the PCI device id
2029 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
2031 # @qdev_id: the device name of the PCI device
2033 # @pci_bridge: if the device is a PCI bridge, the bridge information
2035 # @regions: a list of the PCI I/O regions associated with the device
2037 # Notes: the contents of @class_info.desc are not stable and should only be
2038 # treated as informational.
2042 { 'struct': 'PciDeviceInfo',
2043 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
2044 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
2045 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
2046 'regions': ['PciMemoryRegion']} }
2051 # Information about a PCI bus
2053 # @bus: the bus index
2055 # @devices: a list of devices on this bus
2059 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
2064 # Return information about the PCI bus topology of the guest.
2066 # Returns: a list of @PciInfo for each PCI bus. Each bus is
2067 # represented by a json-object, which has a key with a json-array of
2068 # all PCI devices attached to it. Each device is represented by a
2075 # -> { "execute": "query-pci" }
2086 # "desc": "Host bridge"
2102 # "desc": "ISA bridge"
2118 # "desc": "IDE controller"
2140 # "desc": "VGA controller"
2150 # "mem_type_64": false,
2153 # "address": 4026531840,
2157 # "prefetch": false,
2158 # "mem_type_64": false,
2161 # "address": 4060086272,
2165 # "prefetch": false,
2166 # "mem_type_64": false,
2181 # "desc": "RAM controller"
2202 # Note: This example has been shortened as the real response is too long.
2205 { 'command': 'query-pci', 'returns': ['PciInfo'] }
2210 # This command will cause the QEMU process to exit gracefully. While every
2211 # attempt is made to send the QMP response before terminating, this is not
2212 # guaranteed. When using this interface, a premature EOF would not be
2219 # -> { "execute": "quit" }
2220 # <- { "return": {} }
2222 { 'command': 'quit' }
2227 # Stop all guest VCPU execution.
2231 # Notes: This function will succeed even if the guest is already in the stopped
2232 # state. In "inmigrate" state, it will ensure that the guest
2233 # remains paused once migration finishes, as if the -S option was
2234 # passed on the command line.
2238 # -> { "execute": "stop" }
2239 # <- { "return": {} }
2242 { 'command': 'stop' }
2247 # Performs a hard reset of a guest.
2253 # -> { "execute": "system_reset" }
2254 # <- { "return": {} }
2257 { 'command': 'system_reset' }
2260 # @system_powerdown:
2262 # Requests that a guest perform a powerdown operation.
2266 # Notes: A guest may or may not respond to this command. This command
2267 # returning does not indicate that a guest has accepted the request or
2268 # that it has shut down. Many guests will respond to this command by
2269 # prompting the user in some way.
2272 # -> { "execute": "system_powerdown" }
2273 # <- { "return": {} }
2276 { 'command': 'system_powerdown' }
2281 # This command is a nop that is only provided for the purposes of compatibility.
2285 # Notes: Do not use this command.
2287 { 'command': 'cpu', 'data': {'index': 'int'} }
2292 # Adds CPU with specified ID
2294 # @id: ID of CPU to be created, valid values [0..max_cpus)
2296 # Returns: Nothing on success
2302 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
2303 # <- { "return": {} }
2306 { 'command': 'cpu-add', 'data': {'id': 'int'} }
2311 # Save a portion of guest memory to a file.
2313 # @val: the virtual address of the guest to start from
2315 # @size: the size of memory region to save
2317 # @filename: the file to save the memory to as binary data
2319 # @cpu-index: #optional the index of the virtual CPU to use for translating the
2320 # virtual address (defaults to CPU 0)
2322 # Returns: Nothing on success
2326 # Notes: Errors were not reliably returned until 1.1
2330 # -> { "execute": "memsave",
2331 # "arguments": { "val": 10,
2333 # "filename": "/tmp/virtual-mem-dump" } }
2334 # <- { "return": {} }
2337 { 'command': 'memsave',
2338 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
2343 # Save a portion of guest physical memory to a file.
2345 # @val: the physical address of the guest to start from
2347 # @size: the size of memory region to save
2349 # @filename: the file to save the memory to as binary data
2351 # Returns: Nothing on success
2355 # Notes: Errors were not reliably returned until 1.1
2359 # -> { "execute": "pmemsave",
2360 # "arguments": { "val": 10,
2362 # "filename": "/tmp/physical-mem-dump" } }
2363 # <- { "return": {} }
2366 { 'command': 'pmemsave',
2367 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
2372 # Resume guest VCPU execution.
2376 # Returns: If successful, nothing
2377 # If QEMU was started with an encrypted block device and a key has
2378 # not yet been set, DeviceEncrypted.
2380 # Notes: This command will succeed if the guest is currently running. It
2381 # will also succeed if the guest is in the "inmigrate" state; in
2382 # this case, the effect of the command is to make sure the guest
2383 # starts once migration finishes, removing the effect of the -S
2384 # command line option if it was passed.
2388 # -> { "execute": "cont" }
2389 # <- { "return": {} }
2392 { 'command': 'cont' }
2397 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
2405 # -> { "execute": "system_wakeup" }
2406 # <- { "return": {} }
2409 { 'command': 'system_wakeup' }
2414 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
2415 # The command fails when the guest doesn't support injecting.
2417 # Returns: If successful, nothing
2421 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
2425 # -> { "execute": "inject-nmi" }
2426 # <- { "return": {} }
2429 { 'command': 'inject-nmi' }
2434 # Sets the link status of a virtual network adapter.
2436 # @name: the device name of the virtual network adapter
2438 # @up: true to set the link status to be up
2440 # Returns: Nothing on success
2441 # If @name is not a valid network device, DeviceNotFound
2445 # Notes: Not all network adapters support setting link status. This command
2446 # will succeed even if the network adapter does not support link status
2451 # -> { "execute": "set_link",
2452 # "arguments": { "name": "e1000.0", "up": false } }
2453 # <- { "return": {} }
2456 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
2461 # Request the balloon driver to change its balloon size.
2463 # @value: the target size of the balloon in bytes
2465 # Returns: Nothing on success
2466 # If the balloon driver is enabled but not functional because the KVM
2467 # kernel module cannot support it, KvmMissingCap
2468 # If no balloon device is present, DeviceNotActive
2470 # Notes: This command just issues a request to the guest. When it returns,
2471 # the balloon size may not have changed. A guest can change the balloon
2472 # size independent of this command.
2478 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
2479 # <- { "return": {} }
2482 { 'command': 'balloon', 'data': {'value': 'int'} }
2487 # This action can be used to test transaction failure.
2491 { 'struct': 'Abort',
2495 # @ActionCompletionMode:
2497 # An enumeration of Transactional completion modes.
2499 # @individual: Do not attempt to cancel any other Actions if any Actions fail
2500 # after the Transaction request succeeds. All Actions that
2501 # can complete successfully will do so without waiting on others.
2502 # This is the default.
2504 # @grouped: If any Action fails after the Transaction succeeds, cancel all
2505 # Actions. Actions do not complete until all Actions are ready to
2506 # complete. May be rejected by Actions that do not support this
2511 { 'enum': 'ActionCompletionMode',
2512 'data': [ 'individual', 'grouped' ] }
2515 # @TransactionAction:
2517 # A discriminated record of operations that can be performed with
2518 # @transaction. Action @type can be:
2520 # - @abort: since 1.6
2521 # - @block-dirty-bitmap-add: since 2.5
2522 # - @block-dirty-bitmap-clear: since 2.5
2523 # - @blockdev-backup: since 2.3
2524 # - @blockdev-snapshot: since 2.5
2525 # - @blockdev-snapshot-internal-sync: since 1.7
2526 # - @blockdev-snapshot-sync: since 1.1
2527 # - @drive-backup: since 1.6
2531 { 'union': 'TransactionAction',
2534 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
2535 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
2536 'blockdev-backup': 'BlockdevBackup',
2537 'blockdev-snapshot': 'BlockdevSnapshot',
2538 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
2539 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
2540 'drive-backup': 'DriveBackup'
2544 # @TransactionProperties:
2546 # Optional arguments to modify the behavior of a Transaction.
2548 # @completion-mode: #optional Controls how jobs launched asynchronously by
2549 # Actions will complete or fail as a group.
2550 # See @ActionCompletionMode for details.
2554 { 'struct': 'TransactionProperties',
2556 '*completion-mode': 'ActionCompletionMode'
2563 # Executes a number of transactionable QMP commands atomically. If any
2564 # operation fails, then the entire set of actions will be abandoned and the
2565 # appropriate error returned.
2567 # For external snapshots, the dictionary contains the device, the file to use for
2568 # the new snapshot, and the format. The default format, if not specified, is
2571 # Each new snapshot defaults to being created by QEMU (wiping any
2572 # contents if the file already exists), but it is also possible to reuse
2573 # an externally-created file. In the latter case, you should ensure that
2574 # the new image file has the same contents as the current one; QEMU cannot
2575 # perform any meaningful check. Typically this is achieved by using the
2576 # current image file as the backing file for the new image.
2578 # On failure, the original disks pre-snapshot attempt will be used.
2580 # For internal snapshots, the dictionary contains the device and the snapshot's
2581 # name. If an internal snapshot matching name already exists, the request will
2582 # be rejected. Only some image formats support it, for example, qcow2, rbd,
2585 # On failure, qemu will try delete the newly created internal snapshot in the
2586 # transaction. When an I/O error occurs during deletion, the user needs to fix
2587 # it later with qemu-img or other command.
2589 # @actions: List of @TransactionAction;
2590 # information needed for the respective operations.
2592 # @properties: #optional structure of additional options to control the
2593 # execution of the transaction. See @TransactionProperties
2594 # for additional detail.
2596 # Returns: nothing on success
2598 # Errors depend on the operations of the transaction
2600 # Note: The transaction aborts on the first failure. Therefore, there will be
2601 # information on only one failed operation returned in an error condition, and
2602 # subsequent actions will not have been attempted.
2608 # -> { "execute": "transaction",
2609 # "arguments": { "actions": [
2610 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
2611 # "snapshot-file": "/some/place/my-image",
2612 # "format": "qcow2" } },
2613 # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
2614 # "snapshot-file": "/some/place/my-image2",
2615 # "snapshot-node-name": "node3432",
2616 # "mode": "existing",
2617 # "format": "qcow2" } },
2618 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
2619 # "snapshot-file": "/some/place/my-image2",
2620 # "mode": "existing",
2621 # "format": "qcow2" } },
2622 # { "type": "blockdev-snapshot-internal-sync", "data" : {
2623 # "device": "ide-hd2",
2624 # "name": "snapshot0" } } ] } }
2625 # <- { "return": {} }
2628 { 'command': 'transaction',
2629 'data': { 'actions': [ 'TransactionAction' ],
2630 '*properties': 'TransactionProperties'
2635 # @human-monitor-command:
2637 # Execute a command on the human monitor and return the output.
2639 # @command-line: the command to execute in the human monitor
2641 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
2643 # Returns: the output of the command as a string
2647 # Notes: This command only exists as a stop-gap. Its use is highly
2648 # discouraged. The semantics of this command are not
2649 # guaranteed: this means that command names, arguments and
2650 # responses can change or be removed at ANY time. Applications
2651 # that rely on long term stability guarantees should NOT
2654 # Known limitations:
2656 # * This command is stateless, this means that commands that depend
2657 # on state information (such as getfd) might not work
2659 # * Commands that prompt the user for data (eg. 'cont' when the block
2660 # device is encrypted) don't currently work
2664 # -> { "execute": "human-monitor-command",
2665 # "arguments": { "command-line": "info kvm" } }
2666 # <- { "return": "kvm support: enabled\r\n" }
2669 { 'command': 'human-monitor-command',
2670 'data': {'command-line': 'str', '*cpu-index': 'int'},
2676 # Cancel the current executing migration process.
2678 # Returns: nothing on success
2680 # Notes: This command succeeds even if there is no migration process running.
2686 # -> { "execute": "migrate_cancel" }
2687 # <- { "return": {} }
2690 { 'command': 'migrate_cancel' }
2693 # @migrate_set_downtime:
2695 # Set maximum tolerated downtime for migration.
2697 # @value: maximum downtime in seconds
2699 # Returns: nothing on success
2701 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2707 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
2708 # <- { "return": {} }
2711 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2714 # @migrate_set_speed:
2716 # Set maximum speed for migration.
2718 # @value: maximum speed in bytes per second.
2720 # Returns: nothing on success
2722 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2728 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
2729 # <- { "return": {} }
2732 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2735 # @migrate-set-cache-size:
2737 # Set cache size to be used by XBZRLE migration
2739 # @value: cache size in bytes
2741 # The size will be rounded down to the nearest power of 2.
2742 # The cache size can be modified before and during ongoing migration
2744 # Returns: nothing on success
2750 # -> { "execute": "migrate-set-cache-size",
2751 # "arguments": { "value": 536870912 } }
2752 # <- { "return": {} }
2755 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2758 # @query-migrate-cache-size:
2760 # Query migration XBZRLE cache size
2762 # Returns: XBZRLE cache size in bytes
2768 # -> { "execute": "query-migrate-cache-size" }
2769 # <- { "return": 67108864 }
2772 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2775 # @ObjectPropertyInfo:
2777 # @name: the name of the property
2779 # @type: the type of the property. This will typically come in one of four
2782 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2783 # These types are mapped to the appropriate JSON type.
2785 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
2786 # device type name. Child properties create the composition tree.
2788 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
2789 # device type name. Link properties form the device model graph.
2793 { 'struct': 'ObjectPropertyInfo',
2794 'data': { 'name': 'str', 'type': 'str' } }
2799 # This command will list any properties of a object given a path in the object
2802 # @path: the path within the object model. See @qom-get for a description of
2805 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2810 { 'command': 'qom-list',
2811 'data': { 'path': 'str' },
2812 'returns': [ 'ObjectPropertyInfo' ] }
2817 # This command will get a property from a object model path and return the
2820 # @path: The path within the object model. There are two forms of supported
2821 # paths--absolute and partial paths.
2823 # Absolute paths are derived from the root object and can follow child<>
2824 # or link<> properties. Since they can follow link<> properties, they
2825 # can be arbitrarily long. Absolute paths look like absolute filenames
2826 # and are prefixed with a leading slash.
2828 # Partial paths look like relative filenames. They do not begin
2829 # with a prefix. The matching rules for partial paths are subtle but
2830 # designed to make specifying objects easy. At each level of the
2831 # composition tree, the partial path is matched as an absolute path.
2832 # The first match is not returned. At least two matches are searched
2833 # for. A successful result is only returned if only one match is
2834 # found. If more than one match is found, a flag is return to
2835 # indicate that the match was ambiguous.
2837 # @property: The property name to read
2839 # Returns: The property value. The type depends on the property
2840 # type. child<> and link<> properties are returned as #str
2841 # pathnames. All integer property types (u8, u16, etc) are
2846 { 'command': 'qom-get',
2847 'data': { 'path': 'str', 'property': 'str' },
2853 # This command will set a property from a object model path.
2855 # @path: see @qom-get for a description of this parameter
2857 # @property: the property name to set
2859 # @value: a value who's type is appropriate for the property type. See @qom-get
2860 # for a description of type mapping.
2864 { 'command': 'qom-set',
2865 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2870 # Sets the password of a remote display session.
2872 # @protocol: `vnc' to modify the VNC server password
2873 # `spice' to modify the Spice server password
2875 # @password: the new password
2877 # @connected: #optional how to handle existing clients when changing the
2878 # password. If nothing is specified, defaults to `keep'
2879 # `fail' to fail the command if clients are connected
2880 # `disconnect' to disconnect existing clients
2881 # `keep' to maintain existing clients
2883 # Returns: Nothing on success
2884 # If Spice is not enabled, DeviceNotFound
2890 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
2891 # "password": "secret" } }
2892 # <- { "return": {} }
2895 { 'command': 'set_password',
2896 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2901 # Expire the password of a remote display server.
2903 # @protocol: the name of the remote display protocol `vnc' or `spice'
2905 # @time: when to expire the password.
2906 # `now' to expire the password immediately
2907 # `never' to cancel password expiration
2908 # `+INT' where INT is the number of seconds from now (integer)
2909 # `INT' where INT is the absolute time in seconds
2911 # Returns: Nothing on success
2912 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2916 # Notes: Time is relative to the server and currently there is no way to
2917 # coordinate server time with client time. It is not recommended to
2918 # use the absolute time version of the @time parameter unless you're
2919 # sure you are on the same machine as the QEMU instance.
2923 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2925 # <- { "return": {} }
2928 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2931 # @change-vnc-password:
2933 # Change the VNC server password.
2935 # @password: the new password to use with VNC authentication
2939 # Notes: An empty password in this command will set the password to the empty
2940 # string. Existing clients are unaffected by executing this command.
2942 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2947 # This command is multiple commands multiplexed together.
2949 # @device: This is normally the name of a block device but it may also be 'vnc'.
2950 # when it's 'vnc', then sub command depends on @target
2952 # @target: If @device is a block device, then this is the new filename.
2953 # If @device is 'vnc', then if the value 'password' selects the vnc
2954 # change password command. Otherwise, this specifies a new server URI
2955 # address to listen to for VNC connections.
2957 # @arg: If @device is a block device, then this is an optional format to open
2959 # If @device is 'vnc' and @target is 'password', this is the new VNC
2960 # password to set. If this argument is an empty string, then no future
2961 # logins will be allowed.
2963 # Returns: Nothing on success.
2964 # If @device is not a valid block device, DeviceNotFound
2965 # If the new block device is encrypted, DeviceEncrypted. Note that
2966 # if this error is returned, the device has been opened successfully
2967 # and an additional call to @block_passwd is required to set the
2968 # device's password. The behavior of reads and writes to the block
2969 # device between when these calls are executed is undefined.
2971 # Notes: This interface is deprecated, and it is strongly recommended that you
2972 # avoid using it. For changing block devices, use
2973 # blockdev-change-medium; for changing VNC parameters, use
2974 # change-vnc-password.
2980 # 1. Change a removable medium
2982 # -> { "execute": "change",
2983 # "arguments": { "device": "ide1-cd0",
2984 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
2985 # <- { "return": {} }
2987 # 2. Change VNC password
2989 # -> { "execute": "change",
2990 # "arguments": { "device": "vnc", "target": "password",
2991 # "arg": "foobar1" } }
2992 # <- { "return": {} }
2995 { 'command': 'change',
2996 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
3001 # This structure describes a search result from @qom-list-types
3003 # @name: the type name found in the search
3007 # Notes: This command is experimental and may change syntax in future releases.
3009 { 'struct': 'ObjectTypeInfo',
3010 'data': { 'name': 'str' } }
3015 # This command will return a list of types given search parameters
3017 # @implements: if specified, only return types that implement this type name
3019 # @abstract: if true, include abstract types in the results
3021 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
3025 { 'command': 'qom-list-types',
3026 'data': { '*implements': 'str', '*abstract': 'bool' },
3027 'returns': [ 'ObjectTypeInfo' ] }
3030 # @DevicePropertyInfo:
3032 # Information about device properties.
3034 # @name: the name of the property
3035 # @type: the typename of the property
3036 # @description: #optional if specified, the description of the property.
3041 { 'struct': 'DevicePropertyInfo',
3042 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
3045 # @device-list-properties:
3047 # List properties associated with a device.
3049 # @typename: the type name of a device
3051 # Returns: a list of DevicePropertyInfo describing a devices properties
3055 { 'command': 'device-list-properties',
3056 'data': { 'typename': 'str'},
3057 'returns': [ 'DevicePropertyInfo' ] }
3062 # Migrates the current running guest to another Virtual Machine.
3064 # @uri: the Uniform Resource Identifier of the destination VM
3066 # @blk: #optional do block migration (full disk copy)
3068 # @inc: #optional incremental disk copy migration
3070 # @detach: this argument exists only for compatibility reasons and
3071 # is ignored by QEMU
3073 # Returns: nothing on success
3079 # 1. The 'query-migrate' command should be used to check migration's progress
3080 # and final result (this information is provided by the 'status' member)
3082 # 2. All boolean arguments default to false
3084 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
3089 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
3090 # <- { "return": {} }
3093 { 'command': 'migrate',
3094 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
3097 # @migrate-incoming:
3099 # Start an incoming migration, the qemu must have been started
3100 # with -incoming defer
3102 # @uri: The Uniform Resource Identifier identifying the source or
3103 # address to listen on
3105 # Returns: nothing on success
3111 # 1. It's a bad idea to use a string for the uri, but it needs to stay
3112 # compatible with -incoming and the format of the uri is already exposed
3115 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
3118 # 3. The uri format is the same as for -incoming
3122 # -> { "execute": "migrate-incoming",
3123 # "arguments": { "uri": "tcp::4446" } }
3124 # <- { "return": {} }
3127 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
3130 # @xen-save-devices-state:
3132 # Save the state of all devices to file. The RAM and the block devices
3133 # of the VM are not saved by this command.
3135 # @filename: the file to save the state of the devices to as binary
3136 # data. See xen-save-devices-state.txt for a description of the binary
3139 # Returns: Nothing on success
3145 # -> { "execute": "xen-save-devices-state",
3146 # "arguments": { "filename": "/tmp/save" } }
3147 # <- { "return": {} }
3150 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
3153 # @xen-set-global-dirty-log:
3155 # Enable or disable the global dirty log mode.
3157 # @enable: true to enable, false to disable.
3165 # -> { "execute": "xen-set-global-dirty-log",
3166 # "arguments": { "enable": true } }
3167 # <- { "return": {} }
3170 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
3175 # @driver: the name of the new device's driver
3177 # @bus: #optional the device's parent bus (device tree path)
3179 # @id: #optional the device's ID, must be unique
3181 # Additional arguments depend on the type.
3186 # 1. For detailed information about this command, please refer to the
3187 # 'docs/qdev-device-use.txt' file.
3189 # 2. It's possible to list device properties by running QEMU with the
3190 # "-device DEVICE,help" command-line argument, where DEVICE is the
3195 # -> { "execute": "device_add",
3196 # "arguments": { "driver": "e1000", "id": "net1",
3198 # "mac": "52:54:00:12:34:56" } }
3199 # <- { "return": {} }
3201 # TODO: This command effectively bypasses QAPI completely due to its
3202 # "additional arguments" business. It shouldn't have been added to
3203 # the schema in this form. It should be qapified properly, or
3204 # replaced by a properly qapified command.
3208 { 'command': 'device_add',
3209 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
3210 'gen': false } # so we can get the additional arguments
3215 # Remove a device from a guest
3217 # @id: the device's ID or QOM path
3219 # Returns: Nothing on success
3220 # If @id is not a valid device, DeviceNotFound
3222 # Notes: When this command completes, the device may not be removed from the
3223 # guest. Hot removal is an operation that requires guest cooperation.
3224 # This command merely requests that the guest begin the hot removal
3225 # process. Completion of the device removal process is signaled with a
3226 # DEVICE_DELETED event. Guest reset will automatically complete removal
3233 # -> { "execute": "device_del",
3234 # "arguments": { "id": "net1" } }
3235 # <- { "return": {} }
3237 # -> { "execute": "device_del",
3238 # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
3239 # <- { "return": {} }
3242 { 'command': 'device_del', 'data': {'id': 'str'} }
3245 # @DumpGuestMemoryFormat:
3247 # An enumeration of guest-memory-dump's format.
3251 # @kdump-zlib: kdump-compressed format with zlib-compressed
3253 # @kdump-lzo: kdump-compressed format with lzo-compressed
3255 # @kdump-snappy: kdump-compressed format with snappy-compressed
3259 { 'enum': 'DumpGuestMemoryFormat',
3260 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
3263 # @dump-guest-memory:
3265 # Dump guest's memory to vmcore. It is a synchronous operation that can take
3266 # very long depending on the amount of guest memory.
3268 # @paging: if true, do paging to get guest's memory mapping. This allows
3269 # using gdb to process the core file.
3271 # IMPORTANT: this option can make QEMU allocate several gigabytes
3272 # of RAM. This can happen for a large guest, or a
3273 # malicious guest pretending to be large.
3275 # Also, paging=true has the following limitations:
3277 # 1. The guest may be in a catastrophic state or can have corrupted
3278 # memory, which cannot be trusted
3279 # 2. The guest can be in real-mode even if paging is enabled. For
3280 # example, the guest uses ACPI to sleep, and ACPI sleep state
3282 # 3. Currently only supported on i386 and x86_64.
3284 # @protocol: the filename or file descriptor of the vmcore. The supported
3287 # 1. file: the protocol starts with "file:", and the following
3288 # string is the file's path.
3289 # 2. fd: the protocol starts with "fd:", and the following string
3292 # @detach: #optional if true, QMP will return immediately rather than
3293 # waiting for the dump to finish. The user can track progress
3294 # using "query-dump". (since 2.6).
3296 # @begin: #optional if specified, the starting physical address.
3298 # @length: #optional if specified, the memory size, in bytes. If you don't
3299 # want to dump all guest's memory, please specify the start @begin
3302 # @format: #optional if specified, the format of guest memory dump. But non-elf
3303 # format is conflict with paging and filter, ie. @paging, @begin and
3304 # @length is not allowed to be specified with non-elf @format at the
3305 # same time (since 2.0)
3307 # Note: All boolean arguments default to false
3309 # Returns: nothing on success
3315 # -> { "execute": "dump-guest-memory",
3316 # "arguments": { "protocol": "fd:dump" } }
3317 # <- { "return": {} }
3320 { 'command': 'dump-guest-memory',
3321 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
3322 '*begin': 'int', '*length': 'int',
3323 '*format': 'DumpGuestMemoryFormat'} }
3328 # Describe the status of a long-running background guest memory dump.
3330 # @none: no dump-guest-memory has started yet.
3332 # @active: there is one dump running in background.
3334 # @completed: the last dump has finished successfully.
3336 # @failed: the last dump has failed.
3340 { 'enum': 'DumpStatus',
3341 'data': [ 'none', 'active', 'completed', 'failed' ] }
3346 # The result format for 'query-dump'.
3348 # @status: enum of @DumpStatus, which shows current dump status
3350 # @completed: bytes written in latest dump (uncompressed)
3352 # @total: total bytes to be written in latest dump (uncompressed)
3356 { 'struct': 'DumpQueryResult',
3357 'data': { 'status': 'DumpStatus',
3364 # Query latest dump status.
3366 # Returns: A @DumpStatus object showing the dump status.
3372 # -> { "execute": "query-dump" }
3373 # <- { "return": { "status": "active", "completed": 1024000,
3374 # "total": 2048000 } }
3377 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
3380 # @DumpGuestMemoryCapability:
3382 # A list of the available formats for dump-guest-memory
3386 { 'struct': 'DumpGuestMemoryCapability',
3388 'formats': ['DumpGuestMemoryFormat'] } }
3391 # @query-dump-guest-memory-capability:
3393 # Returns the available formats for dump-guest-memory
3395 # Returns: A @DumpGuestMemoryCapability object listing available formats for
3402 # -> { "execute": "query-dump-guest-memory-capability" }
3403 # <- { "return": { "formats":
3404 # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
3407 { 'command': 'query-dump-guest-memory-capability',
3408 'returns': 'DumpGuestMemoryCapability' }
3413 # Dump guest's storage keys
3415 # @filename: the path to the file to dump to
3417 # This command is only supported on s390 architecture.
3423 # -> { "execute": "dump-skeys",
3424 # "arguments": { "filename": "/tmp/skeys" } }
3425 # <- { "return": {} }
3428 { 'command': 'dump-skeys',
3429 'data': { 'filename': 'str' } }
3434 # Add a network backend.
3436 # @type: the type of network backend. Current valid values are 'user', 'tap',
3437 # 'vde', 'socket', 'dump' and 'bridge'
3439 # @id: the name of the new network backend
3441 # Additional arguments depend on the type.
3443 # TODO: This command effectively bypasses QAPI completely due to its
3444 # "additional arguments" business. It shouldn't have been added to
3445 # the schema in this form. It should be qapified properly, or
3446 # replaced by a properly qapified command.
3450 # Returns: Nothing on success
3451 # If @type is not a valid network backend, DeviceNotFound
3455 # -> { "execute": "netdev_add",
3456 # "arguments": { "type": "user", "id": "netdev1",
3457 # "dnssearch": "example.org" } }
3458 # <- { "return": {} }
3461 { 'command': 'netdev_add',
3462 'data': {'type': 'str', 'id': 'str'},
3463 'gen': false } # so we can get the additional arguments
3468 # Remove a network backend.
3470 # @id: the name of the network backend to remove
3472 # Returns: Nothing on success
3473 # If @id is not a valid network backend, DeviceNotFound
3479 # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
3480 # <- { "return": {} }
3483 { 'command': 'netdev_del', 'data': {'id': 'str'} }
3488 # Create a QOM object.
3490 # @qom-type: the class name for the object to be created
3492 # @id: the name of the new object
3494 # @props: #optional a dictionary of properties to be passed to the backend
3496 # Returns: Nothing on success
3497 # Error if @qom-type is not a valid class name
3503 # -> { "execute": "object-add",
3504 # "arguments": { "qom-type": "rng-random", "id": "rng1",
3505 # "props": { "filename": "/dev/hwrng" } } }
3506 # <- { "return": {} }
3509 { 'command': 'object-add',
3510 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
3515 # Remove a QOM object.
3517 # @id: the name of the QOM object to remove
3519 # Returns: Nothing on success
3520 # Error if @id is not a valid id for a QOM object
3526 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
3527 # <- { "return": {} }
3530 { 'command': 'object-del', 'data': {'id': 'str'} }
3533 # @NetdevNoneOptions:
3535 # Use it alone to have zero network devices.
3539 { 'struct': 'NetdevNoneOptions',
3543 # @NetLegacyNicOptions:
3545 # Create a new Network Interface Card.
3547 # @netdev: #optional id of -netdev to connect to
3549 # @macaddr: #optional MAC address
3551 # @model: #optional device model (e1000, rtl8139, virtio etc.)
3553 # @addr: #optional PCI device address
3555 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
3559 { 'struct': 'NetLegacyNicOptions',
3565 '*vectors': 'uint32' } }
3570 # A fat type wrapping 'str', to be embedded in lists.
3574 { 'struct': 'String',
3579 # @NetdevUserOptions:
3581 # Use the user mode network stack which requires no administrator privilege to
3584 # @hostname: #optional client hostname reported by the builtin DHCP server
3586 # @restrict: #optional isolate the guest from the host
3588 # @ipv4: #optional whether to support IPv4, default true for enabled
3591 # @ipv6: #optional whether to support IPv6, default true for enabled
3594 # @ip: #optional legacy parameter, use net= instead
3596 # @net: #optional IP network address that the guest will see, in the
3597 # form addr[/netmask] The netmask is optional, and can be
3598 # either in the form a.b.c.d or as a number of valid top-most
3599 # bits. Default is 10.0.2.0/24.
3601 # @host: #optional guest-visible address of the host
3603 # @tftp: #optional root directory of the built-in TFTP server
3605 # @bootfile: #optional BOOTP filename, for use with tftp=
3607 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
3610 # @dns: #optional guest-visible address of the virtual nameserver
3612 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
3615 # @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
3616 # 2.6). The network prefix is given in the usual
3617 # hexadecimal IPv6 address notation.
3619 # @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
3622 # @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
3624 # @ipv6-dns: #optional guest-visible IPv6 address of the virtual
3625 # nameserver (since 2.6)
3627 # @smb: #optional root directory of the built-in SMB server
3629 # @smbserver: #optional IP address of the built-in SMB server
3631 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
3634 # @guestfwd: #optional forward guest TCP connections
3638 { 'struct': 'NetdevUserOptions',
3641 '*restrict': 'bool',
3649 '*dhcpstart': 'str',
3651 '*dnssearch': ['String'],
3652 '*ipv6-prefix': 'str',
3653 '*ipv6-prefixlen': 'int',
3654 '*ipv6-host': 'str',
3657 '*smbserver': 'str',
3658 '*hostfwd': ['String'],
3659 '*guestfwd': ['String'] } }
3662 # @NetdevTapOptions:
3664 # Connect the host TAP network interface name to the VLAN.
3666 # @ifname: #optional interface name
3668 # @fd: #optional file descriptor of an already opened tap
3670 # @fds: #optional multiple file descriptors of already opened multiqueue capable
3673 # @script: #optional script to initialize the interface
3675 # @downscript: #optional script to shut down the interface
3677 # @br: #optional bridge name (since 2.8)
3679 # @helper: #optional command to execute to configure bridge
3681 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
3683 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
3685 # @vhost: #optional enable vhost-net network accelerator
3687 # @vhostfd: #optional file descriptor of an already opened vhost net device
3689 # @vhostfds: #optional file descriptors of multiple already opened vhost net
3692 # @vhostforce: #optional vhost on for non-MSIX virtio guests
3694 # @queues: #optional number of queues to be created for multiqueue capable tap
3696 # @poll-us: #optional maximum number of microseconds that could
3697 # be spent on busy polling for tap (since 2.7)
3701 { 'struct': 'NetdevTapOptions',
3707 '*downscript': 'str',
3711 '*vnet_hdr': 'bool',
3715 '*vhostforce': 'bool',
3716 '*queues': 'uint32',
3717 '*poll-us': 'uint32'} }
3720 # @NetdevSocketOptions:
3722 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3723 # socket connection.
3725 # @fd: #optional file descriptor of an already opened socket
3727 # @listen: #optional port number, and optional hostname, to listen on
3729 # @connect: #optional port number, and optional hostname, to connect to
3731 # @mcast: #optional UDP multicast address and port number
3733 # @localaddr: #optional source address and port for multicast and udp packets
3735 # @udp: #optional UDP unicast address and port number
3739 { 'struct': 'NetdevSocketOptions',
3745 '*localaddr': 'str',
3749 # @NetdevL2TPv3Options:
3751 # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
3753 # @src: source address
3755 # @dst: destination address
3757 # @srcport: #optional source port - mandatory for udp, optional for ip
3759 # @dstport: #optional destination port - mandatory for udp, optional for ip
3761 # @ipv6: #optional - force the use of ipv6
3763 # @udp: #optional - use the udp version of l2tpv3 encapsulation
3765 # @cookie64: #optional - use 64 bit coookies
3767 # @counter: #optional have sequence counter
3769 # @pincounter: #optional pin sequence counter to zero -
3770 # workaround for buggy implementations or
3771 # networks with packet reorder
3773 # @txcookie: #optional 32 or 64 bit transmit cookie
3775 # @rxcookie: #optional 32 or 64 bit receive cookie
3777 # @txsession: 32 bit transmit session
3779 # @rxsession: #optional 32 bit receive session - if not specified
3780 # set to the same value as transmit
3782 # @offset: #optional additional offset - allows the insertion of
3783 # additional application-specific data before the packet payload
3787 { 'struct': 'NetdevL2TPv3Options',
3795 '*cookie64': 'bool',
3797 '*pincounter': 'bool',
3798 '*txcookie': 'uint64',
3799 '*rxcookie': 'uint64',
3800 'txsession': 'uint32',
3801 '*rxsession': 'uint32',
3802 '*offset': 'uint32' } }
3805 # @NetdevVdeOptions:
3807 # Connect the VLAN to a vde switch running on the host.
3809 # @sock: #optional socket path
3811 # @port: #optional port number
3813 # @group: #optional group owner of socket
3815 # @mode: #optional permissions for socket
3819 { 'struct': 'NetdevVdeOptions',
3824 '*mode': 'uint16' } }
3827 # @NetdevDumpOptions:
3829 # Dump VLAN network traffic to a file.
3831 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
3834 # @file: #optional dump file path (default is qemu-vlan0.pcap)
3838 { 'struct': 'NetdevDumpOptions',
3844 # @NetdevBridgeOptions:
3846 # Connect a host TAP network interface to a host bridge device.
3848 # @br: #optional bridge name
3850 # @helper: #optional command to execute to configure bridge
3854 { 'struct': 'NetdevBridgeOptions',
3857 '*helper': 'str' } }
3860 # @NetdevHubPortOptions:
3862 # Connect two or more net clients through a software hub.
3864 # @hubid: hub identifier number
3868 { 'struct': 'NetdevHubPortOptions',
3870 'hubid': 'int32' } }
3873 # @NetdevNetmapOptions:
3875 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3877 # @ifname: Either the name of an existing network interface supported by
3878 # netmap, or the name of a VALE port (created on the fly).
3879 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3880 # YYY are non-negative integers. XXX identifies a switch and
3881 # YYY identifies a port of the switch. VALE ports having the
3882 # same XXX are therefore connected to the same switch.
3884 # @devname: #optional path of the netmap device (default: '/dev/netmap').
3888 { 'struct': 'NetdevNetmapOptions',
3891 '*devname': 'str' } }
3894 # @NetdevVhostUserOptions:
3896 # Vhost-user network backend
3898 # @chardev: name of a unix socket chardev
3900 # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
3902 # @queues: #optional number of queues to be created for multiqueue vhost-user
3903 # (default: 1) (Since 2.5)
3907 { 'struct': 'NetdevVhostUserOptions',
3910 '*vhostforce': 'bool',
3911 '*queues': 'int' } }
3916 # Available netdev drivers.
3920 { 'enum': 'NetClientDriver',
3921 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
3922 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
3927 # Captures the configuration of a network device.
3929 # @id: identifier for monitor commands.
3931 # @type: Specify the driver used for interpreting remaining arguments.
3935 # 'l2tpv3' - since 2.1
3937 { 'union': 'Netdev',
3938 'base': { 'id': 'str', 'type': 'NetClientDriver' },
3939 'discriminator': 'type',
3941 'none': 'NetdevNoneOptions',
3942 'nic': 'NetLegacyNicOptions',
3943 'user': 'NetdevUserOptions',
3944 'tap': 'NetdevTapOptions',
3945 'l2tpv3': 'NetdevL2TPv3Options',
3946 'socket': 'NetdevSocketOptions',
3947 'vde': 'NetdevVdeOptions',
3948 'dump': 'NetdevDumpOptions',
3949 'bridge': 'NetdevBridgeOptions',
3950 'hubport': 'NetdevHubPortOptions',
3951 'netmap': 'NetdevNetmapOptions',
3952 'vhost-user': 'NetdevVhostUserOptions' } }
3957 # Captures the configuration of a network device; legacy.
3959 # @vlan: #optional vlan number
3961 # @id: #optional identifier for monitor commands
3963 # @name: #optional identifier for monitor commands, ignored if @id is present
3965 # @opts: device type specific properties (legacy)
3969 { 'struct': 'NetLegacy',
3974 'opts': 'NetLegacyOptions' } }
3977 # @NetLegacyOptionsType:
3981 { 'enum': 'NetLegacyOptionsType',
3982 'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
3983 'dump', 'bridge', 'netmap', 'vhost-user'] }
3986 # @NetLegacyOptions:
3988 # Like Netdev, but for use only by the legacy command line options
3992 { 'union': 'NetLegacyOptions',
3993 'base': { 'type': 'NetLegacyOptionsType' },
3994 'discriminator': 'type',
3996 'none': 'NetdevNoneOptions',
3997 'nic': 'NetLegacyNicOptions',
3998 'user': 'NetdevUserOptions',
3999 'tap': 'NetdevTapOptions',
4000 'l2tpv3': 'NetdevL2TPv3Options',
4001 'socket': 'NetdevSocketOptions',
4002 'vde': 'NetdevVdeOptions',
4003 'dump': 'NetdevDumpOptions',
4004 'bridge': 'NetdevBridgeOptions',
4005 'netmap': 'NetdevNetmapOptions',
4006 'vhost-user': 'NetdevVhostUserOptions' } }
4009 # @NetFilterDirection:
4011 # Indicates whether a netfilter is attached to a netdev's transmit queue or
4012 # receive queue or both.
4014 # @all: the filter is attached both to the receive and the transmit
4015 # queue of the netdev (default).
4017 # @rx: the filter is attached to the receive queue of the netdev,
4018 # where it will receive packets sent to the netdev.
4020 # @tx: the filter is attached to the transmit queue of the netdev,
4021 # where it will receive packets sent by the netdev.
4025 { 'enum': 'NetFilterDirection',
4026 'data': [ 'all', 'rx', 'tx' ] }
4029 # @InetSocketAddress:
4031 # Captures a socket address or address range in the Internet namespace.
4033 # @host: host part of the address
4035 # @port: port part of the address, or lowest port if @to is present
4037 # @numeric: #optional true if the host/port are guaranteed to be numeric,
4038 # false if name resolution should be attempted. Defaults to false.
4041 # @to: highest port to try
4043 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
4046 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
4051 { 'struct': 'InetSocketAddress',
4061 # @UnixSocketAddress:
4063 # Captures a socket address in the local ("Unix socket") namespace.
4065 # @path: filesystem path to use
4069 { 'struct': 'UnixSocketAddress',
4074 # @VsockSocketAddress:
4076 # Captures a socket address in the vsock namespace.
4078 # @cid: unique host identifier
4081 # Note: string types are used to allow for possible future hostname or
4082 # service resolution support.
4086 { 'struct': 'VsockSocketAddress',
4094 # Captures the address of a socket, which could also be a named file descriptor
4098 { 'union': 'SocketAddress',
4100 'inet': 'InetSocketAddress',
4101 'unix': 'UnixSocketAddress',
4102 'vsock': 'VsockSocketAddress',
4106 # @SocketAddressFlatType:
4108 # Available SocketAddressFlat types
4110 # @inet: Internet address
4112 # @unix: Unix domain socket
4116 { 'enum': 'SocketAddressFlatType',
4117 'data': [ 'unix', 'inet' ] }
4120 # @SocketAddressFlat:
4122 # Captures the address of a socket
4124 # @type: Transport type
4126 # This is similar to SocketAddress, only distinction:
4128 # 1. SocketAddressFlat is a flat union, SocketAddress is a simple union.
4129 # A flat union is nicer than simple because it avoids nesting
4130 # (i.e. more {}) on the wire.
4132 # 2. SocketAddressFlat supports only types 'unix' and 'inet', because
4133 # that's what its current users need.
4137 { 'union': 'SocketAddressFlat',
4138 'base': { 'type': 'SocketAddressFlatType' },
4139 'discriminator': 'type',
4140 'data': { 'unix': 'UnixSocketAddress',
4141 'inet': 'InetSocketAddress' } }
4146 # Receive a file descriptor via SCM rights and assign it a name
4148 # @fdname: file descriptor name
4150 # Returns: Nothing on success
4154 # Notes: If @fdname already exists, the file descriptor assigned to
4155 # it will be closed and replaced by the received file
4158 # The 'closefd' command can be used to explicitly close the
4159 # file descriptor when it is no longer needed.
4163 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
4164 # <- { "return": {} }
4167 { 'command': 'getfd', 'data': {'fdname': 'str'} }
4172 # Close a file descriptor previously passed via SCM rights
4174 # @fdname: file descriptor name
4176 # Returns: Nothing on success
4182 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
4183 # <- { "return": {} }
4186 { 'command': 'closefd', 'data': {'fdname': 'str'} }
4191 # Information describing a machine.
4193 # @name: the name of the machine
4195 # @alias: #optional an alias for the machine name
4197 # @is-default: #optional whether the machine is default
4199 # @cpu-max: maximum number of CPUs supported by the machine type
4202 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
4206 { 'struct': 'MachineInfo',
4207 'data': { 'name': 'str', '*alias': 'str',
4208 '*is-default': 'bool', 'cpu-max': 'int',
4209 'hotpluggable-cpus': 'bool'} }
4214 # Return a list of supported machines
4216 # Returns: a list of MachineInfo
4220 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
4223 # @CpuDefinitionInfo:
4225 # Virtual CPU definition.
4227 # @name: the name of the CPU definition
4229 # @migration-safe: #optional whether a CPU definition can be safely used for
4230 # migration in combination with a QEMU compatibility machine
4231 # when migrating between different QMU versions and between
4232 # hosts with different sets of (hardware or software)
4233 # capabilities. If not provided, information is not available
4234 # and callers should not assume the CPU definition to be
4235 # migration-safe. (since 2.8)
4237 # @static: whether a CPU definition is static and will not change depending on
4238 # QEMU version, machine type, machine options and accelerator options.
4239 # A static model is always migration-safe. (since 2.8)
4241 # @unavailable-features: #optional List of properties that prevent
4242 # the CPU model from running in the current
4244 # @typename: Type name that can be used as argument to @device-list-properties,
4245 # to introspect properties configurable using -cpu or -global.
4248 # @unavailable-features is a list of QOM property names that
4249 # represent CPU model attributes that prevent the CPU from running.
4250 # If the QOM property is read-only, that means there's no known
4251 # way to make the CPU model run in the current host. Implementations
4252 # that choose not to provide specific information return the
4253 # property name "type".
4254 # If the property is read-write, it means that it MAY be possible
4255 # to run the CPU model in the current host if that property is
4256 # changed. Management software can use it as hints to suggest or
4257 # choose an alternative for the user, or just to generate meaningful
4258 # error messages explaining why the CPU model can't be used.
4259 # If @unavailable-features is an empty list, the CPU model is
4260 # runnable using the current host and machine-type.
4261 # If @unavailable-features is not present, runnability
4262 # information for the CPU is not available.
4266 { 'struct': 'CpuDefinitionInfo',
4267 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
4268 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
4271 # @query-cpu-definitions:
4273 # Return a list of supported virtual CPU definitions
4275 # Returns: a list of CpuDefInfo
4279 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
4284 # Virtual CPU model.
4286 # A CPU model consists of the name of a CPU definition, to which
4287 # delta changes are applied (e.g. features added/removed). Most magic values
4288 # that an architecture might require should be hidden behind the name.
4289 # However, if required, architectures can expose relevant properties.
4291 # @name: the name of the CPU definition the model is based on
4292 # @props: #optional a dictionary of QOM properties to be applied
4296 { 'struct': 'CpuModelInfo',
4297 'data': { 'name': 'str',
4301 # @CpuModelExpansionType:
4303 # An enumeration of CPU model expansion types.
4305 # @static: Expand to a static CPU model, a combination of a static base
4306 # model name and property delta changes. As the static base model will
4307 # never change, the expanded CPU model will be the same, independant of
4308 # independent of QEMU version, machine type, machine options, and
4309 # accelerator options. Therefore, the resulting model can be used by
4310 # tooling without having to specify a compatibility machine - e.g. when
4311 # displaying the "host" model. static CPU models are migration-safe.
4313 # @full: Expand all properties. The produced model is not guaranteed to be
4314 # migration-safe, but allows tooling to get an insight and work with
4317 # Note: When a non-migration-safe CPU model is expanded in static mode, some
4318 # features enabled by the CPU model may be omitted, because they can't be
4319 # implemented by a static CPU model definition (e.g. cache info passthrough and
4320 # PMU passthrough in x86). If you need an accurate representation of the
4321 # features enabled by a non-migration-safe CPU model, use @full. If you need a
4322 # static representation that will keep ABI compatibility even when changing QEMU
4323 # version or machine-type, use @static (but keep in mind that some features may
4328 { 'enum': 'CpuModelExpansionType',
4329 'data': [ 'static', 'full' ] }
4333 # @CpuModelExpansionInfo:
4335 # The result of a cpu model expansion.
4337 # @model: the expanded CpuModelInfo.
4341 { 'struct': 'CpuModelExpansionInfo',
4342 'data': { 'model': 'CpuModelInfo' } }
4346 # @query-cpu-model-expansion:
4348 # Expands a given CPU model (or a combination of CPU model + additional options)
4349 # to different granularities, allowing tooling to get an understanding what a
4350 # specific CPU model looks like in QEMU under a certain configuration.
4352 # This interface can be used to query the "host" CPU model.
4354 # The data returned by this command may be affected by:
4356 # * QEMU version: CPU models may look different depending on the QEMU version.
4357 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4358 # * machine-type: CPU model may look different depending on the machine-type.
4359 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4360 # * machine options (including accelerator): in some architectures, CPU models
4361 # may look different depending on machine and accelerator options. (Except for
4362 # CPU models reported as "static" in query-cpu-definitions.)
4363 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4364 # global properties may affect expansion of CPU models. Using
4365 # query-cpu-model-expansion while using these is not advised.
4367 # Some architectures may not support all expansion types. s390x supports
4368 # "full" and "static".
4370 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
4371 # not supported, if the model cannot be expanded, if the model contains
4372 # an unknown CPU definition name, unknown properties or properties
4373 # with a wrong type. Also returns an error if an expansion type is
4378 { 'command': 'query-cpu-model-expansion',
4379 'data': { 'type': 'CpuModelExpansionType',
4380 'model': 'CpuModelInfo' },
4381 'returns': 'CpuModelExpansionInfo' }
4384 # @CpuModelCompareResult:
4386 # An enumeration of CPU model comparation results. The result is usually
4387 # calculated using e.g. CPU features or CPU generations.
4389 # @incompatible: If model A is incompatible to model B, model A is not
4390 # guaranteed to run where model B runs and the other way around.
4392 # @identical: If model A is identical to model B, model A is guaranteed to run
4393 # where model B runs and the other way around.
4395 # @superset: If model A is a superset of model B, model B is guaranteed to run
4396 # where model A runs. There are no guarantees about the other way.
4398 # @subset: If model A is a subset of model B, model A is guaranteed to run
4399 # where model B runs. There are no guarantees about the other way.
4403 { 'enum': 'CpuModelCompareResult',
4404 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
4407 # @CpuModelCompareInfo:
4409 # The result of a CPU model comparison.
4411 # @result: The result of the compare operation.
4412 # @responsible-properties: List of properties that led to the comparison result
4413 # not being identical.
4415 # @responsible-properties is a list of QOM property names that led to
4416 # both CPUs not being detected as identical. For identical models, this
4418 # If a QOM property is read-only, that means there's no known way to make the
4419 # CPU models identical. If the special property name "type" is included, the
4420 # models are by definition not identical and cannot be made identical.
4424 { 'struct': 'CpuModelCompareInfo',
4425 'data': {'result': 'CpuModelCompareResult',
4426 'responsible-properties': ['str']
4431 # @query-cpu-model-comparison:
4433 # Compares two CPU models, returning how they compare in a specific
4434 # configuration. The results indicates how both models compare regarding
4435 # runnability. This result can be used by tooling to make decisions if a
4436 # certain CPU model will run in a certain configuration or if a compatible
4437 # CPU model has to be created by baselining.
4439 # Usually, a CPU model is compared against the maximum possible CPU model
4440 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
4441 # model is identical or a subset, it will run in that configuration.
4443 # The result returned by this command may be affected by:
4445 # * QEMU version: CPU models may look different depending on the QEMU version.
4446 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4447 # * machine-type: CPU model may look different depending on the machine-type.
4448 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4449 # * machine options (including accelerator): in some architectures, CPU models
4450 # may look different depending on machine and accelerator options. (Except for
4451 # CPU models reported as "static" in query-cpu-definitions.)
4452 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4453 # global properties may affect expansion of CPU models. Using
4454 # query-cpu-model-expansion while using these is not advised.
4456 # Some architectures may not support comparing CPU models. s390x supports
4457 # comparing CPU models.
4459 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
4460 # not supported, if a model cannot be used, if a model contains
4461 # an unknown cpu definition name, unknown properties or properties
4466 { 'command': 'query-cpu-model-comparison',
4467 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
4468 'returns': 'CpuModelCompareInfo' }
4471 # @CpuModelBaselineInfo:
4473 # The result of a CPU model baseline.
4475 # @model: the baselined CpuModelInfo.
4479 { 'struct': 'CpuModelBaselineInfo',
4480 'data': { 'model': 'CpuModelInfo' } }
4483 # @query-cpu-model-baseline:
4485 # Baseline two CPU models, creating a compatible third model. The created
4486 # model will always be a static, migration-safe CPU model (see "static"
4487 # CPU model expansion for details).
4489 # This interface can be used by tooling to create a compatible CPU model out
4490 # two CPU models. The created CPU model will be identical to or a subset of
4491 # both CPU models when comparing them. Therefore, the created CPU model is
4492 # guaranteed to run where the given CPU models run.
4494 # The result returned by this command may be affected by:
4496 # * QEMU version: CPU models may look different depending on the QEMU version.
4497 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4498 # * machine-type: CPU model may look different depending on the machine-type.
4499 # (Except for CPU models reported as "static" in query-cpu-definitions.)
4500 # * machine options (including accelerator): in some architectures, CPU models
4501 # may look different depending on machine and accelerator options. (Except for
4502 # CPU models reported as "static" in query-cpu-definitions.)
4503 # * "-cpu" arguments and global properties: arguments to the -cpu option and
4504 # global properties may affect expansion of CPU models. Using
4505 # query-cpu-model-expansion while using these is not advised.
4507 # Some architectures may not support baselining CPU models. s390x supports
4508 # baselining CPU models.
4510 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
4511 # not supported, if a model cannot be used, if a model contains
4512 # an unknown cpu definition name, unknown properties or properties
4517 { 'command': 'query-cpu-model-baseline',
4518 'data': { 'modela': 'CpuModelInfo',
4519 'modelb': 'CpuModelInfo' },
4520 'returns': 'CpuModelBaselineInfo' }
4525 # Information about a file descriptor that was added to an fd set.
4527 # @fdset-id: The ID of the fd set that @fd was added to.
4529 # @fd: The file descriptor that was received via SCM rights and
4530 # added to the fd set.
4534 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
4539 # Add a file descriptor, that was passed via SCM rights, to an fd set.
4541 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
4543 # @opaque: #optional A free-form string that can be used to describe the fd.
4545 # Returns: @AddfdInfo on success
4547 # If file descriptor was not received, FdNotSupplied
4549 # If @fdset-id is a negative value, InvalidParameterValue
4551 # Notes: The list of fd sets is shared by all monitor connections.
4553 # If @fdset-id is not specified, a new fd set will be created.
4559 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
4560 # <- { "return": { "fdset-id": 1, "fd": 3 } }
4563 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
4564 'returns': 'AddfdInfo' }
4569 # Remove a file descriptor from an fd set.
4571 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
4573 # @fd: #optional The file descriptor that is to be removed.
4575 # Returns: Nothing on success
4576 # If @fdset-id or @fd is not found, FdNotFound
4580 # Notes: The list of fd sets is shared by all monitor connections.
4582 # If @fd is not specified, all file descriptors in @fdset-id
4587 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
4588 # <- { "return": {} }
4591 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
4596 # Information about a file descriptor that belongs to an fd set.
4598 # @fd: The file descriptor value.
4600 # @opaque: #optional A free-form string that can be used to describe the fd.
4604 { 'struct': 'FdsetFdInfo',
4605 'data': {'fd': 'int', '*opaque': 'str'} }
4610 # Information about an fd set.
4612 # @fdset-id: The ID of the fd set.
4614 # @fds: A list of file descriptors that belong to this fd set.
4618 { 'struct': 'FdsetInfo',
4619 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
4624 # Return information describing all fd sets.
4626 # Returns: A list of @FdsetInfo
4630 # Note: The list of fd sets is shared by all monitor connections.
4634 # -> { "execute": "query-fdsets" }
4640 # "opaque": "rdonly:/path/to/file"
4644 # "opaque": "rdwr:/path/to/file"
4664 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
4669 # Information describing the QEMU target.
4671 # @arch: the target architecture (eg "x86_64", "i386", etc)
4675 { 'struct': 'TargetInfo',
4676 'data': { 'arch': 'str' } }
4681 # Return information about the target for this QEMU
4683 # Returns: TargetInfo
4687 { 'command': 'query-target', 'returns': 'TargetInfo' }
4692 # An enumeration of key name.
4694 # This is used by the @send-key command.
4696 # @unmapped: since 2.0
4699 # @kp_comma: since 2.4
4700 # @kp_equals: since 2.6
4702 # @hiragana: since 2.9
4703 # @henkan: since 2.9
4709 { 'enum': 'QKeyCode',
4710 'data': [ 'unmapped',
4711 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
4712 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
4713 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
4714 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
4715 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
4716 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
4717 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
4718 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
4719 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
4720 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
4721 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
4722 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
4723 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
4724 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
4725 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
4726 'ro', 'hiragana', 'henkan', 'yen',
4727 'kp_comma', 'kp_equals', 'power' ] }
4732 # Represents a keyboard key.
4736 { 'union': 'KeyValue',
4739 'qcode': 'QKeyCode' } }
4744 # Send keys to guest.
4746 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
4747 # simultaneously sent to the guest. A @KeyValue.number value is sent
4748 # directly to the guest, while @KeyValue.qcode must be a valid
4751 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
4754 # Returns: Nothing on success
4755 # If key is unknown or redundant, InvalidParameter
4761 # -> { "execute": "send-key",
4762 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
4763 # { "type": "qcode", "data": "alt" },
4764 # { "type": "qcode", "data": "delete" } ] } }
4765 # <- { "return": {} }
4768 { 'command': 'send-key',
4769 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
4774 # Write a PPM of the VGA screen to a file.
4776 # @filename: the path of a new PPM file to store the image
4778 # Returns: Nothing on success
4784 # -> { "execute": "screendump",
4785 # "arguments": { "filename": "/tmp/image" } }
4786 # <- { "return": {} }
4789 { 'command': 'screendump', 'data': {'filename': 'str'} }
4795 # Configuration shared across all chardev backends
4797 # @logfile: #optional The name of a logfile to save output
4798 # @logappend: #optional true to append instead of truncate
4799 # (default to false to truncate)
4803 { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
4804 '*logappend': 'bool' } }
4809 # Configuration info for file chardevs.
4811 # @in: #optional The name of the input file
4812 # @out: The name of the output file
4813 # @append: #optional Open the file in append mode (default false to
4814 # truncate) (Since 2.6)
4818 { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
4820 '*append': 'bool' },
4821 'base': 'ChardevCommon' }
4826 # Configuration info for device and pipe chardevs.
4828 # @device: The name of the special file for the device,
4829 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
4833 { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
4834 'base': 'ChardevCommon' }
4839 # Configuration info for (stream) socket chardevs.
4841 # @addr: socket address to listen on (server=true)
4842 # or connect to (server=false)
4843 # @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
4844 # @server: #optional create server socket (default: true)
4845 # @wait: #optional wait for incoming connection on server
4846 # sockets (default: false).
4847 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
4848 # @telnet: #optional enable telnet protocol on server
4849 # sockets (default: false)
4850 # @reconnect: #optional For a client socket, if a socket is disconnected,
4851 # then attempt a reconnect after the given number of seconds.
4852 # Setting this to zero disables this function. (default: 0)
4857 { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
4858 '*tls-creds' : 'str',
4861 '*nodelay' : 'bool',
4863 '*reconnect' : 'int' },
4864 'base': 'ChardevCommon' }
4869 # Configuration info for datagram socket chardevs.
4871 # @remote: remote address
4872 # @local: #optional local address
4876 { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
4877 '*local' : 'SocketAddress' },
4878 'base': 'ChardevCommon' }
4883 # Configuration info for mux chardevs.
4885 # @chardev: name of the base chardev.
4889 { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
4890 'base': 'ChardevCommon' }
4895 # Configuration info for stdio chardevs.
4897 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
4898 # be delivered to qemu. Default: true in -nographic mode,
4903 { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
4904 'base': 'ChardevCommon' }
4908 # @ChardevSpiceChannel:
4910 # Configuration info for spice vm channel chardevs.
4912 # @type: kind of channel (for example vdagent).
4916 { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
4917 'base': 'ChardevCommon' }
4920 # @ChardevSpicePort:
4922 # Configuration info for spice port chardevs.
4924 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
4928 { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
4929 'base': 'ChardevCommon' }
4934 # Configuration info for virtual console chardevs.
4936 # @width: console width, in pixels
4937 # @height: console height, in pixels
4938 # @cols: console width, in chars
4939 # @rows: console height, in chars
4943 { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
4947 'base': 'ChardevCommon' }
4952 # Configuration info for ring buffer chardevs.
4954 # @size: #optional ring buffer size, must be power of two, default is 65536
4958 { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
4959 'base': 'ChardevCommon' }
4964 # Configuration info for the new chardev backend.
4966 # Since: 1.4 (testdev since 2.2, wctablet since 2.9)
4968 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
4969 'serial' : 'ChardevHostdev',
4970 'parallel': 'ChardevHostdev',
4971 'pipe' : 'ChardevHostdev',
4972 'socket' : 'ChardevSocket',
4973 'udp' : 'ChardevUdp',
4974 'pty' : 'ChardevCommon',
4975 'null' : 'ChardevCommon',
4976 'mux' : 'ChardevMux',
4977 'msmouse': 'ChardevCommon',
4978 'wctablet' : 'ChardevCommon',
4979 'braille': 'ChardevCommon',
4980 'testdev': 'ChardevCommon',
4981 'stdio' : 'ChardevStdio',
4982 'console': 'ChardevCommon',
4983 'spicevmc' : 'ChardevSpiceChannel',
4984 'spiceport' : 'ChardevSpicePort',
4986 'ringbuf': 'ChardevRingbuf',
4987 # next one is just for compatibility
4988 'memory' : 'ChardevRingbuf' } }
4993 # Return info about the chardev backend just created.
4995 # @pty: #optional name of the slave pseudoterminal device, present if
4996 # and only if a chardev of type 'pty' was created
5000 { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
5005 # Add a character device backend
5007 # @id: the chardev's ID, must be unique
5008 # @backend: backend type and parameters
5010 # Returns: ChardevReturn.
5016 # -> { "execute" : "chardev-add",
5017 # "arguments" : { "id" : "foo",
5018 # "backend" : { "type" : "null", "data" : {} } } }
5019 # <- { "return": {} }
5021 # -> { "execute" : "chardev-add",
5022 # "arguments" : { "id" : "bar",
5023 # "backend" : { "type" : "file",
5024 # "data" : { "out" : "/tmp/bar.log" } } } }
5025 # <- { "return": {} }
5027 # -> { "execute" : "chardev-add",
5028 # "arguments" : { "id" : "baz",
5029 # "backend" : { "type" : "pty", "data" : {} } } }
5030 # <- { "return": { "pty" : "/dev/pty/42" } }
5033 { 'command': 'chardev-add', 'data': {'id' : 'str',
5034 'backend' : 'ChardevBackend' },
5035 'returns': 'ChardevReturn' }
5040 # Remove a character device backend
5042 # @id: the chardev's ID, must exist and not be in use
5044 # Returns: Nothing on success
5050 # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
5051 # <- { "return": {} }
5054 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
5059 # An enumeration of TPM models
5061 # @tpm-tis: TPM TIS model
5065 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
5068 # @query-tpm-models:
5070 # Return a list of supported TPM models
5072 # Returns: a list of TpmModel
5078 # -> { "execute": "query-tpm-models" }
5079 # <- { "return": [ "tpm-tis" ] }
5082 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
5087 # An enumeration of TPM types
5089 # @passthrough: TPM passthrough type
5093 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
5098 # Return a list of supported TPM types
5100 # Returns: a list of TpmType
5106 # -> { "execute": "query-tpm-types" }
5107 # <- { "return": [ "passthrough" ] }
5110 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
5113 # @TPMPassthroughOptions:
5115 # Information about the TPM passthrough type
5117 # @path: #optional string describing the path used for accessing the TPM device
5119 # @cancel-path: #optional string showing the TPM's sysfs cancel file
5120 # for cancellation of TPM commands while they are executing
5124 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
5125 '*cancel-path' : 'str'} }
5130 # A union referencing different TPM backend types' configuration options
5132 # @type: 'passthrough' The configuration options for the TPM passthrough type
5136 { 'union': 'TpmTypeOptions',
5137 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
5142 # Information about the TPM
5144 # @id: The Id of the TPM
5146 # @model: The TPM frontend model
5148 # @options: The TPM (backend) type configuration options
5152 { 'struct': 'TPMInfo',
5153 'data': {'id': 'str',
5154 'model': 'TpmModel',
5155 'options': 'TpmTypeOptions' } }
5160 # Return information about the TPM device
5162 # Returns: @TPMInfo on success
5168 # -> { "execute": "query-tpm" }
5171 # { "model": "tpm-tis",
5173 # { "type": "passthrough",
5175 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
5176 # "path": "/dev/tpm0"
5185 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
5188 # @AcpiTableOptions:
5190 # Specify an ACPI table on the command line to load.
5192 # At most one of @file and @data can be specified. The list of files specified
5193 # by any one of them is loaded and concatenated in order. If both are omitted,
5196 # Other fields / optargs can be used to override fields of the generic ACPI
5197 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
5198 # Description Table Header. If a header field is not overridden, then the
5199 # corresponding value from the concatenated blob is used (in case of @file), or
5200 # it is filled in with a hard-coded value (in case of @data).
5202 # String fields are copied into the matching ACPI member from lowest address
5203 # upwards, and silently truncated / NUL-padded to length.
5205 # @sig: #optional table signature / identifier (4 bytes)
5207 # @rev: #optional table revision number (dependent on signature, 1 byte)
5209 # @oem_id: #optional OEM identifier (6 bytes)
5211 # @oem_table_id: #optional OEM table identifier (8 bytes)
5213 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
5215 # @asl_compiler_id: #optional identifier of the utility that created the table
5218 # @asl_compiler_rev: #optional revision number of the utility that created the
5221 # @file: #optional colon (:) separated list of pathnames to load and
5222 # concatenate as table data. The resultant binary blob is expected to
5223 # have an ACPI table header. At least one file is required. This field
5226 # @data: #optional colon (:) separated list of pathnames to load and
5227 # concatenate as table data. The resultant binary blob must not have an
5228 # ACPI table header. At least one file is required. This field excludes
5233 { 'struct': 'AcpiTableOptions',
5238 '*oem_table_id': 'str',
5239 '*oem_rev': 'uint32',
5240 '*asl_compiler_id': 'str',
5241 '*asl_compiler_rev': 'uint32',
5246 # @CommandLineParameterType:
5248 # Possible types for an option parameter.
5250 # @string: accepts a character string
5252 # @boolean: accepts "on" or "off"
5254 # @number: accepts a number
5256 # @size: accepts a number followed by an optional suffix (K)ilo,
5257 # (M)ega, (G)iga, (T)era
5261 { 'enum': 'CommandLineParameterType',
5262 'data': ['string', 'boolean', 'number', 'size'] }
5265 # @CommandLineParameterInfo:
5267 # Details about a single parameter of a command line option.
5269 # @name: parameter name
5271 # @type: parameter @CommandLineParameterType
5273 # @help: #optional human readable text string, not suitable for parsing.
5275 # @default: #optional default value string (since 2.1)
5279 { 'struct': 'CommandLineParameterInfo',
5280 'data': { 'name': 'str',
5281 'type': 'CommandLineParameterType',
5283 '*default': 'str' } }
5286 # @CommandLineOptionInfo:
5288 # Details about a command line option, including its list of parameter details
5290 # @option: option name
5292 # @parameters: an array of @CommandLineParameterInfo
5296 { 'struct': 'CommandLineOptionInfo',
5297 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
5300 # @query-command-line-options:
5302 # Query command line option schema.
5304 # @option: #optional option name
5306 # Returns: list of @CommandLineOptionInfo for all options (or for the given
5307 # @option). Returns an error if the given @option doesn't exist.
5313 # -> { "execute": "query-command-line-options",
5314 # "arguments": { "option": "option-rom" } }
5319 # "name": "romfile",
5323 # "name": "bootindex",
5327 # "option": "option-rom"
5333 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
5334 'returns': ['CommandLineOptionInfo'] }
5337 # @X86CPURegister32:
5339 # A X86 32-bit register
5343 { 'enum': 'X86CPURegister32',
5344 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
5347 # @X86CPUFeatureWordInfo:
5349 # Information about a X86 CPU feature word
5351 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
5353 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
5356 # @cpuid-register: Output register containing the feature bits
5358 # @features: value of output register, containing the feature bits
5362 { 'struct': 'X86CPUFeatureWordInfo',
5363 'data': { 'cpuid-input-eax': 'int',
5364 '*cpuid-input-ecx': 'int',
5365 'cpuid-register': 'X86CPURegister32',
5366 'features': 'int' } }
5369 # @DummyForceArrays:
5371 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
5375 { 'struct': 'DummyForceArrays',
5376 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
5382 # Packets receiving state
5384 # @normal: filter assigned packets according to the mac-table
5386 # @none: don't receive any assigned packet
5388 # @all: receive all assigned packets
5392 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
5397 # Rx-filter information for a NIC.
5399 # @name: net client name
5401 # @promiscuous: whether promiscuous mode is enabled
5403 # @multicast: multicast receive state
5405 # @unicast: unicast receive state
5407 # @vlan: vlan receive state (Since 2.0)
5409 # @broadcast-allowed: whether to receive broadcast
5411 # @multicast-overflow: multicast table is overflowed or not
5413 # @unicast-overflow: unicast table is overflowed or not
5415 # @main-mac: the main macaddr string
5417 # @vlan-table: a list of active vlan id
5419 # @unicast-table: a list of unicast macaddr string
5421 # @multicast-table: a list of multicast macaddr string
5425 { 'struct': 'RxFilterInfo',
5428 'promiscuous': 'bool',
5429 'multicast': 'RxState',
5430 'unicast': 'RxState',
5432 'broadcast-allowed': 'bool',
5433 'multicast-overflow': 'bool',
5434 'unicast-overflow': 'bool',
5436 'vlan-table': ['int'],
5437 'unicast-table': ['str'],
5438 'multicast-table': ['str'] }}
5443 # Return rx-filter information for all NICs (or for the given NIC).
5445 # @name: #optional net client name
5447 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
5448 # Returns an error if the given @name doesn't exist, or given
5449 # NIC doesn't support rx-filter querying, or given net client
5456 # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
5459 # "promiscuous": true,
5461 # "main-mac": "52:54:00:12:34:56",
5462 # "unicast": "normal",
5468 # "unicast-table": [
5470 # "multicast": "normal",
5471 # "multicast-overflow": false,
5472 # "unicast-overflow": false,
5473 # "multicast-table": [
5474 # "01:00:5e:00:00:01",
5475 # "33:33:00:00:00:01",
5476 # "33:33:ff:12:34:56"
5478 # "broadcast-allowed": false
5484 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
5485 'returns': ['RxFilterInfo'] }
5490 # Button of a pointer input device (mouse, tablet).
5492 # @side: front side button of a 5-button mouse (since 2.9)
5494 # @extra: rear side button of a 5-button mouse (since 2.9)
5498 { 'enum' : 'InputButton',
5499 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
5505 # Position axis of a pointer input device (mouse, tablet).
5509 { 'enum' : 'InputAxis',
5510 'data' : [ 'x', 'y' ] }
5515 # Keyboard input event.
5517 # @key: Which key this event is for.
5518 # @down: True for key-down and false for key-up events.
5522 { 'struct' : 'InputKeyEvent',
5523 'data' : { 'key' : 'KeyValue',
5529 # Pointer button input event.
5531 # @button: Which button this event is for.
5532 # @down: True for key-down and false for key-up events.
5536 { 'struct' : 'InputBtnEvent',
5537 'data' : { 'button' : 'InputButton',
5543 # Pointer motion input event.
5545 # @axis: Which axis is referenced by @value.
5546 # @value: Pointer position. For absolute coordinates the
5547 # valid range is 0 -> 0x7ffff
5551 { 'struct' : 'InputMoveEvent',
5552 'data' : { 'axis' : 'InputAxis',
5558 # Input event union.
5560 # @type: the input type, one of:
5561 # - 'key': Input event of Keyboard
5562 # - 'btn': Input event of pointer buttons
5563 # - 'rel': Input event of relative pointer motion
5564 # - 'abs': Input event of absolute pointer motion
5568 { 'union' : 'InputEvent',
5569 'data' : { 'key' : 'InputKeyEvent',
5570 'btn' : 'InputBtnEvent',
5571 'rel' : 'InputMoveEvent',
5572 'abs' : 'InputMoveEvent' } }
5575 # @input-send-event:
5577 # Send input event(s) to guest.
5579 # @device: #optional display device to send event(s) to.
5580 # @head: #optional head to send event(s) to, in case the
5581 # display device supports multiple scanouts.
5582 # @events: List of InputEvent union.
5584 # Returns: Nothing on success.
5586 # The @device and @head parameters can be used to send the input event
5587 # to specific input devices in case (a) multiple input devices of the
5588 # same kind are added to the virtual machine and (b) you have
5589 # configured input routing (see docs/multiseat.txt) for those input
5590 # devices. The parameters work exactly like the device and head
5591 # properties of input devices. If @device is missing, only devices
5592 # that have no input routing config are admissible. If @device is
5593 # specified, both input devices with and without input routing config
5594 # are admissible, but devices with input routing config take
5599 # Note: The consoles are visible in the qom tree, under
5600 # /backend/console[$index]. They have a device link and head property,
5601 # so it is possible to map which console belongs to which device and
5606 # 1. Press left mouse button.
5608 # -> { "execute": "input-send-event",
5609 # "arguments": { "device": "video0",
5610 # "events": [ { "type": "btn",
5611 # "data" : { "down": true, "button": "left" } } ] } }
5612 # <- { "return": {} }
5614 # -> { "execute": "input-send-event",
5615 # "arguments": { "device": "video0",
5616 # "events": [ { "type": "btn",
5617 # "data" : { "down": false, "button": "left" } } ] } }
5618 # <- { "return": {} }
5620 # 2. Press ctrl-alt-del.
5622 # -> { "execute": "input-send-event",
5623 # "arguments": { "events": [
5624 # { "type": "key", "data" : { "down": true,
5625 # "key": {"type": "qcode", "data": "ctrl" } } },
5626 # { "type": "key", "data" : { "down": true,
5627 # "key": {"type": "qcode", "data": "alt" } } },
5628 # { "type": "key", "data" : { "down": true,
5629 # "key": {"type": "qcode", "data": "delete" } } } ] } }
5630 # <- { "return": {} }
5632 # 3. Move mouse pointer to absolute coordinates (20000, 400).
5634 # -> { "execute": "input-send-event" ,
5635 # "arguments": { "events": [
5636 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
5637 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
5638 # <- { "return": {} }
5641 { 'command': 'input-send-event',
5642 'data': { '*device': 'str',
5644 'events' : [ 'InputEvent' ] } }
5651 { 'enum': 'NumaOptionsType',
5652 'data': [ 'node' ] }
5657 # A discriminated record of NUMA options. (for OptsVisitor)
5661 { 'union': 'NumaOptions',
5662 'base': { 'type': 'NumaOptionsType' },
5663 'discriminator': 'type',
5665 'node': 'NumaNodeOptions' }}
5670 # Create a guest NUMA node. (for OptsVisitor)
5672 # @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
5674 # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
5677 # @mem: #optional memory size of this node; mutually exclusive with @memdev.
5678 # Equally divide total memory among nodes if both @mem and @memdev are
5681 # @memdev: #optional memory backend object. If specified for one node,
5682 # it must be specified for all nodes.
5686 { 'struct': 'NumaNodeOptions',
5688 '*nodeid': 'uint16',
5689 '*cpus': ['uint16'],
5696 # Host memory policy types
5698 # @default: restore default policy, remove any nondefault policy
5700 # @preferred: set the preferred host nodes for allocation
5702 # @bind: a strict policy that restricts memory allocation to the
5703 # host nodes specified
5705 # @interleave: memory allocations are interleaved across the set
5706 # of host nodes specified
5710 { 'enum': 'HostMemPolicy',
5711 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
5716 # Information about memory backend
5718 # @id: #optional backend's ID if backend has 'id' property (since 2.9)
5720 # @size: memory backend size
5722 # @merge: enables or disables memory merge support
5724 # @dump: includes memory backend's memory in a core dump or not
5726 # @prealloc: enables or disables memory preallocation
5728 # @host-nodes: host nodes for its memory policy
5730 # @policy: memory policy of memory backend
5734 { 'struct': 'Memdev',
5741 'host-nodes': ['uint16'],
5742 'policy': 'HostMemPolicy' }}
5747 # Returns information for all memory backends.
5749 # Returns: a list of @Memdev.
5755 # -> { "execute": "query-memdev" }
5759 # "size": 536870912,
5762 # "prealloc": false,
5763 # "host-nodes": [0, 1],
5767 # "size": 536870912,
5771 # "host-nodes": [2, 3],
5772 # "policy": "preferred"
5778 { 'command': 'query-memdev', 'returns': ['Memdev'] }
5781 # @PCDIMMDeviceInfo:
5783 # PCDIMMDevice state information
5785 # @id: #optional device's ID
5787 # @addr: physical address, where device is mapped
5789 # @size: size of memory that the device provides
5791 # @slot: slot number at which device is plugged in
5793 # @node: NUMA node number where device is plugged in
5795 # @memdev: memory backend linked with device
5797 # @hotplugged: true if device was hotplugged
5799 # @hotpluggable: true if device if could be added/removed while machine is running
5803 { 'struct': 'PCDIMMDeviceInfo',
5804 'data': { '*id': 'str',
5810 'hotplugged': 'bool',
5811 'hotpluggable': 'bool'
5816 # @MemoryDeviceInfo:
5818 # Union containing information about a memory device
5822 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
5825 # @query-memory-devices:
5827 # Lists available memory devices and their state
5833 # -> { "execute": "query-memory-devices" }
5834 # <- { "return": [ { "data":
5835 # { "addr": 5368709120,
5836 # "hotpluggable": true,
5837 # "hotplugged": true,
5839 # "memdev": "/objects/memX",
5841 # "size": 1073741824,
5847 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
5852 # @DIMM: memory slot
5853 # @CPU: logical CPU slot (since 2.7)
5855 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
5860 # OSPM Status Indication for a device
5861 # For description of possible values of @source and @status fields
5862 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
5864 # @device: #optional device ID associated with slot
5866 # @slot: slot ID, unique per slot of a given @slot-type
5868 # @slot-type: type of the slot
5870 # @source: an integer containing the source event
5872 # @status: an integer containing the status code
5876 { 'struct': 'ACPIOSTInfo',
5877 'data' : { '*device': 'str',
5879 'slot-type': 'ACPISlotType',
5884 # @query-acpi-ospm-status:
5886 # Return a list of ACPIOSTInfo for devices that support status
5887 # reporting via ACPI _OST method.
5893 # -> { "execute": "query-acpi-ospm-status" }
5894 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
5895 # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
5896 # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
5897 # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
5901 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
5904 # @WatchdogExpirationAction:
5906 # An enumeration of the actions taken when the watchdog device's timer is
5909 # @reset: system resets
5911 # @shutdown: system shutdown, note that it is similar to @powerdown, which
5912 # tries to set to system status and notify guest
5914 # @poweroff: system poweroff, the emulator program exits
5916 # @pause: system pauses, similar to @stop
5918 # @debug: system enters debug state
5920 # @none: nothing is done
5922 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
5923 # VCPUS on x86) (since 2.4)
5927 { 'enum': 'WatchdogExpirationAction',
5928 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
5934 # An enumeration of the I/O operation types
5936 # @read: read operation
5938 # @write: write operation
5942 { 'enum': 'IoOperationType',
5943 'data': [ 'read', 'write' ] }
5946 # @GuestPanicAction:
5948 # An enumeration of the actions taken when guest OS panic is detected
5950 # @pause: system pauses
5952 # Since: 2.1 (poweroff since 2.8)
5954 { 'enum': 'GuestPanicAction',
5955 'data': [ 'pause', 'poweroff' ] }
5958 # @GuestPanicInformationType:
5960 # An enumeration of the guest panic information types
5964 { 'enum': 'GuestPanicInformationType',
5965 'data': [ 'hyper-v'] }
5968 # @GuestPanicInformation:
5970 # Information about a guest panic
5974 {'union': 'GuestPanicInformation',
5975 'base': {'type': 'GuestPanicInformationType'},
5976 'discriminator': 'type',
5977 'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }
5980 # @GuestPanicInformationHyperV:
5982 # Hyper-V specific guest panic information (HV crash MSRs)
5986 {'struct': 'GuestPanicInformationHyperV',
5987 'data': { 'arg1': 'uint64',
5991 'arg5': 'uint64' } }
5994 # @rtc-reset-reinjection:
5996 # This command will reset the RTC interrupt reinjection backlog.
5997 # Can be used if another mechanism to synchronize guest time
5998 # is in effect, for example QEMU guest agent's guest-set-time
6005 # -> { "execute": "rtc-reset-reinjection" }
6006 # <- { "return": {} }
6009 { 'command': 'rtc-reset-reinjection' }
6011 # Rocker ethernet network switch
6012 { 'include': 'qapi/rocker.json' }
6017 # Mode of the replay subsystem.
6019 # @none: normal execution mode. Replay or record are not enabled.
6021 # @record: record mode. All non-deterministic data is written into the
6024 # @play: replay mode. Non-deterministic data required for system execution
6025 # is read from the log.
6029 { 'enum': 'ReplayMode',
6030 'data': [ 'none', 'record', 'play' ] }
6033 # @xen-load-devices-state:
6035 # Load the state of all devices from file. The RAM and the block devices
6036 # of the VM are not loaded by this command.
6038 # @filename: the file to load the state of the devices from as binary
6039 # data. See xen-save-devices-state.txt for a description of the binary
6046 # -> { "execute": "xen-load-devices-state",
6047 # "arguments": { "filename": "/tmp/resume" } }
6048 # <- { "return": {} }
6051 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
6054 # @xen-set-replication:
6056 # Enable or disable replication.
6058 # @enable: true to enable, false to disable.
6060 # @primary: true for primary or false for secondary.
6062 # @failover: #optional true to do failover, false to stop. but cannot be
6063 # specified if 'enable' is true. default value is false.
6069 # -> { "execute": "xen-set-replication",
6070 # "arguments": {"enable": true, "primary": false} }
6071 # <- { "return": {} }
6075 { 'command': 'xen-set-replication',
6076 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
6079 # @ReplicationStatus:
6081 # The result format for 'query-xen-replication-status'.
6083 # @error: true if an error happened, false if replication is normal.
6085 # @desc: #optional the human readable error description string, when
6090 { 'struct': 'ReplicationStatus',
6091 'data': { 'error': 'bool', '*desc': 'str' } }
6094 # @query-xen-replication-status:
6096 # Query replication status while the vm is running.
6098 # Returns: A @ReplicationResult object showing the status.
6102 # -> { "execute": "query-xen-replication-status" }
6103 # <- { "return": { "error": false } }
6107 { 'command': 'query-xen-replication-status',
6108 'returns': 'ReplicationStatus' }
6111 # @xen-colo-do-checkpoint:
6113 # Xen uses this command to notify replication to trigger a checkpoint.
6119 # -> { "execute": "xen-colo-do-checkpoint" }
6120 # <- { "return": {} }
6124 { 'command': 'xen-colo-do-checkpoint' }
6129 # The struct describes capability for a specific GIC (Generic
6130 # Interrupt Controller) version. These bits are not only decided by
6131 # QEMU/KVM software version, but also decided by the hardware that
6132 # the program is running upon.
6134 # @version: version of GIC to be described. Currently, only 2 and 3
6137 # @emulated: whether current QEMU/hardware supports emulated GIC
6138 # device in user space.
6140 # @kernel: whether current QEMU/hardware supports hardware
6141 # accelerated GIC device in kernel.
6145 { 'struct': 'GICCapability',
6146 'data': { 'version': 'int',
6148 'kernel': 'bool' } }
6151 # @query-gic-capabilities:
6153 # This command is ARM-only. It will return a list of GICCapability
6154 # objects that describe its capability bits.
6156 # Returns: a list of GICCapability objects.
6162 # -> { "execute": "query-gic-capabilities" }
6163 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
6164 # { "version": 3, "emulated": false, "kernel": true } ] }
6167 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
6170 # @CpuInstanceProperties:
6172 # List of properties to be used for hotplugging a CPU instance,
6173 # it should be passed by management with device_add command when
6174 # a CPU is being hotplugged.
6176 # @node-id: #optional NUMA node ID the CPU belongs to
6177 # @socket-id: #optional socket number within node/board the CPU belongs to
6178 # @core-id: #optional core number within socket the CPU belongs to
6179 # @thread-id: #optional thread number within core the CPU belongs to
6181 # Note: currently there are 4 properties that could be present
6182 # but management should be prepared to pass through other
6183 # properties with device_add command to allow for future
6184 # interface extension. This also requires the filed names to be kept in
6185 # sync with the properties passed to -device/device_add.
6189 { 'struct': 'CpuInstanceProperties',
6190 'data': { '*node-id': 'int',
6191 '*socket-id': 'int',
6200 # @type: CPU object type for usage with device_add command
6201 # @props: list of properties to be used for hotplugging CPU
6202 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
6203 # @qom-path: #optional link to existing CPU object if CPU is present or
6204 # omitted if CPU is not present.
6208 { 'struct': 'HotpluggableCPU',
6209 'data': { 'type': 'str',
6210 'vcpus-count': 'int',
6211 'props': 'CpuInstanceProperties',
6217 # @query-hotpluggable-cpus:
6219 # Returns: a list of HotpluggableCPU objects.
6225 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
6227 # -> { "execute": "query-hotpluggable-cpus" }
6229 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
6230 # "vcpus-count": 1 },
6231 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
6232 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
6235 # For pc machine type started with -smp 1,maxcpus=2:
6237 # -> { "execute": "query-hotpluggable-cpus" }
6240 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6241 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
6244 # "qom-path": "/machine/unattached/device[0]",
6245 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
6246 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
6251 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
6258 # @guid: the globally unique identifier
6262 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
6265 # @query-vm-generation-id:
6267 # Show Virtual Machine Generation ID
6271 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }