9 { 'include': 'common.json' }
10 { 'include': 'sockets.json' }
15 # Detailed migration status.
17 # @transferred: amount of bytes already transferred to the target VM
19 # @remaining: amount of bytes remaining to be transferred to the target VM
21 # @total: total amount of bytes involved in the migration process
23 # @duplicate: number of duplicate (zero) pages (since 1.2)
25 # @skipped: number of skipped zero pages (since 1.5)
27 # @normal: number of normal pages (since 1.2)
29 # @normal-bytes: number of normal bytes sent (since 1.2)
31 # @dirty-pages-rate: number of pages dirtied by second by the
34 # @mbps: throughput in megabits/sec. (since 1.6)
36 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
38 # @postcopy-requests: The number of page requests received from the destination
41 # @page-size: The number of bytes per page for the various page-based
42 # statistics (since 2.10)
44 # @multifd-bytes: The number of bytes sent through multifd (since 3.0)
46 # @pages-per-second: the number of memory pages transferred per second
49 # @precopy-bytes: The number of bytes sent in the pre-copy phase
52 # @downtime-bytes: The number of bytes sent while the guest is paused
55 # @postcopy-bytes: The number of bytes sent during the post-copy phase
60 { 'struct': 'MigrationStats',
61 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
62 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
63 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
64 'mbps' : 'number', 'dirty-sync-count' : 'int',
65 'postcopy-requests' : 'int', 'page-size' : 'int',
66 'multifd-bytes' : 'uint64', 'pages-per-second' : 'uint64',
67 'precopy-bytes' : 'uint64', 'downtime-bytes' : 'uint64',
68 'postcopy-bytes' : 'uint64' } }
73 # Detailed XBZRLE migration cache statistics
75 # @cache-size: XBZRLE cache size
77 # @bytes: amount of bytes already transferred to the target VM
79 # @pages: amount of pages transferred to the target VM
81 # @cache-miss: number of cache miss
83 # @cache-miss-rate: rate of cache miss (since 2.1)
85 # @encoding-rate: rate of encoded bytes (since 5.1)
87 # @overflow: number of overflows
91 { 'struct': 'XBZRLECacheStats',
92 'data': {'cache-size': 'size', 'bytes': 'int', 'pages': 'int',
93 'cache-miss': 'int', 'cache-miss-rate': 'number',
94 'encoding-rate': 'number', 'overflow': 'int' } }
99 # Detailed migration compression statistics
101 # @pages: amount of pages compressed and transferred to the target VM
103 # @busy: count of times that no free thread was available to compress data
105 # @busy-rate: rate of thread busy
107 # @compressed-size: amount of bytes after compression
109 # @compression-rate: rate of compressed size
113 { 'struct': 'CompressionStats',
114 'data': {'pages': 'int', 'busy': 'int', 'busy-rate': 'number',
115 'compressed-size': 'int', 'compression-rate': 'number' } }
120 # An enumeration of migration status.
122 # @none: no migration has ever happened.
124 # @setup: migration process has been initiated.
126 # @cancelling: in the process of cancelling migration.
128 # @cancelled: cancelling migration is finished.
130 # @active: in the process of doing migration.
132 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
134 # @postcopy-paused: during postcopy but paused. (since 3.0)
136 # @postcopy-recover: trying to recover from a paused postcopy. (since 3.0)
138 # @completed: migration is finished.
140 # @failed: some error occurred during migration process.
142 # @colo: VM is in the process of fault tolerance, VM can not get into this
143 # state unless colo capability is enabled for migration. (since 2.8)
145 # @pre-switchover: Paused before device serialisation. (since 2.11)
147 # @device: During device serialisation when pause-before-switchover is enabled
150 # @wait-unplug: wait for device unplug request by guest OS to be completed.
155 { 'enum': 'MigrationStatus',
156 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
157 'active', 'postcopy-active', 'postcopy-paused',
158 'postcopy-recover', 'completed', 'failed', 'colo',
159 'pre-switchover', 'device', 'wait-unplug' ] }
163 # Detailed VFIO devices migration statistics
165 # @transferred: amount of bytes transferred to the target VM by VFIO devices
169 { 'struct': 'VfioStats',
170 'data': {'transferred': 'int' } }
175 # Information about current migration process.
177 # @status: @MigrationStatus describing the current migration status.
178 # If this field is not returned, no migration process
181 # @ram: @MigrationStats containing detailed migration
182 # status, only returned if status is 'active' or
183 # 'completed'(since 1.2)
185 # @disk: @MigrationStats containing detailed disk migration
186 # status, only returned if status is 'active' and it is a block
189 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
190 # migration statistics, only returned if XBZRLE feature is on and
191 # status is 'active' or 'completed' (since 1.2)
193 # @total-time: total amount of milliseconds since migration started.
194 # If migration has ended, it returns the total migration
197 # @downtime: only present when migration finishes correctly
198 # total downtime in milliseconds for the guest.
201 # @expected-downtime: only present while migration is active
202 # expected downtime in milliseconds for the guest in last walk
203 # of the dirty bitmap. (since 1.3)
205 # @setup-time: amount of setup time in milliseconds *before* the
206 # iterations begin but *after* the QMP command is issued. This is designed
207 # to provide an accounting of any activities (such as RDMA pinning) which
208 # may be expensive, but do not actually occur during the iterative
209 # migration rounds themselves. (since 1.6)
211 # @cpu-throttle-percentage: percentage of time guest cpus are being
212 # throttled during auto-converge. This is only present when auto-converge
213 # has started throttling guest cpus. (Since 2.7)
215 # @error-desc: the human readable error description string, when
216 # @status is 'failed'. Clients should not attempt to parse the
217 # error strings. (Since 2.7)
219 # @postcopy-blocktime: total time when all vCPU were blocked during postcopy
220 # live migration. This is only present when the postcopy-blocktime
221 # migration capability is enabled. (Since 3.0)
223 # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU. This is
224 # only present when the postcopy-blocktime migration capability
225 # is enabled. (Since 3.0)
227 # @compression: migration compression statistics, only returned if compression
228 # feature is on and status is 'active' or 'completed' (Since 3.1)
230 # @socket-address: Only used for tcp, to know what the real port is (Since 4.0)
232 # @vfio: @VfioStats containing detailed VFIO devices migration statistics,
233 # only returned if VFIO device is present, migration is supported by all
234 # VFIO devices and status is 'active' or 'completed' (since 5.2)
236 # @blocked-reasons: A list of reasons an outgoing migration is blocked.
237 # Present and non-empty when migration is blocked.
242 { 'struct': 'MigrationInfo',
243 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
244 '*disk': 'MigrationStats',
245 '*vfio': 'VfioStats',
246 '*xbzrle-cache': 'XBZRLECacheStats',
247 '*total-time': 'int',
248 '*expected-downtime': 'int',
250 '*setup-time': 'int',
251 '*cpu-throttle-percentage': 'int',
252 '*error-desc': 'str',
253 '*blocked-reasons': ['str'],
254 '*postcopy-blocktime' : 'uint32',
255 '*postcopy-vcpu-blocktime': ['uint32'],
256 '*compression': 'CompressionStats',
257 '*socket-address': ['SocketAddress'] } }
262 # Returns information about current migration process. If migration
263 # is active there will be another json-object with RAM migration
264 # status and if block migration is active another one with block
267 # Returns: @MigrationInfo
273 # 1. Before the first migration
275 # -> { "execute": "query-migrate" }
276 # <- { "return": {} }
278 # 2. Migration is done and has succeeded
280 # -> { "execute": "query-migrate" }
282 # "status": "completed",
283 # "total-time":12345,
284 # "setup-time":12345,
292 # "normal-bytes":123456,
293 # "dirty-sync-count":15
298 # 3. Migration is done and has failed
300 # -> { "execute": "query-migrate" }
301 # <- { "return": { "status": "failed" } }
303 # 4. Migration is being performed and is not a block migration:
305 # -> { "execute": "query-migrate" }
309 # "total-time":12345,
310 # "setup-time":12345,
311 # "expected-downtime":12345,
318 # "normal-bytes":123456,
319 # "dirty-sync-count":15
324 # 5. Migration is being performed and is a block migration:
326 # -> { "execute": "query-migrate" }
330 # "total-time":12345,
331 # "setup-time":12345,
332 # "expected-downtime":12345,
335 # "remaining":1053304,
336 # "transferred":3720,
339 # "normal-bytes":123456,
340 # "dirty-sync-count":15
344 # "remaining":20880384,
345 # "transferred":91136
350 # 6. Migration is being performed and XBZRLE is active:
352 # -> { "execute": "query-migrate" }
356 # "total-time":12345,
357 # "setup-time":12345,
358 # "expected-downtime":12345,
361 # "remaining":1053304,
362 # "transferred":3720,
365 # "normal-bytes":3412992,
366 # "dirty-sync-count":15
369 # "cache-size":67108864,
373 # "cache-miss-rate":0.123,
374 # "encoding-rate":80.1,
381 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
384 # @MigrationCapability:
386 # Migration capabilities enumeration
388 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
389 # This feature allows us to minimize migration traffic for certain work
390 # loads, by sending compressed difference of the pages
392 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
393 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
394 # Disabled by default. (since 2.0)
396 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
397 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
398 # source and target VM to support this feature. To enable it is sufficient
399 # to enable the capability on the source VM. The feature is disabled by
400 # default. (since 1.6)
402 # @compress: Use multiple compression threads to accelerate live migration.
403 # This feature can help to reduce the migration traffic, by sending
404 # compressed pages. Please note that if compress and xbzrle are both
405 # on, compress only takes effect in the ram bulk stage, after that,
406 # it will be disabled and only xbzrle takes effect, this can help to
407 # minimize migration traffic. The feature is disabled by default.
410 # @events: generate events for each migration state change
413 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
414 # to speed up convergence of RAM migration. (since 1.6)
416 # @postcopy-ram: Start executing on the migration target before all of RAM has
417 # been migrated, pulling the remaining pages along as needed. The
418 # capacity must have the same setting on both source and target
419 # or migration will not even start. NOTE: If the migration fails during
420 # postcopy the VM will fail. (since 2.6)
422 # @x-colo: If enabled, migration will never end, and the state of the VM on the
423 # primary side will be migrated continuously to the VM on secondary
424 # side, this process is called COarse-Grain LOck Stepping (COLO) for
425 # Non-stop Service. (since 2.8)
427 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
428 # during postcopy-ram migration. (since 2.9)
430 # @block: If enabled, QEMU will also migrate the contents of all block
431 # devices. Default is disabled. A possible alternative uses
432 # mirror jobs to a builtin NBD server on the destination, which
433 # offers more flexibility.
436 # @return-path: If enabled, migration will use the return path even
437 # for precopy. (since 2.10)
439 # @pause-before-switchover: Pause outgoing migration before serialising device
440 # state and before disabling block IO (since 2.11)
442 # @multifd: Use more than one fd for migration (since 4.0)
444 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
447 # @postcopy-blocktime: Calculate downtime for postcopy live migration
450 # @late-block-activate: If enabled, the destination will not activate block
451 # devices (and thus take locks) immediately at the end of migration.
454 # @x-ignore-shared: If enabled, QEMU will not migrate shared memory (since 4.0)
456 # @validate-uuid: Send the UUID of the source to allow the destination
457 # to ensure it is the same. (since 4.2)
459 # @background-snapshot: If enabled, the migration stream will be a snapshot
460 # of the VM exactly at the point when the migration
461 # procedure starts. The VM RAM is saved with running VM.
464 # @zero-copy-send: Controls behavior on sending memory pages on migration.
465 # When true, enables a zero-copy mechanism for sending
466 # memory pages, if host supports it.
467 # Requires that QEMU be permitted to use locked memory
468 # for guest RAM pages.
472 # @unstable: Members @x-colo and @x-ignore-shared are experimental.
476 { 'enum': 'MigrationCapability',
477 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
478 'compress', 'events', 'postcopy-ram',
479 { 'name': 'x-colo', 'features': [ 'unstable' ] },
481 'block', 'return-path', 'pause-before-switchover', 'multifd',
482 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
483 { 'name': 'x-ignore-shared', 'features': [ 'unstable' ] },
484 'validate-uuid', 'background-snapshot',
488 # @MigrationCapabilityStatus:
490 # Migration capability information
492 # @capability: capability enum
494 # @state: capability state bool
498 { 'struct': 'MigrationCapabilityStatus',
499 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
502 # @migrate-set-capabilities:
504 # Enable/Disable the following migration capabilities (like xbzrle)
506 # @capabilities: json array of capability modifications to make
512 # -> { "execute": "migrate-set-capabilities" , "arguments":
513 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
516 { 'command': 'migrate-set-capabilities',
517 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
520 # @query-migrate-capabilities:
522 # Returns information about the current migration capabilities status
524 # Returns: @MigrationCapabilitiesStatus
530 # -> { "execute": "query-migrate-capabilities" }
532 # {"state": false, "capability": "xbzrle"},
533 # {"state": false, "capability": "rdma-pin-all"},
534 # {"state": false, "capability": "auto-converge"},
535 # {"state": false, "capability": "zero-blocks"},
536 # {"state": false, "capability": "compress"},
537 # {"state": true, "capability": "events"},
538 # {"state": false, "capability": "postcopy-ram"},
539 # {"state": false, "capability": "x-colo"}
543 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
546 # @MultiFDCompression:
548 # An enumeration of multifd compression methods.
550 # @none: no compression.
551 # @zlib: use zlib compression method.
552 # @zstd: use zstd compression method.
556 { 'enum': 'MultiFDCompression',
557 'data': [ 'none', 'zlib',
558 { 'name': 'zstd', 'if': 'CONFIG_ZSTD' } ] }
561 # @BitmapMigrationBitmapAliasTransform:
563 # @persistent: If present, the bitmap will be made persistent
564 # or transient depending on this parameter.
568 { 'struct': 'BitmapMigrationBitmapAliasTransform',
570 '*persistent': 'bool'
574 # @BitmapMigrationBitmapAlias:
576 # @name: The name of the bitmap.
578 # @alias: An alias name for migration (for example the bitmap name on
579 # the opposite site).
581 # @transform: Allows the modification of the migrated bitmap.
586 { 'struct': 'BitmapMigrationBitmapAlias',
590 '*transform': 'BitmapMigrationBitmapAliasTransform'
594 # @BitmapMigrationNodeAlias:
596 # Maps a block node name and the bitmaps it has to aliases for dirty
599 # @node-name: A block node name.
601 # @alias: An alias block node name for migration (for example the
602 # node name on the opposite site).
604 # @bitmaps: Mappings for the bitmaps on this node.
608 { 'struct': 'BitmapMigrationNodeAlias',
612 'bitmaps': [ 'BitmapMigrationBitmapAlias' ]
616 # @MigrationParameter:
618 # Migration parameters enumeration
620 # @announce-initial: Initial delay (in milliseconds) before sending the first
621 # announce (Since 4.0)
623 # @announce-max: Maximum delay (in milliseconds) between packets in the
624 # announcement (Since 4.0)
626 # @announce-rounds: Number of self-announce packets sent after migration
629 # @announce-step: Increase in delay (in milliseconds) between subsequent
630 # packets in the announcement (Since 4.0)
632 # @compress-level: Set the compression level to be used in live migration,
633 # the compression level is an integer between 0 and 9, where 0 means
634 # no compression, 1 means the best compression speed, and 9 means best
635 # compression ratio which will consume more CPU.
637 # @compress-threads: Set compression thread count to be used in live migration,
638 # the compression thread count is an integer between 1 and 255.
640 # @compress-wait-thread: Controls behavior when all compression threads are
641 # currently busy. If true (default), wait for a free
642 # compression thread to become available; otherwise,
643 # send the page uncompressed. (Since 3.1)
645 # @decompress-threads: Set decompression thread count to be used in live
646 # migration, the decompression thread count is an integer between 1
647 # and 255. Usually, decompression is at least 4 times as fast as
648 # compression, so set the decompress-threads to the number about 1/4
649 # of compress-threads is adequate.
651 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
652 # to trigger throttling. It is expressed as percentage.
653 # The default value is 50. (Since 5.0)
655 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
656 # when migration auto-converge is activated. The
657 # default value is 20. (Since 2.7)
659 # @cpu-throttle-increment: throttle percentage increase each time
660 # auto-converge detects that migration is not making
661 # progress. The default value is 10. (Since 2.7)
663 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
664 # At the tail stage of throttling, the Guest is very
665 # sensitive to CPU percentage while the @cpu-throttle
666 # -increment is excessive usually at tail stage.
667 # If this parameter is true, we will compute the ideal
668 # CPU percentage used by the Guest, which may exactly make
669 # the dirty rate match the dirty rate threshold. Then we
670 # will choose a smaller throttle increment between the
671 # one specified by @cpu-throttle-increment and the one
672 # generated by ideal CPU percentage.
673 # Therefore, it is compatible to traditional throttling,
674 # meanwhile the throttle increment won't be excessive
676 # The default value is false. (Since 5.1)
678 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
679 # establishing a TLS connection over the migration data channel.
680 # On the outgoing side of the migration, the credentials must
681 # be for a 'client' endpoint, while for the incoming side the
682 # credentials must be for a 'server' endpoint. Setting this
683 # will enable TLS for all migrations. The default is unset,
684 # resulting in unsecured migration at the QEMU level. (Since 2.7)
686 # @tls-hostname: hostname of the target host for the migration. This is
687 # required when using x509 based TLS credentials and the
688 # migration URI does not already include a hostname. For
689 # example if using fd: or exec: based migration, the
690 # hostname must be provided so that the server's x509
691 # certificate identity can be validated. (Since 2.7)
693 # @tls-authz: ID of the 'authz' object subclass that provides access control
694 # checking of the TLS x509 certificate distinguished name.
695 # This object is only resolved at time of use, so can be deleted
696 # and recreated on the fly while the migration server is active.
697 # If missing, it will default to denying access (Since 4.0)
699 # @max-bandwidth: to set maximum speed for migration. maximum speed in
700 # bytes per second. (Since 2.8)
702 # @downtime-limit: set maximum tolerated downtime for migration. maximum
703 # downtime in milliseconds (Since 2.8)
705 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
706 # periodic mode. (Since 2.8)
708 # @block-incremental: Affects how much storage is migrated when the
709 # block migration capability is enabled. When false, the entire
710 # storage backing chain is migrated into a flattened image at
711 # the destination; when true, only the active qcow2 layer is
712 # migrated and the destination must already have access to the
713 # same backing chain as was used on the source. (since 2.10)
715 # @multifd-channels: Number of channels used to migrate data in
716 # parallel. This is the same number that the
717 # number of sockets used for migration. The
718 # default value is 2 (since 4.0)
720 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
721 # needs to be a multiple of the target page size
725 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
726 # Defaults to 0 (unlimited). In bytes per second.
729 # @max-cpu-throttle: maximum cpu throttle percentage.
730 # Defaults to 99. (Since 3.1)
732 # @multifd-compression: Which compression method to use.
733 # Defaults to none. (Since 5.0)
735 # @multifd-zlib-level: Set the compression level to be used in live
736 # migration, the compression level is an integer between 0
737 # and 9, where 0 means no compression, 1 means the best
738 # compression speed, and 9 means best compression ratio which
739 # will consume more CPU.
740 # Defaults to 1. (Since 5.0)
742 # @multifd-zstd-level: Set the compression level to be used in live
743 # migration, the compression level is an integer between 0
744 # and 20, where 0 means no compression, 1 means the best
745 # compression speed, and 20 means best compression ratio which
746 # will consume more CPU.
747 # Defaults to 1. (Since 5.0)
750 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
751 # aliases for the purpose of dirty bitmap migration. Such
752 # aliases may for example be the corresponding names on the
754 # The mapping must be one-to-one, but not necessarily
755 # complete: On the source, unmapped bitmaps and all bitmaps
756 # on unmapped nodes will be ignored. On the destination,
757 # encountering an unmapped alias in the incoming migration
758 # stream will result in a report, and all further bitmap
759 # migration data will then be discarded.
760 # Note that the destination does not know about bitmaps it
761 # does not receive, so there is no limitation or requirement
762 # regarding the number of bitmaps received, or how they are
763 # named, or on which nodes they are placed.
764 # By default (when this parameter has never been set), bitmap
765 # names are mapped to themselves. Nodes are mapped to their
766 # block device name if there is one, and to their node name
767 # otherwise. (Since 5.2)
770 # @unstable: Member @x-checkpoint-delay is experimental.
774 { 'enum': 'MigrationParameter',
775 'data': ['announce-initial', 'announce-max',
776 'announce-rounds', 'announce-step',
777 'compress-level', 'compress-threads', 'decompress-threads',
778 'compress-wait-thread', 'throttle-trigger-threshold',
779 'cpu-throttle-initial', 'cpu-throttle-increment',
780 'cpu-throttle-tailslow',
781 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
783 { 'name': 'x-checkpoint-delay', 'features': [ 'unstable' ] },
786 'xbzrle-cache-size', 'max-postcopy-bandwidth',
787 'max-cpu-throttle', 'multifd-compression',
788 'multifd-zlib-level' ,'multifd-zstd-level',
789 'block-bitmap-mapping' ] }
792 # @MigrateSetParameters:
794 # @announce-initial: Initial delay (in milliseconds) before sending the first
795 # announce (Since 4.0)
797 # @announce-max: Maximum delay (in milliseconds) between packets in the
798 # announcement (Since 4.0)
800 # @announce-rounds: Number of self-announce packets sent after migration
803 # @announce-step: Increase in delay (in milliseconds) between subsequent
804 # packets in the announcement (Since 4.0)
806 # @compress-level: compression level
808 # @compress-threads: compression thread count
810 # @compress-wait-thread: Controls behavior when all compression threads are
811 # currently busy. If true (default), wait for a free
812 # compression thread to become available; otherwise,
813 # send the page uncompressed. (Since 3.1)
815 # @decompress-threads: decompression thread count
817 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
818 # to trigger throttling. It is expressed as percentage.
819 # The default value is 50. (Since 5.0)
821 # @cpu-throttle-initial: Initial percentage of time guest cpus are
822 # throttled when migration auto-converge is activated.
823 # The default value is 20. (Since 2.7)
825 # @cpu-throttle-increment: throttle percentage increase each time
826 # auto-converge detects that migration is not making
827 # progress. The default value is 10. (Since 2.7)
829 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
830 # At the tail stage of throttling, the Guest is very
831 # sensitive to CPU percentage while the @cpu-throttle
832 # -increment is excessive usually at tail stage.
833 # If this parameter is true, we will compute the ideal
834 # CPU percentage used by the Guest, which may exactly make
835 # the dirty rate match the dirty rate threshold. Then we
836 # will choose a smaller throttle increment between the
837 # one specified by @cpu-throttle-increment and the one
838 # generated by ideal CPU percentage.
839 # Therefore, it is compatible to traditional throttling,
840 # meanwhile the throttle increment won't be excessive
842 # The default value is false. (Since 5.1)
844 # @tls-creds: ID of the 'tls-creds' object that provides credentials
845 # for establishing a TLS connection over the migration data
846 # channel. On the outgoing side of the migration, the credentials
847 # must be for a 'client' endpoint, while for the incoming side the
848 # credentials must be for a 'server' endpoint. Setting this
849 # to a non-empty string enables TLS for all migrations.
850 # An empty string means that QEMU will use plain text mode for
851 # migration, rather than TLS (Since 2.9)
852 # Previously (since 2.7), this was reported by omitting
855 # @tls-hostname: hostname of the target host for the migration. This
856 # is required when using x509 based TLS credentials and the
857 # migration URI does not already include a hostname. For
858 # example if using fd: or exec: based migration, the
859 # hostname must be provided so that the server's x509
860 # certificate identity can be validated. (Since 2.7)
861 # An empty string means that QEMU will use the hostname
862 # associated with the migration URI, if any. (Since 2.9)
863 # Previously (since 2.7), this was reported by omitting
864 # tls-hostname instead.
866 # @max-bandwidth: to set maximum speed for migration. maximum speed in
867 # bytes per second. (Since 2.8)
869 # @downtime-limit: set maximum tolerated downtime for migration. maximum
870 # downtime in milliseconds (Since 2.8)
872 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
874 # @block-incremental: Affects how much storage is migrated when the
875 # block migration capability is enabled. When false, the entire
876 # storage backing chain is migrated into a flattened image at
877 # the destination; when true, only the active qcow2 layer is
878 # migrated and the destination must already have access to the
879 # same backing chain as was used on the source. (since 2.10)
881 # @multifd-channels: Number of channels used to migrate data in
882 # parallel. This is the same number that the
883 # number of sockets used for migration. The
884 # default value is 2 (since 4.0)
886 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
887 # needs to be a multiple of the target page size
891 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
892 # Defaults to 0 (unlimited). In bytes per second.
895 # @max-cpu-throttle: maximum cpu throttle percentage.
896 # The default value is 99. (Since 3.1)
898 # @multifd-compression: Which compression method to use.
899 # Defaults to none. (Since 5.0)
901 # @multifd-zlib-level: Set the compression level to be used in live
902 # migration, the compression level is an integer between 0
903 # and 9, where 0 means no compression, 1 means the best
904 # compression speed, and 9 means best compression ratio which
905 # will consume more CPU.
906 # Defaults to 1. (Since 5.0)
908 # @multifd-zstd-level: Set the compression level to be used in live
909 # migration, the compression level is an integer between 0
910 # and 20, where 0 means no compression, 1 means the best
911 # compression speed, and 20 means best compression ratio which
912 # will consume more CPU.
913 # Defaults to 1. (Since 5.0)
915 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
916 # aliases for the purpose of dirty bitmap migration. Such
917 # aliases may for example be the corresponding names on the
919 # The mapping must be one-to-one, but not necessarily
920 # complete: On the source, unmapped bitmaps and all bitmaps
921 # on unmapped nodes will be ignored. On the destination,
922 # encountering an unmapped alias in the incoming migration
923 # stream will result in a report, and all further bitmap
924 # migration data will then be discarded.
925 # Note that the destination does not know about bitmaps it
926 # does not receive, so there is no limitation or requirement
927 # regarding the number of bitmaps received, or how they are
928 # named, or on which nodes they are placed.
929 # By default (when this parameter has never been set), bitmap
930 # names are mapped to themselves. Nodes are mapped to their
931 # block device name if there is one, and to their node name
932 # otherwise. (Since 5.2)
935 # @unstable: Member @x-checkpoint-delay is experimental.
939 # TODO either fuse back into MigrationParameters, or make
940 # MigrationParameters members mandatory
941 { 'struct': 'MigrateSetParameters',
942 'data': { '*announce-initial': 'size',
943 '*announce-max': 'size',
944 '*announce-rounds': 'size',
945 '*announce-step': 'size',
946 '*compress-level': 'uint8',
947 '*compress-threads': 'uint8',
948 '*compress-wait-thread': 'bool',
949 '*decompress-threads': 'uint8',
950 '*throttle-trigger-threshold': 'uint8',
951 '*cpu-throttle-initial': 'uint8',
952 '*cpu-throttle-increment': 'uint8',
953 '*cpu-throttle-tailslow': 'bool',
954 '*tls-creds': 'StrOrNull',
955 '*tls-hostname': 'StrOrNull',
956 '*tls-authz': 'StrOrNull',
957 '*max-bandwidth': 'size',
958 '*downtime-limit': 'uint64',
959 '*x-checkpoint-delay': { 'type': 'uint32',
960 'features': [ 'unstable' ] },
961 '*block-incremental': 'bool',
962 '*multifd-channels': 'uint8',
963 '*xbzrle-cache-size': 'size',
964 '*max-postcopy-bandwidth': 'size',
965 '*max-cpu-throttle': 'uint8',
966 '*multifd-compression': 'MultiFDCompression',
967 '*multifd-zlib-level': 'uint8',
968 '*multifd-zstd-level': 'uint8',
969 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ] } }
972 # @migrate-set-parameters:
974 # Set various migration parameters.
980 # -> { "execute": "migrate-set-parameters" ,
981 # "arguments": { "compress-level": 1 } }
984 { 'command': 'migrate-set-parameters', 'boxed': true,
985 'data': 'MigrateSetParameters' }
988 # @MigrationParameters:
990 # The optional members aren't actually optional.
992 # @announce-initial: Initial delay (in milliseconds) before sending the
993 # first announce (Since 4.0)
995 # @announce-max: Maximum delay (in milliseconds) between packets in the
996 # announcement (Since 4.0)
998 # @announce-rounds: Number of self-announce packets sent after migration
1001 # @announce-step: Increase in delay (in milliseconds) between subsequent
1002 # packets in the announcement (Since 4.0)
1004 # @compress-level: compression level
1006 # @compress-threads: compression thread count
1008 # @compress-wait-thread: Controls behavior when all compression threads are
1009 # currently busy. If true (default), wait for a free
1010 # compression thread to become available; otherwise,
1011 # send the page uncompressed. (Since 3.1)
1013 # @decompress-threads: decompression thread count
1015 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
1016 # to trigger throttling. It is expressed as percentage.
1017 # The default value is 50. (Since 5.0)
1019 # @cpu-throttle-initial: Initial percentage of time guest cpus are
1020 # throttled when migration auto-converge is activated.
1023 # @cpu-throttle-increment: throttle percentage increase each time
1024 # auto-converge detects that migration is not making
1025 # progress. (Since 2.7)
1027 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
1028 # At the tail stage of throttling, the Guest is very
1029 # sensitive to CPU percentage while the @cpu-throttle
1030 # -increment is excessive usually at tail stage.
1031 # If this parameter is true, we will compute the ideal
1032 # CPU percentage used by the Guest, which may exactly make
1033 # the dirty rate match the dirty rate threshold. Then we
1034 # will choose a smaller throttle increment between the
1035 # one specified by @cpu-throttle-increment and the one
1036 # generated by ideal CPU percentage.
1037 # Therefore, it is compatible to traditional throttling,
1038 # meanwhile the throttle increment won't be excessive
1040 # The default value is false. (Since 5.1)
1042 # @tls-creds: ID of the 'tls-creds' object that provides credentials
1043 # for establishing a TLS connection over the migration data
1044 # channel. On the outgoing side of the migration, the credentials
1045 # must be for a 'client' endpoint, while for the incoming side the
1046 # credentials must be for a 'server' endpoint.
1047 # An empty string means that QEMU will use plain text mode for
1048 # migration, rather than TLS (Since 2.7)
1049 # Note: 2.8 reports this by omitting tls-creds instead.
1051 # @tls-hostname: hostname of the target host for the migration. This
1052 # is required when using x509 based TLS credentials and the
1053 # migration URI does not already include a hostname. For
1054 # example if using fd: or exec: based migration, the
1055 # hostname must be provided so that the server's x509
1056 # certificate identity can be validated. (Since 2.7)
1057 # An empty string means that QEMU will use the hostname
1058 # associated with the migration URI, if any. (Since 2.9)
1059 # Note: 2.8 reports this by omitting tls-hostname instead.
1061 # @tls-authz: ID of the 'authz' object subclass that provides access control
1062 # checking of the TLS x509 certificate distinguished name. (Since
1065 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1066 # bytes per second. (Since 2.8)
1068 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1069 # downtime in milliseconds (Since 2.8)
1071 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1073 # @block-incremental: Affects how much storage is migrated when the
1074 # block migration capability is enabled. When false, the entire
1075 # storage backing chain is migrated into a flattened image at
1076 # the destination; when true, only the active qcow2 layer is
1077 # migrated and the destination must already have access to the
1078 # same backing chain as was used on the source. (since 2.10)
1080 # @multifd-channels: Number of channels used to migrate data in
1081 # parallel. This is the same number that the
1082 # number of sockets used for migration.
1083 # The default value is 2 (since 4.0)
1085 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
1086 # needs to be a multiple of the target page size
1090 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
1091 # Defaults to 0 (unlimited). In bytes per second.
1094 # @max-cpu-throttle: maximum cpu throttle percentage.
1098 # @multifd-compression: Which compression method to use.
1099 # Defaults to none. (Since 5.0)
1101 # @multifd-zlib-level: Set the compression level to be used in live
1102 # migration, the compression level is an integer between 0
1103 # and 9, where 0 means no compression, 1 means the best
1104 # compression speed, and 9 means best compression ratio which
1105 # will consume more CPU.
1106 # Defaults to 1. (Since 5.0)
1108 # @multifd-zstd-level: Set the compression level to be used in live
1109 # migration, the compression level is an integer between 0
1110 # and 20, where 0 means no compression, 1 means the best
1111 # compression speed, and 20 means best compression ratio which
1112 # will consume more CPU.
1113 # Defaults to 1. (Since 5.0)
1115 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
1116 # aliases for the purpose of dirty bitmap migration. Such
1117 # aliases may for example be the corresponding names on the
1119 # The mapping must be one-to-one, but not necessarily
1120 # complete: On the source, unmapped bitmaps and all bitmaps
1121 # on unmapped nodes will be ignored. On the destination,
1122 # encountering an unmapped alias in the incoming migration
1123 # stream will result in a report, and all further bitmap
1124 # migration data will then be discarded.
1125 # Note that the destination does not know about bitmaps it
1126 # does not receive, so there is no limitation or requirement
1127 # regarding the number of bitmaps received, or how they are
1128 # named, or on which nodes they are placed.
1129 # By default (when this parameter has never been set), bitmap
1130 # names are mapped to themselves. Nodes are mapped to their
1131 # block device name if there is one, and to their node name
1132 # otherwise. (Since 5.2)
1135 # @unstable: Member @x-checkpoint-delay is experimental.
1139 { 'struct': 'MigrationParameters',
1140 'data': { '*announce-initial': 'size',
1141 '*announce-max': 'size',
1142 '*announce-rounds': 'size',
1143 '*announce-step': 'size',
1144 '*compress-level': 'uint8',
1145 '*compress-threads': 'uint8',
1146 '*compress-wait-thread': 'bool',
1147 '*decompress-threads': 'uint8',
1148 '*throttle-trigger-threshold': 'uint8',
1149 '*cpu-throttle-initial': 'uint8',
1150 '*cpu-throttle-increment': 'uint8',
1151 '*cpu-throttle-tailslow': 'bool',
1152 '*tls-creds': 'str',
1153 '*tls-hostname': 'str',
1154 '*tls-authz': 'str',
1155 '*max-bandwidth': 'size',
1156 '*downtime-limit': 'uint64',
1157 '*x-checkpoint-delay': { 'type': 'uint32',
1158 'features': [ 'unstable' ] },
1159 '*block-incremental': 'bool',
1160 '*multifd-channels': 'uint8',
1161 '*xbzrle-cache-size': 'size',
1162 '*max-postcopy-bandwidth': 'size',
1163 '*max-cpu-throttle': 'uint8',
1164 '*multifd-compression': 'MultiFDCompression',
1165 '*multifd-zlib-level': 'uint8',
1166 '*multifd-zstd-level': 'uint8',
1167 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ] } }
1170 # @query-migrate-parameters:
1172 # Returns information about the current migration parameters
1174 # Returns: @MigrationParameters
1180 # -> { "execute": "query-migrate-parameters" }
1182 # "decompress-threads": 2,
1183 # "cpu-throttle-increment": 10,
1184 # "compress-threads": 8,
1185 # "compress-level": 1,
1186 # "cpu-throttle-initial": 20,
1187 # "max-bandwidth": 33554432,
1188 # "downtime-limit": 300
1193 { 'command': 'query-migrate-parameters',
1194 'returns': 'MigrationParameters' }
1197 # @client_migrate_info:
1199 # Set migration information for remote display. This makes the server
1200 # ask the client to automatically reconnect using the new parameters
1201 # once migration finished successfully. Only implemented for SPICE.
1203 # @protocol: must be "spice"
1204 # @hostname: migration target hostname
1205 # @port: spice tcp port for plaintext channels
1206 # @tls-port: spice tcp port for tls-secured channels
1207 # @cert-subject: server certificate subject
1213 # -> { "execute": "client_migrate_info",
1214 # "arguments": { "protocol": "spice",
1215 # "hostname": "virt42.lab.kraxel.org",
1217 # <- { "return": {} }
1220 { 'command': 'client_migrate_info',
1221 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1222 '*tls-port': 'int', '*cert-subject': 'str' } }
1225 # @migrate-start-postcopy:
1227 # Followup to a migration command to switch the migration to postcopy mode.
1228 # The postcopy-ram capability must be set on both source and destination
1229 # before the original migration command.
1235 # -> { "execute": "migrate-start-postcopy" }
1236 # <- { "return": {} }
1239 { 'command': 'migrate-start-postcopy' }
1244 # Emitted when a migration event happens
1246 # @status: @MigrationStatus describing the current migration status.
1252 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
1253 # "event": "MIGRATION",
1254 # "data": {"status": "completed"} }
1257 { 'event': 'MIGRATION',
1258 'data': {'status': 'MigrationStatus'}}
1263 # Emitted from the source side of a migration at the start of each pass
1264 # (when it syncs the dirty bitmap)
1266 # @pass: An incrementing count (starting at 1 on the first pass)
1272 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
1273 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
1276 { 'event': 'MIGRATION_PASS',
1277 'data': { 'pass': 'int' } }
1282 # The message transmission between Primary side and Secondary side.
1284 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1286 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1288 # @checkpoint-reply: SVM gets PVM's checkpoint request
1290 # @vmstate-send: VM's state will be sent by PVM.
1292 # @vmstate-size: The total size of VMstate.
1294 # @vmstate-received: VM's state has been received by SVM.
1296 # @vmstate-loaded: VM's state has been loaded by SVM.
1300 { 'enum': 'COLOMessage',
1301 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1302 'vmstate-send', 'vmstate-size', 'vmstate-received',
1303 'vmstate-loaded' ] }
1308 # The COLO current mode.
1310 # @none: COLO is disabled.
1312 # @primary: COLO node in primary side.
1314 # @secondary: COLO node in slave side.
1318 { 'enum': 'COLOMode',
1319 'data': [ 'none', 'primary', 'secondary'] }
1324 # An enumeration of COLO failover status
1326 # @none: no failover has ever happened
1328 # @require: got failover requirement but not handled
1330 # @active: in the process of doing failover
1332 # @completed: finish the process of failover
1334 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1338 { 'enum': 'FailoverStatus',
1339 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1344 # Emitted when VM finishes COLO mode due to some errors happening or
1345 # at the request of users.
1347 # @mode: report COLO mode when COLO exited.
1349 # @reason: describes the reason for the COLO exit.
1355 # <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
1356 # "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
1359 { 'event': 'COLO_EXIT',
1360 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1365 # The reason for a COLO exit.
1367 # @none: failover has never happened. This state does not occur
1368 # in the COLO_EXIT event, and is only visible in the result of
1369 # query-colo-status.
1371 # @request: COLO exit is due to an external request.
1373 # @error: COLO exit is due to an internal error.
1375 # @processing: COLO is currently handling a failover (since 4.0).
1379 { 'enum': 'COLOExitReason',
1380 'data': [ 'none', 'request', 'error' , 'processing' ] }
1383 # @x-colo-lost-heartbeat:
1385 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1386 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1387 # If sent to the Secondary, the Secondary side will run failover work,
1388 # then takes over server operation to become the service VM.
1391 # @unstable: This command is experimental.
1397 # -> { "execute": "x-colo-lost-heartbeat" }
1398 # <- { "return": {} }
1401 { 'command': 'x-colo-lost-heartbeat',
1402 'features': [ 'unstable' ] }
1407 # Cancel the current executing migration process.
1409 # Returns: nothing on success
1411 # Notes: This command succeeds even if there is no migration process running.
1417 # -> { "execute": "migrate_cancel" }
1418 # <- { "return": {} }
1421 { 'command': 'migrate_cancel' }
1424 # @migrate-continue:
1426 # Continue migration when it's in a paused state.
1428 # @state: The state the migration is currently expected to be in
1430 # Returns: nothing on success
1436 # -> { "execute": "migrate-continue" , "arguments":
1437 # { "state": "pre-switchover" } }
1438 # <- { "return": {} }
1440 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
1445 # Migrates the current running guest to another Virtual Machine.
1447 # @uri: the Uniform Resource Identifier of the destination VM
1449 # @blk: do block migration (full disk copy)
1451 # @inc: incremental disk copy migration
1453 # @detach: this argument exists only for compatibility reasons and
1454 # is ignored by QEMU
1456 # @resume: resume one paused migration, default "off". (since 3.0)
1458 # Returns: nothing on success
1464 # 1. The 'query-migrate' command should be used to check migration's progress
1465 # and final result (this information is provided by the 'status' member)
1467 # 2. All boolean arguments default to false
1469 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1474 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1475 # <- { "return": {} }
1478 { 'command': 'migrate',
1479 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1480 '*detach': 'bool', '*resume': 'bool' } }
1483 # @migrate-incoming:
1485 # Start an incoming migration, the qemu must have been started
1486 # with -incoming defer
1488 # @uri: The Uniform Resource Identifier identifying the source or
1489 # address to listen on
1491 # Returns: nothing on success
1497 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1498 # compatible with -incoming and the format of the uri is already exposed
1501 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1504 # 3. The uri format is the same as for -incoming
1508 # -> { "execute": "migrate-incoming",
1509 # "arguments": { "uri": "tcp::4446" } }
1510 # <- { "return": {} }
1513 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1516 # @xen-save-devices-state:
1518 # Save the state of all devices to file. The RAM and the block devices
1519 # of the VM are not saved by this command.
1521 # @filename: the file to save the state of the devices to as binary
1522 # data. See xen-save-devices-state.txt for a description of the binary
1525 # @live: Optional argument to ask QEMU to treat this command as part of a live
1526 # migration. Default to true. (since 2.11)
1528 # Returns: Nothing on success
1534 # -> { "execute": "xen-save-devices-state",
1535 # "arguments": { "filename": "/tmp/save" } }
1536 # <- { "return": {} }
1539 { 'command': 'xen-save-devices-state',
1540 'data': {'filename': 'str', '*live':'bool' } }
1543 # @xen-set-global-dirty-log:
1545 # Enable or disable the global dirty log mode.
1547 # @enable: true to enable, false to disable.
1555 # -> { "execute": "xen-set-global-dirty-log",
1556 # "arguments": { "enable": true } }
1557 # <- { "return": {} }
1560 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1563 # @xen-load-devices-state:
1565 # Load the state of all devices from file. The RAM and the block devices
1566 # of the VM are not loaded by this command.
1568 # @filename: the file to load the state of the devices from as binary
1569 # data. See xen-save-devices-state.txt for a description of the binary
1576 # -> { "execute": "xen-load-devices-state",
1577 # "arguments": { "filename": "/tmp/resume" } }
1578 # <- { "return": {} }
1581 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
1584 # @xen-set-replication:
1586 # Enable or disable replication.
1588 # @enable: true to enable, false to disable.
1590 # @primary: true for primary or false for secondary.
1592 # @failover: true to do failover, false to stop. but cannot be
1593 # specified if 'enable' is true. default value is false.
1599 # -> { "execute": "xen-set-replication",
1600 # "arguments": {"enable": true, "primary": false} }
1601 # <- { "return": {} }
1605 { 'command': 'xen-set-replication',
1606 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' },
1607 'if': 'CONFIG_REPLICATION' }
1610 # @ReplicationStatus:
1612 # The result format for 'query-xen-replication-status'.
1614 # @error: true if an error happened, false if replication is normal.
1616 # @desc: the human readable error description string, when
1621 { 'struct': 'ReplicationStatus',
1622 'data': { 'error': 'bool', '*desc': 'str' },
1623 'if': 'CONFIG_REPLICATION' }
1626 # @query-xen-replication-status:
1628 # Query replication status while the vm is running.
1630 # Returns: A @ReplicationStatus object showing the status.
1634 # -> { "execute": "query-xen-replication-status" }
1635 # <- { "return": { "error": false } }
1639 { 'command': 'query-xen-replication-status',
1640 'returns': 'ReplicationStatus',
1641 'if': 'CONFIG_REPLICATION' }
1644 # @xen-colo-do-checkpoint:
1646 # Xen uses this command to notify replication to trigger a checkpoint.
1652 # -> { "execute": "xen-colo-do-checkpoint" }
1653 # <- { "return": {} }
1657 { 'command': 'xen-colo-do-checkpoint',
1658 'if': 'CONFIG_REPLICATION' }
1663 # The result format for 'query-colo-status'.
1665 # @mode: COLO running mode. If COLO is running, this field will return
1666 # 'primary' or 'secondary'.
1668 # @last-mode: COLO last running mode. If COLO is running, this field
1669 # will return same like mode field, after failover we can
1670 # use this field to get last colo mode. (since 4.0)
1672 # @reason: describes the reason for the COLO exit.
1676 { 'struct': 'COLOStatus',
1677 'data': { 'mode': 'COLOMode', 'last-mode': 'COLOMode',
1678 'reason': 'COLOExitReason' } }
1681 # @query-colo-status:
1683 # Query COLO status while the vm is running.
1685 # Returns: A @COLOStatus object showing the status.
1689 # -> { "execute": "query-colo-status" }
1690 # <- { "return": { "mode": "primary", "last-mode": "none", "reason": "request" } }
1694 { 'command': 'query-colo-status',
1695 'returns': 'COLOStatus' }
1700 # Provide a recovery migration stream URI.
1702 # @uri: the URI to be used for the recovery of migration stream.
1708 # -> { "execute": "migrate-recover",
1709 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1710 # <- { "return": {} }
1714 { 'command': 'migrate-recover',
1715 'data': { 'uri': 'str' },
1721 # Pause a migration. Currently it only supports postcopy.
1727 # -> { "execute": "migrate-pause" }
1728 # <- { "return": {} }
1732 { 'command': 'migrate-pause', 'allow-oob': true }
1737 # Emitted from source side of a migration when migration state is
1738 # WAIT_UNPLUG. Device was unplugged by guest operating system.
1739 # Device resources in QEMU are kept on standby to be able to re-plug it in case
1740 # of migration failure.
1742 # @device-id: QEMU device id of the unplugged device
1748 # <- { "event": "UNPLUG_PRIMARY",
1749 # "data": { "device-id": "hostdev0" },
1750 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1753 { 'event': 'UNPLUG_PRIMARY',
1754 'data': { 'device-id': 'str' } }
1759 # Dirty rate of vcpu.
1763 # @dirty-rate: dirty rate.
1767 { 'struct': 'DirtyRateVcpu',
1768 'data': { 'id': 'int', 'dirty-rate': 'int64' } }
1773 # An enumeration of dirtyrate status.
1775 # @unstarted: the dirtyrate thread has not been started.
1777 # @measuring: the dirtyrate thread is measuring.
1779 # @measured: the dirtyrate thread has measured and results are available.
1783 { 'enum': 'DirtyRateStatus',
1784 'data': [ 'unstarted', 'measuring', 'measured'] }
1787 # @DirtyRateMeasureMode:
1789 # An enumeration of mode of measuring dirtyrate.
1791 # @page-sampling: calculate dirtyrate by sampling pages.
1793 # @dirty-ring: calculate dirtyrate by dirty ring.
1795 # @dirty-bitmap: calculate dirtyrate by dirty bitmap.
1799 { 'enum': 'DirtyRateMeasureMode',
1800 'data': ['page-sampling', 'dirty-ring', 'dirty-bitmap'] }
1805 # Information about current dirty page rate of vm.
1807 # @dirty-rate: an estimate of the dirty page rate of the VM in units of
1808 # MB/s, present only when estimating the rate has completed.
1810 # @status: status containing dirtyrate query status includes
1811 # 'unstarted' or 'measuring' or 'measured'
1813 # @start-time: start time in units of second for calculation
1815 # @calc-time: time in units of second for sample dirty pages
1817 # @sample-pages: page count per GB for sample dirty pages
1818 # the default value is 512 (since 6.1)
1820 # @mode: mode containing method of calculate dirtyrate includes
1821 # 'page-sampling' and 'dirty-ring' (Since 6.2)
1823 # @vcpu-dirty-rate: dirtyrate for each vcpu if dirty-ring
1824 # mode specified (Since 6.2)
1828 { 'struct': 'DirtyRateInfo',
1829 'data': {'*dirty-rate': 'int64',
1830 'status': 'DirtyRateStatus',
1831 'start-time': 'int64',
1832 'calc-time': 'int64',
1833 'sample-pages': 'uint64',
1834 'mode': 'DirtyRateMeasureMode',
1835 '*vcpu-dirty-rate': [ 'DirtyRateVcpu' ] } }
1840 # start calculating dirty page rate for vm
1842 # @calc-time: time in units of second for sample dirty pages
1844 # @sample-pages: page count per GB for sample dirty pages
1845 # the default value is 512 (since 6.1)
1847 # @mode: mechanism of calculating dirtyrate includes
1848 # 'page-sampling' and 'dirty-ring' (Since 6.1)
1854 # {"execute": "calc-dirty-rate", "arguments": {"calc-time": 1,
1855 # 'sample-pages': 512} }
1858 { 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64',
1859 '*sample-pages': 'int',
1860 '*mode': 'DirtyRateMeasureMode'} }
1863 # @query-dirty-rate:
1865 # query dirty page rate in units of MB/s for vm
1869 { 'command': 'query-dirty-rate', 'returns': 'DirtyRateInfo' }
1874 # Save a VM snapshot
1876 # @job-id: identifier for the newly created job
1877 # @tag: name of the snapshot to create
1878 # @vmstate: block device node name to save vmstate to
1879 # @devices: list of block device node names to save a snapshot to
1881 # Applications should not assume that the snapshot save is complete
1882 # when this command returns. The job commands / events must be used
1883 # to determine completion and to fetch details of any errors that arise.
1885 # Note that execution of the guest CPUs may be stopped during the
1886 # time it takes to save the snapshot. A future version of QEMU
1887 # may ensure CPUs are executing continuously.
1889 # It is strongly recommended that @devices contain all writable
1890 # block device nodes if a consistent snapshot is required.
1892 # If @tag already exists, an error will be reported
1898 # -> { "execute": "snapshot-save",
1900 # "job-id": "snapsave0",
1902 # "vmstate": "disk0",
1903 # "devices": ["disk0", "disk1"]
1906 # <- { "return": { } }
1907 # <- {"event": "JOB_STATUS_CHANGE",
1908 # "data": {"status": "created", "id": "snapsave0"}}
1909 # <- {"event": "JOB_STATUS_CHANGE",
1910 # "data": {"status": "running", "id": "snapsave0"}}
1911 # <- {"event": "STOP"}
1912 # <- {"event": "RESUME"}
1913 # <- {"event": "JOB_STATUS_CHANGE",
1914 # "data": {"status": "waiting", "id": "snapsave0"}}
1915 # <- {"event": "JOB_STATUS_CHANGE",
1916 # "data": {"status": "pending", "id": "snapsave0"}}
1917 # <- {"event": "JOB_STATUS_CHANGE",
1918 # "data": {"status": "concluded", "id": "snapsave0"}}
1919 # -> {"execute": "query-jobs"}
1920 # <- {"return": [{"current-progress": 1,
1921 # "status": "concluded",
1922 # "total-progress": 1,
1923 # "type": "snapshot-save",
1924 # "id": "snapsave0"}]}
1928 { 'command': 'snapshot-save',
1929 'data': { 'job-id': 'str',
1932 'devices': ['str'] } }
1937 # Load a VM snapshot
1939 # @job-id: identifier for the newly created job
1940 # @tag: name of the snapshot to load.
1941 # @vmstate: block device node name to load vmstate from
1942 # @devices: list of block device node names to load a snapshot from
1944 # Applications should not assume that the snapshot load is complete
1945 # when this command returns. The job commands / events must be used
1946 # to determine completion and to fetch details of any errors that arise.
1948 # Note that execution of the guest CPUs will be stopped during the
1949 # time it takes to load the snapshot.
1951 # It is strongly recommended that @devices contain all writable
1952 # block device nodes that can have changed since the original
1953 # @snapshot-save command execution.
1959 # -> { "execute": "snapshot-load",
1961 # "job-id": "snapload0",
1963 # "vmstate": "disk0",
1964 # "devices": ["disk0", "disk1"]
1967 # <- { "return": { } }
1968 # <- {"event": "JOB_STATUS_CHANGE",
1969 # "data": {"status": "created", "id": "snapload0"}}
1970 # <- {"event": "JOB_STATUS_CHANGE",
1971 # "data": {"status": "running", "id": "snapload0"}}
1972 # <- {"event": "STOP"}
1973 # <- {"event": "RESUME"}
1974 # <- {"event": "JOB_STATUS_CHANGE",
1975 # "data": {"status": "waiting", "id": "snapload0"}}
1976 # <- {"event": "JOB_STATUS_CHANGE",
1977 # "data": {"status": "pending", "id": "snapload0"}}
1978 # <- {"event": "JOB_STATUS_CHANGE",
1979 # "data": {"status": "concluded", "id": "snapload0"}}
1980 # -> {"execute": "query-jobs"}
1981 # <- {"return": [{"current-progress": 1,
1982 # "status": "concluded",
1983 # "total-progress": 1,
1984 # "type": "snapshot-load",
1985 # "id": "snapload0"}]}
1989 { 'command': 'snapshot-load',
1990 'data': { 'job-id': 'str',
1993 'devices': ['str'] } }
1998 # Delete a VM snapshot
2000 # @job-id: identifier for the newly created job
2001 # @tag: name of the snapshot to delete.
2002 # @devices: list of block device node names to delete a snapshot from
2004 # Applications should not assume that the snapshot delete is complete
2005 # when this command returns. The job commands / events must be used
2006 # to determine completion and to fetch details of any errors that arise.
2012 # -> { "execute": "snapshot-delete",
2014 # "job-id": "snapdelete0",
2016 # "devices": ["disk0", "disk1"]
2019 # <- { "return": { } }
2020 # <- {"event": "JOB_STATUS_CHANGE",
2021 # "data": {"status": "created", "id": "snapdelete0"}}
2022 # <- {"event": "JOB_STATUS_CHANGE",
2023 # "data": {"status": "running", "id": "snapdelete0"}}
2024 # <- {"event": "JOB_STATUS_CHANGE",
2025 # "data": {"status": "waiting", "id": "snapdelete0"}}
2026 # <- {"event": "JOB_STATUS_CHANGE",
2027 # "data": {"status": "pending", "id": "snapdelete0"}}
2028 # <- {"event": "JOB_STATUS_CHANGE",
2029 # "data": {"status": "concluded", "id": "snapdelete0"}}
2030 # -> {"execute": "query-jobs"}
2031 # <- {"return": [{"current-progress": 1,
2032 # "status": "concluded",
2033 # "total-progress": 1,
2034 # "type": "snapshot-delete",
2035 # "id": "snapdelete0"}]}
2039 { 'command': 'snapshot-delete',
2040 'data': { 'job-id': 'str',
2042 'devices': ['str'] } }