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': 'int', '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)
229 { 'struct': 'MigrationInfo',
230 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
231 '*disk': 'MigrationStats',
232 '*vfio': 'VfioStats',
233 '*xbzrle-cache': 'XBZRLECacheStats',
234 '*total-time': 'int',
235 '*expected-downtime': 'int',
237 '*setup-time': 'int',
238 '*cpu-throttle-percentage': 'int',
239 '*error-desc': 'str',
240 '*postcopy-blocktime' : 'uint32',
241 '*postcopy-vcpu-blocktime': ['uint32'],
242 '*compression': 'CompressionStats',
243 '*socket-address': ['SocketAddress'] } }
248 # Returns information about current migration process. If migration
249 # is active there will be another json-object with RAM migration
250 # status and if block migration is active another one with block
253 # Returns: @MigrationInfo
259 # 1. Before the first migration
261 # -> { "execute": "query-migrate" }
262 # <- { "return": {} }
264 # 2. Migration is done and has succeeded
266 # -> { "execute": "query-migrate" }
268 # "status": "completed",
269 # "total-time":12345,
270 # "setup-time":12345,
278 # "normal-bytes":123456,
279 # "dirty-sync-count":15
284 # 3. Migration is done and has failed
286 # -> { "execute": "query-migrate" }
287 # <- { "return": { "status": "failed" } }
289 # 4. Migration is being performed and is not a block migration:
291 # -> { "execute": "query-migrate" }
295 # "total-time":12345,
296 # "setup-time":12345,
297 # "expected-downtime":12345,
304 # "normal-bytes":123456,
305 # "dirty-sync-count":15
310 # 5. Migration is being performed and is a block migration:
312 # -> { "execute": "query-migrate" }
316 # "total-time":12345,
317 # "setup-time":12345,
318 # "expected-downtime":12345,
321 # "remaining":1053304,
322 # "transferred":3720,
325 # "normal-bytes":123456,
326 # "dirty-sync-count":15
330 # "remaining":20880384,
331 # "transferred":91136
336 # 6. Migration is being performed and XBZRLE is active:
338 # -> { "execute": "query-migrate" }
342 # "total-time":12345,
343 # "setup-time":12345,
344 # "expected-downtime":12345,
347 # "remaining":1053304,
348 # "transferred":3720,
351 # "normal-bytes":3412992,
352 # "dirty-sync-count":15
355 # "cache-size":67108864,
359 # "cache-miss-rate":0.123,
360 # "encoding-rate":80.1,
367 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
370 # @MigrationCapability:
372 # Migration capabilities enumeration
374 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
375 # This feature allows us to minimize migration traffic for certain work
376 # loads, by sending compressed difference of the pages
378 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
379 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
380 # Disabled by default. (since 2.0)
382 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
383 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
384 # source and target VM to support this feature. To enable it is sufficient
385 # to enable the capability on the source VM. The feature is disabled by
386 # default. (since 1.6)
388 # @compress: Use multiple compression threads to accelerate live migration.
389 # This feature can help to reduce the migration traffic, by sending
390 # compressed pages. Please note that if compress and xbzrle are both
391 # on, compress only takes effect in the ram bulk stage, after that,
392 # it will be disabled and only xbzrle takes effect, this can help to
393 # minimize migration traffic. The feature is disabled by default.
396 # @events: generate events for each migration state change
399 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
400 # to speed up convergence of RAM migration. (since 1.6)
402 # @postcopy-ram: Start executing on the migration target before all of RAM has
403 # been migrated, pulling the remaining pages along as needed. The
404 # capacity must have the same setting on both source and target
405 # or migration will not even start. NOTE: If the migration fails during
406 # postcopy the VM will fail. (since 2.6)
408 # @x-colo: If enabled, migration will never end, and the state of the VM on the
409 # primary side will be migrated continuously to the VM on secondary
410 # side, this process is called COarse-Grain LOck Stepping (COLO) for
411 # Non-stop Service. (since 2.8)
413 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
414 # during postcopy-ram migration. (since 2.9)
416 # @block: If enabled, QEMU will also migrate the contents of all block
417 # devices. Default is disabled. A possible alternative uses
418 # mirror jobs to a builtin NBD server on the destination, which
419 # offers more flexibility.
422 # @return-path: If enabled, migration will use the return path even
423 # for precopy. (since 2.10)
425 # @pause-before-switchover: Pause outgoing migration before serialising device
426 # state and before disabling block IO (since 2.11)
428 # @multifd: Use more than one fd for migration (since 4.0)
430 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
433 # @postcopy-blocktime: Calculate downtime for postcopy live migration
436 # @late-block-activate: If enabled, the destination will not activate block
437 # devices (and thus take locks) immediately at the end of migration.
440 # @x-ignore-shared: If enabled, QEMU will not migrate shared memory (since 4.0)
442 # @validate-uuid: Send the UUID of the source to allow the destination
443 # to ensure it is the same. (since 4.2)
447 { 'enum': 'MigrationCapability',
448 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
449 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
450 'block', 'return-path', 'pause-before-switchover', 'multifd',
451 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
452 'x-ignore-shared', 'validate-uuid' ] }
455 # @MigrationCapabilityStatus:
457 # Migration capability information
459 # @capability: capability enum
461 # @state: capability state bool
465 { 'struct': 'MigrationCapabilityStatus',
466 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
469 # @migrate-set-capabilities:
471 # Enable/Disable the following migration capabilities (like xbzrle)
473 # @capabilities: json array of capability modifications to make
479 # -> { "execute": "migrate-set-capabilities" , "arguments":
480 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
483 { 'command': 'migrate-set-capabilities',
484 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
487 # @query-migrate-capabilities:
489 # Returns information about the current migration capabilities status
491 # Returns: @MigrationCapabilitiesStatus
497 # -> { "execute": "query-migrate-capabilities" }
499 # {"state": false, "capability": "xbzrle"},
500 # {"state": false, "capability": "rdma-pin-all"},
501 # {"state": false, "capability": "auto-converge"},
502 # {"state": false, "capability": "zero-blocks"},
503 # {"state": false, "capability": "compress"},
504 # {"state": true, "capability": "events"},
505 # {"state": false, "capability": "postcopy-ram"},
506 # {"state": false, "capability": "x-colo"}
510 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
513 # @MultiFDCompression:
515 # An enumeration of multifd compression methods.
517 # @none: no compression.
518 # @zlib: use zlib compression method.
519 # @zstd: use zstd compression method.
524 { 'enum': 'MultiFDCompression',
525 'data': [ 'none', 'zlib',
526 { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] }
529 # @BitmapMigrationBitmapAlias:
531 # @name: The name of the bitmap.
533 # @alias: An alias name for migration (for example the bitmap name on
534 # the opposite site).
538 { 'struct': 'BitmapMigrationBitmapAlias',
545 # @BitmapMigrationNodeAlias:
547 # Maps a block node name and the bitmaps it has to aliases for dirty
550 # @node-name: A block node name.
552 # @alias: An alias block node name for migration (for example the
553 # node name on the opposite site).
555 # @bitmaps: Mappings for the bitmaps on this node.
559 { 'struct': 'BitmapMigrationNodeAlias',
563 'bitmaps': [ 'BitmapMigrationBitmapAlias' ]
567 # @MigrationParameter:
569 # Migration parameters enumeration
571 # @announce-initial: Initial delay (in milliseconds) before sending the first
572 # announce (Since 4.0)
574 # @announce-max: Maximum delay (in milliseconds) between packets in the
575 # announcement (Since 4.0)
577 # @announce-rounds: Number of self-announce packets sent after migration
580 # @announce-step: Increase in delay (in milliseconds) between subsequent
581 # packets in the announcement (Since 4.0)
583 # @compress-level: Set the compression level to be used in live migration,
584 # the compression level is an integer between 0 and 9, where 0 means
585 # no compression, 1 means the best compression speed, and 9 means best
586 # compression ratio which will consume more CPU.
588 # @compress-threads: Set compression thread count to be used in live migration,
589 # the compression thread count is an integer between 1 and 255.
591 # @compress-wait-thread: Controls behavior when all compression threads are
592 # currently busy. If true (default), wait for a free
593 # compression thread to become available; otherwise,
594 # send the page uncompressed. (Since 3.1)
596 # @decompress-threads: Set decompression thread count to be used in live
597 # migration, the decompression thread count is an integer between 1
598 # and 255. Usually, decompression is at least 4 times as fast as
599 # compression, so set the decompress-threads to the number about 1/4
600 # of compress-threads is adequate.
602 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
603 # to trigger throttling. It is expressed as percentage.
604 # The default value is 50. (Since 5.0)
606 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
607 # when migration auto-converge is activated. The
608 # default value is 20. (Since 2.7)
610 # @cpu-throttle-increment: throttle percentage increase each time
611 # auto-converge detects that migration is not making
612 # progress. The default value is 10. (Since 2.7)
614 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
615 # At the tail stage of throttling, the Guest is very
616 # sensitive to CPU percentage while the @cpu-throttle
617 # -increment is excessive usually at tail stage.
618 # If this parameter is true, we will compute the ideal
619 # CPU percentage used by the Guest, which may exactly make
620 # the dirty rate match the dirty rate threshold. Then we
621 # will choose a smaller throttle increment between the
622 # one specified by @cpu-throttle-increment and the one
623 # generated by ideal CPU percentage.
624 # Therefore, it is compatible to traditional throttling,
625 # meanwhile the throttle increment won't be excessive
627 # The default value is false. (Since 5.1)
629 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
630 # establishing a TLS connection over the migration data channel.
631 # On the outgoing side of the migration, the credentials must
632 # be for a 'client' endpoint, while for the incoming side the
633 # credentials must be for a 'server' endpoint. Setting this
634 # will enable TLS for all migrations. The default is unset,
635 # resulting in unsecured migration at the QEMU level. (Since 2.7)
637 # @tls-hostname: hostname of the target host for the migration. This is
638 # required when using x509 based TLS credentials and the
639 # migration URI does not already include a hostname. For
640 # example if using fd: or exec: based migration, the
641 # hostname must be provided so that the server's x509
642 # certificate identity can be validated. (Since 2.7)
644 # @tls-authz: ID of the 'authz' object subclass that provides access control
645 # checking of the TLS x509 certificate distinguished name.
646 # This object is only resolved at time of use, so can be deleted
647 # and recreated on the fly while the migration server is active.
648 # If missing, it will default to denying access (Since 4.0)
650 # @max-bandwidth: to set maximum speed for migration. maximum speed in
651 # bytes per second. (Since 2.8)
653 # @downtime-limit: set maximum tolerated downtime for migration. maximum
654 # downtime in milliseconds (Since 2.8)
656 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
657 # periodic mode. (Since 2.8)
659 # @block-incremental: Affects how much storage is migrated when the
660 # block migration capability is enabled. When false, the entire
661 # storage backing chain is migrated into a flattened image at
662 # the destination; when true, only the active qcow2 layer is
663 # migrated and the destination must already have access to the
664 # same backing chain as was used on the source. (since 2.10)
666 # @multifd-channels: Number of channels used to migrate data in
667 # parallel. This is the same number that the
668 # number of sockets used for migration. The
669 # default value is 2 (since 4.0)
671 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
672 # needs to be a multiple of the target page size
676 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
677 # Defaults to 0 (unlimited). In bytes per second.
680 # @max-cpu-throttle: maximum cpu throttle percentage.
681 # Defaults to 99. (Since 3.1)
683 # @multifd-compression: Which compression method to use.
684 # Defaults to none. (Since 5.0)
686 # @multifd-zlib-level: Set the compression level to be used in live
687 # migration, the compression level is an integer between 0
688 # and 9, where 0 means no compression, 1 means the best
689 # compression speed, and 9 means best compression ratio which
690 # will consume more CPU.
691 # Defaults to 1. (Since 5.0)
693 # @multifd-zstd-level: Set the compression level to be used in live
694 # migration, the compression level is an integer between 0
695 # and 20, where 0 means no compression, 1 means the best
696 # compression speed, and 20 means best compression ratio which
697 # will consume more CPU.
698 # Defaults to 1. (Since 5.0)
700 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
701 # aliases for the purpose of dirty bitmap migration. Such
702 # aliases may for example be the corresponding names on the
704 # The mapping must be one-to-one, but not necessarily
705 # complete: On the source, unmapped bitmaps and all bitmaps
706 # on unmapped nodes will be ignored. On the destination,
707 # encountering an unmapped alias in the incoming migration
708 # stream will result in a report, and all further bitmap
709 # migration data will then be discarded.
710 # Note that the destination does not know about bitmaps it
711 # does not receive, so there is no limitation or requirement
712 # regarding the number of bitmaps received, or how they are
713 # named, or on which nodes they are placed.
714 # By default (when this parameter has never been set), bitmap
715 # names are mapped to themselves. Nodes are mapped to their
716 # block device name if there is one, and to their node name
717 # otherwise. (Since 5.2)
721 { 'enum': 'MigrationParameter',
722 'data': ['announce-initial', 'announce-max',
723 'announce-rounds', 'announce-step',
724 'compress-level', 'compress-threads', 'decompress-threads',
725 'compress-wait-thread', 'throttle-trigger-threshold',
726 'cpu-throttle-initial', 'cpu-throttle-increment',
727 'cpu-throttle-tailslow',
728 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
729 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
731 'xbzrle-cache-size', 'max-postcopy-bandwidth',
732 'max-cpu-throttle', 'multifd-compression',
733 'multifd-zlib-level' ,'multifd-zstd-level',
734 'block-bitmap-mapping' ] }
737 # @MigrateSetParameters:
739 # @announce-initial: Initial delay (in milliseconds) before sending the first
740 # announce (Since 4.0)
742 # @announce-max: Maximum delay (in milliseconds) between packets in the
743 # announcement (Since 4.0)
745 # @announce-rounds: Number of self-announce packets sent after migration
748 # @announce-step: Increase in delay (in milliseconds) between subsequent
749 # packets in the announcement (Since 4.0)
751 # @compress-level: compression level
753 # @compress-threads: compression thread count
755 # @compress-wait-thread: Controls behavior when all compression threads are
756 # currently busy. If true (default), wait for a free
757 # compression thread to become available; otherwise,
758 # send the page uncompressed. (Since 3.1)
760 # @decompress-threads: decompression thread count
762 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
763 # to trigger throttling. It is expressed as percentage.
764 # The default value is 50. (Since 5.0)
766 # @cpu-throttle-initial: Initial percentage of time guest cpus are
767 # throttled when migration auto-converge is activated.
768 # The default value is 20. (Since 2.7)
770 # @cpu-throttle-increment: throttle percentage increase each time
771 # auto-converge detects that migration is not making
772 # progress. The default value is 10. (Since 2.7)
774 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
775 # At the tail stage of throttling, the Guest is very
776 # sensitive to CPU percentage while the @cpu-throttle
777 # -increment is excessive usually at tail stage.
778 # If this parameter is true, we will compute the ideal
779 # CPU percentage used by the Guest, which may exactly make
780 # the dirty rate match the dirty rate threshold. Then we
781 # will choose a smaller throttle increment between the
782 # one specified by @cpu-throttle-increment and the one
783 # generated by ideal CPU percentage.
784 # Therefore, it is compatible to traditional throttling,
785 # meanwhile the throttle increment won't be excessive
787 # The default value is false. (Since 5.1)
789 # @tls-creds: ID of the 'tls-creds' object that provides credentials
790 # for establishing a TLS connection over the migration data
791 # channel. On the outgoing side of the migration, the credentials
792 # must be for a 'client' endpoint, while for the incoming side the
793 # credentials must be for a 'server' endpoint. Setting this
794 # to a non-empty string enables TLS for all migrations.
795 # An empty string means that QEMU will use plain text mode for
796 # migration, rather than TLS (Since 2.9)
797 # Previously (since 2.7), this was reported by omitting
800 # @tls-hostname: hostname of the target host for the migration. This
801 # is required when using x509 based TLS credentials and the
802 # migration URI does not already include a hostname. For
803 # example if using fd: or exec: based migration, the
804 # hostname must be provided so that the server's x509
805 # certificate identity can be validated. (Since 2.7)
806 # An empty string means that QEMU will use the hostname
807 # associated with the migration URI, if any. (Since 2.9)
808 # Previously (since 2.7), this was reported by omitting
809 # tls-hostname instead.
811 # @max-bandwidth: to set maximum speed for migration. maximum speed in
812 # bytes per second. (Since 2.8)
814 # @downtime-limit: set maximum tolerated downtime for migration. maximum
815 # downtime in milliseconds (Since 2.8)
817 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
819 # @block-incremental: Affects how much storage is migrated when the
820 # block migration capability is enabled. When false, the entire
821 # storage backing chain is migrated into a flattened image at
822 # the destination; when true, only the active qcow2 layer is
823 # migrated and the destination must already have access to the
824 # same backing chain as was used on the source. (since 2.10)
826 # @multifd-channels: Number of channels used to migrate data in
827 # parallel. This is the same number that the
828 # number of sockets used for migration. The
829 # default value is 2 (since 4.0)
831 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
832 # needs to be a multiple of the target page size
836 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
837 # Defaults to 0 (unlimited). In bytes per second.
840 # @max-cpu-throttle: maximum cpu throttle percentage.
841 # The default value is 99. (Since 3.1)
843 # @multifd-compression: Which compression method to use.
844 # Defaults to none. (Since 5.0)
846 # @multifd-zlib-level: Set the compression level to be used in live
847 # migration, the compression level is an integer between 0
848 # and 9, where 0 means no compression, 1 means the best
849 # compression speed, and 9 means best compression ratio which
850 # will consume more CPU.
851 # Defaults to 1. (Since 5.0)
853 # @multifd-zstd-level: Set the compression level to be used in live
854 # migration, the compression level is an integer between 0
855 # and 20, where 0 means no compression, 1 means the best
856 # compression speed, and 20 means best compression ratio which
857 # will consume more CPU.
858 # Defaults to 1. (Since 5.0)
860 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
861 # aliases for the purpose of dirty bitmap migration. Such
862 # aliases may for example be the corresponding names on the
864 # The mapping must be one-to-one, but not necessarily
865 # complete: On the source, unmapped bitmaps and all bitmaps
866 # on unmapped nodes will be ignored. On the destination,
867 # encountering an unmapped alias in the incoming migration
868 # stream will result in a report, and all further bitmap
869 # migration data will then be discarded.
870 # Note that the destination does not know about bitmaps it
871 # does not receive, so there is no limitation or requirement
872 # regarding the number of bitmaps received, or how they are
873 # named, or on which nodes they are placed.
874 # By default (when this parameter has never been set), bitmap
875 # names are mapped to themselves. Nodes are mapped to their
876 # block device name if there is one, and to their node name
877 # otherwise. (Since 5.2)
881 # TODO either fuse back into MigrationParameters, or make
882 # MigrationParameters members mandatory
883 { 'struct': 'MigrateSetParameters',
884 'data': { '*announce-initial': 'size',
885 '*announce-max': 'size',
886 '*announce-rounds': 'size',
887 '*announce-step': 'size',
888 '*compress-level': 'int',
889 '*compress-threads': 'int',
890 '*compress-wait-thread': 'bool',
891 '*decompress-threads': 'int',
892 '*throttle-trigger-threshold': 'int',
893 '*cpu-throttle-initial': 'int',
894 '*cpu-throttle-increment': 'int',
895 '*cpu-throttle-tailslow': 'bool',
896 '*tls-creds': 'StrOrNull',
897 '*tls-hostname': 'StrOrNull',
898 '*tls-authz': 'StrOrNull',
899 '*max-bandwidth': 'int',
900 '*downtime-limit': 'int',
901 '*x-checkpoint-delay': 'int',
902 '*block-incremental': 'bool',
903 '*multifd-channels': 'int',
904 '*xbzrle-cache-size': 'size',
905 '*max-postcopy-bandwidth': 'size',
906 '*max-cpu-throttle': 'int',
907 '*multifd-compression': 'MultiFDCompression',
908 '*multifd-zlib-level': 'int',
909 '*multifd-zstd-level': 'int',
910 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ] } }
913 # @migrate-set-parameters:
915 # Set various migration parameters.
921 # -> { "execute": "migrate-set-parameters" ,
922 # "arguments": { "compress-level": 1 } }
925 { 'command': 'migrate-set-parameters', 'boxed': true,
926 'data': 'MigrateSetParameters' }
929 # @MigrationParameters:
931 # The optional members aren't actually optional.
933 # @announce-initial: Initial delay (in milliseconds) before sending the
934 # first announce (Since 4.0)
936 # @announce-max: Maximum delay (in milliseconds) between packets in the
937 # announcement (Since 4.0)
939 # @announce-rounds: Number of self-announce packets sent after migration
942 # @announce-step: Increase in delay (in milliseconds) between subsequent
943 # packets in the announcement (Since 4.0)
945 # @compress-level: compression level
947 # @compress-threads: compression thread count
949 # @compress-wait-thread: Controls behavior when all compression threads are
950 # currently busy. If true (default), wait for a free
951 # compression thread to become available; otherwise,
952 # send the page uncompressed. (Since 3.1)
954 # @decompress-threads: decompression thread count
956 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
957 # to trigger throttling. It is expressed as percentage.
958 # The default value is 50. (Since 5.0)
960 # @cpu-throttle-initial: Initial percentage of time guest cpus are
961 # throttled when migration auto-converge is activated.
964 # @cpu-throttle-increment: throttle percentage increase each time
965 # auto-converge detects that migration is not making
966 # progress. (Since 2.7)
968 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
969 # At the tail stage of throttling, the Guest is very
970 # sensitive to CPU percentage while the @cpu-throttle
971 # -increment is excessive usually at tail stage.
972 # If this parameter is true, we will compute the ideal
973 # CPU percentage used by the Guest, which may exactly make
974 # the dirty rate match the dirty rate threshold. Then we
975 # will choose a smaller throttle increment between the
976 # one specified by @cpu-throttle-increment and the one
977 # generated by ideal CPU percentage.
978 # Therefore, it is compatible to traditional throttling,
979 # meanwhile the throttle increment won't be excessive
981 # The default value is false. (Since 5.1)
983 # @tls-creds: ID of the 'tls-creds' object that provides credentials
984 # for establishing a TLS connection over the migration data
985 # channel. On the outgoing side of the migration, the credentials
986 # must be for a 'client' endpoint, while for the incoming side the
987 # credentials must be for a 'server' endpoint.
988 # An empty string means that QEMU will use plain text mode for
989 # migration, rather than TLS (Since 2.7)
990 # Note: 2.8 reports this by omitting tls-creds instead.
992 # @tls-hostname: hostname of the target host for the migration. This
993 # is required when using x509 based TLS credentials and the
994 # migration URI does not already include a hostname. For
995 # example if using fd: or exec: based migration, the
996 # hostname must be provided so that the server's x509
997 # certificate identity can be validated. (Since 2.7)
998 # An empty string means that QEMU will use the hostname
999 # associated with the migration URI, if any. (Since 2.9)
1000 # Note: 2.8 reports this by omitting tls-hostname instead.
1002 # @tls-authz: ID of the 'authz' object subclass that provides access control
1003 # checking of the TLS x509 certificate distinguished name. (Since
1006 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1007 # bytes per second. (Since 2.8)
1009 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1010 # downtime in milliseconds (Since 2.8)
1012 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1014 # @block-incremental: Affects how much storage is migrated when the
1015 # block migration capability is enabled. When false, the entire
1016 # storage backing chain is migrated into a flattened image at
1017 # the destination; when true, only the active qcow2 layer is
1018 # migrated and the destination must already have access to the
1019 # same backing chain as was used on the source. (since 2.10)
1021 # @multifd-channels: Number of channels used to migrate data in
1022 # parallel. This is the same number that the
1023 # number of sockets used for migration.
1024 # The default value is 2 (since 4.0)
1026 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
1027 # needs to be a multiple of the target page size
1031 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
1032 # Defaults to 0 (unlimited). In bytes per second.
1035 # @max-cpu-throttle: maximum cpu throttle percentage.
1039 # @multifd-compression: Which compression method to use.
1040 # Defaults to none. (Since 5.0)
1042 # @multifd-zlib-level: Set the compression level to be used in live
1043 # migration, the compression level is an integer between 0
1044 # and 9, where 0 means no compression, 1 means the best
1045 # compression speed, and 9 means best compression ratio which
1046 # will consume more CPU.
1047 # Defaults to 1. (Since 5.0)
1049 # @multifd-zstd-level: Set the compression level to be used in live
1050 # migration, the compression level is an integer between 0
1051 # and 20, where 0 means no compression, 1 means the best
1052 # compression speed, and 20 means best compression ratio which
1053 # will consume more CPU.
1054 # Defaults to 1. (Since 5.0)
1056 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
1057 # aliases for the purpose of dirty bitmap migration. Such
1058 # aliases may for example be the corresponding names on the
1060 # The mapping must be one-to-one, but not necessarily
1061 # complete: On the source, unmapped bitmaps and all bitmaps
1062 # on unmapped nodes will be ignored. On the destination,
1063 # encountering an unmapped alias in the incoming migration
1064 # stream will result in a report, and all further bitmap
1065 # migration data will then be discarded.
1066 # Note that the destination does not know about bitmaps it
1067 # does not receive, so there is no limitation or requirement
1068 # regarding the number of bitmaps received, or how they are
1069 # named, or on which nodes they are placed.
1070 # By default (when this parameter has never been set), bitmap
1071 # names are mapped to themselves. Nodes are mapped to their
1072 # block device name if there is one, and to their node name
1073 # otherwise. (Since 5.2)
1077 { 'struct': 'MigrationParameters',
1078 'data': { '*announce-initial': 'size',
1079 '*announce-max': 'size',
1080 '*announce-rounds': 'size',
1081 '*announce-step': 'size',
1082 '*compress-level': 'uint8',
1083 '*compress-threads': 'uint8',
1084 '*compress-wait-thread': 'bool',
1085 '*decompress-threads': 'uint8',
1086 '*throttle-trigger-threshold': 'uint8',
1087 '*cpu-throttle-initial': 'uint8',
1088 '*cpu-throttle-increment': 'uint8',
1089 '*cpu-throttle-tailslow': 'bool',
1090 '*tls-creds': 'str',
1091 '*tls-hostname': 'str',
1092 '*tls-authz': 'str',
1093 '*max-bandwidth': 'size',
1094 '*downtime-limit': 'uint64',
1095 '*x-checkpoint-delay': 'uint32',
1096 '*block-incremental': 'bool' ,
1097 '*multifd-channels': 'uint8',
1098 '*xbzrle-cache-size': 'size',
1099 '*max-postcopy-bandwidth': 'size',
1100 '*max-cpu-throttle': 'uint8',
1101 '*multifd-compression': 'MultiFDCompression',
1102 '*multifd-zlib-level': 'uint8',
1103 '*multifd-zstd-level': 'uint8',
1104 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ] } }
1107 # @query-migrate-parameters:
1109 # Returns information about the current migration parameters
1111 # Returns: @MigrationParameters
1117 # -> { "execute": "query-migrate-parameters" }
1119 # "decompress-threads": 2,
1120 # "cpu-throttle-increment": 10,
1121 # "compress-threads": 8,
1122 # "compress-level": 1,
1123 # "cpu-throttle-initial": 20,
1124 # "max-bandwidth": 33554432,
1125 # "downtime-limit": 300
1130 { 'command': 'query-migrate-parameters',
1131 'returns': 'MigrationParameters' }
1134 # @client_migrate_info:
1136 # Set migration information for remote display. This makes the server
1137 # ask the client to automatically reconnect using the new parameters
1138 # once migration finished successfully. Only implemented for SPICE.
1140 # @protocol: must be "spice"
1141 # @hostname: migration target hostname
1142 # @port: spice tcp port for plaintext channels
1143 # @tls-port: spice tcp port for tls-secured channels
1144 # @cert-subject: server certificate subject
1150 # -> { "execute": "client_migrate_info",
1151 # "arguments": { "protocol": "spice",
1152 # "hostname": "virt42.lab.kraxel.org",
1154 # <- { "return": {} }
1157 { 'command': 'client_migrate_info',
1158 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1159 '*tls-port': 'int', '*cert-subject': 'str' } }
1162 # @migrate-start-postcopy:
1164 # Followup to a migration command to switch the migration to postcopy mode.
1165 # The postcopy-ram capability must be set on both source and destination
1166 # before the original migration command.
1172 # -> { "execute": "migrate-start-postcopy" }
1173 # <- { "return": {} }
1176 { 'command': 'migrate-start-postcopy' }
1181 # Emitted when a migration event happens
1183 # @status: @MigrationStatus describing the current migration status.
1189 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
1190 # "event": "MIGRATION",
1191 # "data": {"status": "completed"} }
1194 { 'event': 'MIGRATION',
1195 'data': {'status': 'MigrationStatus'}}
1200 # Emitted from the source side of a migration at the start of each pass
1201 # (when it syncs the dirty bitmap)
1203 # @pass: An incrementing count (starting at 1 on the first pass)
1209 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
1210 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
1213 { 'event': 'MIGRATION_PASS',
1214 'data': { 'pass': 'int' } }
1219 # The message transmission between Primary side and Secondary side.
1221 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1223 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1225 # @checkpoint-reply: SVM gets PVM's checkpoint request
1227 # @vmstate-send: VM's state will be sent by PVM.
1229 # @vmstate-size: The total size of VMstate.
1231 # @vmstate-received: VM's state has been received by SVM.
1233 # @vmstate-loaded: VM's state has been loaded by SVM.
1237 { 'enum': 'COLOMessage',
1238 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1239 'vmstate-send', 'vmstate-size', 'vmstate-received',
1240 'vmstate-loaded' ] }
1245 # The COLO current mode.
1247 # @none: COLO is disabled.
1249 # @primary: COLO node in primary side.
1251 # @secondary: COLO node in slave side.
1255 { 'enum': 'COLOMode',
1256 'data': [ 'none', 'primary', 'secondary'] }
1261 # An enumeration of COLO failover status
1263 # @none: no failover has ever happened
1265 # @require: got failover requirement but not handled
1267 # @active: in the process of doing failover
1269 # @completed: finish the process of failover
1271 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1275 { 'enum': 'FailoverStatus',
1276 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1281 # Emitted when VM finishes COLO mode due to some errors happening or
1282 # at the request of users.
1284 # @mode: report COLO mode when COLO exited.
1286 # @reason: describes the reason for the COLO exit.
1292 # <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
1293 # "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
1296 { 'event': 'COLO_EXIT',
1297 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1302 # The reason for a COLO exit.
1304 # @none: failover has never happened. This state does not occur
1305 # in the COLO_EXIT event, and is only visible in the result of
1306 # query-colo-status.
1308 # @request: COLO exit is due to an external request.
1310 # @error: COLO exit is due to an internal error.
1312 # @processing: COLO is currently handling a failover (since 4.0).
1316 { 'enum': 'COLOExitReason',
1317 'data': [ 'none', 'request', 'error' , 'processing' ] }
1320 # @x-colo-lost-heartbeat:
1322 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1323 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1324 # If sent to the Secondary, the Secondary side will run failover work,
1325 # then takes over server operation to become the service VM.
1331 # -> { "execute": "x-colo-lost-heartbeat" }
1332 # <- { "return": {} }
1335 { 'command': 'x-colo-lost-heartbeat' }
1340 # Cancel the current executing migration process.
1342 # Returns: nothing on success
1344 # Notes: This command succeeds even if there is no migration process running.
1350 # -> { "execute": "migrate_cancel" }
1351 # <- { "return": {} }
1354 { 'command': 'migrate_cancel' }
1357 # @migrate-continue:
1359 # Continue migration when it's in a paused state.
1361 # @state: The state the migration is currently expected to be in
1363 # Returns: nothing on success
1367 # -> { "execute": "migrate-continue" , "arguments":
1368 # { "state": "pre-switchover" } }
1369 # <- { "return": {} }
1371 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
1374 # @migrate_set_downtime:
1376 # Set maximum tolerated downtime for migration.
1378 # @value: maximum downtime in seconds
1381 # @deprecated: This command is deprecated. Use
1382 # 'migrate-set-parameters' instead.
1384 # Returns: nothing on success
1390 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
1391 # <- { "return": {} }
1394 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'},
1395 'features': [ 'deprecated' ] }
1398 # @migrate_set_speed:
1400 # Set maximum speed for migration.
1402 # @value: maximum speed in bytes per second.
1405 # @deprecated: This command is deprecated. Use
1406 # 'migrate-set-parameters' instead.
1408 # Returns: nothing on success
1414 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
1415 # <- { "return": {} }
1418 { 'command': 'migrate_set_speed', 'data': {'value': 'int'},
1419 'features': [ 'deprecated' ] }
1422 # @migrate-set-cache-size:
1424 # Set cache size to be used by XBZRLE migration
1426 # @value: cache size in bytes
1429 # @deprecated: This command is deprecated. Use
1430 # 'migrate-set-parameters' instead.
1432 # The size will be rounded down to the nearest power of 2.
1433 # The cache size can be modified before and during ongoing migration
1435 # Returns: nothing on success
1441 # -> { "execute": "migrate-set-cache-size",
1442 # "arguments": { "value": 536870912 } }
1443 # <- { "return": {} }
1446 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'},
1447 'features': [ 'deprecated' ] }
1450 # @query-migrate-cache-size:
1452 # Query migration XBZRLE cache size
1455 # @deprecated: This command is deprecated. Use
1456 # 'query-migrate-parameters' instead.
1458 # Returns: XBZRLE cache size in bytes
1464 # -> { "execute": "query-migrate-cache-size" }
1465 # <- { "return": 67108864 }
1468 { 'command': 'query-migrate-cache-size', 'returns': 'int',
1469 'features': [ 'deprecated' ] }
1474 # Migrates the current running guest to another Virtual Machine.
1476 # @uri: the Uniform Resource Identifier of the destination VM
1478 # @blk: do block migration (full disk copy)
1480 # @inc: incremental disk copy migration
1482 # @detach: this argument exists only for compatibility reasons and
1483 # is ignored by QEMU
1485 # @resume: resume one paused migration, default "off". (since 3.0)
1487 # Returns: nothing on success
1493 # 1. The 'query-migrate' command should be used to check migration's progress
1494 # and final result (this information is provided by the 'status' member)
1496 # 2. All boolean arguments default to false
1498 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1503 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1504 # <- { "return": {} }
1507 { 'command': 'migrate',
1508 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1509 '*detach': 'bool', '*resume': 'bool' } }
1512 # @migrate-incoming:
1514 # Start an incoming migration, the qemu must have been started
1515 # with -incoming defer
1517 # @uri: The Uniform Resource Identifier identifying the source or
1518 # address to listen on
1520 # Returns: nothing on success
1526 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1527 # compatible with -incoming and the format of the uri is already exposed
1530 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1533 # 3. The uri format is the same as for -incoming
1537 # -> { "execute": "migrate-incoming",
1538 # "arguments": { "uri": "tcp::4446" } }
1539 # <- { "return": {} }
1542 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1545 # @xen-save-devices-state:
1547 # Save the state of all devices to file. The RAM and the block devices
1548 # of the VM are not saved by this command.
1550 # @filename: the file to save the state of the devices to as binary
1551 # data. See xen-save-devices-state.txt for a description of the binary
1554 # @live: Optional argument to ask QEMU to treat this command as part of a live
1555 # migration. Default to true. (since 2.11)
1557 # Returns: Nothing on success
1563 # -> { "execute": "xen-save-devices-state",
1564 # "arguments": { "filename": "/tmp/save" } }
1565 # <- { "return": {} }
1568 { 'command': 'xen-save-devices-state',
1569 'data': {'filename': 'str', '*live':'bool' } }
1572 # @xen-set-global-dirty-log:
1574 # Enable or disable the global dirty log mode.
1576 # @enable: true to enable, false to disable.
1584 # -> { "execute": "xen-set-global-dirty-log",
1585 # "arguments": { "enable": true } }
1586 # <- { "return": {} }
1589 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1592 # @xen-load-devices-state:
1594 # Load the state of all devices from file. The RAM and the block devices
1595 # of the VM are not loaded by this command.
1597 # @filename: the file to load the state of the devices from as binary
1598 # data. See xen-save-devices-state.txt for a description of the binary
1605 # -> { "execute": "xen-load-devices-state",
1606 # "arguments": { "filename": "/tmp/resume" } }
1607 # <- { "return": {} }
1610 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
1613 # @xen-set-replication:
1615 # Enable or disable replication.
1617 # @enable: true to enable, false to disable.
1619 # @primary: true for primary or false for secondary.
1621 # @failover: true to do failover, false to stop. but cannot be
1622 # specified if 'enable' is true. default value is false.
1628 # -> { "execute": "xen-set-replication",
1629 # "arguments": {"enable": true, "primary": false} }
1630 # <- { "return": {} }
1634 { 'command': 'xen-set-replication',
1635 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' },
1636 'if': 'defined(CONFIG_REPLICATION)' }
1639 # @ReplicationStatus:
1641 # The result format for 'query-xen-replication-status'.
1643 # @error: true if an error happened, false if replication is normal.
1645 # @desc: the human readable error description string, when
1650 { 'struct': 'ReplicationStatus',
1651 'data': { 'error': 'bool', '*desc': 'str' },
1652 'if': 'defined(CONFIG_REPLICATION)' }
1655 # @query-xen-replication-status:
1657 # Query replication status while the vm is running.
1659 # Returns: A @ReplicationResult object showing the status.
1663 # -> { "execute": "query-xen-replication-status" }
1664 # <- { "return": { "error": false } }
1668 { 'command': 'query-xen-replication-status',
1669 'returns': 'ReplicationStatus',
1670 'if': 'defined(CONFIG_REPLICATION)' }
1673 # @xen-colo-do-checkpoint:
1675 # Xen uses this command to notify replication to trigger a checkpoint.
1681 # -> { "execute": "xen-colo-do-checkpoint" }
1682 # <- { "return": {} }
1686 { 'command': 'xen-colo-do-checkpoint',
1687 'if': 'defined(CONFIG_REPLICATION)' }
1692 # The result format for 'query-colo-status'.
1694 # @mode: COLO running mode. If COLO is running, this field will return
1695 # 'primary' or 'secondary'.
1697 # @last-mode: COLO last running mode. If COLO is running, this field
1698 # will return same like mode field, after failover we can
1699 # use this field to get last colo mode. (since 4.0)
1701 # @reason: describes the reason for the COLO exit.
1705 { 'struct': 'COLOStatus',
1706 'data': { 'mode': 'COLOMode', 'last-mode': 'COLOMode',
1707 'reason': 'COLOExitReason' } }
1710 # @query-colo-status:
1712 # Query COLO status while the vm is running.
1714 # Returns: A @COLOStatus object showing the status.
1718 # -> { "execute": "query-colo-status" }
1719 # <- { "return": { "mode": "primary", "reason": "request" } }
1723 { 'command': 'query-colo-status',
1724 'returns': 'COLOStatus' }
1729 # Provide a recovery migration stream URI.
1731 # @uri: the URI to be used for the recovery of migration stream.
1737 # -> { "execute": "migrate-recover",
1738 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1739 # <- { "return": {} }
1743 { 'command': 'migrate-recover',
1744 'data': { 'uri': 'str' },
1750 # Pause a migration. Currently it only supports postcopy.
1756 # -> { "execute": "migrate-pause" }
1757 # <- { "return": {} }
1761 { 'command': 'migrate-pause', 'allow-oob': true }
1766 # Emitted from source side of a migration when migration state is
1767 # WAIT_UNPLUG. Device was unplugged by guest operating system.
1768 # Device resources in QEMU are kept on standby to be able to re-plug it in case
1769 # of migration failure.
1771 # @device-id: QEMU device id of the unplugged device
1776 # {"event": "UNPLUG_PRIMARY", "data": {"device-id": "hostdev0"} }
1779 { 'event': 'UNPLUG_PRIMARY',
1780 'data': { 'device-id': 'str' } }
1785 # An enumeration of dirtyrate status.
1787 # @unstarted: the dirtyrate thread has not been started.
1789 # @measuring: the dirtyrate thread is measuring.
1791 # @measured: the dirtyrate thread has measured and results are available.
1796 { 'enum': 'DirtyRateStatus',
1797 'data': [ 'unstarted', 'measuring', 'measured'] }
1802 # Information about current dirty page rate of vm.
1804 # @dirty-rate: an estimate of the dirty page rate of the VM in units of
1805 # MB/s, present only when estimating the rate has completed.
1807 # @status: status containing dirtyrate query status includes
1808 # 'unstarted' or 'measuring' or 'measured'
1810 # @start-time: start time in units of second for calculation
1812 # @calc-time: time in units of second for sample dirty pages
1817 { 'struct': 'DirtyRateInfo',
1818 'data': {'*dirty-rate': 'int64',
1819 'status': 'DirtyRateStatus',
1820 'start-time': 'int64',
1821 'calc-time': 'int64'} }
1826 # start calculating dirty page rate for vm
1828 # @calc-time: time in units of second for sample dirty pages
1833 # {"command": "calc-dirty-rate", "data": {"calc-time": 1} }
1836 { 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64'} }
1839 # @query-dirty-rate:
1841 # query dirty page rate in units of MB/s for vm
1845 { 'command': 'query-dirty-rate', 'returns': 'DirtyRateInfo' }