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/interop/qmp-spec.txt) for
27 # detailed information on the Server command and response formats.
29 # = Stability Considerations
31 # The current QMP command set (described in this file) may be useful for a
32 # number of use cases, however it's limited and several commands have bad
33 # defined semantics, specially with regard to command completion.
35 # These problems are going to be solved incrementally in the next QEMU releases
36 # and we're going to establish a deprecation policy for badly defined commands.
38 # If you're planning to adopt QMP, please observe the following:
40 # 1. The deprecation policy will take effect and be documented soon, please
41 # check the documentation of each used command as soon as a new release of
44 # 2. DO NOT rely on anything which is not explicit documented
46 # 3. Errors, in special, are not documented. Applications should NOT check
47 # for specific errors classes or data (it's strongly recommended to only
48 # check for the "error" key)
52 { 'pragma': { 'doc-required': true } }
54 # Whitelists to permit QAPI rule violations; think twice before you
57 # Commands allowed to return a non-dictionary:
58 'returns-whitelist': [
59 'human-monitor-command',
61 'query-migrate-cache-size',
65 'name-case-whitelist': [
66 'ACPISlotType', # DIMM, visible through query-acpi-ospm-status
67 'CpuInfoMIPS', # PC, visible through query-cpu
68 'CpuInfoTricore', # PC, visible through query-cpu
69 'QapiErrorClass', # all members, visible through errors
70 'UuidInfo', # UUID, visible through query-uuid
71 'X86CPURegister32', # all members, visible indirectly through qom-get
72 'q_obj_CpuInfo-base' # CPU, visible through query-cpu
75 # Documentation generated with qapi2texi.py is in source order, with
76 # included sub-schemas inserted at the first include directive
77 # (subsequent include directives have no effect). To get a sane and
78 # stable order, it's best to include each sub-schema just once, or
79 # include it first in qapi-schema.json.
81 { 'include': 'qapi/common.json' }
82 { 'include': 'qapi/sockets.json' }
83 { 'include': 'qapi/run-state.json' }
84 { 'include': 'qapi/crypto.json' }
85 { 'include': 'qapi/block.json' }
86 { 'include': 'qapi/char.json' }
87 { 'include': 'qapi/net.json' }
88 { 'include': 'qapi/rocker.json' }
89 { 'include': 'qapi/event.json' }
90 { 'include': 'qapi/trace.json' }
91 { 'include': 'qapi/introspect.json' }
100 # Enable QMP capabilities.
106 # -> { "execute": "qmp_capabilities" }
107 # <- { "return": {} }
109 # Notes: This command is valid exactly when first connecting: it must be
110 # issued before any other command will be accepted, and will fail once the
111 # monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt)
116 { 'command': 'qmp_capabilities' }
121 # This is a string value or the explicit lack of a string (null
122 # pointer in C). Intended for cases when 'optional absent' already
123 # has a different meaning.
125 # @s: the string value
126 # @n: no string value
130 { 'alternate': 'StrOrNull',
131 'data': { 's': 'str',
137 # Policy for handling lost ticks in timer devices.
139 # @discard: throw away the missed tick(s) and continue with future injection
140 # normally. Guest time may be delayed, unless the OS has explicit
141 # handling of lost ticks
143 # @delay: continue to deliver ticks at the normal rate. Guest time will be
144 # delayed due to the late tick
146 # @merge: merge the missed tick(s) into one tick and inject. Guest time
147 # may be delayed, depending on how the OS reacts to the merging
150 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
151 # guest time should not be delayed once catchup is complete.
155 { 'enum': 'LostTickPolicy',
156 'data': ['discard', 'delay', 'merge', 'slew' ] }
161 # Allow client connections for VNC, Spice and socket based
162 # character devices to be passed in to QEMU via SCM_RIGHTS.
164 # @protocol: protocol name. Valid names are "vnc", "spice" or the
165 # name of a character device (eg. from -chardev id=XXXX)
167 # @fdname: file descriptor name previously passed via 'getfd' command
169 # @skipauth: whether to skip authentication. Only applies
170 # to "vnc" and "spice" protocols
172 # @tls: whether to perform TLS. Only applies to the "spice"
175 # Returns: nothing on success.
181 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
182 # "fdname": "myclient" } }
183 # <- { "return": {} }
186 { 'command': 'add_client',
187 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
193 # Guest name information.
195 # @name: The name of the guest
199 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
204 # Return the name information of a guest.
206 # Returns: @NameInfo of the guest
212 # -> { "execute": "query-name" }
213 # <- { "return": { "name": "qemu-name" } }
216 { 'command': 'query-name', 'returns': 'NameInfo' }
221 # Information about support for KVM acceleration
223 # @enabled: true if KVM acceleration is active
225 # @present: true if KVM acceleration is built into this executable
229 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
234 # Returns information about KVM acceleration
242 # -> { "execute": "query-kvm" }
243 # <- { "return": { "enabled": true, "present": true } }
246 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
251 # Guest UUID information (Universally Unique Identifier).
253 # @UUID: the UUID of the guest
257 # Notes: If no UUID was specified for the guest, a null UUID is returned.
259 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
264 # Query the guest UUID information.
266 # Returns: The @UuidInfo for the guest
272 # -> { "execute": "query-uuid" }
273 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
276 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
281 # Information about a QMP event
283 # @name: The event name
287 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
292 # Return a list of supported QMP events by this server
294 # Returns: A list of @EventInfo for all supported events
300 # -> { "execute": "query-events" }
312 # Note: This example has been shortened as the real response is too long.
315 { 'command': 'query-events', 'returns': ['EventInfo'] }
320 # Detailed migration status.
322 # @transferred: amount of bytes already transferred to the target VM
324 # @remaining: amount of bytes remaining to be transferred to the target VM
326 # @total: total amount of bytes involved in the migration process
328 # @duplicate: number of duplicate (zero) pages (since 1.2)
330 # @skipped: number of skipped zero pages (since 1.5)
332 # @normal: number of normal pages (since 1.2)
334 # @normal-bytes: number of normal bytes sent (since 1.2)
336 # @dirty-pages-rate: number of pages dirtied by second by the
339 # @mbps: throughput in megabits/sec. (since 1.6)
341 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
343 # @postcopy-requests: The number of page requests received from the destination
346 # @page-size: The number of bytes per page for the various page-based
347 # statistics (since 2.10)
351 { 'struct': 'MigrationStats',
352 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
353 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
354 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
355 'mbps' : 'number', 'dirty-sync-count' : 'int',
356 'postcopy-requests' : 'int', 'page-size' : 'int' } }
361 # Detailed XBZRLE migration cache statistics
363 # @cache-size: XBZRLE cache size
365 # @bytes: amount of bytes already transferred to the target VM
367 # @pages: amount of pages transferred to the target VM
369 # @cache-miss: number of cache miss
371 # @cache-miss-rate: rate of cache miss (since 2.1)
373 # @overflow: number of overflows
377 { 'struct': 'XBZRLECacheStats',
378 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
379 'cache-miss': 'int', 'cache-miss-rate': 'number',
380 'overflow': 'int' } }
385 # An enumeration of migration status.
387 # @none: no migration has ever happened.
389 # @setup: migration process has been initiated.
391 # @cancelling: in the process of cancelling migration.
393 # @cancelled: cancelling migration is finished.
395 # @active: in the process of doing migration.
397 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
399 # @completed: migration is finished.
401 # @failed: some error occurred during migration process.
403 # @colo: VM is in the process of fault tolerance, VM can not get into this
404 # state unless colo capability is enabled for migration. (since 2.8)
409 { 'enum': 'MigrationStatus',
410 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
411 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
416 # Information about current migration process.
418 # @status: @MigrationStatus describing the current migration status.
419 # If this field is not returned, no migration process
422 # @ram: @MigrationStats containing detailed migration
423 # status, only returned if status is 'active' or
424 # 'completed'(since 1.2)
426 # @disk: @MigrationStats containing detailed disk migration
427 # status, only returned if status is 'active' and it is a block
430 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
431 # migration statistics, only returned if XBZRLE feature is on and
432 # status is 'active' or 'completed' (since 1.2)
434 # @total-time: total amount of milliseconds since migration started.
435 # If migration has ended, it returns the total migration
438 # @downtime: only present when migration finishes correctly
439 # total downtime in milliseconds for the guest.
442 # @expected-downtime: only present while migration is active
443 # expected downtime in milliseconds for the guest in last walk
444 # of the dirty bitmap. (since 1.3)
446 # @setup-time: amount of setup time in milliseconds _before_ the
447 # iterations begin but _after_ the QMP command is issued. This is designed
448 # to provide an accounting of any activities (such as RDMA pinning) which
449 # may be expensive, but do not actually occur during the iterative
450 # migration rounds themselves. (since 1.6)
452 # @cpu-throttle-percentage: percentage of time guest cpus are being
453 # throttled during auto-converge. This is only present when auto-converge
454 # has started throttling guest cpus. (Since 2.7)
456 # @error-desc: the human readable error description string, when
457 # @status is 'failed'. Clients should not attempt to parse the
458 # error strings. (Since 2.7)
462 { 'struct': 'MigrationInfo',
463 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
464 '*disk': 'MigrationStats',
465 '*xbzrle-cache': 'XBZRLECacheStats',
466 '*total-time': 'int',
467 '*expected-downtime': 'int',
469 '*setup-time': 'int',
470 '*cpu-throttle-percentage': 'int',
471 '*error-desc': 'str'} }
476 # Returns information about current migration process. If migration
477 # is active there will be another json-object with RAM migration
478 # status and if block migration is active another one with block
481 # Returns: @MigrationInfo
487 # 1. Before the first migration
489 # -> { "execute": "query-migrate" }
490 # <- { "return": {} }
492 # 2. Migration is done and has succeeded
494 # -> { "execute": "query-migrate" }
496 # "status": "completed",
501 # "total-time":12345,
502 # "setup-time":12345,
506 # "normal-bytes":123456,
507 # "dirty-sync-count":15
512 # 3. Migration is done and has failed
514 # -> { "execute": "query-migrate" }
515 # <- { "return": { "status": "failed" } }
517 # 4. Migration is being performed and is not a block migration:
519 # -> { "execute": "query-migrate" }
527 # "total-time":12345,
528 # "setup-time":12345,
529 # "expected-downtime":12345,
532 # "normal-bytes":123456,
533 # "dirty-sync-count":15
538 # 5. Migration is being performed and is a block migration:
540 # -> { "execute": "query-migrate" }
546 # "remaining":1053304,
547 # "transferred":3720,
548 # "total-time":12345,
549 # "setup-time":12345,
550 # "expected-downtime":12345,
553 # "normal-bytes":123456,
554 # "dirty-sync-count":15
558 # "remaining":20880384,
559 # "transferred":91136
564 # 6. Migration is being performed and XBZRLE is active:
566 # -> { "execute": "query-migrate" }
570 # "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
573 # "remaining":1053304,
574 # "transferred":3720,
575 # "total-time":12345,
576 # "setup-time":12345,
577 # "expected-downtime":12345,
580 # "normal-bytes":3412992,
581 # "dirty-sync-count":15
584 # "cache-size":67108864,
588 # "cache-miss-rate":0.123,
595 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
598 # @MigrationCapability:
600 # Migration capabilities enumeration
602 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
603 # This feature allows us to minimize migration traffic for certain work
604 # loads, by sending compressed difference of the pages
606 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
607 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
608 # Disabled by default. (since 2.0)
610 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
611 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
612 # source and target VM to support this feature. To enable it is sufficient
613 # to enable the capability on the source VM. The feature is disabled by
614 # default. (since 1.6)
616 # @compress: Use multiple compression threads to accelerate live migration.
617 # This feature can help to reduce the migration traffic, by sending
618 # compressed pages. Please note that if compress and xbzrle are both
619 # on, compress only takes effect in the ram bulk stage, after that,
620 # it will be disabled and only xbzrle takes effect, this can help to
621 # minimize migration traffic. The feature is disabled by default.
624 # @events: generate events for each migration state change
627 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
628 # to speed up convergence of RAM migration. (since 1.6)
630 # @postcopy-ram: Start executing on the migration target before all of RAM has
631 # been migrated, pulling the remaining pages along as needed. NOTE: If
632 # the migration fails during postcopy the VM will fail. (since 2.6)
634 # @x-colo: If enabled, migration will never end, and the state of the VM on the
635 # primary side will be migrated continuously to the VM on secondary
636 # side, this process is called COarse-Grain LOck Stepping (COLO) for
637 # Non-stop Service. (since 2.8)
639 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
640 # during postcopy-ram migration. (since 2.9)
642 # @block: If enabled, QEMU will also migrate the contents of all block
643 # devices. Default is disabled. A possible alternative uses
644 # mirror jobs to a builtin NBD server on the destination, which
645 # offers more flexibility.
648 # @return-path: If enabled, migration will use the return path even
649 # for precopy. (since 2.10)
653 { 'enum': 'MigrationCapability',
654 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
655 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
656 'block', 'return-path' ] }
659 # @MigrationCapabilityStatus:
661 # Migration capability information
663 # @capability: capability enum
665 # @state: capability state bool
669 { 'struct': 'MigrationCapabilityStatus',
670 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
673 # @migrate-set-capabilities:
675 # Enable/Disable the following migration capabilities (like xbzrle)
677 # @capabilities: json array of capability modifications to make
683 # -> { "execute": "migrate-set-capabilities" , "arguments":
684 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
687 { 'command': 'migrate-set-capabilities',
688 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
691 # @query-migrate-capabilities:
693 # Returns information about the current migration capabilities status
695 # Returns: @MigrationCapabilitiesStatus
701 # -> { "execute": "query-migrate-capabilities" }
703 # {"state": false, "capability": "xbzrle"},
704 # {"state": false, "capability": "rdma-pin-all"},
705 # {"state": false, "capability": "auto-converge"},
706 # {"state": false, "capability": "zero-blocks"},
707 # {"state": false, "capability": "compress"},
708 # {"state": true, "capability": "events"},
709 # {"state": false, "capability": "postcopy-ram"},
710 # {"state": false, "capability": "x-colo"}
714 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
717 # @MigrationParameter:
719 # Migration parameters enumeration
721 # @compress-level: Set the compression level to be used in live migration,
722 # the compression level is an integer between 0 and 9, where 0 means
723 # no compression, 1 means the best compression speed, and 9 means best
724 # compression ratio which will consume more CPU.
726 # @compress-threads: Set compression thread count to be used in live migration,
727 # the compression thread count is an integer between 1 and 255.
729 # @decompress-threads: Set decompression thread count to be used in live
730 # migration, the decompression thread count is an integer between 1
731 # and 255. Usually, decompression is at least 4 times as fast as
732 # compression, so set the decompress-threads to the number about 1/4
733 # of compress-threads is adequate.
735 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
736 # when migration auto-converge is activated. The
737 # default value is 20. (Since 2.7)
739 # @cpu-throttle-increment: throttle percentage increase each time
740 # auto-converge detects that migration is not making
741 # progress. The default value is 10. (Since 2.7)
743 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
744 # establishing a TLS connection over the migration data channel.
745 # On the outgoing side of the migration, the credentials must
746 # be for a 'client' endpoint, while for the incoming side the
747 # credentials must be for a 'server' endpoint. Setting this
748 # will enable TLS for all migrations. The default is unset,
749 # resulting in unsecured migration at the QEMU level. (Since 2.7)
751 # @tls-hostname: hostname of the target host for the migration. This is
752 # required when using x509 based TLS credentials and the
753 # migration URI does not already include a hostname. For
754 # example if using fd: or exec: based migration, the
755 # hostname must be provided so that the server's x509
756 # certificate identity can be validated. (Since 2.7)
758 # @max-bandwidth: to set maximum speed for migration. maximum speed in
759 # bytes per second. (Since 2.8)
761 # @downtime-limit: set maximum tolerated downtime for migration. maximum
762 # downtime in milliseconds (Since 2.8)
764 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
765 # periodic mode. (Since 2.8)
767 # @block-incremental: Affects how much storage is migrated when the
768 # block migration capability is enabled. When false, the entire
769 # storage backing chain is migrated into a flattened image at
770 # the destination; when true, only the active qcow2 layer is
771 # migrated and the destination must already have access to the
772 # same backing chain as was used on the source. (since 2.10)
776 { 'enum': 'MigrationParameter',
777 'data': ['compress-level', 'compress-threads', 'decompress-threads',
778 'cpu-throttle-initial', 'cpu-throttle-increment',
779 'tls-creds', 'tls-hostname', 'max-bandwidth',
780 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] }
783 # @MigrateSetParameters:
785 # @compress-level: compression level
787 # @compress-threads: compression thread count
789 # @decompress-threads: decompression thread count
791 # @cpu-throttle-initial: Initial percentage of time guest cpus are
792 # throttled when migration auto-converge is activated.
793 # The default value is 20. (Since 2.7)
795 # @cpu-throttle-increment: throttle percentage increase each time
796 # auto-converge detects that migration is not making
797 # progress. The default value is 10. (Since 2.7)
799 # @tls-creds: ID of the 'tls-creds' object that provides credentials
800 # for establishing a TLS connection over the migration data
801 # channel. On the outgoing side of the migration, the credentials
802 # must be for a 'client' endpoint, while for the incoming side the
803 # credentials must be for a 'server' endpoint. Setting this
804 # to a non-empty string enables TLS for all migrations.
805 # An empty string means that QEMU will use plain text mode for
806 # migration, rather than TLS (Since 2.9)
807 # Previously (since 2.7), this was reported by omitting
810 # @tls-hostname: hostname of the target host for the migration. This
811 # is required when using x509 based TLS credentials and the
812 # migration URI does not already include a hostname. For
813 # example if using fd: or exec: based migration, the
814 # hostname must be provided so that the server's x509
815 # certificate identity can be validated. (Since 2.7)
816 # An empty string means that QEMU will use the hostname
817 # associated with the migration URI, if any. (Since 2.9)
818 # Previously (since 2.7), this was reported by omitting
819 # tls-hostname instead.
821 # @max-bandwidth: to set maximum speed for migration. maximum speed in
822 # bytes per second. (Since 2.8)
824 # @downtime-limit: set maximum tolerated downtime for migration. maximum
825 # downtime in milliseconds (Since 2.8)
827 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
829 # @block-incremental: Affects how much storage is migrated when the
830 # block migration capability is enabled. When false, the entire
831 # storage backing chain is migrated into a flattened image at
832 # the destination; when true, only the active qcow2 layer is
833 # migrated and the destination must already have access to the
834 # same backing chain as was used on the source. (since 2.10)
838 # TODO either fuse back into MigrationParameters, or make
839 # MigrationParameters members mandatory
840 { 'struct': 'MigrateSetParameters',
841 'data': { '*compress-level': 'int',
842 '*compress-threads': 'int',
843 '*decompress-threads': 'int',
844 '*cpu-throttle-initial': 'int',
845 '*cpu-throttle-increment': 'int',
846 '*tls-creds': 'StrOrNull',
847 '*tls-hostname': 'StrOrNull',
848 '*max-bandwidth': 'int',
849 '*downtime-limit': 'int',
850 '*x-checkpoint-delay': 'int',
851 '*block-incremental': 'bool' } }
854 # @migrate-set-parameters:
856 # Set various migration parameters.
862 # -> { "execute": "migrate-set-parameters" ,
863 # "arguments": { "compress-level": 1 } }
866 { 'command': 'migrate-set-parameters', 'boxed': true,
867 'data': 'MigrateSetParameters' }
870 # @MigrationParameters:
872 # The optional members aren't actually optional.
874 # @compress-level: compression level
876 # @compress-threads: compression thread count
878 # @decompress-threads: decompression thread count
880 # @cpu-throttle-initial: Initial percentage of time guest cpus are
881 # throttled when migration auto-converge is activated.
884 # @cpu-throttle-increment: throttle percentage increase each time
885 # auto-converge detects that migration is not making
886 # progress. (Since 2.7)
888 # @tls-creds: ID of the 'tls-creds' object that provides credentials
889 # for establishing a TLS connection over the migration data
890 # channel. On the outgoing side of the migration, the credentials
891 # must be for a 'client' endpoint, while for the incoming side the
892 # credentials must be for a 'server' endpoint.
893 # An empty string means that QEMU will use plain text mode for
894 # migration, rather than TLS (Since 2.7)
895 # Note: 2.8 reports this by omitting tls-creds instead.
897 # @tls-hostname: hostname of the target host for the migration. This
898 # is required when using x509 based TLS credentials and the
899 # migration URI does not already include a hostname. For
900 # example if using fd: or exec: based migration, the
901 # hostname must be provided so that the server's x509
902 # certificate identity can be validated. (Since 2.7)
903 # An empty string means that QEMU will use the hostname
904 # associated with the migration URI, if any. (Since 2.9)
905 # Note: 2.8 reports this by omitting tls-hostname instead.
907 # @max-bandwidth: to set maximum speed for migration. maximum speed in
908 # bytes per second. (Since 2.8)
910 # @downtime-limit: set maximum tolerated downtime for migration. maximum
911 # downtime in milliseconds (Since 2.8)
913 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
915 # @block-incremental: Affects how much storage is migrated when the
916 # block migration capability is enabled. When false, the entire
917 # storage backing chain is migrated into a flattened image at
918 # the destination; when true, only the active qcow2 layer is
919 # migrated and the destination must already have access to the
920 # same backing chain as was used on the source. (since 2.10)
924 { 'struct': 'MigrationParameters',
925 'data': { '*compress-level': 'int',
926 '*compress-threads': 'int',
927 '*decompress-threads': 'int',
928 '*cpu-throttle-initial': 'int',
929 '*cpu-throttle-increment': 'int',
931 '*tls-hostname': 'str',
932 '*max-bandwidth': 'int',
933 '*downtime-limit': 'int',
934 '*x-checkpoint-delay': 'int',
935 '*block-incremental': 'bool' } }
938 # @query-migrate-parameters:
940 # Returns information about the current migration parameters
942 # Returns: @MigrationParameters
948 # -> { "execute": "query-migrate-parameters" }
950 # "decompress-threads": 2,
951 # "cpu-throttle-increment": 10,
952 # "compress-threads": 8,
953 # "compress-level": 1,
954 # "cpu-throttle-initial": 20,
955 # "max-bandwidth": 33554432,
956 # "downtime-limit": 300
961 { 'command': 'query-migrate-parameters',
962 'returns': 'MigrationParameters' }
965 # @client_migrate_info:
967 # Set migration information for remote display. This makes the server
968 # ask the client to automatically reconnect using the new parameters
969 # once migration finished successfully. Only implemented for SPICE.
971 # @protocol: must be "spice"
972 # @hostname: migration target hostname
973 # @port: spice tcp port for plaintext channels
974 # @tls-port: spice tcp port for tls-secured channels
975 # @cert-subject: server certificate subject
981 # -> { "execute": "client_migrate_info",
982 # "arguments": { "protocol": "spice",
983 # "hostname": "virt42.lab.kraxel.org",
985 # <- { "return": {} }
988 { 'command': 'client_migrate_info',
989 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
990 '*tls-port': 'int', '*cert-subject': 'str' } }
993 # @migrate-start-postcopy:
995 # Followup to a migration command to switch the migration to postcopy mode.
996 # The postcopy-ram capability must be set before the original migration
1003 # -> { "execute": "migrate-start-postcopy" }
1004 # <- { "return": {} }
1007 { 'command': 'migrate-start-postcopy' }
1012 # The message transmission between Primary side and Secondary side.
1014 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1016 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1018 # @checkpoint-reply: SVM gets PVM's checkpoint request
1020 # @vmstate-send: VM's state will be sent by PVM.
1022 # @vmstate-size: The total size of VMstate.
1024 # @vmstate-received: VM's state has been received by SVM.
1026 # @vmstate-loaded: VM's state has been loaded by SVM.
1030 { 'enum': 'COLOMessage',
1031 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1032 'vmstate-send', 'vmstate-size', 'vmstate-received',
1033 'vmstate-loaded' ] }
1040 # @unknown: unknown mode
1042 # @primary: master side
1044 # @secondary: slave side
1048 { 'enum': 'COLOMode',
1049 'data': [ 'unknown', 'primary', 'secondary'] }
1054 # An enumeration of COLO failover status
1056 # @none: no failover has ever happened
1058 # @require: got failover requirement but not handled
1060 # @active: in the process of doing failover
1062 # @completed: finish the process of failover
1064 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1068 { 'enum': 'FailoverStatus',
1069 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1072 # @x-colo-lost-heartbeat:
1074 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1075 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1076 # If sent to the Secondary, the Secondary side will run failover work,
1077 # then takes over server operation to become the service VM.
1083 # -> { "execute": "x-colo-lost-heartbeat" }
1084 # <- { "return": {} }
1087 { 'command': 'x-colo-lost-heartbeat' }
1092 # Information about a mouse device.
1094 # @name: the name of the mouse device
1096 # @index: the index of the mouse device
1098 # @current: true if this device is currently receiving mouse events
1100 # @absolute: true if this device supports absolute coordinates as input
1104 { 'struct': 'MouseInfo',
1105 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
1106 'absolute': 'bool'} }
1111 # Returns information about each active mouse device
1113 # Returns: a list of @MouseInfo for each device
1119 # -> { "execute": "query-mice" }
1122 # "name":"QEMU Microsoft Mouse",
1128 # "name":"QEMU PS/2 Mouse",
1137 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
1142 # An enumeration of cpu types that enable additional information during
1147 { 'enum': 'CpuInfoArch',
1148 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1153 # Information about a virtual CPU
1155 # @CPU: the index of the virtual CPU
1157 # @current: this only exists for backwards compatibility and should be ignored
1159 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
1160 # to a processor specific low power mode.
1162 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1164 # @thread_id: ID of the underlying host thread
1166 # @props: properties describing to which node/socket/core/thread
1167 # virtual CPU belongs to, provided if supported by board (since 2.10)
1169 # @arch: architecture of the cpu, which determines which additional fields
1170 # will be listed (since 2.6)
1174 # Notes: @halted is a transient state that changes frequently. By the time the
1175 # data is sent to the client, the guest may no longer be halted.
1177 { 'union': 'CpuInfo',
1178 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1179 'qom_path': 'str', 'thread_id': 'int',
1180 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
1181 'discriminator': 'arch',
1182 'data': { 'x86': 'CpuInfoX86',
1183 'sparc': 'CpuInfoSPARC',
1184 'ppc': 'CpuInfoPPC',
1185 'mips': 'CpuInfoMIPS',
1186 'tricore': 'CpuInfoTricore',
1187 'other': 'CpuInfoOther' } }
1192 # Additional information about a virtual i386 or x86_64 CPU
1194 # @pc: the 64-bit instruction pointer
1198 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1203 # Additional information about a virtual SPARC CPU
1205 # @pc: the PC component of the instruction pointer
1207 # @npc: the NPC component of the instruction pointer
1211 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1216 # Additional information about a virtual PPC CPU
1218 # @nip: the instruction pointer
1222 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1227 # Additional information about a virtual MIPS CPU
1229 # @PC: the instruction pointer
1233 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1238 # Additional information about a virtual Tricore CPU
1240 # @PC: the instruction pointer
1244 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1249 # No additional information is available about the virtual CPU
1254 { 'struct': 'CpuInfoOther', 'data': { } }
1259 # Returns a list of information about each virtual CPU.
1261 # Returns: a list of @CpuInfo for each virtual CPU
1267 # -> { "execute": "query-cpus" }
1273 # "qom_path":"/machine/unattached/device[0]",
1282 # "qom_path":"/machine/unattached/device[2]",
1291 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1296 # Information about an iothread
1298 # @id: the identifier of the iothread
1300 # @thread-id: ID of the underlying host thread
1302 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
1305 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
1306 # configured (since 2.9)
1308 # @poll-shrink: how many ns will be removed from polling time, 0 means that
1309 # it's not configured (since 2.9)
1313 { 'struct': 'IOThreadInfo',
1314 'data': {'id': 'str',
1316 'poll-max-ns': 'int',
1318 'poll-shrink': 'int' } }
1323 # Returns a list of information about each iothread.
1325 # Note: this list excludes the QEMU main loop thread, which is not declared
1326 # using the -object iothread command-line option. It is always the main thread
1329 # Returns: a list of @IOThreadInfo for each iothread
1335 # -> { "execute": "query-iothreads" }
1349 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1354 # The basic information for vnc network connection
1358 # @service: The service name of the vnc port. This may depend on the host
1359 # system's service database so symbolic names should not be relied
1362 # @family: address family
1364 # @websocket: true in case the socket is a websocket (since 2.3).
1368 { 'struct': 'VncBasicInfo',
1369 'data': { 'host': 'str',
1371 'family': 'NetworkAddressFamily',
1372 'websocket': 'bool' } }
1377 # The network connection information for server
1379 # @auth: authentication method used for
1380 # the plain (non-websocket) VNC server
1384 { 'struct': 'VncServerInfo',
1385 'base': 'VncBasicInfo',
1386 'data': { '*auth': 'str' } }
1391 # Information about a connected VNC client.
1393 # @x509_dname: If x509 authentication is in use, the Distinguished
1394 # Name of the client.
1396 # @sasl_username: If SASL authentication is in use, the SASL username
1397 # used for authentication.
1401 { 'struct': 'VncClientInfo',
1402 'base': 'VncBasicInfo',
1403 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1408 # Information about the VNC session.
1410 # @enabled: true if the VNC server is enabled, false otherwise
1412 # @host: The hostname the VNC server is bound to. This depends on
1413 # the name resolution on the host and may be an IP address.
1415 # @family: 'ipv6' if the host is listening for IPv6 connections
1416 # 'ipv4' if the host is listening for IPv4 connections
1417 # 'unix' if the host is listening on a unix domain socket
1418 # 'unknown' otherwise
1420 # @service: The service name of the server's port. This may depends
1421 # on the host system's service database so symbolic names should not
1424 # @auth: the current authentication type used by the server
1425 # 'none' if no authentication is being used
1426 # 'vnc' if VNC authentication is being used
1427 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1428 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1429 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1430 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1431 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1432 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1433 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1434 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1435 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1437 # @clients: a list of @VncClientInfo of all currently connected clients
1441 { 'struct': 'VncInfo',
1442 'data': {'enabled': 'bool', '*host': 'str',
1443 '*family': 'NetworkAddressFamily',
1444 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1449 # vnc primary authentication method.
1453 { 'enum': 'VncPrimaryAuth',
1454 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1455 'tls', 'vencrypt', 'sasl' ] }
1458 # @VncVencryptSubAuth:
1460 # vnc sub authentication method with vencrypt.
1464 { 'enum': 'VncVencryptSubAuth',
1466 'tls-none', 'x509-none',
1467 'tls-vnc', 'x509-vnc',
1468 'tls-plain', 'x509-plain',
1469 'tls-sasl', 'x509-sasl' ] }
1475 # The network connection information for server
1477 # @auth: The current authentication type used by the servers
1479 # @vencrypt: The vencrypt sub authentication type used by the
1480 # servers, only specified in case auth == vencrypt.
1484 { 'struct': 'VncServerInfo2',
1485 'base': 'VncBasicInfo',
1486 'data': { 'auth' : 'VncPrimaryAuth',
1487 '*vencrypt' : 'VncVencryptSubAuth' } }
1493 # Information about a vnc server
1495 # @id: vnc server name.
1497 # @server: A list of @VncBasincInfo describing all listening sockets.
1498 # The list can be empty (in case the vnc server is disabled).
1499 # It also may have multiple entries: normal + websocket,
1500 # possibly also ipv4 + ipv6 in the future.
1502 # @clients: A list of @VncClientInfo of all currently connected clients.
1503 # The list can be empty, for obvious reasons.
1505 # @auth: The current authentication type used by the non-websockets servers
1507 # @vencrypt: The vencrypt authentication type used by the servers,
1508 # only specified in case auth == vencrypt.
1510 # @display: The display device the vnc server is linked to.
1514 { 'struct': 'VncInfo2',
1515 'data': { 'id' : 'str',
1516 'server' : ['VncServerInfo2'],
1517 'clients' : ['VncClientInfo'],
1518 'auth' : 'VncPrimaryAuth',
1519 '*vencrypt' : 'VncVencryptSubAuth',
1520 '*display' : 'str' } }
1525 # Returns information about the current VNC server
1533 # -> { "execute": "query-vnc" }
1537 # "service":"50402",
1542 # "host":"127.0.0.1",
1543 # "service":"50401",
1551 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1554 # @query-vnc-servers:
1556 # Returns a list of vnc servers. The list can be empty.
1558 # Returns: a list of @VncInfo2
1562 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1567 # The basic information for SPICE network connection
1571 # @port: port number
1573 # @family: address family
1577 { 'struct': 'SpiceBasicInfo',
1578 'data': { 'host': 'str',
1580 'family': 'NetworkAddressFamily' } }
1585 # Information about a SPICE server
1587 # @auth: authentication method
1591 { 'struct': 'SpiceServerInfo',
1592 'base': 'SpiceBasicInfo',
1593 'data': { '*auth': 'str' } }
1598 # Information about a SPICE client channel.
1600 # @connection-id: SPICE connection id number. All channels with the same id
1601 # belong to the same SPICE session.
1603 # @channel-type: SPICE channel type number. "1" is the main control
1604 # channel, filter for this one if you want to track spice
1607 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1608 # multiple channels of the same type exist, such as multiple
1609 # display channels in a multihead setup
1611 # @tls: true if the channel is encrypted, false otherwise.
1615 { 'struct': 'SpiceChannel',
1616 'base': 'SpiceBasicInfo',
1617 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1621 # @SpiceQueryMouseMode:
1623 # An enumeration of Spice mouse states.
1625 # @client: Mouse cursor position is determined by the client.
1627 # @server: Mouse cursor position is determined by the server.
1629 # @unknown: No information is available about mouse mode used by
1632 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1636 { 'enum': 'SpiceQueryMouseMode',
1637 'data': [ 'client', 'server', 'unknown' ] }
1642 # Information about the SPICE session.
1644 # @enabled: true if the SPICE server is enabled, false otherwise
1646 # @migrated: true if the last guest migration completed and spice
1647 # migration had completed as well. false otherwise. (since 1.4)
1649 # @host: The hostname the SPICE server is bound to. This depends on
1650 # the name resolution on the host and may be an IP address.
1652 # @port: The SPICE server's port number.
1654 # @compiled-version: SPICE server version.
1656 # @tls-port: The SPICE server's TLS port number.
1658 # @auth: the current authentication type used by the server
1659 # 'none' if no authentication is being used
1660 # 'spice' uses SASL or direct TLS authentication, depending on command
1663 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1664 # be determined by the client or the server, or unknown if spice
1665 # server doesn't provide this information. (since: 1.1)
1667 # @channels: a list of @SpiceChannel for each active spice channel
1671 { 'struct': 'SpiceInfo',
1672 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1673 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1674 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1679 # Returns information about the current SPICE server
1681 # Returns: @SpiceInfo
1687 # -> { "execute": "query-spice" }
1693 # "host": "0.0.0.0",
1698 # "channel-type": 1,
1699 # "connection-id": 1804289383,
1700 # "host": "127.0.0.1",
1707 # "channel-type": 4,
1708 # "connection-id": 1804289383,
1709 # "host": "127.0.0.1",
1713 # [ ... more channels follow ... ]
1719 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1724 # Information about the guest balloon device.
1726 # @actual: the number of bytes the balloon currently contains
1731 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1736 # Return information about the balloon device.
1738 # Returns: @BalloonInfo on success
1740 # If the balloon driver is enabled but not functional because the KVM
1741 # kernel module cannot support it, KvmMissingCap
1743 # If no balloon device is present, DeviceNotActive
1749 # -> { "execute": "query-balloon" }
1751 # "actual": 1073741824,
1756 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1761 # A PCI device memory region
1763 # @base: the starting address (guest physical)
1765 # @limit: the ending address (guest physical)
1769 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1774 # Information about a PCI device I/O region.
1776 # @bar: the index of the Base Address Register for this region
1778 # @type: 'io' if the region is a PIO region
1779 # 'memory' if the region is a MMIO region
1781 # @size: memory size
1783 # @prefetch: if @type is 'memory', true if the memory is prefetchable
1785 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
1789 { 'struct': 'PciMemoryRegion',
1790 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1791 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1796 # Information about a bus of a PCI Bridge device
1798 # @number: primary bus interface number. This should be the number of the
1799 # bus the device resides on.
1801 # @secondary: secondary bus interface number. This is the number of the
1802 # main bus for the bridge
1804 # @subordinate: This is the highest number bus that resides below the
1807 # @io_range: The PIO range for all devices on this bridge
1809 # @memory_range: The MMIO range for all devices on this bridge
1811 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1816 { 'struct': 'PciBusInfo',
1817 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1818 'io_range': 'PciMemoryRange',
1819 'memory_range': 'PciMemoryRange',
1820 'prefetchable_range': 'PciMemoryRange' } }
1825 # Information about a PCI Bridge device
1827 # @bus: information about the bus the device resides on
1829 # @devices: a list of @PciDeviceInfo for each device on this bridge
1833 { 'struct': 'PciBridgeInfo',
1834 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1839 # Information about the Class of a PCI device
1841 # @desc: a string description of the device's class
1843 # @class: the class code of the device
1847 { 'struct': 'PciDeviceClass',
1848 'data': {'*desc': 'str', 'class': 'int'} }
1853 # Information about the Id of a PCI device
1855 # @device: the PCI device id
1857 # @vendor: the PCI vendor id
1861 { 'struct': 'PciDeviceId',
1862 'data': {'device': 'int', 'vendor': 'int'} }
1867 # Information about a PCI device
1869 # @bus: the bus number of the device
1871 # @slot: the slot the device is located in
1873 # @function: the function of the slot used by the device
1875 # @class_info: the class of the device
1877 # @id: the PCI device id
1879 # @irq: if an IRQ is assigned to the device, the IRQ number
1881 # @qdev_id: the device name of the PCI device
1883 # @pci_bridge: if the device is a PCI bridge, the bridge information
1885 # @regions: a list of the PCI I/O regions associated with the device
1887 # Notes: the contents of @class_info.desc are not stable and should only be
1888 # treated as informational.
1892 { 'struct': 'PciDeviceInfo',
1893 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1894 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1895 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1896 'regions': ['PciMemoryRegion']} }
1901 # Information about a PCI bus
1903 # @bus: the bus index
1905 # @devices: a list of devices on this bus
1909 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1914 # Return information about the PCI bus topology of the guest.
1916 # Returns: a list of @PciInfo for each PCI bus. Each bus is
1917 # represented by a json-object, which has a key with a json-array of
1918 # all PCI devices attached to it. Each device is represented by a
1925 # -> { "execute": "query-pci" }
1936 # "desc": "Host bridge"
1952 # "desc": "ISA bridge"
1968 # "desc": "IDE controller"
1990 # "desc": "VGA controller"
2000 # "mem_type_64": false,
2003 # "address": 4026531840,
2007 # "prefetch": false,
2008 # "mem_type_64": false,
2011 # "address": 4060086272,
2015 # "prefetch": false,
2016 # "mem_type_64": false,
2031 # "desc": "RAM controller"
2052 # Note: This example has been shortened as the real response is too long.
2055 { 'command': 'query-pci', 'returns': ['PciInfo'] }
2060 # This command will cause the QEMU process to exit gracefully. While every
2061 # attempt is made to send the QMP response before terminating, this is not
2062 # guaranteed. When using this interface, a premature EOF would not be
2069 # -> { "execute": "quit" }
2070 # <- { "return": {} }
2072 { 'command': 'quit' }
2077 # Stop all guest VCPU execution.
2081 # Notes: This function will succeed even if the guest is already in the stopped
2082 # state. In "inmigrate" state, it will ensure that the guest
2083 # remains paused once migration finishes, as if the -S option was
2084 # passed on the command line.
2088 # -> { "execute": "stop" }
2089 # <- { "return": {} }
2092 { 'command': 'stop' }
2097 # Performs a hard reset of a guest.
2103 # -> { "execute": "system_reset" }
2104 # <- { "return": {} }
2107 { 'command': 'system_reset' }
2110 # @system_powerdown:
2112 # Requests that a guest perform a powerdown operation.
2116 # Notes: A guest may or may not respond to this command. This command
2117 # returning does not indicate that a guest has accepted the request or
2118 # that it has shut down. Many guests will respond to this command by
2119 # prompting the user in some way.
2122 # -> { "execute": "system_powerdown" }
2123 # <- { "return": {} }
2126 { 'command': 'system_powerdown' }
2131 # This command is a nop that is only provided for the purposes of compatibility.
2135 # Notes: Do not use this command.
2137 { 'command': 'cpu', 'data': {'index': 'int'} }
2142 # Adds CPU with specified ID
2144 # @id: ID of CPU to be created, valid values [0..max_cpus)
2146 # Returns: Nothing on success
2152 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
2153 # <- { "return": {} }
2156 { 'command': 'cpu-add', 'data': {'id': 'int'} }
2161 # Save a portion of guest memory to a file.
2163 # @val: the virtual address of the guest to start from
2165 # @size: the size of memory region to save
2167 # @filename: the file to save the memory to as binary data
2169 # @cpu-index: the index of the virtual CPU to use for translating the
2170 # virtual address (defaults to CPU 0)
2172 # Returns: Nothing on success
2176 # Notes: Errors were not reliably returned until 1.1
2180 # -> { "execute": "memsave",
2181 # "arguments": { "val": 10,
2183 # "filename": "/tmp/virtual-mem-dump" } }
2184 # <- { "return": {} }
2187 { 'command': 'memsave',
2188 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
2193 # Save a portion of guest physical memory to a file.
2195 # @val: the physical address of the guest to start from
2197 # @size: the size of memory region to save
2199 # @filename: the file to save the memory to as binary data
2201 # Returns: Nothing on success
2205 # Notes: Errors were not reliably returned until 1.1
2209 # -> { "execute": "pmemsave",
2210 # "arguments": { "val": 10,
2212 # "filename": "/tmp/physical-mem-dump" } }
2213 # <- { "return": {} }
2216 { 'command': 'pmemsave',
2217 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
2222 # Resume guest VCPU execution.
2226 # Returns: If successful, nothing
2228 # Notes: This command will succeed if the guest is currently running. It
2229 # will also succeed if the guest is in the "inmigrate" state; in
2230 # this case, the effect of the command is to make sure the guest
2231 # starts once migration finishes, removing the effect of the -S
2232 # command line option if it was passed.
2236 # -> { "execute": "cont" }
2237 # <- { "return": {} }
2240 { 'command': 'cont' }
2245 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
2253 # -> { "execute": "system_wakeup" }
2254 # <- { "return": {} }
2257 { 'command': 'system_wakeup' }
2262 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
2263 # The command fails when the guest doesn't support injecting.
2265 # Returns: If successful, nothing
2269 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
2273 # -> { "execute": "inject-nmi" }
2274 # <- { "return": {} }
2277 { 'command': 'inject-nmi' }
2282 # Request the balloon driver to change its balloon size.
2284 # @value: the target size of the balloon in bytes
2286 # Returns: Nothing on success
2287 # If the balloon driver is enabled but not functional because the KVM
2288 # kernel module cannot support it, KvmMissingCap
2289 # If no balloon device is present, DeviceNotActive
2291 # Notes: This command just issues a request to the guest. When it returns,
2292 # the balloon size may not have changed. A guest can change the balloon
2293 # size independent of this command.
2299 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
2300 # <- { "return": {} }
2303 { 'command': 'balloon', 'data': {'value': 'int'} }
2308 # This action can be used to test transaction failure.
2312 { 'struct': 'Abort',
2316 # @ActionCompletionMode:
2318 # An enumeration of Transactional completion modes.
2320 # @individual: Do not attempt to cancel any other Actions if any Actions fail
2321 # after the Transaction request succeeds. All Actions that
2322 # can complete successfully will do so without waiting on others.
2323 # This is the default.
2325 # @grouped: If any Action fails after the Transaction succeeds, cancel all
2326 # Actions. Actions do not complete until all Actions are ready to
2327 # complete. May be rejected by Actions that do not support this
2332 { 'enum': 'ActionCompletionMode',
2333 'data': [ 'individual', 'grouped' ] }
2336 # @TransactionAction:
2338 # A discriminated record of operations that can be performed with
2339 # @transaction. Action @type can be:
2341 # - @abort: since 1.6
2342 # - @block-dirty-bitmap-add: since 2.5
2343 # - @block-dirty-bitmap-clear: since 2.5
2344 # - @blockdev-backup: since 2.3
2345 # - @blockdev-snapshot: since 2.5
2346 # - @blockdev-snapshot-internal-sync: since 1.7
2347 # - @blockdev-snapshot-sync: since 1.1
2348 # - @drive-backup: since 1.6
2352 { 'union': 'TransactionAction',
2355 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
2356 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
2357 'blockdev-backup': 'BlockdevBackup',
2358 'blockdev-snapshot': 'BlockdevSnapshot',
2359 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
2360 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
2361 'drive-backup': 'DriveBackup'
2365 # @TransactionProperties:
2367 # Optional arguments to modify the behavior of a Transaction.
2369 # @completion-mode: Controls how jobs launched asynchronously by
2370 # Actions will complete or fail as a group.
2371 # See @ActionCompletionMode for details.
2375 { 'struct': 'TransactionProperties',
2377 '*completion-mode': 'ActionCompletionMode'
2384 # Executes a number of transactionable QMP commands atomically. If any
2385 # operation fails, then the entire set of actions will be abandoned and the
2386 # appropriate error returned.
2388 # For external snapshots, the dictionary contains the device, the file to use for
2389 # the new snapshot, and the format. The default format, if not specified, is
2392 # Each new snapshot defaults to being created by QEMU (wiping any
2393 # contents if the file already exists), but it is also possible to reuse
2394 # an externally-created file. In the latter case, you should ensure that
2395 # the new image file has the same contents as the current one; QEMU cannot
2396 # perform any meaningful check. Typically this is achieved by using the
2397 # current image file as the backing file for the new image.
2399 # On failure, the original disks pre-snapshot attempt will be used.
2401 # For internal snapshots, the dictionary contains the device and the snapshot's
2402 # name. If an internal snapshot matching name already exists, the request will
2403 # be rejected. Only some image formats support it, for example, qcow2, rbd,
2406 # On failure, qemu will try delete the newly created internal snapshot in the
2407 # transaction. When an I/O error occurs during deletion, the user needs to fix
2408 # it later with qemu-img or other command.
2410 # @actions: List of @TransactionAction;
2411 # information needed for the respective operations.
2413 # @properties: structure of additional options to control the
2414 # execution of the transaction. See @TransactionProperties
2415 # for additional detail.
2417 # Returns: nothing on success
2419 # Errors depend on the operations of the transaction
2421 # Note: The transaction aborts on the first failure. Therefore, there will be
2422 # information on only one failed operation returned in an error condition, and
2423 # subsequent actions will not have been attempted.
2429 # -> { "execute": "transaction",
2430 # "arguments": { "actions": [
2431 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
2432 # "snapshot-file": "/some/place/my-image",
2433 # "format": "qcow2" } },
2434 # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
2435 # "snapshot-file": "/some/place/my-image2",
2436 # "snapshot-node-name": "node3432",
2437 # "mode": "existing",
2438 # "format": "qcow2" } },
2439 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
2440 # "snapshot-file": "/some/place/my-image2",
2441 # "mode": "existing",
2442 # "format": "qcow2" } },
2443 # { "type": "blockdev-snapshot-internal-sync", "data" : {
2444 # "device": "ide-hd2",
2445 # "name": "snapshot0" } } ] } }
2446 # <- { "return": {} }
2449 { 'command': 'transaction',
2450 'data': { 'actions': [ 'TransactionAction' ],
2451 '*properties': 'TransactionProperties'
2456 # @human-monitor-command:
2458 # Execute a command on the human monitor and return the output.
2460 # @command-line: the command to execute in the human monitor
2462 # @cpu-index: The CPU to use for commands that require an implicit CPU
2464 # Returns: the output of the command as a string
2468 # Notes: This command only exists as a stop-gap. Its use is highly
2469 # discouraged. The semantics of this command are not
2470 # guaranteed: this means that command names, arguments and
2471 # responses can change or be removed at ANY time. Applications
2472 # that rely on long term stability guarantees should NOT
2475 # Known limitations:
2477 # * This command is stateless, this means that commands that depend
2478 # on state information (such as getfd) might not work
2480 # * Commands that prompt the user for data don't currently work
2484 # -> { "execute": "human-monitor-command",
2485 # "arguments": { "command-line": "info kvm" } }
2486 # <- { "return": "kvm support: enabled\r\n" }
2489 { 'command': 'human-monitor-command',
2490 'data': {'command-line': 'str', '*cpu-index': 'int'},
2496 # Cancel the current executing migration process.
2498 # Returns: nothing on success
2500 # Notes: This command succeeds even if there is no migration process running.
2506 # -> { "execute": "migrate_cancel" }
2507 # <- { "return": {} }
2510 { 'command': 'migrate_cancel' }
2513 # @migrate_set_downtime:
2515 # Set maximum tolerated downtime for migration.
2517 # @value: maximum downtime in seconds
2519 # Returns: nothing on success
2521 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2527 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
2528 # <- { "return": {} }
2531 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2534 # @migrate_set_speed:
2536 # Set maximum speed for migration.
2538 # @value: maximum speed in bytes per second.
2540 # Returns: nothing on success
2542 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2548 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
2549 # <- { "return": {} }
2552 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2555 # @migrate-set-cache-size:
2557 # Set cache size to be used by XBZRLE migration
2559 # @value: cache size in bytes
2561 # The size will be rounded down to the nearest power of 2.
2562 # The cache size can be modified before and during ongoing migration
2564 # Returns: nothing on success
2570 # -> { "execute": "migrate-set-cache-size",
2571 # "arguments": { "value": 536870912 } }
2572 # <- { "return": {} }
2575 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2578 # @query-migrate-cache-size:
2580 # Query migration XBZRLE cache size
2582 # Returns: XBZRLE cache size in bytes
2588 # -> { "execute": "query-migrate-cache-size" }
2589 # <- { "return": 67108864 }
2592 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2595 # @ObjectPropertyInfo:
2597 # @name: the name of the property
2599 # @type: the type of the property. This will typically come in one of four
2602 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2603 # These types are mapped to the appropriate JSON type.
2605 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
2606 # device type name. Child properties create the composition tree.
2608 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
2609 # device type name. Link properties form the device model graph.
2613 { 'struct': 'ObjectPropertyInfo',
2614 'data': { 'name': 'str', 'type': 'str' } }
2619 # This command will list any properties of a object given a path in the object
2622 # @path: the path within the object model. See @qom-get for a description of
2625 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2630 { 'command': 'qom-list',
2631 'data': { 'path': 'str' },
2632 'returns': [ 'ObjectPropertyInfo' ] }
2637 # This command will get a property from a object model path and return the
2640 # @path: The path within the object model. There are two forms of supported
2641 # paths--absolute and partial paths.
2643 # Absolute paths are derived from the root object and can follow child<>
2644 # or link<> properties. Since they can follow link<> properties, they
2645 # can be arbitrarily long. Absolute paths look like absolute filenames
2646 # and are prefixed with a leading slash.
2648 # Partial paths look like relative filenames. They do not begin
2649 # with a prefix. The matching rules for partial paths are subtle but
2650 # designed to make specifying objects easy. At each level of the
2651 # composition tree, the partial path is matched as an absolute path.
2652 # The first match is not returned. At least two matches are searched
2653 # for. A successful result is only returned if only one match is
2654 # found. If more than one match is found, a flag is return to
2655 # indicate that the match was ambiguous.
2657 # @property: The property name to read
2659 # Returns: The property value. The type depends on the property
2660 # type. child<> and link<> properties are returned as #str
2661 # pathnames. All integer property types (u8, u16, etc) are
2666 { 'command': 'qom-get',
2667 'data': { 'path': 'str', 'property': 'str' },
2673 # This command will set a property from a object model path.
2675 # @path: see @qom-get for a description of this parameter
2677 # @property: the property name to set
2679 # @value: a value who's type is appropriate for the property type. See @qom-get
2680 # for a description of type mapping.
2684 { 'command': 'qom-set',
2685 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2690 # Sets the password of a remote display session.
2692 # @protocol: `vnc' to modify the VNC server password
2693 # `spice' to modify the Spice server password
2695 # @password: the new password
2697 # @connected: how to handle existing clients when changing the
2698 # password. If nothing is specified, defaults to `keep'
2699 # `fail' to fail the command if clients are connected
2700 # `disconnect' to disconnect existing clients
2701 # `keep' to maintain existing clients
2703 # Returns: Nothing on success
2704 # If Spice is not enabled, DeviceNotFound
2710 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
2711 # "password": "secret" } }
2712 # <- { "return": {} }
2715 { 'command': 'set_password',
2716 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2721 # Expire the password of a remote display server.
2723 # @protocol: the name of the remote display protocol `vnc' or `spice'
2725 # @time: when to expire the password.
2726 # `now' to expire the password immediately
2727 # `never' to cancel password expiration
2728 # `+INT' where INT is the number of seconds from now (integer)
2729 # `INT' where INT is the absolute time in seconds
2731 # Returns: Nothing on success
2732 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2736 # Notes: Time is relative to the server and currently there is no way to
2737 # coordinate server time with client time. It is not recommended to
2738 # use the absolute time version of the @time parameter unless you're
2739 # sure you are on the same machine as the QEMU instance.
2743 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2745 # <- { "return": {} }
2748 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2751 # @change-vnc-password:
2753 # Change the VNC server password.
2755 # @password: the new password to use with VNC authentication
2759 # Notes: An empty password in this command will set the password to the empty
2760 # string. Existing clients are unaffected by executing this command.
2762 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2767 # This command is multiple commands multiplexed together.
2769 # @device: This is normally the name of a block device but it may also be 'vnc'.
2770 # when it's 'vnc', then sub command depends on @target
2772 # @target: If @device is a block device, then this is the new filename.
2773 # If @device is 'vnc', then if the value 'password' selects the vnc
2774 # change password command. Otherwise, this specifies a new server URI
2775 # address to listen to for VNC connections.
2777 # @arg: If @device is a block device, then this is an optional format to open
2779 # If @device is 'vnc' and @target is 'password', this is the new VNC
2780 # password to set. See change-vnc-password for additional notes.
2782 # Returns: Nothing on success.
2783 # If @device is not a valid block device, DeviceNotFound
2785 # Notes: This interface is deprecated, and it is strongly recommended that you
2786 # avoid using it. For changing block devices, use
2787 # blockdev-change-medium; for changing VNC parameters, use
2788 # change-vnc-password.
2794 # 1. Change a removable medium
2796 # -> { "execute": "change",
2797 # "arguments": { "device": "ide1-cd0",
2798 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
2799 # <- { "return": {} }
2801 # 2. Change VNC password
2803 # -> { "execute": "change",
2804 # "arguments": { "device": "vnc", "target": "password",
2805 # "arg": "foobar1" } }
2806 # <- { "return": {} }
2809 { 'command': 'change',
2810 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2815 # This structure describes a search result from @qom-list-types
2817 # @name: the type name found in the search
2819 # @abstract: the type is abstract and can't be directly instantiated.
2820 # Omitted if false. (since 2.10)
2822 # @parent: Name of parent type, if any (since 2.10)
2826 { 'struct': 'ObjectTypeInfo',
2827 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } }
2832 # This command will return a list of types given search parameters
2834 # @implements: if specified, only return types that implement this type name
2836 # @abstract: if true, include abstract types in the results
2838 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2842 { 'command': 'qom-list-types',
2843 'data': { '*implements': 'str', '*abstract': 'bool' },
2844 'returns': [ 'ObjectTypeInfo' ] }
2847 # @DevicePropertyInfo:
2849 # Information about device properties.
2851 # @name: the name of the property
2852 # @type: the typename of the property
2853 # @description: if specified, the description of the property.
2858 { 'struct': 'DevicePropertyInfo',
2859 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2862 # @device-list-properties:
2864 # List properties associated with a device.
2866 # @typename: the type name of a device
2868 # Returns: a list of DevicePropertyInfo describing a devices properties
2872 { 'command': 'device-list-properties',
2873 'data': { 'typename': 'str'},
2874 'returns': [ 'DevicePropertyInfo' ] }
2879 # Migrates the current running guest to another Virtual Machine.
2881 # @uri: the Uniform Resource Identifier of the destination VM
2883 # @blk: do block migration (full disk copy)
2885 # @inc: incremental disk copy migration
2887 # @detach: this argument exists only for compatibility reasons and
2888 # is ignored by QEMU
2890 # Returns: nothing on success
2896 # 1. The 'query-migrate' command should be used to check migration's progress
2897 # and final result (this information is provided by the 'status' member)
2899 # 2. All boolean arguments default to false
2901 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
2906 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
2907 # <- { "return": {} }
2910 { 'command': 'migrate',
2911 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2914 # @migrate-incoming:
2916 # Start an incoming migration, the qemu must have been started
2917 # with -incoming defer
2919 # @uri: The Uniform Resource Identifier identifying the source or
2920 # address to listen on
2922 # Returns: nothing on success
2928 # 1. It's a bad idea to use a string for the uri, but it needs to stay
2929 # compatible with -incoming and the format of the uri is already exposed
2932 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
2935 # 3. The uri format is the same as for -incoming
2939 # -> { "execute": "migrate-incoming",
2940 # "arguments": { "uri": "tcp::4446" } }
2941 # <- { "return": {} }
2944 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2947 # @xen-save-devices-state:
2949 # Save the state of all devices to file. The RAM and the block devices
2950 # of the VM are not saved by this command.
2952 # @filename: the file to save the state of the devices to as binary
2953 # data. See xen-save-devices-state.txt for a description of the binary
2956 # Returns: Nothing on success
2962 # -> { "execute": "xen-save-devices-state",
2963 # "arguments": { "filename": "/tmp/save" } }
2964 # <- { "return": {} }
2967 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2970 # @xen-set-global-dirty-log:
2972 # Enable or disable the global dirty log mode.
2974 # @enable: true to enable, false to disable.
2982 # -> { "execute": "xen-set-global-dirty-log",
2983 # "arguments": { "enable": true } }
2984 # <- { "return": {} }
2987 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2992 # @driver: the name of the new device's driver
2994 # @bus: the device's parent bus (device tree path)
2996 # @id: the device's ID, must be unique
2998 # Additional arguments depend on the type.
3003 # 1. For detailed information about this command, please refer to the
3004 # 'docs/qdev-device-use.txt' file.
3006 # 2. It's possible to list device properties by running QEMU with the
3007 # "-device DEVICE,help" command-line argument, where DEVICE is the
3012 # -> { "execute": "device_add",
3013 # "arguments": { "driver": "e1000", "id": "net1",
3015 # "mac": "52:54:00:12:34:56" } }
3016 # <- { "return": {} }
3018 # TODO: This command effectively bypasses QAPI completely due to its
3019 # "additional arguments" business. It shouldn't have been added to
3020 # the schema in this form. It should be qapified properly, or
3021 # replaced by a properly qapified command.
3025 { 'command': 'device_add',
3026 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
3027 'gen': false } # so we can get the additional arguments
3032 # Remove a device from a guest
3034 # @id: the device's ID or QOM path
3036 # Returns: Nothing on success
3037 # If @id is not a valid device, DeviceNotFound
3039 # Notes: When this command completes, the device may not be removed from the
3040 # guest. Hot removal is an operation that requires guest cooperation.
3041 # This command merely requests that the guest begin the hot removal
3042 # process. Completion of the device removal process is signaled with a
3043 # DEVICE_DELETED event. Guest reset will automatically complete removal
3050 # -> { "execute": "device_del",
3051 # "arguments": { "id": "net1" } }
3052 # <- { "return": {} }
3054 # -> { "execute": "device_del",
3055 # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
3056 # <- { "return": {} }
3059 { 'command': 'device_del', 'data': {'id': 'str'} }
3062 # @DumpGuestMemoryFormat:
3064 # An enumeration of guest-memory-dump's format.
3068 # @kdump-zlib: kdump-compressed format with zlib-compressed
3070 # @kdump-lzo: kdump-compressed format with lzo-compressed
3072 # @kdump-snappy: kdump-compressed format with snappy-compressed
3076 { 'enum': 'DumpGuestMemoryFormat',
3077 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
3080 # @dump-guest-memory:
3082 # Dump guest's memory to vmcore. It is a synchronous operation that can take
3083 # very long depending on the amount of guest memory.
3085 # @paging: if true, do paging to get guest's memory mapping. This allows
3086 # using gdb to process the core file.
3088 # IMPORTANT: this option can make QEMU allocate several gigabytes
3089 # of RAM. This can happen for a large guest, or a
3090 # malicious guest pretending to be large.
3092 # Also, paging=true has the following limitations:
3094 # 1. The guest may be in a catastrophic state or can have corrupted
3095 # memory, which cannot be trusted
3096 # 2. The guest can be in real-mode even if paging is enabled. For
3097 # example, the guest uses ACPI to sleep, and ACPI sleep state
3099 # 3. Currently only supported on i386 and x86_64.
3101 # @protocol: the filename or file descriptor of the vmcore. The supported
3104 # 1. file: the protocol starts with "file:", and the following
3105 # string is the file's path.
3106 # 2. fd: the protocol starts with "fd:", and the following string
3109 # @detach: if true, QMP will return immediately rather than
3110 # waiting for the dump to finish. The user can track progress
3111 # using "query-dump". (since 2.6).
3113 # @begin: if specified, the starting physical address.
3115 # @length: if specified, the memory size, in bytes. If you don't
3116 # want to dump all guest's memory, please specify the start @begin
3119 # @format: if specified, the format of guest memory dump. But non-elf
3120 # format is conflict with paging and filter, ie. @paging, @begin and
3121 # @length is not allowed to be specified with non-elf @format at the
3122 # same time (since 2.0)
3124 # Note: All boolean arguments default to false
3126 # Returns: nothing on success
3132 # -> { "execute": "dump-guest-memory",
3133 # "arguments": { "protocol": "fd:dump" } }
3134 # <- { "return": {} }
3137 { 'command': 'dump-guest-memory',
3138 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
3139 '*begin': 'int', '*length': 'int',
3140 '*format': 'DumpGuestMemoryFormat'} }
3145 # Describe the status of a long-running background guest memory dump.
3147 # @none: no dump-guest-memory has started yet.
3149 # @active: there is one dump running in background.
3151 # @completed: the last dump has finished successfully.
3153 # @failed: the last dump has failed.
3157 { 'enum': 'DumpStatus',
3158 'data': [ 'none', 'active', 'completed', 'failed' ] }
3163 # The result format for 'query-dump'.
3165 # @status: enum of @DumpStatus, which shows current dump status
3167 # @completed: bytes written in latest dump (uncompressed)
3169 # @total: total bytes to be written in latest dump (uncompressed)
3173 { 'struct': 'DumpQueryResult',
3174 'data': { 'status': 'DumpStatus',
3181 # Query latest dump status.
3183 # Returns: A @DumpStatus object showing the dump status.
3189 # -> { "execute": "query-dump" }
3190 # <- { "return": { "status": "active", "completed": 1024000,
3191 # "total": 2048000 } }
3194 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
3197 # @DumpGuestMemoryCapability:
3199 # A list of the available formats for dump-guest-memory
3203 { 'struct': 'DumpGuestMemoryCapability',
3205 'formats': ['DumpGuestMemoryFormat'] } }
3208 # @query-dump-guest-memory-capability:
3210 # Returns the available formats for dump-guest-memory
3212 # Returns: A @DumpGuestMemoryCapability object listing available formats for
3219 # -> { "execute": "query-dump-guest-memory-capability" }
3220 # <- { "return": { "formats":
3221 # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
3224 { 'command': 'query-dump-guest-memory-capability',
3225 'returns': 'DumpGuestMemoryCapability' }
3230 # Dump guest's storage keys
3232 # @filename: the path to the file to dump to
3234 # This command is only supported on s390 architecture.
3240 # -> { "execute": "dump-skeys",
3241 # "arguments": { "filename": "/tmp/skeys" } }
3242 # <- { "return": {} }
3245 { 'command': 'dump-skeys',
3246 'data': { 'filename': 'str' } }
3251 # Create a QOM object.
3253 # @qom-type: the class name for the object to be created
3255 # @id: the name of the new object
3257 # @props: a dictionary of properties to be passed to the backend
3259 # Returns: Nothing on success
3260 # Error if @qom-type is not a valid class name
3266 # -> { "execute": "object-add",
3267 # "arguments": { "qom-type": "rng-random", "id": "rng1",
3268 # "props": { "filename": "/dev/hwrng" } } }
3269 # <- { "return": {} }
3272 { 'command': 'object-add',
3273 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
3278 # Remove a QOM object.
3280 # @id: the name of the QOM object to remove
3282 # Returns: Nothing on success
3283 # Error if @id is not a valid id for a QOM object
3289 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
3290 # <- { "return": {} }
3293 { 'command': 'object-del', 'data': {'id': 'str'} }
3298 # Receive a file descriptor via SCM rights and assign it a name
3300 # @fdname: file descriptor name
3302 # Returns: Nothing on success
3306 # Notes: If @fdname already exists, the file descriptor assigned to
3307 # it will be closed and replaced by the received file
3310 # The 'closefd' command can be used to explicitly close the
3311 # file descriptor when it is no longer needed.
3315 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
3316 # <- { "return": {} }
3319 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3324 # Close a file descriptor previously passed via SCM rights
3326 # @fdname: file descriptor name
3328 # Returns: Nothing on success
3334 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
3335 # <- { "return": {} }
3338 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3343 # Information describing a machine.
3345 # @name: the name of the machine
3347 # @alias: an alias for the machine name
3349 # @is-default: whether the machine is default
3351 # @cpu-max: maximum number of CPUs supported by the machine type
3354 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3358 { 'struct': 'MachineInfo',
3359 'data': { 'name': 'str', '*alias': 'str',
3360 '*is-default': 'bool', 'cpu-max': 'int',
3361 'hotpluggable-cpus': 'bool'} }
3366 # Return a list of supported machines
3368 # Returns: a list of MachineInfo
3372 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3375 # @CpuDefinitionInfo:
3377 # Virtual CPU definition.
3379 # @name: the name of the CPU definition
3381 # @migration-safe: whether a CPU definition can be safely used for
3382 # migration in combination with a QEMU compatibility machine
3383 # when migrating between different QMU versions and between
3384 # hosts with different sets of (hardware or software)
3385 # capabilities. If not provided, information is not available
3386 # and callers should not assume the CPU definition to be
3387 # migration-safe. (since 2.8)
3389 # @static: whether a CPU definition is static and will not change depending on
3390 # QEMU version, machine type, machine options and accelerator options.
3391 # A static model is always migration-safe. (since 2.8)
3393 # @unavailable-features: List of properties that prevent
3394 # the CPU model from running in the current
3396 # @typename: Type name that can be used as argument to @device-list-properties,
3397 # to introspect properties configurable using -cpu or -global.
3400 # @unavailable-features is a list of QOM property names that
3401 # represent CPU model attributes that prevent the CPU from running.
3402 # If the QOM property is read-only, that means there's no known
3403 # way to make the CPU model run in the current host. Implementations
3404 # that choose not to provide specific information return the
3405 # property name "type".
3406 # If the property is read-write, it means that it MAY be possible
3407 # to run the CPU model in the current host if that property is
3408 # changed. Management software can use it as hints to suggest or
3409 # choose an alternative for the user, or just to generate meaningful
3410 # error messages explaining why the CPU model can't be used.
3411 # If @unavailable-features is an empty list, the CPU model is
3412 # runnable using the current host and machine-type.
3413 # If @unavailable-features is not present, runnability
3414 # information for the CPU is not available.
3418 { 'struct': 'CpuDefinitionInfo',
3419 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
3420 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
3423 # @query-cpu-definitions:
3425 # Return a list of supported virtual CPU definitions
3427 # Returns: a list of CpuDefInfo
3431 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3436 # Virtual CPU model.
3438 # A CPU model consists of the name of a CPU definition, to which
3439 # delta changes are applied (e.g. features added/removed). Most magic values
3440 # that an architecture might require should be hidden behind the name.
3441 # However, if required, architectures can expose relevant properties.
3443 # @name: the name of the CPU definition the model is based on
3444 # @props: a dictionary of QOM properties to be applied
3448 { 'struct': 'CpuModelInfo',
3449 'data': { 'name': 'str',
3453 # @CpuModelExpansionType:
3455 # An enumeration of CPU model expansion types.
3457 # @static: Expand to a static CPU model, a combination of a static base
3458 # model name and property delta changes. As the static base model will
3459 # never change, the expanded CPU model will be the same, independant of
3460 # independent of QEMU version, machine type, machine options, and
3461 # accelerator options. Therefore, the resulting model can be used by
3462 # tooling without having to specify a compatibility machine - e.g. when
3463 # displaying the "host" model. static CPU models are migration-safe.
3465 # @full: Expand all properties. The produced model is not guaranteed to be
3466 # migration-safe, but allows tooling to get an insight and work with
3469 # Note: When a non-migration-safe CPU model is expanded in static mode, some
3470 # features enabled by the CPU model may be omitted, because they can't be
3471 # implemented by a static CPU model definition (e.g. cache info passthrough and
3472 # PMU passthrough in x86). If you need an accurate representation of the
3473 # features enabled by a non-migration-safe CPU model, use @full. If you need a
3474 # static representation that will keep ABI compatibility even when changing QEMU
3475 # version or machine-type, use @static (but keep in mind that some features may
3480 { 'enum': 'CpuModelExpansionType',
3481 'data': [ 'static', 'full' ] }
3485 # @CpuModelExpansionInfo:
3487 # The result of a cpu model expansion.
3489 # @model: the expanded CpuModelInfo.
3493 { 'struct': 'CpuModelExpansionInfo',
3494 'data': { 'model': 'CpuModelInfo' } }
3498 # @query-cpu-model-expansion:
3500 # Expands a given CPU model (or a combination of CPU model + additional options)
3501 # to different granularities, allowing tooling to get an understanding what a
3502 # specific CPU model looks like in QEMU under a certain configuration.
3504 # This interface can be used to query the "host" CPU model.
3506 # The data returned by this command may be affected by:
3508 # * QEMU version: CPU models may look different depending on the QEMU version.
3509 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3510 # * machine-type: CPU model may look different depending on the machine-type.
3511 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3512 # * machine options (including accelerator): in some architectures, CPU models
3513 # may look different depending on machine and accelerator options. (Except for
3514 # CPU models reported as "static" in query-cpu-definitions.)
3515 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3516 # global properties may affect expansion of CPU models. Using
3517 # query-cpu-model-expansion while using these is not advised.
3519 # Some architectures may not support all expansion types. s390x supports
3520 # "full" and "static".
3522 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3523 # not supported, if the model cannot be expanded, if the model contains
3524 # an unknown CPU definition name, unknown properties or properties
3525 # with a wrong type. Also returns an error if an expansion type is
3530 { 'command': 'query-cpu-model-expansion',
3531 'data': { 'type': 'CpuModelExpansionType',
3532 'model': 'CpuModelInfo' },
3533 'returns': 'CpuModelExpansionInfo' }
3536 # @CpuModelCompareResult:
3538 # An enumeration of CPU model comparation results. The result is usually
3539 # calculated using e.g. CPU features or CPU generations.
3541 # @incompatible: If model A is incompatible to model B, model A is not
3542 # guaranteed to run where model B runs and the other way around.
3544 # @identical: If model A is identical to model B, model A is guaranteed to run
3545 # where model B runs and the other way around.
3547 # @superset: If model A is a superset of model B, model B is guaranteed to run
3548 # where model A runs. There are no guarantees about the other way.
3550 # @subset: If model A is a subset of model B, model A is guaranteed to run
3551 # where model B runs. There are no guarantees about the other way.
3555 { 'enum': 'CpuModelCompareResult',
3556 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3559 # @CpuModelCompareInfo:
3561 # The result of a CPU model comparison.
3563 # @result: The result of the compare operation.
3564 # @responsible-properties: List of properties that led to the comparison result
3565 # not being identical.
3567 # @responsible-properties is a list of QOM property names that led to
3568 # both CPUs not being detected as identical. For identical models, this
3570 # If a QOM property is read-only, that means there's no known way to make the
3571 # CPU models identical. If the special property name "type" is included, the
3572 # models are by definition not identical and cannot be made identical.
3576 { 'struct': 'CpuModelCompareInfo',
3577 'data': {'result': 'CpuModelCompareResult',
3578 'responsible-properties': ['str']
3583 # @query-cpu-model-comparison:
3585 # Compares two CPU models, returning how they compare in a specific
3586 # configuration. The results indicates how both models compare regarding
3587 # runnability. This result can be used by tooling to make decisions if a
3588 # certain CPU model will run in a certain configuration or if a compatible
3589 # CPU model has to be created by baselining.
3591 # Usually, a CPU model is compared against the maximum possible CPU model
3592 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3593 # model is identical or a subset, it will run in that configuration.
3595 # The result returned by this command may be affected by:
3597 # * QEMU version: CPU models may look different depending on the QEMU version.
3598 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3599 # * machine-type: CPU model may look different depending on the machine-type.
3600 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3601 # * machine options (including accelerator): in some architectures, CPU models
3602 # may look different depending on machine and accelerator options. (Except for
3603 # CPU models reported as "static" in query-cpu-definitions.)
3604 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3605 # global properties may affect expansion of CPU models. Using
3606 # query-cpu-model-expansion while using these is not advised.
3608 # Some architectures may not support comparing CPU models. s390x supports
3609 # comparing CPU models.
3611 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3612 # not supported, if a model cannot be used, if a model contains
3613 # an unknown cpu definition name, unknown properties or properties
3618 { 'command': 'query-cpu-model-comparison',
3619 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3620 'returns': 'CpuModelCompareInfo' }
3623 # @CpuModelBaselineInfo:
3625 # The result of a CPU model baseline.
3627 # @model: the baselined CpuModelInfo.
3631 { 'struct': 'CpuModelBaselineInfo',
3632 'data': { 'model': 'CpuModelInfo' } }
3635 # @query-cpu-model-baseline:
3637 # Baseline two CPU models, creating a compatible third model. The created
3638 # model will always be a static, migration-safe CPU model (see "static"
3639 # CPU model expansion for details).
3641 # This interface can be used by tooling to create a compatible CPU model out
3642 # two CPU models. The created CPU model will be identical to or a subset of
3643 # both CPU models when comparing them. Therefore, the created CPU model is
3644 # guaranteed to run where the given CPU models run.
3646 # The result returned by this command may be affected by:
3648 # * QEMU version: CPU models may look different depending on the QEMU version.
3649 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3650 # * machine-type: CPU model may look different depending on the machine-type.
3651 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3652 # * machine options (including accelerator): in some architectures, CPU models
3653 # may look different depending on machine and accelerator options. (Except for
3654 # CPU models reported as "static" in query-cpu-definitions.)
3655 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3656 # global properties may affect expansion of CPU models. Using
3657 # query-cpu-model-expansion while using these is not advised.
3659 # Some architectures may not support baselining CPU models. s390x supports
3660 # baselining CPU models.
3662 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3663 # not supported, if a model cannot be used, if a model contains
3664 # an unknown cpu definition name, unknown properties or properties
3669 { 'command': 'query-cpu-model-baseline',
3670 'data': { 'modela': 'CpuModelInfo',
3671 'modelb': 'CpuModelInfo' },
3672 'returns': 'CpuModelBaselineInfo' }
3677 # Information about a file descriptor that was added to an fd set.
3679 # @fdset-id: The ID of the fd set that @fd was added to.
3681 # @fd: The file descriptor that was received via SCM rights and
3682 # added to the fd set.
3686 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3691 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3693 # @fdset-id: The ID of the fd set to add the file descriptor to.
3695 # @opaque: A free-form string that can be used to describe the fd.
3697 # Returns: @AddfdInfo on success
3699 # If file descriptor was not received, FdNotSupplied
3701 # If @fdset-id is a negative value, InvalidParameterValue
3703 # Notes: The list of fd sets is shared by all monitor connections.
3705 # If @fdset-id is not specified, a new fd set will be created.
3711 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
3712 # <- { "return": { "fdset-id": 1, "fd": 3 } }
3715 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3716 'returns': 'AddfdInfo' }
3721 # Remove a file descriptor from an fd set.
3723 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3725 # @fd: The file descriptor that is to be removed.
3727 # Returns: Nothing on success
3728 # If @fdset-id or @fd is not found, FdNotFound
3732 # Notes: The list of fd sets is shared by all monitor connections.
3734 # If @fd is not specified, all file descriptors in @fdset-id
3739 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
3740 # <- { "return": {} }
3743 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3748 # Information about a file descriptor that belongs to an fd set.
3750 # @fd: The file descriptor value.
3752 # @opaque: A free-form string that can be used to describe the fd.
3756 { 'struct': 'FdsetFdInfo',
3757 'data': {'fd': 'int', '*opaque': 'str'} }
3762 # Information about an fd set.
3764 # @fdset-id: The ID of the fd set.
3766 # @fds: A list of file descriptors that belong to this fd set.
3770 { 'struct': 'FdsetInfo',
3771 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3776 # Return information describing all fd sets.
3778 # Returns: A list of @FdsetInfo
3782 # Note: The list of fd sets is shared by all monitor connections.
3786 # -> { "execute": "query-fdsets" }
3792 # "opaque": "rdonly:/path/to/file"
3796 # "opaque": "rdwr:/path/to/file"
3816 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3821 # Information describing the QEMU target.
3823 # @arch: the target architecture (eg "x86_64", "i386", etc)
3827 { 'struct': 'TargetInfo',
3828 'data': { 'arch': 'str' } }
3833 # Return information about the target for this QEMU
3835 # Returns: TargetInfo
3839 { 'command': 'query-target', 'returns': 'TargetInfo' }
3844 # An enumeration of key name.
3846 # This is used by the @send-key command.
3848 # @unmapped: since 2.0
3851 # @kp_comma: since 2.4
3852 # @kp_equals: since 2.6
3854 # @hiragana: since 2.9
3855 # @henkan: since 2.9
3858 # @sleep: since 2.10
3860 # @audionext: since 2.10
3861 # @audioprev: since 2.10
3862 # @audiostop: since 2.10
3863 # @audioplay: since 2.10
3864 # @audiomute: since 2.10
3865 # @volumeup: since 2.10
3866 # @volumedown: since 2.10
3867 # @mediaselect: since 2.10
3869 # @calculator: since 2.10
3870 # @computer: since 2.10
3871 # @ac_home: since 2.10
3872 # @ac_back: since 2.10
3873 # @ac_forward: since 2.10
3874 # @ac_refresh: since 2.10
3875 # @ac_bookmarks: since 2.10
3876 # altgr, altgr_r: dropped in 2.10
3881 { 'enum': 'QKeyCode',
3882 'data': [ 'unmapped',
3883 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
3884 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3885 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3886 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3887 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3888 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3889 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3890 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3891 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3892 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3893 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3894 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3895 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3896 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3897 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
3898 'ro', 'hiragana', 'henkan', 'yen',
3899 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
3900 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
3901 'volumeup', 'volumedown', 'mediaselect',
3902 'mail', 'calculator', 'computer',
3903 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks' ] }
3908 # Represents a keyboard key.
3912 { 'union': 'KeyValue',
3915 'qcode': 'QKeyCode' } }
3920 # Send keys to guest.
3922 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3923 # simultaneously sent to the guest. A @KeyValue.number value is sent
3924 # directly to the guest, while @KeyValue.qcode must be a valid
3927 # @hold-time: time to delay key up events, milliseconds. Defaults
3930 # Returns: Nothing on success
3931 # If key is unknown or redundant, InvalidParameter
3937 # -> { "execute": "send-key",
3938 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
3939 # { "type": "qcode", "data": "alt" },
3940 # { "type": "qcode", "data": "delete" } ] } }
3941 # <- { "return": {} }
3944 { 'command': 'send-key',
3945 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3950 # Write a PPM of the VGA screen to a file.
3952 # @filename: the path of a new PPM file to store the image
3954 # Returns: Nothing on success
3960 # -> { "execute": "screendump",
3961 # "arguments": { "filename": "/tmp/image" } }
3962 # <- { "return": {} }
3965 { 'command': 'screendump', 'data': {'filename': 'str'} }
3971 # An enumeration of TPM models
3973 # @tpm-tis: TPM TIS model
3977 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3980 # @query-tpm-models:
3982 # Return a list of supported TPM models
3984 # Returns: a list of TpmModel
3990 # -> { "execute": "query-tpm-models" }
3991 # <- { "return": [ "tpm-tis" ] }
3994 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3999 # An enumeration of TPM types
4001 # @passthrough: TPM passthrough type
4005 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
4010 # Return a list of supported TPM types
4012 # Returns: a list of TpmType
4018 # -> { "execute": "query-tpm-types" }
4019 # <- { "return": [ "passthrough" ] }
4022 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
4025 # @TPMPassthroughOptions:
4027 # Information about the TPM passthrough type
4029 # @path: string describing the path used for accessing the TPM device
4031 # @cancel-path: string showing the TPM's sysfs cancel file
4032 # for cancellation of TPM commands while they are executing
4036 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
4037 '*cancel-path' : 'str'} }
4042 # A union referencing different TPM backend types' configuration options
4044 # @type: 'passthrough' The configuration options for the TPM passthrough type
4048 { 'union': 'TpmTypeOptions',
4049 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
4054 # Information about the TPM
4056 # @id: The Id of the TPM
4058 # @model: The TPM frontend model
4060 # @options: The TPM (backend) type configuration options
4064 { 'struct': 'TPMInfo',
4065 'data': {'id': 'str',
4066 'model': 'TpmModel',
4067 'options': 'TpmTypeOptions' } }
4072 # Return information about the TPM device
4074 # Returns: @TPMInfo on success
4080 # -> { "execute": "query-tpm" }
4083 # { "model": "tpm-tis",
4085 # { "type": "passthrough",
4087 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
4088 # "path": "/dev/tpm0"
4097 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
4100 # @AcpiTableOptions:
4102 # Specify an ACPI table on the command line to load.
4104 # At most one of @file and @data can be specified. The list of files specified
4105 # by any one of them is loaded and concatenated in order. If both are omitted,
4108 # Other fields / optargs can be used to override fields of the generic ACPI
4109 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
4110 # Description Table Header. If a header field is not overridden, then the
4111 # corresponding value from the concatenated blob is used (in case of @file), or
4112 # it is filled in with a hard-coded value (in case of @data).
4114 # String fields are copied into the matching ACPI member from lowest address
4115 # upwards, and silently truncated / NUL-padded to length.
4117 # @sig: table signature / identifier (4 bytes)
4119 # @rev: table revision number (dependent on signature, 1 byte)
4121 # @oem_id: OEM identifier (6 bytes)
4123 # @oem_table_id: OEM table identifier (8 bytes)
4125 # @oem_rev: OEM-supplied revision number (4 bytes)
4127 # @asl_compiler_id: identifier of the utility that created the table
4130 # @asl_compiler_rev: revision number of the utility that created the
4133 # @file: colon (:) separated list of pathnames to load and
4134 # concatenate as table data. The resultant binary blob is expected to
4135 # have an ACPI table header. At least one file is required. This field
4138 # @data: colon (:) separated list of pathnames to load and
4139 # concatenate as table data. The resultant binary blob must not have an
4140 # ACPI table header. At least one file is required. This field excludes
4145 { 'struct': 'AcpiTableOptions',
4150 '*oem_table_id': 'str',
4151 '*oem_rev': 'uint32',
4152 '*asl_compiler_id': 'str',
4153 '*asl_compiler_rev': 'uint32',
4158 # @CommandLineParameterType:
4160 # Possible types for an option parameter.
4162 # @string: accepts a character string
4164 # @boolean: accepts "on" or "off"
4166 # @number: accepts a number
4168 # @size: accepts a number followed by an optional suffix (K)ilo,
4169 # (M)ega, (G)iga, (T)era
4173 { 'enum': 'CommandLineParameterType',
4174 'data': ['string', 'boolean', 'number', 'size'] }
4177 # @CommandLineParameterInfo:
4179 # Details about a single parameter of a command line option.
4181 # @name: parameter name
4183 # @type: parameter @CommandLineParameterType
4185 # @help: human readable text string, not suitable for parsing.
4187 # @default: default value string (since 2.1)
4191 { 'struct': 'CommandLineParameterInfo',
4192 'data': { 'name': 'str',
4193 'type': 'CommandLineParameterType',
4195 '*default': 'str' } }
4198 # @CommandLineOptionInfo:
4200 # Details about a command line option, including its list of parameter details
4202 # @option: option name
4204 # @parameters: an array of @CommandLineParameterInfo
4208 { 'struct': 'CommandLineOptionInfo',
4209 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4212 # @query-command-line-options:
4214 # Query command line option schema.
4216 # @option: option name
4218 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4219 # @option). Returns an error if the given @option doesn't exist.
4225 # -> { "execute": "query-command-line-options",
4226 # "arguments": { "option": "option-rom" } }
4231 # "name": "romfile",
4235 # "name": "bootindex",
4239 # "option": "option-rom"
4245 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4246 'returns': ['CommandLineOptionInfo'] }
4249 # @X86CPURegister32:
4251 # A X86 32-bit register
4255 { 'enum': 'X86CPURegister32',
4256 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4259 # @X86CPUFeatureWordInfo:
4261 # Information about a X86 CPU feature word
4263 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4265 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
4268 # @cpuid-register: Output register containing the feature bits
4270 # @features: value of output register, containing the feature bits
4274 { 'struct': 'X86CPUFeatureWordInfo',
4275 'data': { 'cpuid-input-eax': 'int',
4276 '*cpuid-input-ecx': 'int',
4277 'cpuid-register': 'X86CPURegister32',
4278 'features': 'int' } }
4281 # @DummyForceArrays:
4283 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4287 { 'struct': 'DummyForceArrays',
4288 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4294 # Button of a pointer input device (mouse, tablet).
4296 # @side: front side button of a 5-button mouse (since 2.9)
4298 # @extra: rear side button of a 5-button mouse (since 2.9)
4302 { 'enum' : 'InputButton',
4303 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
4309 # Position axis of a pointer input device (mouse, tablet).
4313 { 'enum' : 'InputAxis',
4314 'data' : [ 'x', 'y' ] }
4319 # Keyboard input event.
4321 # @key: Which key this event is for.
4322 # @down: True for key-down and false for key-up events.
4326 { 'struct' : 'InputKeyEvent',
4327 'data' : { 'key' : 'KeyValue',
4333 # Pointer button input event.
4335 # @button: Which button this event is for.
4336 # @down: True for key-down and false for key-up events.
4340 { 'struct' : 'InputBtnEvent',
4341 'data' : { 'button' : 'InputButton',
4347 # Pointer motion input event.
4349 # @axis: Which axis is referenced by @value.
4350 # @value: Pointer position. For absolute coordinates the
4351 # valid range is 0 -> 0x7ffff
4355 { 'struct' : 'InputMoveEvent',
4356 'data' : { 'axis' : 'InputAxis',
4362 # Input event union.
4364 # @type: the input type, one of:
4365 # - 'key': Input event of Keyboard
4366 # - 'btn': Input event of pointer buttons
4367 # - 'rel': Input event of relative pointer motion
4368 # - 'abs': Input event of absolute pointer motion
4372 { 'union' : 'InputEvent',
4373 'data' : { 'key' : 'InputKeyEvent',
4374 'btn' : 'InputBtnEvent',
4375 'rel' : 'InputMoveEvent',
4376 'abs' : 'InputMoveEvent' } }
4379 # @input-send-event:
4381 # Send input event(s) to guest.
4383 # @device: display device to send event(s) to.
4384 # @head: head to send event(s) to, in case the
4385 # display device supports multiple scanouts.
4386 # @events: List of InputEvent union.
4388 # Returns: Nothing on success.
4390 # The @device and @head parameters can be used to send the input event
4391 # to specific input devices in case (a) multiple input devices of the
4392 # same kind are added to the virtual machine and (b) you have
4393 # configured input routing (see docs/multiseat.txt) for those input
4394 # devices. The parameters work exactly like the device and head
4395 # properties of input devices. If @device is missing, only devices
4396 # that have no input routing config are admissible. If @device is
4397 # specified, both input devices with and without input routing config
4398 # are admissible, but devices with input routing config take
4403 # Note: The consoles are visible in the qom tree, under
4404 # /backend/console[$index]. They have a device link and head property,
4405 # so it is possible to map which console belongs to which device and
4410 # 1. Press left mouse button.
4412 # -> { "execute": "input-send-event",
4413 # "arguments": { "device": "video0",
4414 # "events": [ { "type": "btn",
4415 # "data" : { "down": true, "button": "left" } } ] } }
4416 # <- { "return": {} }
4418 # -> { "execute": "input-send-event",
4419 # "arguments": { "device": "video0",
4420 # "events": [ { "type": "btn",
4421 # "data" : { "down": false, "button": "left" } } ] } }
4422 # <- { "return": {} }
4424 # 2. Press ctrl-alt-del.
4426 # -> { "execute": "input-send-event",
4427 # "arguments": { "events": [
4428 # { "type": "key", "data" : { "down": true,
4429 # "key": {"type": "qcode", "data": "ctrl" } } },
4430 # { "type": "key", "data" : { "down": true,
4431 # "key": {"type": "qcode", "data": "alt" } } },
4432 # { "type": "key", "data" : { "down": true,
4433 # "key": {"type": "qcode", "data": "delete" } } } ] } }
4434 # <- { "return": {} }
4436 # 3. Move mouse pointer to absolute coordinates (20000, 400).
4438 # -> { "execute": "input-send-event" ,
4439 # "arguments": { "events": [
4440 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
4441 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
4442 # <- { "return": {} }
4445 { 'command': 'input-send-event',
4446 'data': { '*device': 'str',
4448 'events' : [ 'InputEvent' ] } }
4453 # @node: NUMA nodes configuration
4455 # @dist: NUMA distance configuration (since 2.10)
4457 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
4461 { 'enum': 'NumaOptionsType',
4462 'data': [ 'node', 'dist', 'cpu' ] }
4467 # A discriminated record of NUMA options. (for OptsVisitor)
4471 { 'union': 'NumaOptions',
4472 'base': { 'type': 'NumaOptionsType' },
4473 'discriminator': 'type',
4475 'node': 'NumaNodeOptions',
4476 'dist': 'NumaDistOptions',
4477 'cpu': 'NumaCpuOptions' }}
4482 # Create a guest NUMA node. (for OptsVisitor)
4484 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
4486 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
4489 # @mem: memory size of this node; mutually exclusive with @memdev.
4490 # Equally divide total memory among nodes if both @mem and @memdev are
4493 # @memdev: memory backend object. If specified for one node,
4494 # it must be specified for all nodes.
4498 { 'struct': 'NumaNodeOptions',
4500 '*nodeid': 'uint16',
4501 '*cpus': ['uint16'],
4508 # Set the distance between 2 NUMA nodes.
4510 # @src: source NUMA node.
4512 # @dst: destination NUMA node.
4514 # @val: NUMA distance from source node to destination node.
4515 # When a node is unreachable from another node, set the distance
4516 # between them to 255.
4520 { 'struct': 'NumaDistOptions',
4529 # Option "-numa cpu" overrides default cpu to node mapping.
4530 # It accepts the same set of cpu properties as returned by
4531 # query-hotpluggable-cpus[].props, where node-id could be used to
4532 # override default node mapping.
4536 { 'struct': 'NumaCpuOptions',
4537 'base': 'CpuInstanceProperties',
4543 # Host memory policy types
4545 # @default: restore default policy, remove any nondefault policy
4547 # @preferred: set the preferred host nodes for allocation
4549 # @bind: a strict policy that restricts memory allocation to the
4550 # host nodes specified
4552 # @interleave: memory allocations are interleaved across the set
4553 # of host nodes specified
4557 { 'enum': 'HostMemPolicy',
4558 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
4563 # Information about memory backend
4565 # @id: backend's ID if backend has 'id' property (since 2.9)
4567 # @size: memory backend size
4569 # @merge: enables or disables memory merge support
4571 # @dump: includes memory backend's memory in a core dump or not
4573 # @prealloc: enables or disables memory preallocation
4575 # @host-nodes: host nodes for its memory policy
4577 # @policy: memory policy of memory backend
4581 { 'struct': 'Memdev',
4588 'host-nodes': ['uint16'],
4589 'policy': 'HostMemPolicy' }}
4594 # Returns information for all memory backends.
4596 # Returns: a list of @Memdev.
4602 # -> { "execute": "query-memdev" }
4606 # "size": 536870912,
4609 # "prealloc": false,
4610 # "host-nodes": [0, 1],
4614 # "size": 536870912,
4618 # "host-nodes": [2, 3],
4619 # "policy": "preferred"
4625 { 'command': 'query-memdev', 'returns': ['Memdev'] }
4628 # @PCDIMMDeviceInfo:
4630 # PCDIMMDevice state information
4634 # @addr: physical address, where device is mapped
4636 # @size: size of memory that the device provides
4638 # @slot: slot number at which device is plugged in
4640 # @node: NUMA node number where device is plugged in
4642 # @memdev: memory backend linked with device
4644 # @hotplugged: true if device was hotplugged
4646 # @hotpluggable: true if device if could be added/removed while machine is running
4650 { 'struct': 'PCDIMMDeviceInfo',
4651 'data': { '*id': 'str',
4657 'hotplugged': 'bool',
4658 'hotpluggable': 'bool'
4663 # @MemoryDeviceInfo:
4665 # Union containing information about a memory device
4669 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
4672 # @query-memory-devices:
4674 # Lists available memory devices and their state
4680 # -> { "execute": "query-memory-devices" }
4681 # <- { "return": [ { "data":
4682 # { "addr": 5368709120,
4683 # "hotpluggable": true,
4684 # "hotplugged": true,
4686 # "memdev": "/objects/memX",
4688 # "size": 1073741824,
4694 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
4699 # @DIMM: memory slot
4700 # @CPU: logical CPU slot (since 2.7)
4702 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
4707 # OSPM Status Indication for a device
4708 # For description of possible values of @source and @status fields
4709 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
4711 # @device: device ID associated with slot
4713 # @slot: slot ID, unique per slot of a given @slot-type
4715 # @slot-type: type of the slot
4717 # @source: an integer containing the source event
4719 # @status: an integer containing the status code
4723 { 'struct': 'ACPIOSTInfo',
4724 'data' : { '*device': 'str',
4726 'slot-type': 'ACPISlotType',
4731 # @query-acpi-ospm-status:
4733 # Return a list of ACPIOSTInfo for devices that support status
4734 # reporting via ACPI _OST method.
4740 # -> { "execute": "query-acpi-ospm-status" }
4741 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
4742 # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
4743 # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
4744 # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
4748 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
4753 # An enumeration of the I/O operation types
4755 # @read: read operation
4757 # @write: write operation
4761 { 'enum': 'IoOperationType',
4762 'data': [ 'read', 'write' ] }
4765 # @rtc-reset-reinjection:
4767 # This command will reset the RTC interrupt reinjection backlog.
4768 # Can be used if another mechanism to synchronize guest time
4769 # is in effect, for example QEMU guest agent's guest-set-time
4776 # -> { "execute": "rtc-reset-reinjection" }
4777 # <- { "return": {} }
4780 { 'command': 'rtc-reset-reinjection' }
4785 # Mode of the replay subsystem.
4787 # @none: normal execution mode. Replay or record are not enabled.
4789 # @record: record mode. All non-deterministic data is written into the
4792 # @play: replay mode. Non-deterministic data required for system execution
4793 # is read from the log.
4797 { 'enum': 'ReplayMode',
4798 'data': [ 'none', 'record', 'play' ] }
4801 # @xen-load-devices-state:
4803 # Load the state of all devices from file. The RAM and the block devices
4804 # of the VM are not loaded by this command.
4806 # @filename: the file to load the state of the devices from as binary
4807 # data. See xen-save-devices-state.txt for a description of the binary
4814 # -> { "execute": "xen-load-devices-state",
4815 # "arguments": { "filename": "/tmp/resume" } }
4816 # <- { "return": {} }
4819 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4822 # @xen-set-replication:
4824 # Enable or disable replication.
4826 # @enable: true to enable, false to disable.
4828 # @primary: true for primary or false for secondary.
4830 # @failover: true to do failover, false to stop. but cannot be
4831 # specified if 'enable' is true. default value is false.
4837 # -> { "execute": "xen-set-replication",
4838 # "arguments": {"enable": true, "primary": false} }
4839 # <- { "return": {} }
4843 { 'command': 'xen-set-replication',
4844 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
4847 # @ReplicationStatus:
4849 # The result format for 'query-xen-replication-status'.
4851 # @error: true if an error happened, false if replication is normal.
4853 # @desc: the human readable error description string, when
4858 { 'struct': 'ReplicationStatus',
4859 'data': { 'error': 'bool', '*desc': 'str' } }
4862 # @query-xen-replication-status:
4864 # Query replication status while the vm is running.
4866 # Returns: A @ReplicationResult object showing the status.
4870 # -> { "execute": "query-xen-replication-status" }
4871 # <- { "return": { "error": false } }
4875 { 'command': 'query-xen-replication-status',
4876 'returns': 'ReplicationStatus' }
4879 # @xen-colo-do-checkpoint:
4881 # Xen uses this command to notify replication to trigger a checkpoint.
4887 # -> { "execute": "xen-colo-do-checkpoint" }
4888 # <- { "return": {} }
4892 { 'command': 'xen-colo-do-checkpoint' }
4897 # The struct describes capability for a specific GIC (Generic
4898 # Interrupt Controller) version. These bits are not only decided by
4899 # QEMU/KVM software version, but also decided by the hardware that
4900 # the program is running upon.
4902 # @version: version of GIC to be described. Currently, only 2 and 3
4905 # @emulated: whether current QEMU/hardware supports emulated GIC
4906 # device in user space.
4908 # @kernel: whether current QEMU/hardware supports hardware
4909 # accelerated GIC device in kernel.
4913 { 'struct': 'GICCapability',
4914 'data': { 'version': 'int',
4916 'kernel': 'bool' } }
4919 # @query-gic-capabilities:
4921 # This command is ARM-only. It will return a list of GICCapability
4922 # objects that describe its capability bits.
4924 # Returns: a list of GICCapability objects.
4930 # -> { "execute": "query-gic-capabilities" }
4931 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
4932 # { "version": 3, "emulated": false, "kernel": true } ] }
4935 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4938 # @CpuInstanceProperties:
4940 # List of properties to be used for hotplugging a CPU instance,
4941 # it should be passed by management with device_add command when
4942 # a CPU is being hotplugged.
4944 # @node-id: NUMA node ID the CPU belongs to
4945 # @socket-id: socket number within node/board the CPU belongs to
4946 # @core-id: core number within socket the CPU belongs to
4947 # @thread-id: thread number within core the CPU belongs to
4949 # Note: currently there are 4 properties that could be present
4950 # but management should be prepared to pass through other
4951 # properties with device_add command to allow for future
4952 # interface extension. This also requires the filed names to be kept in
4953 # sync with the properties passed to -device/device_add.
4957 { 'struct': 'CpuInstanceProperties',
4958 'data': { '*node-id': 'int',
4959 '*socket-id': 'int',
4968 # @type: CPU object type for usage with device_add command
4969 # @props: list of properties to be used for hotplugging CPU
4970 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4971 # @qom-path: link to existing CPU object if CPU is present or
4972 # omitted if CPU is not present.
4976 { 'struct': 'HotpluggableCPU',
4977 'data': { 'type': 'str',
4978 'vcpus-count': 'int',
4979 'props': 'CpuInstanceProperties',
4985 # @query-hotpluggable-cpus:
4987 # Returns: a list of HotpluggableCPU objects.
4993 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
4995 # -> { "execute": "query-hotpluggable-cpus" }
4997 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
4998 # "vcpus-count": 1 },
4999 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
5000 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
5003 # For pc machine type started with -smp 1,maxcpus=2:
5005 # -> { "execute": "query-hotpluggable-cpus" }
5008 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
5009 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
5012 # "qom-path": "/machine/unattached/device[0]",
5013 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
5014 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
5019 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
5026 # @guid: the globally unique identifier
5030 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
5033 # @query-vm-generation-id:
5035 # Show Virtual Machine Generation ID
5039 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }