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
51 { 'struct': 'MigrationStats',
52 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
53 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
54 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
55 'mbps' : 'number', 'dirty-sync-count' : 'int',
56 'postcopy-requests' : 'int', 'page-size' : 'int',
57 'multifd-bytes' : 'uint64', 'pages-per-second' : 'uint64' } }
62 # Detailed XBZRLE migration cache statistics
64 # @cache-size: XBZRLE cache size
66 # @bytes: amount of bytes already transferred to the target VM
68 # @pages: amount of pages transferred to the target VM
70 # @cache-miss: number of cache miss
72 # @cache-miss-rate: rate of cache miss (since 2.1)
74 # @encoding-rate: rate of encoded bytes (since 5.1)
76 # @overflow: number of overflows
80 { 'struct': 'XBZRLECacheStats',
81 'data': {'cache-size': 'size', 'bytes': 'int', 'pages': 'int',
82 'cache-miss': 'int', 'cache-miss-rate': 'number',
83 'encoding-rate': 'number', 'overflow': 'int' } }
88 # Detailed migration compression statistics
90 # @pages: amount of pages compressed and transferred to the target VM
92 # @busy: count of times that no free thread was available to compress data
94 # @busy-rate: rate of thread busy
96 # @compressed-size: amount of bytes after compression
98 # @compression-rate: rate of compressed size
102 { 'struct': 'CompressionStats',
103 'data': {'pages': 'int', 'busy': 'int', 'busy-rate': 'number',
104 'compressed-size': 'int', 'compression-rate': 'number' } }
109 # An enumeration of migration status.
111 # @none: no migration has ever happened.
113 # @setup: migration process has been initiated.
115 # @cancelling: in the process of cancelling migration.
117 # @cancelled: cancelling migration is finished.
119 # @active: in the process of doing migration.
121 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
123 # @postcopy-paused: during postcopy but paused. (since 3.0)
125 # @postcopy-recover: trying to recover from a paused postcopy. (since 3.0)
127 # @completed: migration is finished.
129 # @failed: some error occurred during migration process.
131 # @colo: VM is in the process of fault tolerance, VM can not get into this
132 # state unless colo capability is enabled for migration. (since 2.8)
134 # @pre-switchover: Paused before device serialisation. (since 2.11)
136 # @device: During device serialisation when pause-before-switchover is enabled
139 # @wait-unplug: wait for device unplug request by guest OS to be completed.
145 { 'enum': 'MigrationStatus',
146 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
147 'active', 'postcopy-active', 'postcopy-paused',
148 'postcopy-recover', 'completed', 'failed', 'colo',
149 'pre-switchover', 'device', 'wait-unplug' ] }
153 # Detailed VFIO devices migration statistics
155 # @transferred: amount of bytes transferred to the target VM by VFIO devices
160 { 'struct': 'VfioStats',
161 'data': {'transferred': 'int' } }
166 # Information about current migration process.
168 # @status: @MigrationStatus describing the current migration status.
169 # If this field is not returned, no migration process
172 # @ram: @MigrationStats containing detailed migration
173 # status, only returned if status is 'active' or
174 # 'completed'(since 1.2)
176 # @disk: @MigrationStats containing detailed disk migration
177 # status, only returned if status is 'active' and it is a block
180 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
181 # migration statistics, only returned if XBZRLE feature is on and
182 # status is 'active' or 'completed' (since 1.2)
184 # @total-time: total amount of milliseconds since migration started.
185 # If migration has ended, it returns the total migration
188 # @downtime: only present when migration finishes correctly
189 # total downtime in milliseconds for the guest.
192 # @expected-downtime: only present while migration is active
193 # expected downtime in milliseconds for the guest in last walk
194 # of the dirty bitmap. (since 1.3)
196 # @setup-time: amount of setup time in milliseconds *before* the
197 # iterations begin but *after* the QMP command is issued. This is designed
198 # to provide an accounting of any activities (such as RDMA pinning) which
199 # may be expensive, but do not actually occur during the iterative
200 # migration rounds themselves. (since 1.6)
202 # @cpu-throttle-percentage: percentage of time guest cpus are being
203 # throttled during auto-converge. This is only present when auto-converge
204 # has started throttling guest cpus. (Since 2.7)
206 # @error-desc: the human readable error description string, when
207 # @status is 'failed'. Clients should not attempt to parse the
208 # error strings. (Since 2.7)
210 # @postcopy-blocktime: total time when all vCPU were blocked during postcopy
211 # live migration. This is only present when the postcopy-blocktime
212 # migration capability is enabled. (Since 3.0)
214 # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU. This is
215 # only present when the postcopy-blocktime migration capability
216 # is enabled. (Since 3.0)
218 # @compression: migration compression statistics, only returned if compression
219 # feature is on and status is 'active' or 'completed' (Since 3.1)
221 # @socket-address: Only used for tcp, to know what the real port is (Since 4.0)
223 # @vfio: @VfioStats containing detailed VFIO devices migration statistics,
224 # only returned if VFIO device is present, migration is supported by all
225 # VFIO devices and status is 'active' or 'completed' (since 5.2)
227 # @blocked: True if outgoing migration is blocked (since 6.0)
229 # @blocked-reasons: A list of reasons an outgoing migration is blocked (since 6.0)
233 { 'struct': 'MigrationInfo',
234 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
235 '*disk': 'MigrationStats',
236 '*vfio': 'VfioStats',
237 '*xbzrle-cache': 'XBZRLECacheStats',
238 '*total-time': 'int',
239 '*expected-downtime': 'int',
241 '*setup-time': 'int',
242 '*cpu-throttle-percentage': 'int',
243 '*error-desc': 'str',
245 '*blocked-reasons': ['str'],
246 '*postcopy-blocktime' : 'uint32',
247 '*postcopy-vcpu-blocktime': ['uint32'],
248 '*compression': 'CompressionStats',
249 '*socket-address': ['SocketAddress'] } }
254 # Returns information about current migration process. If migration
255 # is active there will be another json-object with RAM migration
256 # status and if block migration is active another one with block
259 # Returns: @MigrationInfo
265 # 1. Before the first migration
267 # -> { "execute": "query-migrate" }
268 # <- { "return": {} }
270 # 2. Migration is done and has succeeded
272 # -> { "execute": "query-migrate" }
274 # "status": "completed",
275 # "total-time":12345,
276 # "setup-time":12345,
284 # "normal-bytes":123456,
285 # "dirty-sync-count":15
290 # 3. Migration is done and has failed
292 # -> { "execute": "query-migrate" }
293 # <- { "return": { "status": "failed" } }
295 # 4. Migration is being performed and is not a block migration:
297 # -> { "execute": "query-migrate" }
301 # "total-time":12345,
302 # "setup-time":12345,
303 # "expected-downtime":12345,
310 # "normal-bytes":123456,
311 # "dirty-sync-count":15
316 # 5. Migration is being performed and is a block migration:
318 # -> { "execute": "query-migrate" }
322 # "total-time":12345,
323 # "setup-time":12345,
324 # "expected-downtime":12345,
327 # "remaining":1053304,
328 # "transferred":3720,
331 # "normal-bytes":123456,
332 # "dirty-sync-count":15
336 # "remaining":20880384,
337 # "transferred":91136
342 # 6. Migration is being performed and XBZRLE is active:
344 # -> { "execute": "query-migrate" }
348 # "total-time":12345,
349 # "setup-time":12345,
350 # "expected-downtime":12345,
353 # "remaining":1053304,
354 # "transferred":3720,
357 # "normal-bytes":3412992,
358 # "dirty-sync-count":15
361 # "cache-size":67108864,
365 # "cache-miss-rate":0.123,
366 # "encoding-rate":80.1,
373 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
376 # @MigrationCapability:
378 # Migration capabilities enumeration
380 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
381 # This feature allows us to minimize migration traffic for certain work
382 # loads, by sending compressed difference of the pages
384 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
385 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
386 # Disabled by default. (since 2.0)
388 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
389 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
390 # source and target VM to support this feature. To enable it is sufficient
391 # to enable the capability on the source VM. The feature is disabled by
392 # default. (since 1.6)
394 # @compress: Use multiple compression threads to accelerate live migration.
395 # This feature can help to reduce the migration traffic, by sending
396 # compressed pages. Please note that if compress and xbzrle are both
397 # on, compress only takes effect in the ram bulk stage, after that,
398 # it will be disabled and only xbzrle takes effect, this can help to
399 # minimize migration traffic. The feature is disabled by default.
402 # @events: generate events for each migration state change
405 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
406 # to speed up convergence of RAM migration. (since 1.6)
408 # @postcopy-ram: Start executing on the migration target before all of RAM has
409 # been migrated, pulling the remaining pages along as needed. The
410 # capacity must have the same setting on both source and target
411 # or migration will not even start. NOTE: If the migration fails during
412 # postcopy the VM will fail. (since 2.6)
414 # @x-colo: If enabled, migration will never end, and the state of the VM on the
415 # primary side will be migrated continuously to the VM on secondary
416 # side, this process is called COarse-Grain LOck Stepping (COLO) for
417 # Non-stop Service. (since 2.8)
419 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
420 # during postcopy-ram migration. (since 2.9)
422 # @block: If enabled, QEMU will also migrate the contents of all block
423 # devices. Default is disabled. A possible alternative uses
424 # mirror jobs to a builtin NBD server on the destination, which
425 # offers more flexibility.
428 # @return-path: If enabled, migration will use the return path even
429 # for precopy. (since 2.10)
431 # @pause-before-switchover: Pause outgoing migration before serialising device
432 # state and before disabling block IO (since 2.11)
434 # @multifd: Use more than one fd for migration (since 4.0)
436 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
439 # @postcopy-blocktime: Calculate downtime for postcopy live migration
442 # @late-block-activate: If enabled, the destination will not activate block
443 # devices (and thus take locks) immediately at the end of migration.
446 # @x-ignore-shared: If enabled, QEMU will not migrate shared memory (since 4.0)
448 # @validate-uuid: Send the UUID of the source to allow the destination
449 # to ensure it is the same. (since 4.2)
451 # @background-snapshot: If enabled, the migration stream will be a snapshot
452 # of the VM exactly at the point when the migration
453 # procedure starts. The VM RAM is saved with running VM.
458 { 'enum': 'MigrationCapability',
459 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
460 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
461 'block', 'return-path', 'pause-before-switchover', 'multifd',
462 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
463 'x-ignore-shared', 'validate-uuid', 'background-snapshot'] }
466 # @MigrationCapabilityStatus:
468 # Migration capability information
470 # @capability: capability enum
472 # @state: capability state bool
476 { 'struct': 'MigrationCapabilityStatus',
477 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
480 # @migrate-set-capabilities:
482 # Enable/Disable the following migration capabilities (like xbzrle)
484 # @capabilities: json array of capability modifications to make
490 # -> { "execute": "migrate-set-capabilities" , "arguments":
491 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
494 { 'command': 'migrate-set-capabilities',
495 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
498 # @query-migrate-capabilities:
500 # Returns information about the current migration capabilities status
502 # Returns: @MigrationCapabilitiesStatus
508 # -> { "execute": "query-migrate-capabilities" }
510 # {"state": false, "capability": "xbzrle"},
511 # {"state": false, "capability": "rdma-pin-all"},
512 # {"state": false, "capability": "auto-converge"},
513 # {"state": false, "capability": "zero-blocks"},
514 # {"state": false, "capability": "compress"},
515 # {"state": true, "capability": "events"},
516 # {"state": false, "capability": "postcopy-ram"},
517 # {"state": false, "capability": "x-colo"}
521 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
524 # @MultiFDCompression:
526 # An enumeration of multifd compression methods.
528 # @none: no compression.
529 # @zlib: use zlib compression method.
530 # @zstd: use zstd compression method.
535 { 'enum': 'MultiFDCompression',
536 'data': [ 'none', 'zlib',
537 { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] }
540 # @BitmapMigrationBitmapAlias:
542 # @name: The name of the bitmap.
544 # @alias: An alias name for migration (for example the bitmap name on
545 # the opposite site).
549 { 'struct': 'BitmapMigrationBitmapAlias',
556 # @BitmapMigrationNodeAlias:
558 # Maps a block node name and the bitmaps it has to aliases for dirty
561 # @node-name: A block node name.
563 # @alias: An alias block node name for migration (for example the
564 # node name on the opposite site).
566 # @bitmaps: Mappings for the bitmaps on this node.
570 { 'struct': 'BitmapMigrationNodeAlias',
574 'bitmaps': [ 'BitmapMigrationBitmapAlias' ]
578 # @MigrationParameter:
580 # Migration parameters enumeration
582 # @announce-initial: Initial delay (in milliseconds) before sending the first
583 # announce (Since 4.0)
585 # @announce-max: Maximum delay (in milliseconds) between packets in the
586 # announcement (Since 4.0)
588 # @announce-rounds: Number of self-announce packets sent after migration
591 # @announce-step: Increase in delay (in milliseconds) between subsequent
592 # packets in the announcement (Since 4.0)
594 # @compress-level: Set the compression level to be used in live migration,
595 # the compression level is an integer between 0 and 9, where 0 means
596 # no compression, 1 means the best compression speed, and 9 means best
597 # compression ratio which will consume more CPU.
599 # @compress-threads: Set compression thread count to be used in live migration,
600 # the compression thread count is an integer between 1 and 255.
602 # @compress-wait-thread: Controls behavior when all compression threads are
603 # currently busy. If true (default), wait for a free
604 # compression thread to become available; otherwise,
605 # send the page uncompressed. (Since 3.1)
607 # @decompress-threads: Set decompression thread count to be used in live
608 # migration, the decompression thread count is an integer between 1
609 # and 255. Usually, decompression is at least 4 times as fast as
610 # compression, so set the decompress-threads to the number about 1/4
611 # of compress-threads is adequate.
613 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
614 # to trigger throttling. It is expressed as percentage.
615 # The default value is 50. (Since 5.0)
617 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
618 # when migration auto-converge is activated. The
619 # default value is 20. (Since 2.7)
621 # @cpu-throttle-increment: throttle percentage increase each time
622 # auto-converge detects that migration is not making
623 # progress. The default value is 10. (Since 2.7)
625 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
626 # At the tail stage of throttling, the Guest is very
627 # sensitive to CPU percentage while the @cpu-throttle
628 # -increment is excessive usually at tail stage.
629 # If this parameter is true, we will compute the ideal
630 # CPU percentage used by the Guest, which may exactly make
631 # the dirty rate match the dirty rate threshold. Then we
632 # will choose a smaller throttle increment between the
633 # one specified by @cpu-throttle-increment and the one
634 # generated by ideal CPU percentage.
635 # Therefore, it is compatible to traditional throttling,
636 # meanwhile the throttle increment won't be excessive
638 # The default value is false. (Since 5.1)
640 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
641 # establishing a TLS connection over the migration data channel.
642 # On the outgoing side of the migration, the credentials must
643 # be for a 'client' endpoint, while for the incoming side the
644 # credentials must be for a 'server' endpoint. Setting this
645 # will enable TLS for all migrations. The default is unset,
646 # resulting in unsecured migration at the QEMU level. (Since 2.7)
648 # @tls-hostname: hostname of the target host for the migration. This is
649 # required when using x509 based TLS credentials and the
650 # migration URI does not already include a hostname. For
651 # example if using fd: or exec: based migration, the
652 # hostname must be provided so that the server's x509
653 # certificate identity can be validated. (Since 2.7)
655 # @tls-authz: ID of the 'authz' object subclass that provides access control
656 # checking of the TLS x509 certificate distinguished name.
657 # This object is only resolved at time of use, so can be deleted
658 # and recreated on the fly while the migration server is active.
659 # If missing, it will default to denying access (Since 4.0)
661 # @max-bandwidth: to set maximum speed for migration. maximum speed in
662 # bytes per second. (Since 2.8)
664 # @downtime-limit: set maximum tolerated downtime for migration. maximum
665 # downtime in milliseconds (Since 2.8)
667 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
668 # periodic mode. (Since 2.8)
670 # @block-incremental: Affects how much storage is migrated when the
671 # block migration capability is enabled. When false, the entire
672 # storage backing chain is migrated into a flattened image at
673 # the destination; when true, only the active qcow2 layer is
674 # migrated and the destination must already have access to the
675 # same backing chain as was used on the source. (since 2.10)
677 # @multifd-channels: Number of channels used to migrate data in
678 # parallel. This is the same number that the
679 # number of sockets used for migration. The
680 # default value is 2 (since 4.0)
682 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
683 # needs to be a multiple of the target page size
687 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
688 # Defaults to 0 (unlimited). In bytes per second.
691 # @max-cpu-throttle: maximum cpu throttle percentage.
692 # Defaults to 99. (Since 3.1)
694 # @multifd-compression: Which compression method to use.
695 # Defaults to none. (Since 5.0)
697 # @multifd-zlib-level: Set the compression level to be used in live
698 # migration, the compression level is an integer between 0
699 # and 9, where 0 means no compression, 1 means the best
700 # compression speed, and 9 means best compression ratio which
701 # will consume more CPU.
702 # Defaults to 1. (Since 5.0)
704 # @multifd-zstd-level: Set the compression level to be used in live
705 # migration, the compression level is an integer between 0
706 # and 20, where 0 means no compression, 1 means the best
707 # compression speed, and 20 means best compression ratio which
708 # will consume more CPU.
709 # Defaults to 1. (Since 5.0)
711 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
712 # aliases for the purpose of dirty bitmap migration. Such
713 # aliases may for example be the corresponding names on the
715 # The mapping must be one-to-one, but not necessarily
716 # complete: On the source, unmapped bitmaps and all bitmaps
717 # on unmapped nodes will be ignored. On the destination,
718 # encountering an unmapped alias in the incoming migration
719 # stream will result in a report, and all further bitmap
720 # migration data will then be discarded.
721 # Note that the destination does not know about bitmaps it
722 # does not receive, so there is no limitation or requirement
723 # regarding the number of bitmaps received, or how they are
724 # named, or on which nodes they are placed.
725 # By default (when this parameter has never been set), bitmap
726 # names are mapped to themselves. Nodes are mapped to their
727 # block device name if there is one, and to their node name
728 # otherwise. (Since 5.2)
732 { 'enum': 'MigrationParameter',
733 'data': ['announce-initial', 'announce-max',
734 'announce-rounds', 'announce-step',
735 'compress-level', 'compress-threads', 'decompress-threads',
736 'compress-wait-thread', 'throttle-trigger-threshold',
737 'cpu-throttle-initial', 'cpu-throttle-increment',
738 'cpu-throttle-tailslow',
739 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
740 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
742 'xbzrle-cache-size', 'max-postcopy-bandwidth',
743 'max-cpu-throttle', 'multifd-compression',
744 'multifd-zlib-level' ,'multifd-zstd-level',
745 'block-bitmap-mapping' ] }
748 # @MigrateSetParameters:
750 # @announce-initial: Initial delay (in milliseconds) before sending the first
751 # announce (Since 4.0)
753 # @announce-max: Maximum delay (in milliseconds) between packets in the
754 # announcement (Since 4.0)
756 # @announce-rounds: Number of self-announce packets sent after migration
759 # @announce-step: Increase in delay (in milliseconds) between subsequent
760 # packets in the announcement (Since 4.0)
762 # @compress-level: compression level
764 # @compress-threads: compression thread count
766 # @compress-wait-thread: Controls behavior when all compression threads are
767 # currently busy. If true (default), wait for a free
768 # compression thread to become available; otherwise,
769 # send the page uncompressed. (Since 3.1)
771 # @decompress-threads: decompression thread count
773 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
774 # to trigger throttling. It is expressed as percentage.
775 # The default value is 50. (Since 5.0)
777 # @cpu-throttle-initial: Initial percentage of time guest cpus are
778 # throttled when migration auto-converge is activated.
779 # The default value is 20. (Since 2.7)
781 # @cpu-throttle-increment: throttle percentage increase each time
782 # auto-converge detects that migration is not making
783 # progress. The default value is 10. (Since 2.7)
785 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
786 # At the tail stage of throttling, the Guest is very
787 # sensitive to CPU percentage while the @cpu-throttle
788 # -increment is excessive usually at tail stage.
789 # If this parameter is true, we will compute the ideal
790 # CPU percentage used by the Guest, which may exactly make
791 # the dirty rate match the dirty rate threshold. Then we
792 # will choose a smaller throttle increment between the
793 # one specified by @cpu-throttle-increment and the one
794 # generated by ideal CPU percentage.
795 # Therefore, it is compatible to traditional throttling,
796 # meanwhile the throttle increment won't be excessive
798 # The default value is false. (Since 5.1)
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)
837 # @multifd-channels: Number of channels used to migrate data in
838 # parallel. This is the same number that the
839 # number of sockets used for migration. The
840 # default value is 2 (since 4.0)
842 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
843 # needs to be a multiple of the target page size
847 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
848 # Defaults to 0 (unlimited). In bytes per second.
851 # @max-cpu-throttle: maximum cpu throttle percentage.
852 # The default value is 99. (Since 3.1)
854 # @multifd-compression: Which compression method to use.
855 # Defaults to none. (Since 5.0)
857 # @multifd-zlib-level: Set the compression level to be used in live
858 # migration, the compression level is an integer between 0
859 # and 9, where 0 means no compression, 1 means the best
860 # compression speed, and 9 means best compression ratio which
861 # will consume more CPU.
862 # Defaults to 1. (Since 5.0)
864 # @multifd-zstd-level: Set the compression level to be used in live
865 # migration, the compression level is an integer between 0
866 # and 20, where 0 means no compression, 1 means the best
867 # compression speed, and 20 means best compression ratio which
868 # will consume more CPU.
869 # Defaults to 1. (Since 5.0)
871 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
872 # aliases for the purpose of dirty bitmap migration. Such
873 # aliases may for example be the corresponding names on the
875 # The mapping must be one-to-one, but not necessarily
876 # complete: On the source, unmapped bitmaps and all bitmaps
877 # on unmapped nodes will be ignored. On the destination,
878 # encountering an unmapped alias in the incoming migration
879 # stream will result in a report, and all further bitmap
880 # migration data will then be discarded.
881 # Note that the destination does not know about bitmaps it
882 # does not receive, so there is no limitation or requirement
883 # regarding the number of bitmaps received, or how they are
884 # named, or on which nodes they are placed.
885 # By default (when this parameter has never been set), bitmap
886 # names are mapped to themselves. Nodes are mapped to their
887 # block device name if there is one, and to their node name
888 # otherwise. (Since 5.2)
892 # TODO either fuse back into MigrationParameters, or make
893 # MigrationParameters members mandatory
894 { 'struct': 'MigrateSetParameters',
895 'data': { '*announce-initial': 'size',
896 '*announce-max': 'size',
897 '*announce-rounds': 'size',
898 '*announce-step': 'size',
899 '*compress-level': 'uint8',
900 '*compress-threads': 'uint8',
901 '*compress-wait-thread': 'bool',
902 '*decompress-threads': 'uint8',
903 '*throttle-trigger-threshold': 'uint8',
904 '*cpu-throttle-initial': 'uint8',
905 '*cpu-throttle-increment': 'uint8',
906 '*cpu-throttle-tailslow': 'bool',
907 '*tls-creds': 'StrOrNull',
908 '*tls-hostname': 'StrOrNull',
909 '*tls-authz': 'StrOrNull',
910 '*max-bandwidth': 'size',
911 '*downtime-limit': 'uint64',
912 '*x-checkpoint-delay': 'uint32',
913 '*block-incremental': 'bool',
914 '*multifd-channels': 'uint8',
915 '*xbzrle-cache-size': 'size',
916 '*max-postcopy-bandwidth': 'size',
917 '*max-cpu-throttle': 'uint8',
918 '*multifd-compression': 'MultiFDCompression',
919 '*multifd-zlib-level': 'uint8',
920 '*multifd-zstd-level': 'uint8',
921 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ] } }
924 # @migrate-set-parameters:
926 # Set various migration parameters.
932 # -> { "execute": "migrate-set-parameters" ,
933 # "arguments": { "compress-level": 1 } }
936 { 'command': 'migrate-set-parameters', 'boxed': true,
937 'data': 'MigrateSetParameters' }
940 # @MigrationParameters:
942 # The optional members aren't actually optional.
944 # @announce-initial: Initial delay (in milliseconds) before sending the
945 # first announce (Since 4.0)
947 # @announce-max: Maximum delay (in milliseconds) between packets in the
948 # announcement (Since 4.0)
950 # @announce-rounds: Number of self-announce packets sent after migration
953 # @announce-step: Increase in delay (in milliseconds) between subsequent
954 # packets in the announcement (Since 4.0)
956 # @compress-level: compression level
958 # @compress-threads: compression thread count
960 # @compress-wait-thread: Controls behavior when all compression threads are
961 # currently busy. If true (default), wait for a free
962 # compression thread to become available; otherwise,
963 # send the page uncompressed. (Since 3.1)
965 # @decompress-threads: decompression thread count
967 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
968 # to trigger throttling. It is expressed as percentage.
969 # The default value is 50. (Since 5.0)
971 # @cpu-throttle-initial: Initial percentage of time guest cpus are
972 # throttled when migration auto-converge is activated.
975 # @cpu-throttle-increment: throttle percentage increase each time
976 # auto-converge detects that migration is not making
977 # progress. (Since 2.7)
979 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
980 # At the tail stage of throttling, the Guest is very
981 # sensitive to CPU percentage while the @cpu-throttle
982 # -increment is excessive usually at tail stage.
983 # If this parameter is true, we will compute the ideal
984 # CPU percentage used by the Guest, which may exactly make
985 # the dirty rate match the dirty rate threshold. Then we
986 # will choose a smaller throttle increment between the
987 # one specified by @cpu-throttle-increment and the one
988 # generated by ideal CPU percentage.
989 # Therefore, it is compatible to traditional throttling,
990 # meanwhile the throttle increment won't be excessive
992 # The default value is false. (Since 5.1)
994 # @tls-creds: ID of the 'tls-creds' object that provides credentials
995 # for establishing a TLS connection over the migration data
996 # channel. On the outgoing side of the migration, the credentials
997 # must be for a 'client' endpoint, while for the incoming side the
998 # credentials must be for a 'server' endpoint.
999 # An empty string means that QEMU will use plain text mode for
1000 # migration, rather than TLS (Since 2.7)
1001 # Note: 2.8 reports this by omitting tls-creds instead.
1003 # @tls-hostname: hostname of the target host for the migration. This
1004 # is required when using x509 based TLS credentials and the
1005 # migration URI does not already include a hostname. For
1006 # example if using fd: or exec: based migration, the
1007 # hostname must be provided so that the server's x509
1008 # certificate identity can be validated. (Since 2.7)
1009 # An empty string means that QEMU will use the hostname
1010 # associated with the migration URI, if any. (Since 2.9)
1011 # Note: 2.8 reports this by omitting tls-hostname instead.
1013 # @tls-authz: ID of the 'authz' object subclass that provides access control
1014 # checking of the TLS x509 certificate distinguished name. (Since
1017 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1018 # bytes per second. (Since 2.8)
1020 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1021 # downtime in milliseconds (Since 2.8)
1023 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1025 # @block-incremental: Affects how much storage is migrated when the
1026 # block migration capability is enabled. When false, the entire
1027 # storage backing chain is migrated into a flattened image at
1028 # the destination; when true, only the active qcow2 layer is
1029 # migrated and the destination must already have access to the
1030 # same backing chain as was used on the source. (since 2.10)
1032 # @multifd-channels: Number of channels used to migrate data in
1033 # parallel. This is the same number that the
1034 # number of sockets used for migration.
1035 # The default value is 2 (since 4.0)
1037 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
1038 # needs to be a multiple of the target page size
1042 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
1043 # Defaults to 0 (unlimited). In bytes per second.
1046 # @max-cpu-throttle: maximum cpu throttle percentage.
1050 # @multifd-compression: Which compression method to use.
1051 # Defaults to none. (Since 5.0)
1053 # @multifd-zlib-level: Set the compression level to be used in live
1054 # migration, the compression level is an integer between 0
1055 # and 9, where 0 means no compression, 1 means the best
1056 # compression speed, and 9 means best compression ratio which
1057 # will consume more CPU.
1058 # Defaults to 1. (Since 5.0)
1060 # @multifd-zstd-level: Set the compression level to be used in live
1061 # migration, the compression level is an integer between 0
1062 # and 20, where 0 means no compression, 1 means the best
1063 # compression speed, and 20 means best compression ratio which
1064 # will consume more CPU.
1065 # Defaults to 1. (Since 5.0)
1067 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
1068 # aliases for the purpose of dirty bitmap migration. Such
1069 # aliases may for example be the corresponding names on the
1071 # The mapping must be one-to-one, but not necessarily
1072 # complete: On the source, unmapped bitmaps and all bitmaps
1073 # on unmapped nodes will be ignored. On the destination,
1074 # encountering an unmapped alias in the incoming migration
1075 # stream will result in a report, and all further bitmap
1076 # migration data will then be discarded.
1077 # Note that the destination does not know about bitmaps it
1078 # does not receive, so there is no limitation or requirement
1079 # regarding the number of bitmaps received, or how they are
1080 # named, or on which nodes they are placed.
1081 # By default (when this parameter has never been set), bitmap
1082 # names are mapped to themselves. Nodes are mapped to their
1083 # block device name if there is one, and to their node name
1084 # otherwise. (Since 5.2)
1088 { 'struct': 'MigrationParameters',
1089 'data': { '*announce-initial': 'size',
1090 '*announce-max': 'size',
1091 '*announce-rounds': 'size',
1092 '*announce-step': 'size',
1093 '*compress-level': 'uint8',
1094 '*compress-threads': 'uint8',
1095 '*compress-wait-thread': 'bool',
1096 '*decompress-threads': 'uint8',
1097 '*throttle-trigger-threshold': 'uint8',
1098 '*cpu-throttle-initial': 'uint8',
1099 '*cpu-throttle-increment': 'uint8',
1100 '*cpu-throttle-tailslow': 'bool',
1101 '*tls-creds': 'str',
1102 '*tls-hostname': 'str',
1103 '*tls-authz': 'str',
1104 '*max-bandwidth': 'size',
1105 '*downtime-limit': 'uint64',
1106 '*x-checkpoint-delay': 'uint32',
1107 '*block-incremental': 'bool',
1108 '*multifd-channels': 'uint8',
1109 '*xbzrle-cache-size': 'size',
1110 '*max-postcopy-bandwidth': 'size',
1111 '*max-cpu-throttle': 'uint8',
1112 '*multifd-compression': 'MultiFDCompression',
1113 '*multifd-zlib-level': 'uint8',
1114 '*multifd-zstd-level': 'uint8',
1115 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ] } }
1118 # @query-migrate-parameters:
1120 # Returns information about the current migration parameters
1122 # Returns: @MigrationParameters
1128 # -> { "execute": "query-migrate-parameters" }
1130 # "decompress-threads": 2,
1131 # "cpu-throttle-increment": 10,
1132 # "compress-threads": 8,
1133 # "compress-level": 1,
1134 # "cpu-throttle-initial": 20,
1135 # "max-bandwidth": 33554432,
1136 # "downtime-limit": 300
1141 { 'command': 'query-migrate-parameters',
1142 'returns': 'MigrationParameters' }
1145 # @client_migrate_info:
1147 # Set migration information for remote display. This makes the server
1148 # ask the client to automatically reconnect using the new parameters
1149 # once migration finished successfully. Only implemented for SPICE.
1151 # @protocol: must be "spice"
1152 # @hostname: migration target hostname
1153 # @port: spice tcp port for plaintext channels
1154 # @tls-port: spice tcp port for tls-secured channels
1155 # @cert-subject: server certificate subject
1161 # -> { "execute": "client_migrate_info",
1162 # "arguments": { "protocol": "spice",
1163 # "hostname": "virt42.lab.kraxel.org",
1165 # <- { "return": {} }
1168 { 'command': 'client_migrate_info',
1169 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1170 '*tls-port': 'int', '*cert-subject': 'str' } }
1173 # @migrate-start-postcopy:
1175 # Followup to a migration command to switch the migration to postcopy mode.
1176 # The postcopy-ram capability must be set on both source and destination
1177 # before the original migration command.
1183 # -> { "execute": "migrate-start-postcopy" }
1184 # <- { "return": {} }
1187 { 'command': 'migrate-start-postcopy' }
1192 # Emitted when a migration event happens
1194 # @status: @MigrationStatus describing the current migration status.
1200 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
1201 # "event": "MIGRATION",
1202 # "data": {"status": "completed"} }
1205 { 'event': 'MIGRATION',
1206 'data': {'status': 'MigrationStatus'}}
1211 # Emitted from the source side of a migration at the start of each pass
1212 # (when it syncs the dirty bitmap)
1214 # @pass: An incrementing count (starting at 1 on the first pass)
1220 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
1221 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
1224 { 'event': 'MIGRATION_PASS',
1225 'data': { 'pass': 'int' } }
1230 # The message transmission between Primary side and Secondary side.
1232 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1234 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1236 # @checkpoint-reply: SVM gets PVM's checkpoint request
1238 # @vmstate-send: VM's state will be sent by PVM.
1240 # @vmstate-size: The total size of VMstate.
1242 # @vmstate-received: VM's state has been received by SVM.
1244 # @vmstate-loaded: VM's state has been loaded by SVM.
1248 { 'enum': 'COLOMessage',
1249 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1250 'vmstate-send', 'vmstate-size', 'vmstate-received',
1251 'vmstate-loaded' ] }
1256 # The COLO current mode.
1258 # @none: COLO is disabled.
1260 # @primary: COLO node in primary side.
1262 # @secondary: COLO node in slave side.
1266 { 'enum': 'COLOMode',
1267 'data': [ 'none', 'primary', 'secondary'] }
1272 # An enumeration of COLO failover status
1274 # @none: no failover has ever happened
1276 # @require: got failover requirement but not handled
1278 # @active: in the process of doing failover
1280 # @completed: finish the process of failover
1282 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1286 { 'enum': 'FailoverStatus',
1287 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1292 # Emitted when VM finishes COLO mode due to some errors happening or
1293 # at the request of users.
1295 # @mode: report COLO mode when COLO exited.
1297 # @reason: describes the reason for the COLO exit.
1303 # <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
1304 # "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
1307 { 'event': 'COLO_EXIT',
1308 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1313 # The reason for a COLO exit.
1315 # @none: failover has never happened. This state does not occur
1316 # in the COLO_EXIT event, and is only visible in the result of
1317 # query-colo-status.
1319 # @request: COLO exit is due to an external request.
1321 # @error: COLO exit is due to an internal error.
1323 # @processing: COLO is currently handling a failover (since 4.0).
1327 { 'enum': 'COLOExitReason',
1328 'data': [ 'none', 'request', 'error' , 'processing' ] }
1331 # @x-colo-lost-heartbeat:
1333 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1334 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1335 # If sent to the Secondary, the Secondary side will run failover work,
1336 # then takes over server operation to become the service VM.
1342 # -> { "execute": "x-colo-lost-heartbeat" }
1343 # <- { "return": {} }
1346 { 'command': 'x-colo-lost-heartbeat' }
1351 # Cancel the current executing migration process.
1353 # Returns: nothing on success
1355 # Notes: This command succeeds even if there is no migration process running.
1361 # -> { "execute": "migrate_cancel" }
1362 # <- { "return": {} }
1365 { 'command': 'migrate_cancel' }
1368 # @migrate-continue:
1370 # Continue migration when it's in a paused state.
1372 # @state: The state the migration is currently expected to be in
1374 # Returns: nothing on success
1378 # -> { "execute": "migrate-continue" , "arguments":
1379 # { "state": "pre-switchover" } }
1380 # <- { "return": {} }
1382 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
1385 # @migrate_set_downtime:
1387 # Set maximum tolerated downtime for migration.
1389 # @value: maximum downtime in seconds
1392 # @deprecated: This command is deprecated. Use
1393 # 'migrate-set-parameters' instead.
1395 # Returns: nothing on success
1401 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
1402 # <- { "return": {} }
1405 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'},
1406 'features': [ 'deprecated' ] }
1409 # @migrate_set_speed:
1411 # Set maximum speed for migration.
1413 # @value: maximum speed in bytes per second.
1416 # @deprecated: This command is deprecated. Use
1417 # 'migrate-set-parameters' instead.
1419 # Returns: nothing on success
1425 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
1426 # <- { "return": {} }
1429 { 'command': 'migrate_set_speed', 'data': {'value': 'int'},
1430 'features': [ 'deprecated' ] }
1433 # @migrate-set-cache-size:
1435 # Set cache size to be used by XBZRLE migration
1437 # @value: cache size in bytes
1440 # @deprecated: This command is deprecated. Use
1441 # 'migrate-set-parameters' instead.
1443 # The size will be rounded down to the nearest power of 2.
1444 # The cache size can be modified before and during ongoing migration
1446 # Returns: nothing on success
1452 # -> { "execute": "migrate-set-cache-size",
1453 # "arguments": { "value": 536870912 } }
1454 # <- { "return": {} }
1457 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'},
1458 'features': [ 'deprecated' ] }
1461 # @query-migrate-cache-size:
1463 # Query migration XBZRLE cache size
1466 # @deprecated: This command is deprecated. Use
1467 # 'query-migrate-parameters' instead.
1469 # Returns: XBZRLE cache size in bytes
1475 # -> { "execute": "query-migrate-cache-size" }
1476 # <- { "return": 67108864 }
1479 { 'command': 'query-migrate-cache-size', 'returns': 'size',
1480 'features': [ 'deprecated' ] }
1485 # Migrates the current running guest to another Virtual Machine.
1487 # @uri: the Uniform Resource Identifier of the destination VM
1489 # @blk: do block migration (full disk copy)
1491 # @inc: incremental disk copy migration
1493 # @detach: this argument exists only for compatibility reasons and
1494 # is ignored by QEMU
1496 # @resume: resume one paused migration, default "off". (since 3.0)
1498 # Returns: nothing on success
1504 # 1. The 'query-migrate' command should be used to check migration's progress
1505 # and final result (this information is provided by the 'status' member)
1507 # 2. All boolean arguments default to false
1509 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1514 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1515 # <- { "return": {} }
1518 { 'command': 'migrate',
1519 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1520 '*detach': 'bool', '*resume': 'bool' } }
1523 # @migrate-incoming:
1525 # Start an incoming migration, the qemu must have been started
1526 # with -incoming defer
1528 # @uri: The Uniform Resource Identifier identifying the source or
1529 # address to listen on
1531 # Returns: nothing on success
1537 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1538 # compatible with -incoming and the format of the uri is already exposed
1541 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1544 # 3. The uri format is the same as for -incoming
1548 # -> { "execute": "migrate-incoming",
1549 # "arguments": { "uri": "tcp::4446" } }
1550 # <- { "return": {} }
1553 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1556 # @xen-save-devices-state:
1558 # Save the state of all devices to file. The RAM and the block devices
1559 # of the VM are not saved by this command.
1561 # @filename: the file to save the state of the devices to as binary
1562 # data. See xen-save-devices-state.txt for a description of the binary
1565 # @live: Optional argument to ask QEMU to treat this command as part of a live
1566 # migration. Default to true. (since 2.11)
1568 # Returns: Nothing on success
1574 # -> { "execute": "xen-save-devices-state",
1575 # "arguments": { "filename": "/tmp/save" } }
1576 # <- { "return": {} }
1579 { 'command': 'xen-save-devices-state',
1580 'data': {'filename': 'str', '*live':'bool' } }
1583 # @xen-set-global-dirty-log:
1585 # Enable or disable the global dirty log mode.
1587 # @enable: true to enable, false to disable.
1595 # -> { "execute": "xen-set-global-dirty-log",
1596 # "arguments": { "enable": true } }
1597 # <- { "return": {} }
1600 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1603 # @xen-load-devices-state:
1605 # Load the state of all devices from file. The RAM and the block devices
1606 # of the VM are not loaded by this command.
1608 # @filename: the file to load the state of the devices from as binary
1609 # data. See xen-save-devices-state.txt for a description of the binary
1616 # -> { "execute": "xen-load-devices-state",
1617 # "arguments": { "filename": "/tmp/resume" } }
1618 # <- { "return": {} }
1621 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
1624 # @xen-set-replication:
1626 # Enable or disable replication.
1628 # @enable: true to enable, false to disable.
1630 # @primary: true for primary or false for secondary.
1632 # @failover: true to do failover, false to stop. but cannot be
1633 # specified if 'enable' is true. default value is false.
1639 # -> { "execute": "xen-set-replication",
1640 # "arguments": {"enable": true, "primary": false} }
1641 # <- { "return": {} }
1645 { 'command': 'xen-set-replication',
1646 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' },
1647 'if': 'defined(CONFIG_REPLICATION)' }
1650 # @ReplicationStatus:
1652 # The result format for 'query-xen-replication-status'.
1654 # @error: true if an error happened, false if replication is normal.
1656 # @desc: the human readable error description string, when
1661 { 'struct': 'ReplicationStatus',
1662 'data': { 'error': 'bool', '*desc': 'str' },
1663 'if': 'defined(CONFIG_REPLICATION)' }
1666 # @query-xen-replication-status:
1668 # Query replication status while the vm is running.
1670 # Returns: A @ReplicationResult object showing the status.
1674 # -> { "execute": "query-xen-replication-status" }
1675 # <- { "return": { "error": false } }
1679 { 'command': 'query-xen-replication-status',
1680 'returns': 'ReplicationStatus',
1681 'if': 'defined(CONFIG_REPLICATION)' }
1684 # @xen-colo-do-checkpoint:
1686 # Xen uses this command to notify replication to trigger a checkpoint.
1692 # -> { "execute": "xen-colo-do-checkpoint" }
1693 # <- { "return": {} }
1697 { 'command': 'xen-colo-do-checkpoint',
1698 'if': 'defined(CONFIG_REPLICATION)' }
1703 # The result format for 'query-colo-status'.
1705 # @mode: COLO running mode. If COLO is running, this field will return
1706 # 'primary' or 'secondary'.
1708 # @last-mode: COLO last running mode. If COLO is running, this field
1709 # will return same like mode field, after failover we can
1710 # use this field to get last colo mode. (since 4.0)
1712 # @reason: describes the reason for the COLO exit.
1716 { 'struct': 'COLOStatus',
1717 'data': { 'mode': 'COLOMode', 'last-mode': 'COLOMode',
1718 'reason': 'COLOExitReason' } }
1721 # @query-colo-status:
1723 # Query COLO status while the vm is running.
1725 # Returns: A @COLOStatus object showing the status.
1729 # -> { "execute": "query-colo-status" }
1730 # <- { "return": { "mode": "primary", "reason": "request" } }
1734 { 'command': 'query-colo-status',
1735 'returns': 'COLOStatus' }
1740 # Provide a recovery migration stream URI.
1742 # @uri: the URI to be used for the recovery of migration stream.
1748 # -> { "execute": "migrate-recover",
1749 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1750 # <- { "return": {} }
1754 { 'command': 'migrate-recover',
1755 'data': { 'uri': 'str' },
1761 # Pause a migration. Currently it only supports postcopy.
1767 # -> { "execute": "migrate-pause" }
1768 # <- { "return": {} }
1772 { 'command': 'migrate-pause', 'allow-oob': true }
1777 # Emitted from source side of a migration when migration state is
1778 # WAIT_UNPLUG. Device was unplugged by guest operating system.
1779 # Device resources in QEMU are kept on standby to be able to re-plug it in case
1780 # of migration failure.
1782 # @device-id: QEMU device id of the unplugged device
1787 # {"event": "UNPLUG_PRIMARY", "data": {"device-id": "hostdev0"} }
1790 { 'event': 'UNPLUG_PRIMARY',
1791 'data': { 'device-id': 'str' } }
1796 # An enumeration of dirtyrate status.
1798 # @unstarted: the dirtyrate thread has not been started.
1800 # @measuring: the dirtyrate thread is measuring.
1802 # @measured: the dirtyrate thread has measured and results are available.
1807 { 'enum': 'DirtyRateStatus',
1808 'data': [ 'unstarted', 'measuring', 'measured'] }
1813 # Information about current dirty page rate of vm.
1815 # @dirty-rate: an estimate of the dirty page rate of the VM in units of
1816 # MB/s, present only when estimating the rate has completed.
1818 # @status: status containing dirtyrate query status includes
1819 # 'unstarted' or 'measuring' or 'measured'
1821 # @start-time: start time in units of second for calculation
1823 # @calc-time: time in units of second for sample dirty pages
1828 { 'struct': 'DirtyRateInfo',
1829 'data': {'*dirty-rate': 'int64',
1830 'status': 'DirtyRateStatus',
1831 'start-time': 'int64',
1832 'calc-time': 'int64'} }
1837 # start calculating dirty page rate for vm
1839 # @calc-time: time in units of second for sample dirty pages
1844 # {"command": "calc-dirty-rate", "data": {"calc-time": 1} }
1847 { 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64'} }
1850 # @query-dirty-rate:
1852 # query dirty page rate in units of MB/s for vm
1856 { 'command': 'query-dirty-rate', 'returns': 'DirtyRateInfo' }