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/ui.json' }
90 { 'include': 'qapi/event.json' }
91 { 'include': 'qapi/trace.json' }
92 { 'include': 'qapi/introspect.json' }
101 # Enable QMP capabilities.
107 # -> { "execute": "qmp_capabilities" }
108 # <- { "return": {} }
110 # Notes: This command is valid exactly when first connecting: it must be
111 # issued before any other command will be accepted, and will fail once the
112 # monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt)
117 { 'command': 'qmp_capabilities' }
122 # This is a string value or the explicit lack of a string (null
123 # pointer in C). Intended for cases when 'optional absent' already
124 # has a different meaning.
126 # @s: the string value
127 # @n: no string value
131 { 'alternate': 'StrOrNull',
132 'data': { 's': 'str',
138 # Policy for handling lost ticks in timer devices.
140 # @discard: throw away the missed tick(s) and continue with future injection
141 # normally. Guest time may be delayed, unless the OS has explicit
142 # handling of lost ticks
144 # @delay: continue to deliver ticks at the normal rate. Guest time will be
145 # delayed due to the late tick
147 # @merge: merge the missed tick(s) into one tick and inject. Guest time
148 # may be delayed, depending on how the OS reacts to the merging
151 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
152 # guest time should not be delayed once catchup is complete.
156 { 'enum': 'LostTickPolicy',
157 'data': ['discard', 'delay', 'merge', 'slew' ] }
162 # Allow client connections for VNC, Spice and socket based
163 # character devices to be passed in to QEMU via SCM_RIGHTS.
165 # @protocol: protocol name. Valid names are "vnc", "spice" or the
166 # name of a character device (eg. from -chardev id=XXXX)
168 # @fdname: file descriptor name previously passed via 'getfd' command
170 # @skipauth: whether to skip authentication. Only applies
171 # to "vnc" and "spice" protocols
173 # @tls: whether to perform TLS. Only applies to the "spice"
176 # Returns: nothing on success.
182 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
183 # "fdname": "myclient" } }
184 # <- { "return": {} }
187 { 'command': 'add_client',
188 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
194 # Guest name information.
196 # @name: The name of the guest
200 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
205 # Return the name information of a guest.
207 # Returns: @NameInfo of the guest
213 # -> { "execute": "query-name" }
214 # <- { "return": { "name": "qemu-name" } }
217 { 'command': 'query-name', 'returns': 'NameInfo' }
222 # Information about support for KVM acceleration
224 # @enabled: true if KVM acceleration is active
226 # @present: true if KVM acceleration is built into this executable
230 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
235 # Returns information about KVM acceleration
243 # -> { "execute": "query-kvm" }
244 # <- { "return": { "enabled": true, "present": true } }
247 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
252 # Guest UUID information (Universally Unique Identifier).
254 # @UUID: the UUID of the guest
258 # Notes: If no UUID was specified for the guest, a null UUID is returned.
260 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
265 # Query the guest UUID information.
267 # Returns: The @UuidInfo for the guest
273 # -> { "execute": "query-uuid" }
274 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
277 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
282 # Information about a QMP event
284 # @name: The event name
288 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
293 # Return a list of supported QMP events by this server
295 # Returns: A list of @EventInfo for all supported events
301 # -> { "execute": "query-events" }
313 # Note: This example has been shortened as the real response is too long.
316 { 'command': 'query-events', 'returns': ['EventInfo'] }
321 # Detailed migration status.
323 # @transferred: amount of bytes already transferred to the target VM
325 # @remaining: amount of bytes remaining to be transferred to the target VM
327 # @total: total amount of bytes involved in the migration process
329 # @duplicate: number of duplicate (zero) pages (since 1.2)
331 # @skipped: number of skipped zero pages (since 1.5)
333 # @normal: number of normal pages (since 1.2)
335 # @normal-bytes: number of normal bytes sent (since 1.2)
337 # @dirty-pages-rate: number of pages dirtied by second by the
340 # @mbps: throughput in megabits/sec. (since 1.6)
342 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
344 # @postcopy-requests: The number of page requests received from the destination
347 # @page-size: The number of bytes per page for the various page-based
348 # statistics (since 2.10)
352 { 'struct': 'MigrationStats',
353 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
354 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
355 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
356 'mbps' : 'number', 'dirty-sync-count' : 'int',
357 'postcopy-requests' : 'int', 'page-size' : 'int' } }
362 # Detailed XBZRLE migration cache statistics
364 # @cache-size: XBZRLE cache size
366 # @bytes: amount of bytes already transferred to the target VM
368 # @pages: amount of pages transferred to the target VM
370 # @cache-miss: number of cache miss
372 # @cache-miss-rate: rate of cache miss (since 2.1)
374 # @overflow: number of overflows
378 { 'struct': 'XBZRLECacheStats',
379 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
380 'cache-miss': 'int', 'cache-miss-rate': 'number',
381 'overflow': 'int' } }
386 # An enumeration of migration status.
388 # @none: no migration has ever happened.
390 # @setup: migration process has been initiated.
392 # @cancelling: in the process of cancelling migration.
394 # @cancelled: cancelling migration is finished.
396 # @active: in the process of doing migration.
398 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
400 # @completed: migration is finished.
402 # @failed: some error occurred during migration process.
404 # @colo: VM is in the process of fault tolerance, VM can not get into this
405 # state unless colo capability is enabled for migration. (since 2.8)
410 { 'enum': 'MigrationStatus',
411 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
412 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
417 # Information about current migration process.
419 # @status: @MigrationStatus describing the current migration status.
420 # If this field is not returned, no migration process
423 # @ram: @MigrationStats containing detailed migration
424 # status, only returned if status is 'active' or
425 # 'completed'(since 1.2)
427 # @disk: @MigrationStats containing detailed disk migration
428 # status, only returned if status is 'active' and it is a block
431 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
432 # migration statistics, only returned if XBZRLE feature is on and
433 # status is 'active' or 'completed' (since 1.2)
435 # @total-time: total amount of milliseconds since migration started.
436 # If migration has ended, it returns the total migration
439 # @downtime: only present when migration finishes correctly
440 # total downtime in milliseconds for the guest.
443 # @expected-downtime: only present while migration is active
444 # expected downtime in milliseconds for the guest in last walk
445 # of the dirty bitmap. (since 1.3)
447 # @setup-time: amount of setup time in milliseconds _before_ the
448 # iterations begin but _after_ the QMP command is issued. This is designed
449 # to provide an accounting of any activities (such as RDMA pinning) which
450 # may be expensive, but do not actually occur during the iterative
451 # migration rounds themselves. (since 1.6)
453 # @cpu-throttle-percentage: percentage of time guest cpus are being
454 # throttled during auto-converge. This is only present when auto-converge
455 # has started throttling guest cpus. (Since 2.7)
457 # @error-desc: the human readable error description string, when
458 # @status is 'failed'. Clients should not attempt to parse the
459 # error strings. (Since 2.7)
463 { 'struct': 'MigrationInfo',
464 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
465 '*disk': 'MigrationStats',
466 '*xbzrle-cache': 'XBZRLECacheStats',
467 '*total-time': 'int',
468 '*expected-downtime': 'int',
470 '*setup-time': 'int',
471 '*cpu-throttle-percentage': 'int',
472 '*error-desc': 'str'} }
477 # Returns information about current migration process. If migration
478 # is active there will be another json-object with RAM migration
479 # status and if block migration is active another one with block
482 # Returns: @MigrationInfo
488 # 1. Before the first migration
490 # -> { "execute": "query-migrate" }
491 # <- { "return": {} }
493 # 2. Migration is done and has succeeded
495 # -> { "execute": "query-migrate" }
497 # "status": "completed",
502 # "total-time":12345,
503 # "setup-time":12345,
507 # "normal-bytes":123456,
508 # "dirty-sync-count":15
513 # 3. Migration is done and has failed
515 # -> { "execute": "query-migrate" }
516 # <- { "return": { "status": "failed" } }
518 # 4. Migration is being performed and is not a block migration:
520 # -> { "execute": "query-migrate" }
528 # "total-time":12345,
529 # "setup-time":12345,
530 # "expected-downtime":12345,
533 # "normal-bytes":123456,
534 # "dirty-sync-count":15
539 # 5. Migration is being performed and is a block migration:
541 # -> { "execute": "query-migrate" }
547 # "remaining":1053304,
548 # "transferred":3720,
549 # "total-time":12345,
550 # "setup-time":12345,
551 # "expected-downtime":12345,
554 # "normal-bytes":123456,
555 # "dirty-sync-count":15
559 # "remaining":20880384,
560 # "transferred":91136
565 # 6. Migration is being performed and XBZRLE is active:
567 # -> { "execute": "query-migrate" }
571 # "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
574 # "remaining":1053304,
575 # "transferred":3720,
576 # "total-time":12345,
577 # "setup-time":12345,
578 # "expected-downtime":12345,
581 # "normal-bytes":3412992,
582 # "dirty-sync-count":15
585 # "cache-size":67108864,
589 # "cache-miss-rate":0.123,
596 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
599 # @MigrationCapability:
601 # Migration capabilities enumeration
603 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
604 # This feature allows us to minimize migration traffic for certain work
605 # loads, by sending compressed difference of the pages
607 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
608 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
609 # Disabled by default. (since 2.0)
611 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
612 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
613 # source and target VM to support this feature. To enable it is sufficient
614 # to enable the capability on the source VM. The feature is disabled by
615 # default. (since 1.6)
617 # @compress: Use multiple compression threads to accelerate live migration.
618 # This feature can help to reduce the migration traffic, by sending
619 # compressed pages. Please note that if compress and xbzrle are both
620 # on, compress only takes effect in the ram bulk stage, after that,
621 # it will be disabled and only xbzrle takes effect, this can help to
622 # minimize migration traffic. The feature is disabled by default.
625 # @events: generate events for each migration state change
628 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
629 # to speed up convergence of RAM migration. (since 1.6)
631 # @postcopy-ram: Start executing on the migration target before all of RAM has
632 # been migrated, pulling the remaining pages along as needed. NOTE: If
633 # the migration fails during postcopy the VM will fail. (since 2.6)
635 # @x-colo: If enabled, migration will never end, and the state of the VM on the
636 # primary side will be migrated continuously to the VM on secondary
637 # side, this process is called COarse-Grain LOck Stepping (COLO) for
638 # Non-stop Service. (since 2.8)
640 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
641 # during postcopy-ram migration. (since 2.9)
643 # @block: If enabled, QEMU will also migrate the contents of all block
644 # devices. Default is disabled. A possible alternative uses
645 # mirror jobs to a builtin NBD server on the destination, which
646 # offers more flexibility.
649 # @return-path: If enabled, migration will use the return path even
650 # for precopy. (since 2.10)
654 { 'enum': 'MigrationCapability',
655 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
656 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
657 'block', 'return-path' ] }
660 # @MigrationCapabilityStatus:
662 # Migration capability information
664 # @capability: capability enum
666 # @state: capability state bool
670 { 'struct': 'MigrationCapabilityStatus',
671 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
674 # @migrate-set-capabilities:
676 # Enable/Disable the following migration capabilities (like xbzrle)
678 # @capabilities: json array of capability modifications to make
684 # -> { "execute": "migrate-set-capabilities" , "arguments":
685 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
688 { 'command': 'migrate-set-capabilities',
689 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
692 # @query-migrate-capabilities:
694 # Returns information about the current migration capabilities status
696 # Returns: @MigrationCapabilitiesStatus
702 # -> { "execute": "query-migrate-capabilities" }
704 # {"state": false, "capability": "xbzrle"},
705 # {"state": false, "capability": "rdma-pin-all"},
706 # {"state": false, "capability": "auto-converge"},
707 # {"state": false, "capability": "zero-blocks"},
708 # {"state": false, "capability": "compress"},
709 # {"state": true, "capability": "events"},
710 # {"state": false, "capability": "postcopy-ram"},
711 # {"state": false, "capability": "x-colo"}
715 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
718 # @MigrationParameter:
720 # Migration parameters enumeration
722 # @compress-level: Set the compression level to be used in live migration,
723 # the compression level is an integer between 0 and 9, where 0 means
724 # no compression, 1 means the best compression speed, and 9 means best
725 # compression ratio which will consume more CPU.
727 # @compress-threads: Set compression thread count to be used in live migration,
728 # the compression thread count is an integer between 1 and 255.
730 # @decompress-threads: Set decompression thread count to be used in live
731 # migration, the decompression thread count is an integer between 1
732 # and 255. Usually, decompression is at least 4 times as fast as
733 # compression, so set the decompress-threads to the number about 1/4
734 # of compress-threads is adequate.
736 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
737 # when migration auto-converge is activated. The
738 # default value is 20. (Since 2.7)
740 # @cpu-throttle-increment: throttle percentage increase each time
741 # auto-converge detects that migration is not making
742 # progress. The default value is 10. (Since 2.7)
744 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
745 # establishing a TLS connection over the migration data channel.
746 # On the outgoing side of the migration, the credentials must
747 # be for a 'client' endpoint, while for the incoming side the
748 # credentials must be for a 'server' endpoint. Setting this
749 # will enable TLS for all migrations. The default is unset,
750 # resulting in unsecured migration at the QEMU level. (Since 2.7)
752 # @tls-hostname: hostname of the target host for the migration. This is
753 # required when using x509 based TLS credentials and the
754 # migration URI does not already include a hostname. For
755 # example if using fd: or exec: based migration, the
756 # hostname must be provided so that the server's x509
757 # certificate identity can be validated. (Since 2.7)
759 # @max-bandwidth: to set maximum speed for migration. maximum speed in
760 # bytes per second. (Since 2.8)
762 # @downtime-limit: set maximum tolerated downtime for migration. maximum
763 # downtime in milliseconds (Since 2.8)
765 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
766 # periodic mode. (Since 2.8)
768 # @block-incremental: Affects how much storage is migrated when the
769 # block migration capability is enabled. When false, the entire
770 # storage backing chain is migrated into a flattened image at
771 # the destination; when true, only the active qcow2 layer is
772 # migrated and the destination must already have access to the
773 # same backing chain as was used on the source. (since 2.10)
777 { 'enum': 'MigrationParameter',
778 'data': ['compress-level', 'compress-threads', 'decompress-threads',
779 'cpu-throttle-initial', 'cpu-throttle-increment',
780 'tls-creds', 'tls-hostname', 'max-bandwidth',
781 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] }
784 # @MigrateSetParameters:
786 # @compress-level: compression level
788 # @compress-threads: compression thread count
790 # @decompress-threads: decompression thread count
792 # @cpu-throttle-initial: Initial percentage of time guest cpus are
793 # throttled when migration auto-converge is activated.
794 # The default value is 20. (Since 2.7)
796 # @cpu-throttle-increment: throttle percentage increase each time
797 # auto-converge detects that migration is not making
798 # progress. The default value is 10. (Since 2.7)
800 # @tls-creds: ID of the 'tls-creds' object that provides credentials
801 # for establishing a TLS connection over the migration data
802 # channel. On the outgoing side of the migration, the credentials
803 # must be for a 'client' endpoint, while for the incoming side the
804 # credentials must be for a 'server' endpoint. Setting this
805 # to a non-empty string enables TLS for all migrations.
806 # An empty string means that QEMU will use plain text mode for
807 # migration, rather than TLS (Since 2.9)
808 # Previously (since 2.7), this was reported by omitting
811 # @tls-hostname: hostname of the target host for the migration. This
812 # is required when using x509 based TLS credentials and the
813 # migration URI does not already include a hostname. For
814 # example if using fd: or exec: based migration, the
815 # hostname must be provided so that the server's x509
816 # certificate identity can be validated. (Since 2.7)
817 # An empty string means that QEMU will use the hostname
818 # associated with the migration URI, if any. (Since 2.9)
819 # Previously (since 2.7), this was reported by omitting
820 # tls-hostname instead.
822 # @max-bandwidth: to set maximum speed for migration. maximum speed in
823 # bytes per second. (Since 2.8)
825 # @downtime-limit: set maximum tolerated downtime for migration. maximum
826 # downtime in milliseconds (Since 2.8)
828 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
830 # @block-incremental: Affects how much storage is migrated when the
831 # block migration capability is enabled. When false, the entire
832 # storage backing chain is migrated into a flattened image at
833 # the destination; when true, only the active qcow2 layer is
834 # migrated and the destination must already have access to the
835 # same backing chain as was used on the source. (since 2.10)
839 # TODO either fuse back into MigrationParameters, or make
840 # MigrationParameters members mandatory
841 { 'struct': 'MigrateSetParameters',
842 'data': { '*compress-level': 'int',
843 '*compress-threads': 'int',
844 '*decompress-threads': 'int',
845 '*cpu-throttle-initial': 'int',
846 '*cpu-throttle-increment': 'int',
847 '*tls-creds': 'StrOrNull',
848 '*tls-hostname': 'StrOrNull',
849 '*max-bandwidth': 'int',
850 '*downtime-limit': 'int',
851 '*x-checkpoint-delay': 'int',
852 '*block-incremental': 'bool' } }
855 # @migrate-set-parameters:
857 # Set various migration parameters.
863 # -> { "execute": "migrate-set-parameters" ,
864 # "arguments": { "compress-level": 1 } }
867 { 'command': 'migrate-set-parameters', 'boxed': true,
868 'data': 'MigrateSetParameters' }
871 # @MigrationParameters:
873 # The optional members aren't actually optional.
875 # @compress-level: compression level
877 # @compress-threads: compression thread count
879 # @decompress-threads: decompression thread count
881 # @cpu-throttle-initial: Initial percentage of time guest cpus are
882 # throttled when migration auto-converge is activated.
885 # @cpu-throttle-increment: throttle percentage increase each time
886 # auto-converge detects that migration is not making
887 # progress. (Since 2.7)
889 # @tls-creds: ID of the 'tls-creds' object that provides credentials
890 # for establishing a TLS connection over the migration data
891 # channel. On the outgoing side of the migration, the credentials
892 # must be for a 'client' endpoint, while for the incoming side the
893 # credentials must be for a 'server' endpoint.
894 # An empty string means that QEMU will use plain text mode for
895 # migration, rather than TLS (Since 2.7)
896 # Note: 2.8 reports this by omitting tls-creds instead.
898 # @tls-hostname: hostname of the target host for the migration. This
899 # is required when using x509 based TLS credentials and the
900 # migration URI does not already include a hostname. For
901 # example if using fd: or exec: based migration, the
902 # hostname must be provided so that the server's x509
903 # certificate identity can be validated. (Since 2.7)
904 # An empty string means that QEMU will use the hostname
905 # associated with the migration URI, if any. (Since 2.9)
906 # Note: 2.8 reports this by omitting tls-hostname instead.
908 # @max-bandwidth: to set maximum speed for migration. maximum speed in
909 # bytes per second. (Since 2.8)
911 # @downtime-limit: set maximum tolerated downtime for migration. maximum
912 # downtime in milliseconds (Since 2.8)
914 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
916 # @block-incremental: Affects how much storage is migrated when the
917 # block migration capability is enabled. When false, the entire
918 # storage backing chain is migrated into a flattened image at
919 # the destination; when true, only the active qcow2 layer is
920 # migrated and the destination must already have access to the
921 # same backing chain as was used on the source. (since 2.10)
925 { 'struct': 'MigrationParameters',
926 'data': { '*compress-level': 'int',
927 '*compress-threads': 'int',
928 '*decompress-threads': 'int',
929 '*cpu-throttle-initial': 'int',
930 '*cpu-throttle-increment': 'int',
932 '*tls-hostname': 'str',
933 '*max-bandwidth': 'int',
934 '*downtime-limit': 'int',
935 '*x-checkpoint-delay': 'int',
936 '*block-incremental': 'bool' } }
939 # @query-migrate-parameters:
941 # Returns information about the current migration parameters
943 # Returns: @MigrationParameters
949 # -> { "execute": "query-migrate-parameters" }
951 # "decompress-threads": 2,
952 # "cpu-throttle-increment": 10,
953 # "compress-threads": 8,
954 # "compress-level": 1,
955 # "cpu-throttle-initial": 20,
956 # "max-bandwidth": 33554432,
957 # "downtime-limit": 300
962 { 'command': 'query-migrate-parameters',
963 'returns': 'MigrationParameters' }
966 # @client_migrate_info:
968 # Set migration information for remote display. This makes the server
969 # ask the client to automatically reconnect using the new parameters
970 # once migration finished successfully. Only implemented for SPICE.
972 # @protocol: must be "spice"
973 # @hostname: migration target hostname
974 # @port: spice tcp port for plaintext channels
975 # @tls-port: spice tcp port for tls-secured channels
976 # @cert-subject: server certificate subject
982 # -> { "execute": "client_migrate_info",
983 # "arguments": { "protocol": "spice",
984 # "hostname": "virt42.lab.kraxel.org",
986 # <- { "return": {} }
989 { 'command': 'client_migrate_info',
990 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
991 '*tls-port': 'int', '*cert-subject': 'str' } }
994 # @migrate-start-postcopy:
996 # Followup to a migration command to switch the migration to postcopy mode.
997 # The postcopy-ram capability must be set before the original migration
1004 # -> { "execute": "migrate-start-postcopy" }
1005 # <- { "return": {} }
1008 { 'command': 'migrate-start-postcopy' }
1013 # The message transmission between Primary side and Secondary side.
1015 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1017 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1019 # @checkpoint-reply: SVM gets PVM's checkpoint request
1021 # @vmstate-send: VM's state will be sent by PVM.
1023 # @vmstate-size: The total size of VMstate.
1025 # @vmstate-received: VM's state has been received by SVM.
1027 # @vmstate-loaded: VM's state has been loaded by SVM.
1031 { 'enum': 'COLOMessage',
1032 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1033 'vmstate-send', 'vmstate-size', 'vmstate-received',
1034 'vmstate-loaded' ] }
1041 # @unknown: unknown mode
1043 # @primary: master side
1045 # @secondary: slave side
1049 { 'enum': 'COLOMode',
1050 'data': [ 'unknown', 'primary', 'secondary'] }
1055 # An enumeration of COLO failover status
1057 # @none: no failover has ever happened
1059 # @require: got failover requirement but not handled
1061 # @active: in the process of doing failover
1063 # @completed: finish the process of failover
1065 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1069 { 'enum': 'FailoverStatus',
1070 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1073 # @x-colo-lost-heartbeat:
1075 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1076 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1077 # If sent to the Secondary, the Secondary side will run failover work,
1078 # then takes over server operation to become the service VM.
1084 # -> { "execute": "x-colo-lost-heartbeat" }
1085 # <- { "return": {} }
1088 { 'command': 'x-colo-lost-heartbeat' }
1093 # An enumeration of cpu types that enable additional information during
1098 { 'enum': 'CpuInfoArch',
1099 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1104 # Information about a virtual CPU
1106 # @CPU: the index of the virtual CPU
1108 # @current: this only exists for backwards compatibility and should be ignored
1110 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
1111 # to a processor specific low power mode.
1113 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
1115 # @thread_id: ID of the underlying host thread
1117 # @props: properties describing to which node/socket/core/thread
1118 # virtual CPU belongs to, provided if supported by board (since 2.10)
1120 # @arch: architecture of the cpu, which determines which additional fields
1121 # will be listed (since 2.6)
1125 # Notes: @halted is a transient state that changes frequently. By the time the
1126 # data is sent to the client, the guest may no longer be halted.
1128 { 'union': 'CpuInfo',
1129 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1130 'qom_path': 'str', 'thread_id': 'int',
1131 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
1132 'discriminator': 'arch',
1133 'data': { 'x86': 'CpuInfoX86',
1134 'sparc': 'CpuInfoSPARC',
1135 'ppc': 'CpuInfoPPC',
1136 'mips': 'CpuInfoMIPS',
1137 'tricore': 'CpuInfoTricore',
1138 'other': 'CpuInfoOther' } }
1143 # Additional information about a virtual i386 or x86_64 CPU
1145 # @pc: the 64-bit instruction pointer
1149 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1154 # Additional information about a virtual SPARC CPU
1156 # @pc: the PC component of the instruction pointer
1158 # @npc: the NPC component of the instruction pointer
1162 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1167 # Additional information about a virtual PPC CPU
1169 # @nip: the instruction pointer
1173 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1178 # Additional information about a virtual MIPS CPU
1180 # @PC: the instruction pointer
1184 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1189 # Additional information about a virtual Tricore CPU
1191 # @PC: the instruction pointer
1195 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1200 # No additional information is available about the virtual CPU
1205 { 'struct': 'CpuInfoOther', 'data': { } }
1210 # Returns a list of information about each virtual CPU.
1212 # Returns: a list of @CpuInfo for each virtual CPU
1218 # -> { "execute": "query-cpus" }
1224 # "qom_path":"/machine/unattached/device[0]",
1233 # "qom_path":"/machine/unattached/device[2]",
1242 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1247 # Information about an iothread
1249 # @id: the identifier of the iothread
1251 # @thread-id: ID of the underlying host thread
1253 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
1256 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
1257 # configured (since 2.9)
1259 # @poll-shrink: how many ns will be removed from polling time, 0 means that
1260 # it's not configured (since 2.9)
1264 { 'struct': 'IOThreadInfo',
1265 'data': {'id': 'str',
1267 'poll-max-ns': 'int',
1269 'poll-shrink': 'int' } }
1274 # Returns a list of information about each iothread.
1276 # Note: this list excludes the QEMU main loop thread, which is not declared
1277 # using the -object iothread command-line option. It is always the main thread
1280 # Returns: a list of @IOThreadInfo for each iothread
1286 # -> { "execute": "query-iothreads" }
1300 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1305 # Information about the guest balloon device.
1307 # @actual: the number of bytes the balloon currently contains
1312 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1317 # Return information about the balloon device.
1319 # Returns: @BalloonInfo on success
1321 # If the balloon driver is enabled but not functional because the KVM
1322 # kernel module cannot support it, KvmMissingCap
1324 # If no balloon device is present, DeviceNotActive
1330 # -> { "execute": "query-balloon" }
1332 # "actual": 1073741824,
1337 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1342 # A PCI device memory region
1344 # @base: the starting address (guest physical)
1346 # @limit: the ending address (guest physical)
1350 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1355 # Information about a PCI device I/O region.
1357 # @bar: the index of the Base Address Register for this region
1359 # @type: 'io' if the region is a PIO region
1360 # 'memory' if the region is a MMIO region
1362 # @size: memory size
1364 # @prefetch: if @type is 'memory', true if the memory is prefetchable
1366 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
1370 { 'struct': 'PciMemoryRegion',
1371 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1372 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1377 # Information about a bus of a PCI Bridge device
1379 # @number: primary bus interface number. This should be the number of the
1380 # bus the device resides on.
1382 # @secondary: secondary bus interface number. This is the number of the
1383 # main bus for the bridge
1385 # @subordinate: This is the highest number bus that resides below the
1388 # @io_range: The PIO range for all devices on this bridge
1390 # @memory_range: The MMIO range for all devices on this bridge
1392 # @prefetchable_range: The range of prefetchable MMIO for all devices on
1397 { 'struct': 'PciBusInfo',
1398 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1399 'io_range': 'PciMemoryRange',
1400 'memory_range': 'PciMemoryRange',
1401 'prefetchable_range': 'PciMemoryRange' } }
1406 # Information about a PCI Bridge device
1408 # @bus: information about the bus the device resides on
1410 # @devices: a list of @PciDeviceInfo for each device on this bridge
1414 { 'struct': 'PciBridgeInfo',
1415 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1420 # Information about the Class of a PCI device
1422 # @desc: a string description of the device's class
1424 # @class: the class code of the device
1428 { 'struct': 'PciDeviceClass',
1429 'data': {'*desc': 'str', 'class': 'int'} }
1434 # Information about the Id of a PCI device
1436 # @device: the PCI device id
1438 # @vendor: the PCI vendor id
1442 { 'struct': 'PciDeviceId',
1443 'data': {'device': 'int', 'vendor': 'int'} }
1448 # Information about a PCI device
1450 # @bus: the bus number of the device
1452 # @slot: the slot the device is located in
1454 # @function: the function of the slot used by the device
1456 # @class_info: the class of the device
1458 # @id: the PCI device id
1460 # @irq: if an IRQ is assigned to the device, the IRQ number
1462 # @qdev_id: the device name of the PCI device
1464 # @pci_bridge: if the device is a PCI bridge, the bridge information
1466 # @regions: a list of the PCI I/O regions associated with the device
1468 # Notes: the contents of @class_info.desc are not stable and should only be
1469 # treated as informational.
1473 { 'struct': 'PciDeviceInfo',
1474 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1475 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1476 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1477 'regions': ['PciMemoryRegion']} }
1482 # Information about a PCI bus
1484 # @bus: the bus index
1486 # @devices: a list of devices on this bus
1490 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1495 # Return information about the PCI bus topology of the guest.
1497 # Returns: a list of @PciInfo for each PCI bus. Each bus is
1498 # represented by a json-object, which has a key with a json-array of
1499 # all PCI devices attached to it. Each device is represented by a
1506 # -> { "execute": "query-pci" }
1517 # "desc": "Host bridge"
1533 # "desc": "ISA bridge"
1549 # "desc": "IDE controller"
1571 # "desc": "VGA controller"
1581 # "mem_type_64": false,
1584 # "address": 4026531840,
1588 # "prefetch": false,
1589 # "mem_type_64": false,
1592 # "address": 4060086272,
1596 # "prefetch": false,
1597 # "mem_type_64": false,
1612 # "desc": "RAM controller"
1633 # Note: This example has been shortened as the real response is too long.
1636 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1641 # This command will cause the QEMU process to exit gracefully. While every
1642 # attempt is made to send the QMP response before terminating, this is not
1643 # guaranteed. When using this interface, a premature EOF would not be
1650 # -> { "execute": "quit" }
1651 # <- { "return": {} }
1653 { 'command': 'quit' }
1658 # Stop all guest VCPU execution.
1662 # Notes: This function will succeed even if the guest is already in the stopped
1663 # state. In "inmigrate" state, it will ensure that the guest
1664 # remains paused once migration finishes, as if the -S option was
1665 # passed on the command line.
1669 # -> { "execute": "stop" }
1670 # <- { "return": {} }
1673 { 'command': 'stop' }
1678 # Performs a hard reset of a guest.
1684 # -> { "execute": "system_reset" }
1685 # <- { "return": {} }
1688 { 'command': 'system_reset' }
1691 # @system_powerdown:
1693 # Requests that a guest perform a powerdown operation.
1697 # Notes: A guest may or may not respond to this command. This command
1698 # returning does not indicate that a guest has accepted the request or
1699 # that it has shut down. Many guests will respond to this command by
1700 # prompting the user in some way.
1703 # -> { "execute": "system_powerdown" }
1704 # <- { "return": {} }
1707 { 'command': 'system_powerdown' }
1712 # This command is a nop that is only provided for the purposes of compatibility.
1716 # Notes: Do not use this command.
1718 { 'command': 'cpu', 'data': {'index': 'int'} }
1723 # Adds CPU with specified ID
1725 # @id: ID of CPU to be created, valid values [0..max_cpus)
1727 # Returns: Nothing on success
1733 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
1734 # <- { "return": {} }
1737 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1742 # Save a portion of guest memory to a file.
1744 # @val: the virtual address of the guest to start from
1746 # @size: the size of memory region to save
1748 # @filename: the file to save the memory to as binary data
1750 # @cpu-index: the index of the virtual CPU to use for translating the
1751 # virtual address (defaults to CPU 0)
1753 # Returns: Nothing on success
1757 # Notes: Errors were not reliably returned until 1.1
1761 # -> { "execute": "memsave",
1762 # "arguments": { "val": 10,
1764 # "filename": "/tmp/virtual-mem-dump" } }
1765 # <- { "return": {} }
1768 { 'command': 'memsave',
1769 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1774 # Save a portion of guest physical memory to a file.
1776 # @val: the physical address of the guest to start from
1778 # @size: the size of memory region to save
1780 # @filename: the file to save the memory to as binary data
1782 # Returns: Nothing on success
1786 # Notes: Errors were not reliably returned until 1.1
1790 # -> { "execute": "pmemsave",
1791 # "arguments": { "val": 10,
1793 # "filename": "/tmp/physical-mem-dump" } }
1794 # <- { "return": {} }
1797 { 'command': 'pmemsave',
1798 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1803 # Resume guest VCPU execution.
1807 # Returns: If successful, nothing
1809 # Notes: This command will succeed if the guest is currently running. It
1810 # will also succeed if the guest is in the "inmigrate" state; in
1811 # this case, the effect of the command is to make sure the guest
1812 # starts once migration finishes, removing the effect of the -S
1813 # command line option if it was passed.
1817 # -> { "execute": "cont" }
1818 # <- { "return": {} }
1821 { 'command': 'cont' }
1826 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1834 # -> { "execute": "system_wakeup" }
1835 # <- { "return": {} }
1838 { 'command': 'system_wakeup' }
1843 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1844 # The command fails when the guest doesn't support injecting.
1846 # Returns: If successful, nothing
1850 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1854 # -> { "execute": "inject-nmi" }
1855 # <- { "return": {} }
1858 { 'command': 'inject-nmi' }
1863 # Request the balloon driver to change its balloon size.
1865 # @value: the target size of the balloon in bytes
1867 # Returns: Nothing on success
1868 # If the balloon driver is enabled but not functional because the KVM
1869 # kernel module cannot support it, KvmMissingCap
1870 # If no balloon device is present, DeviceNotActive
1872 # Notes: This command just issues a request to the guest. When it returns,
1873 # the balloon size may not have changed. A guest can change the balloon
1874 # size independent of this command.
1880 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1881 # <- { "return": {} }
1884 { 'command': 'balloon', 'data': {'value': 'int'} }
1889 # This action can be used to test transaction failure.
1893 { 'struct': 'Abort',
1897 # @ActionCompletionMode:
1899 # An enumeration of Transactional completion modes.
1901 # @individual: Do not attempt to cancel any other Actions if any Actions fail
1902 # after the Transaction request succeeds. All Actions that
1903 # can complete successfully will do so without waiting on others.
1904 # This is the default.
1906 # @grouped: If any Action fails after the Transaction succeeds, cancel all
1907 # Actions. Actions do not complete until all Actions are ready to
1908 # complete. May be rejected by Actions that do not support this
1913 { 'enum': 'ActionCompletionMode',
1914 'data': [ 'individual', 'grouped' ] }
1917 # @TransactionAction:
1919 # A discriminated record of operations that can be performed with
1920 # @transaction. Action @type can be:
1922 # - @abort: since 1.6
1923 # - @block-dirty-bitmap-add: since 2.5
1924 # - @block-dirty-bitmap-clear: since 2.5
1925 # - @blockdev-backup: since 2.3
1926 # - @blockdev-snapshot: since 2.5
1927 # - @blockdev-snapshot-internal-sync: since 1.7
1928 # - @blockdev-snapshot-sync: since 1.1
1929 # - @drive-backup: since 1.6
1933 { 'union': 'TransactionAction',
1936 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
1937 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
1938 'blockdev-backup': 'BlockdevBackup',
1939 'blockdev-snapshot': 'BlockdevSnapshot',
1940 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
1941 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
1942 'drive-backup': 'DriveBackup'
1946 # @TransactionProperties:
1948 # Optional arguments to modify the behavior of a Transaction.
1950 # @completion-mode: Controls how jobs launched asynchronously by
1951 # Actions will complete or fail as a group.
1952 # See @ActionCompletionMode for details.
1956 { 'struct': 'TransactionProperties',
1958 '*completion-mode': 'ActionCompletionMode'
1965 # Executes a number of transactionable QMP commands atomically. If any
1966 # operation fails, then the entire set of actions will be abandoned and the
1967 # appropriate error returned.
1969 # For external snapshots, the dictionary contains the device, the file to use for
1970 # the new snapshot, and the format. The default format, if not specified, is
1973 # Each new snapshot defaults to being created by QEMU (wiping any
1974 # contents if the file already exists), but it is also possible to reuse
1975 # an externally-created file. In the latter case, you should ensure that
1976 # the new image file has the same contents as the current one; QEMU cannot
1977 # perform any meaningful check. Typically this is achieved by using the
1978 # current image file as the backing file for the new image.
1980 # On failure, the original disks pre-snapshot attempt will be used.
1982 # For internal snapshots, the dictionary contains the device and the snapshot's
1983 # name. If an internal snapshot matching name already exists, the request will
1984 # be rejected. Only some image formats support it, for example, qcow2, rbd,
1987 # On failure, qemu will try delete the newly created internal snapshot in the
1988 # transaction. When an I/O error occurs during deletion, the user needs to fix
1989 # it later with qemu-img or other command.
1991 # @actions: List of @TransactionAction;
1992 # information needed for the respective operations.
1994 # @properties: structure of additional options to control the
1995 # execution of the transaction. See @TransactionProperties
1996 # for additional detail.
1998 # Returns: nothing on success
2000 # Errors depend on the operations of the transaction
2002 # Note: The transaction aborts on the first failure. Therefore, there will be
2003 # information on only one failed operation returned in an error condition, and
2004 # subsequent actions will not have been attempted.
2010 # -> { "execute": "transaction",
2011 # "arguments": { "actions": [
2012 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
2013 # "snapshot-file": "/some/place/my-image",
2014 # "format": "qcow2" } },
2015 # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
2016 # "snapshot-file": "/some/place/my-image2",
2017 # "snapshot-node-name": "node3432",
2018 # "mode": "existing",
2019 # "format": "qcow2" } },
2020 # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
2021 # "snapshot-file": "/some/place/my-image2",
2022 # "mode": "existing",
2023 # "format": "qcow2" } },
2024 # { "type": "blockdev-snapshot-internal-sync", "data" : {
2025 # "device": "ide-hd2",
2026 # "name": "snapshot0" } } ] } }
2027 # <- { "return": {} }
2030 { 'command': 'transaction',
2031 'data': { 'actions': [ 'TransactionAction' ],
2032 '*properties': 'TransactionProperties'
2037 # @human-monitor-command:
2039 # Execute a command on the human monitor and return the output.
2041 # @command-line: the command to execute in the human monitor
2043 # @cpu-index: The CPU to use for commands that require an implicit CPU
2045 # Returns: the output of the command as a string
2049 # Notes: This command only exists as a stop-gap. Its use is highly
2050 # discouraged. The semantics of this command are not
2051 # guaranteed: this means that command names, arguments and
2052 # responses can change or be removed at ANY time. Applications
2053 # that rely on long term stability guarantees should NOT
2056 # Known limitations:
2058 # * This command is stateless, this means that commands that depend
2059 # on state information (such as getfd) might not work
2061 # * Commands that prompt the user for data don't currently work
2065 # -> { "execute": "human-monitor-command",
2066 # "arguments": { "command-line": "info kvm" } }
2067 # <- { "return": "kvm support: enabled\r\n" }
2070 { 'command': 'human-monitor-command',
2071 'data': {'command-line': 'str', '*cpu-index': 'int'},
2077 # Cancel the current executing migration process.
2079 # Returns: nothing on success
2081 # Notes: This command succeeds even if there is no migration process running.
2087 # -> { "execute": "migrate_cancel" }
2088 # <- { "return": {} }
2091 { 'command': 'migrate_cancel' }
2094 # @migrate_set_downtime:
2096 # Set maximum tolerated downtime for migration.
2098 # @value: maximum downtime in seconds
2100 # Returns: nothing on success
2102 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2108 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
2109 # <- { "return": {} }
2112 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2115 # @migrate_set_speed:
2117 # Set maximum speed for migration.
2119 # @value: maximum speed in bytes per second.
2121 # Returns: nothing on success
2123 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
2129 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
2130 # <- { "return": {} }
2133 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2136 # @migrate-set-cache-size:
2138 # Set cache size to be used by XBZRLE migration
2140 # @value: cache size in bytes
2142 # The size will be rounded down to the nearest power of 2.
2143 # The cache size can be modified before and during ongoing migration
2145 # Returns: nothing on success
2151 # -> { "execute": "migrate-set-cache-size",
2152 # "arguments": { "value": 536870912 } }
2153 # <- { "return": {} }
2156 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2159 # @query-migrate-cache-size:
2161 # Query migration XBZRLE cache size
2163 # Returns: XBZRLE cache size in bytes
2169 # -> { "execute": "query-migrate-cache-size" }
2170 # <- { "return": 67108864 }
2173 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2176 # @ObjectPropertyInfo:
2178 # @name: the name of the property
2180 # @type: the type of the property. This will typically come in one of four
2183 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2184 # These types are mapped to the appropriate JSON type.
2186 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
2187 # device type name. Child properties create the composition tree.
2189 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
2190 # device type name. Link properties form the device model graph.
2194 { 'struct': 'ObjectPropertyInfo',
2195 'data': { 'name': 'str', 'type': 'str' } }
2200 # This command will list any properties of a object given a path in the object
2203 # @path: the path within the object model. See @qom-get for a description of
2206 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2211 { 'command': 'qom-list',
2212 'data': { 'path': 'str' },
2213 'returns': [ 'ObjectPropertyInfo' ] }
2218 # This command will get a property from a object model path and return the
2221 # @path: The path within the object model. There are two forms of supported
2222 # paths--absolute and partial paths.
2224 # Absolute paths are derived from the root object and can follow child<>
2225 # or link<> properties. Since they can follow link<> properties, they
2226 # can be arbitrarily long. Absolute paths look like absolute filenames
2227 # and are prefixed with a leading slash.
2229 # Partial paths look like relative filenames. They do not begin
2230 # with a prefix. The matching rules for partial paths are subtle but
2231 # designed to make specifying objects easy. At each level of the
2232 # composition tree, the partial path is matched as an absolute path.
2233 # The first match is not returned. At least two matches are searched
2234 # for. A successful result is only returned if only one match is
2235 # found. If more than one match is found, a flag is return to
2236 # indicate that the match was ambiguous.
2238 # @property: The property name to read
2240 # Returns: The property value. The type depends on the property
2241 # type. child<> and link<> properties are returned as #str
2242 # pathnames. All integer property types (u8, u16, etc) are
2247 { 'command': 'qom-get',
2248 'data': { 'path': 'str', 'property': 'str' },
2254 # This command will set a property from a object model path.
2256 # @path: see @qom-get for a description of this parameter
2258 # @property: the property name to set
2260 # @value: a value who's type is appropriate for the property type. See @qom-get
2261 # for a description of type mapping.
2265 { 'command': 'qom-set',
2266 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2271 # This command is multiple commands multiplexed together.
2273 # @device: This is normally the name of a block device but it may also be 'vnc'.
2274 # when it's 'vnc', then sub command depends on @target
2276 # @target: If @device is a block device, then this is the new filename.
2277 # If @device is 'vnc', then if the value 'password' selects the vnc
2278 # change password command. Otherwise, this specifies a new server URI
2279 # address to listen to for VNC connections.
2281 # @arg: If @device is a block device, then this is an optional format to open
2283 # If @device is 'vnc' and @target is 'password', this is the new VNC
2284 # password to set. See change-vnc-password for additional notes.
2286 # Returns: Nothing on success.
2287 # If @device is not a valid block device, DeviceNotFound
2289 # Notes: This interface is deprecated, and it is strongly recommended that you
2290 # avoid using it. For changing block devices, use
2291 # blockdev-change-medium; for changing VNC parameters, use
2292 # change-vnc-password.
2298 # 1. Change a removable medium
2300 # -> { "execute": "change",
2301 # "arguments": { "device": "ide1-cd0",
2302 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
2303 # <- { "return": {} }
2305 # 2. Change VNC password
2307 # -> { "execute": "change",
2308 # "arguments": { "device": "vnc", "target": "password",
2309 # "arg": "foobar1" } }
2310 # <- { "return": {} }
2313 { 'command': 'change',
2314 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2319 # This structure describes a search result from @qom-list-types
2321 # @name: the type name found in the search
2323 # @abstract: the type is abstract and can't be directly instantiated.
2324 # Omitted if false. (since 2.10)
2326 # @parent: Name of parent type, if any (since 2.10)
2330 { 'struct': 'ObjectTypeInfo',
2331 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } }
2336 # This command will return a list of types given search parameters
2338 # @implements: if specified, only return types that implement this type name
2340 # @abstract: if true, include abstract types in the results
2342 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2346 { 'command': 'qom-list-types',
2347 'data': { '*implements': 'str', '*abstract': 'bool' },
2348 'returns': [ 'ObjectTypeInfo' ] }
2351 # @DevicePropertyInfo:
2353 # Information about device properties.
2355 # @name: the name of the property
2356 # @type: the typename of the property
2357 # @description: if specified, the description of the property.
2362 { 'struct': 'DevicePropertyInfo',
2363 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2366 # @device-list-properties:
2368 # List properties associated with a device.
2370 # @typename: the type name of a device
2372 # Returns: a list of DevicePropertyInfo describing a devices properties
2376 { 'command': 'device-list-properties',
2377 'data': { 'typename': 'str'},
2378 'returns': [ 'DevicePropertyInfo' ] }
2383 # Migrates the current running guest to another Virtual Machine.
2385 # @uri: the Uniform Resource Identifier of the destination VM
2387 # @blk: do block migration (full disk copy)
2389 # @inc: incremental disk copy migration
2391 # @detach: this argument exists only for compatibility reasons and
2392 # is ignored by QEMU
2394 # Returns: nothing on success
2400 # 1. The 'query-migrate' command should be used to check migration's progress
2401 # and final result (this information is provided by the 'status' member)
2403 # 2. All boolean arguments default to false
2405 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
2410 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
2411 # <- { "return": {} }
2414 { 'command': 'migrate',
2415 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2418 # @migrate-incoming:
2420 # Start an incoming migration, the qemu must have been started
2421 # with -incoming defer
2423 # @uri: The Uniform Resource Identifier identifying the source or
2424 # address to listen on
2426 # Returns: nothing on success
2432 # 1. It's a bad idea to use a string for the uri, but it needs to stay
2433 # compatible with -incoming and the format of the uri is already exposed
2436 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
2439 # 3. The uri format is the same as for -incoming
2443 # -> { "execute": "migrate-incoming",
2444 # "arguments": { "uri": "tcp::4446" } }
2445 # <- { "return": {} }
2448 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2451 # @xen-save-devices-state:
2453 # Save the state of all devices to file. The RAM and the block devices
2454 # of the VM are not saved by this command.
2456 # @filename: the file to save the state of the devices to as binary
2457 # data. See xen-save-devices-state.txt for a description of the binary
2460 # Returns: Nothing on success
2466 # -> { "execute": "xen-save-devices-state",
2467 # "arguments": { "filename": "/tmp/save" } }
2468 # <- { "return": {} }
2471 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2474 # @xen-set-global-dirty-log:
2476 # Enable or disable the global dirty log mode.
2478 # @enable: true to enable, false to disable.
2486 # -> { "execute": "xen-set-global-dirty-log",
2487 # "arguments": { "enable": true } }
2488 # <- { "return": {} }
2491 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2496 # @driver: the name of the new device's driver
2498 # @bus: the device's parent bus (device tree path)
2500 # @id: the device's ID, must be unique
2502 # Additional arguments depend on the type.
2507 # 1. For detailed information about this command, please refer to the
2508 # 'docs/qdev-device-use.txt' file.
2510 # 2. It's possible to list device properties by running QEMU with the
2511 # "-device DEVICE,help" command-line argument, where DEVICE is the
2516 # -> { "execute": "device_add",
2517 # "arguments": { "driver": "e1000", "id": "net1",
2519 # "mac": "52:54:00:12:34:56" } }
2520 # <- { "return": {} }
2522 # TODO: This command effectively bypasses QAPI completely due to its
2523 # "additional arguments" business. It shouldn't have been added to
2524 # the schema in this form. It should be qapified properly, or
2525 # replaced by a properly qapified command.
2529 { 'command': 'device_add',
2530 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
2531 'gen': false } # so we can get the additional arguments
2536 # Remove a device from a guest
2538 # @id: the device's ID or QOM path
2540 # Returns: Nothing on success
2541 # If @id is not a valid device, DeviceNotFound
2543 # Notes: When this command completes, the device may not be removed from the
2544 # guest. Hot removal is an operation that requires guest cooperation.
2545 # This command merely requests that the guest begin the hot removal
2546 # process. Completion of the device removal process is signaled with a
2547 # DEVICE_DELETED event. Guest reset will automatically complete removal
2554 # -> { "execute": "device_del",
2555 # "arguments": { "id": "net1" } }
2556 # <- { "return": {} }
2558 # -> { "execute": "device_del",
2559 # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
2560 # <- { "return": {} }
2563 { 'command': 'device_del', 'data': {'id': 'str'} }
2566 # @DumpGuestMemoryFormat:
2568 # An enumeration of guest-memory-dump's format.
2572 # @kdump-zlib: kdump-compressed format with zlib-compressed
2574 # @kdump-lzo: kdump-compressed format with lzo-compressed
2576 # @kdump-snappy: kdump-compressed format with snappy-compressed
2580 { 'enum': 'DumpGuestMemoryFormat',
2581 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2584 # @dump-guest-memory:
2586 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2587 # very long depending on the amount of guest memory.
2589 # @paging: if true, do paging to get guest's memory mapping. This allows
2590 # using gdb to process the core file.
2592 # IMPORTANT: this option can make QEMU allocate several gigabytes
2593 # of RAM. This can happen for a large guest, or a
2594 # malicious guest pretending to be large.
2596 # Also, paging=true has the following limitations:
2598 # 1. The guest may be in a catastrophic state or can have corrupted
2599 # memory, which cannot be trusted
2600 # 2. The guest can be in real-mode even if paging is enabled. For
2601 # example, the guest uses ACPI to sleep, and ACPI sleep state
2603 # 3. Currently only supported on i386 and x86_64.
2605 # @protocol: the filename or file descriptor of the vmcore. The supported
2608 # 1. file: the protocol starts with "file:", and the following
2609 # string is the file's path.
2610 # 2. fd: the protocol starts with "fd:", and the following string
2613 # @detach: if true, QMP will return immediately rather than
2614 # waiting for the dump to finish. The user can track progress
2615 # using "query-dump". (since 2.6).
2617 # @begin: if specified, the starting physical address.
2619 # @length: if specified, the memory size, in bytes. If you don't
2620 # want to dump all guest's memory, please specify the start @begin
2623 # @format: if specified, the format of guest memory dump. But non-elf
2624 # format is conflict with paging and filter, ie. @paging, @begin and
2625 # @length is not allowed to be specified with non-elf @format at the
2626 # same time (since 2.0)
2628 # Note: All boolean arguments default to false
2630 # Returns: nothing on success
2636 # -> { "execute": "dump-guest-memory",
2637 # "arguments": { "protocol": "fd:dump" } }
2638 # <- { "return": {} }
2641 { 'command': 'dump-guest-memory',
2642 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2643 '*begin': 'int', '*length': 'int',
2644 '*format': 'DumpGuestMemoryFormat'} }
2649 # Describe the status of a long-running background guest memory dump.
2651 # @none: no dump-guest-memory has started yet.
2653 # @active: there is one dump running in background.
2655 # @completed: the last dump has finished successfully.
2657 # @failed: the last dump has failed.
2661 { 'enum': 'DumpStatus',
2662 'data': [ 'none', 'active', 'completed', 'failed' ] }
2667 # The result format for 'query-dump'.
2669 # @status: enum of @DumpStatus, which shows current dump status
2671 # @completed: bytes written in latest dump (uncompressed)
2673 # @total: total bytes to be written in latest dump (uncompressed)
2677 { 'struct': 'DumpQueryResult',
2678 'data': { 'status': 'DumpStatus',
2685 # Query latest dump status.
2687 # Returns: A @DumpStatus object showing the dump status.
2693 # -> { "execute": "query-dump" }
2694 # <- { "return": { "status": "active", "completed": 1024000,
2695 # "total": 2048000 } }
2698 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
2701 # @DumpGuestMemoryCapability:
2703 # A list of the available formats for dump-guest-memory
2707 { 'struct': 'DumpGuestMemoryCapability',
2709 'formats': ['DumpGuestMemoryFormat'] } }
2712 # @query-dump-guest-memory-capability:
2714 # Returns the available formats for dump-guest-memory
2716 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2723 # -> { "execute": "query-dump-guest-memory-capability" }
2724 # <- { "return": { "formats":
2725 # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
2728 { 'command': 'query-dump-guest-memory-capability',
2729 'returns': 'DumpGuestMemoryCapability' }
2734 # Dump guest's storage keys
2736 # @filename: the path to the file to dump to
2738 # This command is only supported on s390 architecture.
2744 # -> { "execute": "dump-skeys",
2745 # "arguments": { "filename": "/tmp/skeys" } }
2746 # <- { "return": {} }
2749 { 'command': 'dump-skeys',
2750 'data': { 'filename': 'str' } }
2755 # Create a QOM object.
2757 # @qom-type: the class name for the object to be created
2759 # @id: the name of the new object
2761 # @props: a dictionary of properties to be passed to the backend
2763 # Returns: Nothing on success
2764 # Error if @qom-type is not a valid class name
2770 # -> { "execute": "object-add",
2771 # "arguments": { "qom-type": "rng-random", "id": "rng1",
2772 # "props": { "filename": "/dev/hwrng" } } }
2773 # <- { "return": {} }
2776 { 'command': 'object-add',
2777 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
2782 # Remove a QOM object.
2784 # @id: the name of the QOM object to remove
2786 # Returns: Nothing on success
2787 # Error if @id is not a valid id for a QOM object
2793 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
2794 # <- { "return": {} }
2797 { 'command': 'object-del', 'data': {'id': 'str'} }
2802 # Receive a file descriptor via SCM rights and assign it a name
2804 # @fdname: file descriptor name
2806 # Returns: Nothing on success
2810 # Notes: If @fdname already exists, the file descriptor assigned to
2811 # it will be closed and replaced by the received file
2814 # The 'closefd' command can be used to explicitly close the
2815 # file descriptor when it is no longer needed.
2819 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
2820 # <- { "return": {} }
2823 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2828 # Close a file descriptor previously passed via SCM rights
2830 # @fdname: file descriptor name
2832 # Returns: Nothing on success
2838 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
2839 # <- { "return": {} }
2842 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2847 # Information describing a machine.
2849 # @name: the name of the machine
2851 # @alias: an alias for the machine name
2853 # @is-default: whether the machine is default
2855 # @cpu-max: maximum number of CPUs supported by the machine type
2858 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
2862 { 'struct': 'MachineInfo',
2863 'data': { 'name': 'str', '*alias': 'str',
2864 '*is-default': 'bool', 'cpu-max': 'int',
2865 'hotpluggable-cpus': 'bool'} }
2870 # Return a list of supported machines
2872 # Returns: a list of MachineInfo
2876 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2879 # @CpuDefinitionInfo:
2881 # Virtual CPU definition.
2883 # @name: the name of the CPU definition
2885 # @migration-safe: whether a CPU definition can be safely used for
2886 # migration in combination with a QEMU compatibility machine
2887 # when migrating between different QMU versions and between
2888 # hosts with different sets of (hardware or software)
2889 # capabilities. If not provided, information is not available
2890 # and callers should not assume the CPU definition to be
2891 # migration-safe. (since 2.8)
2893 # @static: whether a CPU definition is static and will not change depending on
2894 # QEMU version, machine type, machine options and accelerator options.
2895 # A static model is always migration-safe. (since 2.8)
2897 # @unavailable-features: List of properties that prevent
2898 # the CPU model from running in the current
2900 # @typename: Type name that can be used as argument to @device-list-properties,
2901 # to introspect properties configurable using -cpu or -global.
2904 # @unavailable-features is a list of QOM property names that
2905 # represent CPU model attributes that prevent the CPU from running.
2906 # If the QOM property is read-only, that means there's no known
2907 # way to make the CPU model run in the current host. Implementations
2908 # that choose not to provide specific information return the
2909 # property name "type".
2910 # If the property is read-write, it means that it MAY be possible
2911 # to run the CPU model in the current host if that property is
2912 # changed. Management software can use it as hints to suggest or
2913 # choose an alternative for the user, or just to generate meaningful
2914 # error messages explaining why the CPU model can't be used.
2915 # If @unavailable-features is an empty list, the CPU model is
2916 # runnable using the current host and machine-type.
2917 # If @unavailable-features is not present, runnability
2918 # information for the CPU is not available.
2922 { 'struct': 'CpuDefinitionInfo',
2923 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
2924 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
2927 # @query-cpu-definitions:
2929 # Return a list of supported virtual CPU definitions
2931 # Returns: a list of CpuDefInfo
2935 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2940 # Virtual CPU model.
2942 # A CPU model consists of the name of a CPU definition, to which
2943 # delta changes are applied (e.g. features added/removed). Most magic values
2944 # that an architecture might require should be hidden behind the name.
2945 # However, if required, architectures can expose relevant properties.
2947 # @name: the name of the CPU definition the model is based on
2948 # @props: a dictionary of QOM properties to be applied
2952 { 'struct': 'CpuModelInfo',
2953 'data': { 'name': 'str',
2957 # @CpuModelExpansionType:
2959 # An enumeration of CPU model expansion types.
2961 # @static: Expand to a static CPU model, a combination of a static base
2962 # model name and property delta changes. As the static base model will
2963 # never change, the expanded CPU model will be the same, independant of
2964 # independent of QEMU version, machine type, machine options, and
2965 # accelerator options. Therefore, the resulting model can be used by
2966 # tooling without having to specify a compatibility machine - e.g. when
2967 # displaying the "host" model. static CPU models are migration-safe.
2969 # @full: Expand all properties. The produced model is not guaranteed to be
2970 # migration-safe, but allows tooling to get an insight and work with
2973 # Note: When a non-migration-safe CPU model is expanded in static mode, some
2974 # features enabled by the CPU model may be omitted, because they can't be
2975 # implemented by a static CPU model definition (e.g. cache info passthrough and
2976 # PMU passthrough in x86). If you need an accurate representation of the
2977 # features enabled by a non-migration-safe CPU model, use @full. If you need a
2978 # static representation that will keep ABI compatibility even when changing QEMU
2979 # version or machine-type, use @static (but keep in mind that some features may
2984 { 'enum': 'CpuModelExpansionType',
2985 'data': [ 'static', 'full' ] }
2989 # @CpuModelExpansionInfo:
2991 # The result of a cpu model expansion.
2993 # @model: the expanded CpuModelInfo.
2997 { 'struct': 'CpuModelExpansionInfo',
2998 'data': { 'model': 'CpuModelInfo' } }
3002 # @query-cpu-model-expansion:
3004 # Expands a given CPU model (or a combination of CPU model + additional options)
3005 # to different granularities, allowing tooling to get an understanding what a
3006 # specific CPU model looks like in QEMU under a certain configuration.
3008 # This interface can be used to query the "host" CPU model.
3010 # The data returned by this command may be affected by:
3012 # * QEMU version: CPU models may look different depending on the QEMU version.
3013 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3014 # * machine-type: CPU model may look different depending on the machine-type.
3015 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3016 # * machine options (including accelerator): in some architectures, CPU models
3017 # may look different depending on machine and accelerator options. (Except for
3018 # CPU models reported as "static" in query-cpu-definitions.)
3019 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3020 # global properties may affect expansion of CPU models. Using
3021 # query-cpu-model-expansion while using these is not advised.
3023 # Some architectures may not support all expansion types. s390x supports
3024 # "full" and "static".
3026 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3027 # not supported, if the model cannot be expanded, if the model contains
3028 # an unknown CPU definition name, unknown properties or properties
3029 # with a wrong type. Also returns an error if an expansion type is
3034 { 'command': 'query-cpu-model-expansion',
3035 'data': { 'type': 'CpuModelExpansionType',
3036 'model': 'CpuModelInfo' },
3037 'returns': 'CpuModelExpansionInfo' }
3040 # @CpuModelCompareResult:
3042 # An enumeration of CPU model comparation results. The result is usually
3043 # calculated using e.g. CPU features or CPU generations.
3045 # @incompatible: If model A is incompatible to model B, model A is not
3046 # guaranteed to run where model B runs and the other way around.
3048 # @identical: If model A is identical to model B, model A is guaranteed to run
3049 # where model B runs and the other way around.
3051 # @superset: If model A is a superset of model B, model B is guaranteed to run
3052 # where model A runs. There are no guarantees about the other way.
3054 # @subset: If model A is a subset of model B, model A is guaranteed to run
3055 # where model B runs. There are no guarantees about the other way.
3059 { 'enum': 'CpuModelCompareResult',
3060 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3063 # @CpuModelCompareInfo:
3065 # The result of a CPU model comparison.
3067 # @result: The result of the compare operation.
3068 # @responsible-properties: List of properties that led to the comparison result
3069 # not being identical.
3071 # @responsible-properties is a list of QOM property names that led to
3072 # both CPUs not being detected as identical. For identical models, this
3074 # If a QOM property is read-only, that means there's no known way to make the
3075 # CPU models identical. If the special property name "type" is included, the
3076 # models are by definition not identical and cannot be made identical.
3080 { 'struct': 'CpuModelCompareInfo',
3081 'data': {'result': 'CpuModelCompareResult',
3082 'responsible-properties': ['str']
3087 # @query-cpu-model-comparison:
3089 # Compares two CPU models, returning how they compare in a specific
3090 # configuration. The results indicates how both models compare regarding
3091 # runnability. This result can be used by tooling to make decisions if a
3092 # certain CPU model will run in a certain configuration or if a compatible
3093 # CPU model has to be created by baselining.
3095 # Usually, a CPU model is compared against the maximum possible CPU model
3096 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
3097 # model is identical or a subset, it will run in that configuration.
3099 # The result returned by this command may be affected by:
3101 # * QEMU version: CPU models may look different depending on the QEMU version.
3102 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3103 # * machine-type: CPU model may look different depending on the machine-type.
3104 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3105 # * machine options (including accelerator): in some architectures, CPU models
3106 # may look different depending on machine and accelerator options. (Except for
3107 # CPU models reported as "static" in query-cpu-definitions.)
3108 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3109 # global properties may affect expansion of CPU models. Using
3110 # query-cpu-model-expansion while using these is not advised.
3112 # Some architectures may not support comparing CPU models. s390x supports
3113 # comparing CPU models.
3115 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3116 # not supported, if a model cannot be used, if a model contains
3117 # an unknown cpu definition name, unknown properties or properties
3122 { 'command': 'query-cpu-model-comparison',
3123 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
3124 'returns': 'CpuModelCompareInfo' }
3127 # @CpuModelBaselineInfo:
3129 # The result of a CPU model baseline.
3131 # @model: the baselined CpuModelInfo.
3135 { 'struct': 'CpuModelBaselineInfo',
3136 'data': { 'model': 'CpuModelInfo' } }
3139 # @query-cpu-model-baseline:
3141 # Baseline two CPU models, creating a compatible third model. The created
3142 # model will always be a static, migration-safe CPU model (see "static"
3143 # CPU model expansion for details).
3145 # This interface can be used by tooling to create a compatible CPU model out
3146 # two CPU models. The created CPU model will be identical to or a subset of
3147 # both CPU models when comparing them. Therefore, the created CPU model is
3148 # guaranteed to run where the given CPU models run.
3150 # The result returned by this command may be affected by:
3152 # * QEMU version: CPU models may look different depending on the QEMU version.
3153 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3154 # * machine-type: CPU model may look different depending on the machine-type.
3155 # (Except for CPU models reported as "static" in query-cpu-definitions.)
3156 # * machine options (including accelerator): in some architectures, CPU models
3157 # may look different depending on machine and accelerator options. (Except for
3158 # CPU models reported as "static" in query-cpu-definitions.)
3159 # * "-cpu" arguments and global properties: arguments to the -cpu option and
3160 # global properties may affect expansion of CPU models. Using
3161 # query-cpu-model-expansion while using these is not advised.
3163 # Some architectures may not support baselining CPU models. s390x supports
3164 # baselining CPU models.
3166 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
3167 # not supported, if a model cannot be used, if a model contains
3168 # an unknown cpu definition name, unknown properties or properties
3173 { 'command': 'query-cpu-model-baseline',
3174 'data': { 'modela': 'CpuModelInfo',
3175 'modelb': 'CpuModelInfo' },
3176 'returns': 'CpuModelBaselineInfo' }
3181 # Information about a file descriptor that was added to an fd set.
3183 # @fdset-id: The ID of the fd set that @fd was added to.
3185 # @fd: The file descriptor that was received via SCM rights and
3186 # added to the fd set.
3190 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3195 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3197 # @fdset-id: The ID of the fd set to add the file descriptor to.
3199 # @opaque: A free-form string that can be used to describe the fd.
3201 # Returns: @AddfdInfo on success
3203 # If file descriptor was not received, FdNotSupplied
3205 # If @fdset-id is a negative value, InvalidParameterValue
3207 # Notes: The list of fd sets is shared by all monitor connections.
3209 # If @fdset-id is not specified, a new fd set will be created.
3215 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
3216 # <- { "return": { "fdset-id": 1, "fd": 3 } }
3219 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3220 'returns': 'AddfdInfo' }
3225 # Remove a file descriptor from an fd set.
3227 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3229 # @fd: The file descriptor that is to be removed.
3231 # Returns: Nothing on success
3232 # If @fdset-id or @fd is not found, FdNotFound
3236 # Notes: The list of fd sets is shared by all monitor connections.
3238 # If @fd is not specified, all file descriptors in @fdset-id
3243 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
3244 # <- { "return": {} }
3247 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3252 # Information about a file descriptor that belongs to an fd set.
3254 # @fd: The file descriptor value.
3256 # @opaque: A free-form string that can be used to describe the fd.
3260 { 'struct': 'FdsetFdInfo',
3261 'data': {'fd': 'int', '*opaque': 'str'} }
3266 # Information about an fd set.
3268 # @fdset-id: The ID of the fd set.
3270 # @fds: A list of file descriptors that belong to this fd set.
3274 { 'struct': 'FdsetInfo',
3275 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3280 # Return information describing all fd sets.
3282 # Returns: A list of @FdsetInfo
3286 # Note: The list of fd sets is shared by all monitor connections.
3290 # -> { "execute": "query-fdsets" }
3296 # "opaque": "rdonly:/path/to/file"
3300 # "opaque": "rdwr:/path/to/file"
3320 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3325 # Information describing the QEMU target.
3327 # @arch: the target architecture (eg "x86_64", "i386", etc)
3331 { 'struct': 'TargetInfo',
3332 'data': { 'arch': 'str' } }
3337 # Return information about the target for this QEMU
3339 # Returns: TargetInfo
3343 { 'command': 'query-target', 'returns': 'TargetInfo' }
3348 # An enumeration of TPM models
3350 # @tpm-tis: TPM TIS model
3354 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3357 # @query-tpm-models:
3359 # Return a list of supported TPM models
3361 # Returns: a list of TpmModel
3367 # -> { "execute": "query-tpm-models" }
3368 # <- { "return": [ "tpm-tis" ] }
3371 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3376 # An enumeration of TPM types
3378 # @passthrough: TPM passthrough type
3382 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3387 # Return a list of supported TPM types
3389 # Returns: a list of TpmType
3395 # -> { "execute": "query-tpm-types" }
3396 # <- { "return": [ "passthrough" ] }
3399 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3402 # @TPMPassthroughOptions:
3404 # Information about the TPM passthrough type
3406 # @path: string describing the path used for accessing the TPM device
3408 # @cancel-path: string showing the TPM's sysfs cancel file
3409 # for cancellation of TPM commands while they are executing
3413 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3414 '*cancel-path' : 'str'} }
3419 # A union referencing different TPM backend types' configuration options
3421 # @type: 'passthrough' The configuration options for the TPM passthrough type
3425 { 'union': 'TpmTypeOptions',
3426 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3431 # Information about the TPM
3433 # @id: The Id of the TPM
3435 # @model: The TPM frontend model
3437 # @options: The TPM (backend) type configuration options
3441 { 'struct': 'TPMInfo',
3442 'data': {'id': 'str',
3443 'model': 'TpmModel',
3444 'options': 'TpmTypeOptions' } }
3449 # Return information about the TPM device
3451 # Returns: @TPMInfo on success
3457 # -> { "execute": "query-tpm" }
3460 # { "model": "tpm-tis",
3462 # { "type": "passthrough",
3464 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3465 # "path": "/dev/tpm0"
3474 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3477 # @AcpiTableOptions:
3479 # Specify an ACPI table on the command line to load.
3481 # At most one of @file and @data can be specified. The list of files specified
3482 # by any one of them is loaded and concatenated in order. If both are omitted,
3485 # Other fields / optargs can be used to override fields of the generic ACPI
3486 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3487 # Description Table Header. If a header field is not overridden, then the
3488 # corresponding value from the concatenated blob is used (in case of @file), or
3489 # it is filled in with a hard-coded value (in case of @data).
3491 # String fields are copied into the matching ACPI member from lowest address
3492 # upwards, and silently truncated / NUL-padded to length.
3494 # @sig: table signature / identifier (4 bytes)
3496 # @rev: table revision number (dependent on signature, 1 byte)
3498 # @oem_id: OEM identifier (6 bytes)
3500 # @oem_table_id: OEM table identifier (8 bytes)
3502 # @oem_rev: OEM-supplied revision number (4 bytes)
3504 # @asl_compiler_id: identifier of the utility that created the table
3507 # @asl_compiler_rev: revision number of the utility that created the
3510 # @file: colon (:) separated list of pathnames to load and
3511 # concatenate as table data. The resultant binary blob is expected to
3512 # have an ACPI table header. At least one file is required. This field
3515 # @data: colon (:) separated list of pathnames to load and
3516 # concatenate as table data. The resultant binary blob must not have an
3517 # ACPI table header. At least one file is required. This field excludes
3522 { 'struct': 'AcpiTableOptions',
3527 '*oem_table_id': 'str',
3528 '*oem_rev': 'uint32',
3529 '*asl_compiler_id': 'str',
3530 '*asl_compiler_rev': 'uint32',
3535 # @CommandLineParameterType:
3537 # Possible types for an option parameter.
3539 # @string: accepts a character string
3541 # @boolean: accepts "on" or "off"
3543 # @number: accepts a number
3545 # @size: accepts a number followed by an optional suffix (K)ilo,
3546 # (M)ega, (G)iga, (T)era
3550 { 'enum': 'CommandLineParameterType',
3551 'data': ['string', 'boolean', 'number', 'size'] }
3554 # @CommandLineParameterInfo:
3556 # Details about a single parameter of a command line option.
3558 # @name: parameter name
3560 # @type: parameter @CommandLineParameterType
3562 # @help: human readable text string, not suitable for parsing.
3564 # @default: default value string (since 2.1)
3568 { 'struct': 'CommandLineParameterInfo',
3569 'data': { 'name': 'str',
3570 'type': 'CommandLineParameterType',
3572 '*default': 'str' } }
3575 # @CommandLineOptionInfo:
3577 # Details about a command line option, including its list of parameter details
3579 # @option: option name
3581 # @parameters: an array of @CommandLineParameterInfo
3585 { 'struct': 'CommandLineOptionInfo',
3586 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3589 # @query-command-line-options:
3591 # Query command line option schema.
3593 # @option: option name
3595 # Returns: list of @CommandLineOptionInfo for all options (or for the given
3596 # @option). Returns an error if the given @option doesn't exist.
3602 # -> { "execute": "query-command-line-options",
3603 # "arguments": { "option": "option-rom" } }
3608 # "name": "romfile",
3612 # "name": "bootindex",
3616 # "option": "option-rom"
3622 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
3623 'returns': ['CommandLineOptionInfo'] }
3626 # @X86CPURegister32:
3628 # A X86 32-bit register
3632 { 'enum': 'X86CPURegister32',
3633 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3636 # @X86CPUFeatureWordInfo:
3638 # Information about a X86 CPU feature word
3640 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3642 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
3645 # @cpuid-register: Output register containing the feature bits
3647 # @features: value of output register, containing the feature bits
3651 { 'struct': 'X86CPUFeatureWordInfo',
3652 'data': { 'cpuid-input-eax': 'int',
3653 '*cpuid-input-ecx': 'int',
3654 'cpuid-register': 'X86CPURegister32',
3655 'features': 'int' } }
3658 # @DummyForceArrays:
3660 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
3664 { 'struct': 'DummyForceArrays',
3665 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
3671 # @node: NUMA nodes configuration
3673 # @dist: NUMA distance configuration (since 2.10)
3675 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
3679 { 'enum': 'NumaOptionsType',
3680 'data': [ 'node', 'dist', 'cpu' ] }
3685 # A discriminated record of NUMA options. (for OptsVisitor)
3689 { 'union': 'NumaOptions',
3690 'base': { 'type': 'NumaOptionsType' },
3691 'discriminator': 'type',
3693 'node': 'NumaNodeOptions',
3694 'dist': 'NumaDistOptions',
3695 'cpu': 'NumaCpuOptions' }}
3700 # Create a guest NUMA node. (for OptsVisitor)
3702 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
3704 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
3707 # @mem: memory size of this node; mutually exclusive with @memdev.
3708 # Equally divide total memory among nodes if both @mem and @memdev are
3711 # @memdev: memory backend object. If specified for one node,
3712 # it must be specified for all nodes.
3716 { 'struct': 'NumaNodeOptions',
3718 '*nodeid': 'uint16',
3719 '*cpus': ['uint16'],
3726 # Set the distance between 2 NUMA nodes.
3728 # @src: source NUMA node.
3730 # @dst: destination NUMA node.
3732 # @val: NUMA distance from source node to destination node.
3733 # When a node is unreachable from another node, set the distance
3734 # between them to 255.
3738 { 'struct': 'NumaDistOptions',
3747 # Option "-numa cpu" overrides default cpu to node mapping.
3748 # It accepts the same set of cpu properties as returned by
3749 # query-hotpluggable-cpus[].props, where node-id could be used to
3750 # override default node mapping.
3754 { 'struct': 'NumaCpuOptions',
3755 'base': 'CpuInstanceProperties',
3761 # Host memory policy types
3763 # @default: restore default policy, remove any nondefault policy
3765 # @preferred: set the preferred host nodes for allocation
3767 # @bind: a strict policy that restricts memory allocation to the
3768 # host nodes specified
3770 # @interleave: memory allocations are interleaved across the set
3771 # of host nodes specified
3775 { 'enum': 'HostMemPolicy',
3776 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
3781 # Information about memory backend
3783 # @id: backend's ID if backend has 'id' property (since 2.9)
3785 # @size: memory backend size
3787 # @merge: enables or disables memory merge support
3789 # @dump: includes memory backend's memory in a core dump or not
3791 # @prealloc: enables or disables memory preallocation
3793 # @host-nodes: host nodes for its memory policy
3795 # @policy: memory policy of memory backend
3799 { 'struct': 'Memdev',
3806 'host-nodes': ['uint16'],
3807 'policy': 'HostMemPolicy' }}
3812 # Returns information for all memory backends.
3814 # Returns: a list of @Memdev.
3820 # -> { "execute": "query-memdev" }
3824 # "size": 536870912,
3827 # "prealloc": false,
3828 # "host-nodes": [0, 1],
3832 # "size": 536870912,
3836 # "host-nodes": [2, 3],
3837 # "policy": "preferred"
3843 { 'command': 'query-memdev', 'returns': ['Memdev'] }
3846 # @PCDIMMDeviceInfo:
3848 # PCDIMMDevice state information
3852 # @addr: physical address, where device is mapped
3854 # @size: size of memory that the device provides
3856 # @slot: slot number at which device is plugged in
3858 # @node: NUMA node number where device is plugged in
3860 # @memdev: memory backend linked with device
3862 # @hotplugged: true if device was hotplugged
3864 # @hotpluggable: true if device if could be added/removed while machine is running
3868 { 'struct': 'PCDIMMDeviceInfo',
3869 'data': { '*id': 'str',
3875 'hotplugged': 'bool',
3876 'hotpluggable': 'bool'
3881 # @MemoryDeviceInfo:
3883 # Union containing information about a memory device
3887 { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
3890 # @query-memory-devices:
3892 # Lists available memory devices and their state
3898 # -> { "execute": "query-memory-devices" }
3899 # <- { "return": [ { "data":
3900 # { "addr": 5368709120,
3901 # "hotpluggable": true,
3902 # "hotplugged": true,
3904 # "memdev": "/objects/memX",
3906 # "size": 1073741824,
3912 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
3917 # @DIMM: memory slot
3918 # @CPU: logical CPU slot (since 2.7)
3920 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
3925 # OSPM Status Indication for a device
3926 # For description of possible values of @source and @status fields
3927 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
3929 # @device: device ID associated with slot
3931 # @slot: slot ID, unique per slot of a given @slot-type
3933 # @slot-type: type of the slot
3935 # @source: an integer containing the source event
3937 # @status: an integer containing the status code
3941 { 'struct': 'ACPIOSTInfo',
3942 'data' : { '*device': 'str',
3944 'slot-type': 'ACPISlotType',
3949 # @query-acpi-ospm-status:
3951 # Return a list of ACPIOSTInfo for devices that support status
3952 # reporting via ACPI _OST method.
3958 # -> { "execute": "query-acpi-ospm-status" }
3959 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
3960 # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
3961 # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
3962 # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
3966 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
3971 # An enumeration of the I/O operation types
3973 # @read: read operation
3975 # @write: write operation
3979 { 'enum': 'IoOperationType',
3980 'data': [ 'read', 'write' ] }
3983 # @rtc-reset-reinjection:
3985 # This command will reset the RTC interrupt reinjection backlog.
3986 # Can be used if another mechanism to synchronize guest time
3987 # is in effect, for example QEMU guest agent's guest-set-time
3994 # -> { "execute": "rtc-reset-reinjection" }
3995 # <- { "return": {} }
3998 { 'command': 'rtc-reset-reinjection' }
4003 # Mode of the replay subsystem.
4005 # @none: normal execution mode. Replay or record are not enabled.
4007 # @record: record mode. All non-deterministic data is written into the
4010 # @play: replay mode. Non-deterministic data required for system execution
4011 # is read from the log.
4015 { 'enum': 'ReplayMode',
4016 'data': [ 'none', 'record', 'play' ] }
4019 # @xen-load-devices-state:
4021 # Load the state of all devices from file. The RAM and the block devices
4022 # of the VM are not loaded by this command.
4024 # @filename: the file to load the state of the devices from as binary
4025 # data. See xen-save-devices-state.txt for a description of the binary
4032 # -> { "execute": "xen-load-devices-state",
4033 # "arguments": { "filename": "/tmp/resume" } }
4034 # <- { "return": {} }
4037 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
4040 # @xen-set-replication:
4042 # Enable or disable replication.
4044 # @enable: true to enable, false to disable.
4046 # @primary: true for primary or false for secondary.
4048 # @failover: true to do failover, false to stop. but cannot be
4049 # specified if 'enable' is true. default value is false.
4055 # -> { "execute": "xen-set-replication",
4056 # "arguments": {"enable": true, "primary": false} }
4057 # <- { "return": {} }
4061 { 'command': 'xen-set-replication',
4062 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
4065 # @ReplicationStatus:
4067 # The result format for 'query-xen-replication-status'.
4069 # @error: true if an error happened, false if replication is normal.
4071 # @desc: the human readable error description string, when
4076 { 'struct': 'ReplicationStatus',
4077 'data': { 'error': 'bool', '*desc': 'str' } }
4080 # @query-xen-replication-status:
4082 # Query replication status while the vm is running.
4084 # Returns: A @ReplicationResult object showing the status.
4088 # -> { "execute": "query-xen-replication-status" }
4089 # <- { "return": { "error": false } }
4093 { 'command': 'query-xen-replication-status',
4094 'returns': 'ReplicationStatus' }
4097 # @xen-colo-do-checkpoint:
4099 # Xen uses this command to notify replication to trigger a checkpoint.
4105 # -> { "execute": "xen-colo-do-checkpoint" }
4106 # <- { "return": {} }
4110 { 'command': 'xen-colo-do-checkpoint' }
4115 # The struct describes capability for a specific GIC (Generic
4116 # Interrupt Controller) version. These bits are not only decided by
4117 # QEMU/KVM software version, but also decided by the hardware that
4118 # the program is running upon.
4120 # @version: version of GIC to be described. Currently, only 2 and 3
4123 # @emulated: whether current QEMU/hardware supports emulated GIC
4124 # device in user space.
4126 # @kernel: whether current QEMU/hardware supports hardware
4127 # accelerated GIC device in kernel.
4131 { 'struct': 'GICCapability',
4132 'data': { 'version': 'int',
4134 'kernel': 'bool' } }
4137 # @query-gic-capabilities:
4139 # This command is ARM-only. It will return a list of GICCapability
4140 # objects that describe its capability bits.
4142 # Returns: a list of GICCapability objects.
4148 # -> { "execute": "query-gic-capabilities" }
4149 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
4150 # { "version": 3, "emulated": false, "kernel": true } ] }
4153 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
4156 # @CpuInstanceProperties:
4158 # List of properties to be used for hotplugging a CPU instance,
4159 # it should be passed by management with device_add command when
4160 # a CPU is being hotplugged.
4162 # @node-id: NUMA node ID the CPU belongs to
4163 # @socket-id: socket number within node/board the CPU belongs to
4164 # @core-id: core number within socket the CPU belongs to
4165 # @thread-id: thread number within core the CPU belongs to
4167 # Note: currently there are 4 properties that could be present
4168 # but management should be prepared to pass through other
4169 # properties with device_add command to allow for future
4170 # interface extension. This also requires the filed names to be kept in
4171 # sync with the properties passed to -device/device_add.
4175 { 'struct': 'CpuInstanceProperties',
4176 'data': { '*node-id': 'int',
4177 '*socket-id': 'int',
4186 # @type: CPU object type for usage with device_add command
4187 # @props: list of properties to be used for hotplugging CPU
4188 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
4189 # @qom-path: link to existing CPU object if CPU is present or
4190 # omitted if CPU is not present.
4194 { 'struct': 'HotpluggableCPU',
4195 'data': { 'type': 'str',
4196 'vcpus-count': 'int',
4197 'props': 'CpuInstanceProperties',
4203 # @query-hotpluggable-cpus:
4205 # Returns: a list of HotpluggableCPU objects.
4211 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
4213 # -> { "execute": "query-hotpluggable-cpus" }
4215 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
4216 # "vcpus-count": 1 },
4217 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
4218 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
4221 # For pc machine type started with -smp 1,maxcpus=2:
4223 # -> { "execute": "query-hotpluggable-cpus" }
4226 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
4227 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
4230 # "qom-path": "/machine/unattached/device[0]",
4231 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
4232 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
4237 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
4244 # @guid: the globally unique identifier
4248 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
4251 # @query-vm-generation-id:
4253 # Show Virtual Machine Generation ID
4257 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }