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 # @BitmapMigrationBitmapAliasTransform:
542 # @persistent: If present, the bitmap will be made persistent
543 # or transient depending on this parameter.
547 { 'struct': 'BitmapMigrationBitmapAliasTransform',
549 '*persistent': 'bool'
553 # @BitmapMigrationBitmapAlias:
555 # @name: The name of the bitmap.
557 # @alias: An alias name for migration (for example the bitmap name on
558 # the opposite site).
560 # @transform: Allows the modification of the migrated bitmap.
565 { 'struct': 'BitmapMigrationBitmapAlias',
569 '*transform': 'BitmapMigrationBitmapAliasTransform'
573 # @BitmapMigrationNodeAlias:
575 # Maps a block node name and the bitmaps it has to aliases for dirty
578 # @node-name: A block node name.
580 # @alias: An alias block node name for migration (for example the
581 # node name on the opposite site).
583 # @bitmaps: Mappings for the bitmaps on this node.
587 { 'struct': 'BitmapMigrationNodeAlias',
591 'bitmaps': [ 'BitmapMigrationBitmapAlias' ]
595 # @MigrationParameter:
597 # Migration parameters enumeration
599 # @announce-initial: Initial delay (in milliseconds) before sending the first
600 # announce (Since 4.0)
602 # @announce-max: Maximum delay (in milliseconds) between packets in the
603 # announcement (Since 4.0)
605 # @announce-rounds: Number of self-announce packets sent after migration
608 # @announce-step: Increase in delay (in milliseconds) between subsequent
609 # packets in the announcement (Since 4.0)
611 # @compress-level: Set the compression level to be used in live migration,
612 # the compression level is an integer between 0 and 9, where 0 means
613 # no compression, 1 means the best compression speed, and 9 means best
614 # compression ratio which will consume more CPU.
616 # @compress-threads: Set compression thread count to be used in live migration,
617 # the compression thread count is an integer between 1 and 255.
619 # @compress-wait-thread: Controls behavior when all compression threads are
620 # currently busy. If true (default), wait for a free
621 # compression thread to become available; otherwise,
622 # send the page uncompressed. (Since 3.1)
624 # @decompress-threads: Set decompression thread count to be used in live
625 # migration, the decompression thread count is an integer between 1
626 # and 255. Usually, decompression is at least 4 times as fast as
627 # compression, so set the decompress-threads to the number about 1/4
628 # of compress-threads is adequate.
630 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
631 # to trigger throttling. It is expressed as percentage.
632 # The default value is 50. (Since 5.0)
634 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
635 # when migration auto-converge is activated. The
636 # default value is 20. (Since 2.7)
638 # @cpu-throttle-increment: throttle percentage increase each time
639 # auto-converge detects that migration is not making
640 # progress. The default value is 10. (Since 2.7)
642 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
643 # At the tail stage of throttling, the Guest is very
644 # sensitive to CPU percentage while the @cpu-throttle
645 # -increment is excessive usually at tail stage.
646 # If this parameter is true, we will compute the ideal
647 # CPU percentage used by the Guest, which may exactly make
648 # the dirty rate match the dirty rate threshold. Then we
649 # will choose a smaller throttle increment between the
650 # one specified by @cpu-throttle-increment and the one
651 # generated by ideal CPU percentage.
652 # Therefore, it is compatible to traditional throttling,
653 # meanwhile the throttle increment won't be excessive
655 # The default value is false. (Since 5.1)
657 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
658 # establishing a TLS connection over the migration data channel.
659 # On the outgoing side of the migration, the credentials must
660 # be for a 'client' endpoint, while for the incoming side the
661 # credentials must be for a 'server' endpoint. Setting this
662 # will enable TLS for all migrations. The default is unset,
663 # resulting in unsecured migration at the QEMU level. (Since 2.7)
665 # @tls-hostname: hostname of the target host for the migration. This is
666 # required when using x509 based TLS credentials and the
667 # migration URI does not already include a hostname. For
668 # example if using fd: or exec: based migration, the
669 # hostname must be provided so that the server's x509
670 # certificate identity can be validated. (Since 2.7)
672 # @tls-authz: ID of the 'authz' object subclass that provides access control
673 # checking of the TLS x509 certificate distinguished name.
674 # This object is only resolved at time of use, so can be deleted
675 # and recreated on the fly while the migration server is active.
676 # If missing, it will default to denying access (Since 4.0)
678 # @max-bandwidth: to set maximum speed for migration. maximum speed in
679 # bytes per second. (Since 2.8)
681 # @downtime-limit: set maximum tolerated downtime for migration. maximum
682 # downtime in milliseconds (Since 2.8)
684 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
685 # periodic mode. (Since 2.8)
687 # @block-incremental: Affects how much storage is migrated when the
688 # block migration capability is enabled. When false, the entire
689 # storage backing chain is migrated into a flattened image at
690 # the destination; when true, only the active qcow2 layer is
691 # migrated and the destination must already have access to the
692 # same backing chain as was used on the source. (since 2.10)
694 # @multifd-channels: Number of channels used to migrate data in
695 # parallel. This is the same number that the
696 # number of sockets used for migration. The
697 # default value is 2 (since 4.0)
699 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
700 # needs to be a multiple of the target page size
704 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
705 # Defaults to 0 (unlimited). In bytes per second.
708 # @max-cpu-throttle: maximum cpu throttle percentage.
709 # Defaults to 99. (Since 3.1)
711 # @multifd-compression: Which compression method to use.
712 # Defaults to none. (Since 5.0)
714 # @multifd-zlib-level: Set the compression level to be used in live
715 # migration, the compression level is an integer between 0
716 # and 9, where 0 means no compression, 1 means the best
717 # compression speed, and 9 means best compression ratio which
718 # will consume more CPU.
719 # Defaults to 1. (Since 5.0)
721 # @multifd-zstd-level: Set the compression level to be used in live
722 # migration, the compression level is an integer between 0
723 # and 20, where 0 means no compression, 1 means the best
724 # compression speed, and 20 means best compression ratio which
725 # will consume more CPU.
726 # Defaults to 1. (Since 5.0)
728 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
729 # aliases for the purpose of dirty bitmap migration. Such
730 # aliases may for example be the corresponding names on the
732 # The mapping must be one-to-one, but not necessarily
733 # complete: On the source, unmapped bitmaps and all bitmaps
734 # on unmapped nodes will be ignored. On the destination,
735 # encountering an unmapped alias in the incoming migration
736 # stream will result in a report, and all further bitmap
737 # migration data will then be discarded.
738 # Note that the destination does not know about bitmaps it
739 # does not receive, so there is no limitation or requirement
740 # regarding the number of bitmaps received, or how they are
741 # named, or on which nodes they are placed.
742 # By default (when this parameter has never been set), bitmap
743 # names are mapped to themselves. Nodes are mapped to their
744 # block device name if there is one, and to their node name
745 # otherwise. (Since 5.2)
749 { 'enum': 'MigrationParameter',
750 'data': ['announce-initial', 'announce-max',
751 'announce-rounds', 'announce-step',
752 'compress-level', 'compress-threads', 'decompress-threads',
753 'compress-wait-thread', 'throttle-trigger-threshold',
754 'cpu-throttle-initial', 'cpu-throttle-increment',
755 'cpu-throttle-tailslow',
756 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
757 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
759 'xbzrle-cache-size', 'max-postcopy-bandwidth',
760 'max-cpu-throttle', 'multifd-compression',
761 'multifd-zlib-level' ,'multifd-zstd-level',
762 'block-bitmap-mapping' ] }
765 # @MigrateSetParameters:
767 # @announce-initial: Initial delay (in milliseconds) before sending the first
768 # announce (Since 4.0)
770 # @announce-max: Maximum delay (in milliseconds) between packets in the
771 # announcement (Since 4.0)
773 # @announce-rounds: Number of self-announce packets sent after migration
776 # @announce-step: Increase in delay (in milliseconds) between subsequent
777 # packets in the announcement (Since 4.0)
779 # @compress-level: compression level
781 # @compress-threads: compression thread count
783 # @compress-wait-thread: Controls behavior when all compression threads are
784 # currently busy. If true (default), wait for a free
785 # compression thread to become available; otherwise,
786 # send the page uncompressed. (Since 3.1)
788 # @decompress-threads: decompression thread count
790 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
791 # to trigger throttling. It is expressed as percentage.
792 # The default value is 50. (Since 5.0)
794 # @cpu-throttle-initial: Initial percentage of time guest cpus are
795 # throttled when migration auto-converge is activated.
796 # The default value is 20. (Since 2.7)
798 # @cpu-throttle-increment: throttle percentage increase each time
799 # auto-converge detects that migration is not making
800 # progress. The default value is 10. (Since 2.7)
802 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
803 # At the tail stage of throttling, the Guest is very
804 # sensitive to CPU percentage while the @cpu-throttle
805 # -increment is excessive usually at tail stage.
806 # If this parameter is true, we will compute the ideal
807 # CPU percentage used by the Guest, which may exactly make
808 # the dirty rate match the dirty rate threshold. Then we
809 # will choose a smaller throttle increment between the
810 # one specified by @cpu-throttle-increment and the one
811 # generated by ideal CPU percentage.
812 # Therefore, it is compatible to traditional throttling,
813 # meanwhile the throttle increment won't be excessive
815 # The default value is false. (Since 5.1)
817 # @tls-creds: ID of the 'tls-creds' object that provides credentials
818 # for establishing a TLS connection over the migration data
819 # channel. On the outgoing side of the migration, the credentials
820 # must be for a 'client' endpoint, while for the incoming side the
821 # credentials must be for a 'server' endpoint. Setting this
822 # to a non-empty string enables TLS for all migrations.
823 # An empty string means that QEMU will use plain text mode for
824 # migration, rather than TLS (Since 2.9)
825 # Previously (since 2.7), this was reported by omitting
828 # @tls-hostname: hostname of the target host for the migration. This
829 # is required when using x509 based TLS credentials and the
830 # migration URI does not already include a hostname. For
831 # example if using fd: or exec: based migration, the
832 # hostname must be provided so that the server's x509
833 # certificate identity can be validated. (Since 2.7)
834 # An empty string means that QEMU will use the hostname
835 # associated with the migration URI, if any. (Since 2.9)
836 # Previously (since 2.7), this was reported by omitting
837 # tls-hostname instead.
839 # @max-bandwidth: to set maximum speed for migration. maximum speed in
840 # bytes per second. (Since 2.8)
842 # @downtime-limit: set maximum tolerated downtime for migration. maximum
843 # downtime in milliseconds (Since 2.8)
845 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
847 # @block-incremental: Affects how much storage is migrated when the
848 # block migration capability is enabled. When false, the entire
849 # storage backing chain is migrated into a flattened image at
850 # the destination; when true, only the active qcow2 layer is
851 # migrated and the destination must already have access to the
852 # same backing chain as was used on the source. (since 2.10)
854 # @multifd-channels: Number of channels used to migrate data in
855 # parallel. This is the same number that the
856 # number of sockets used for migration. The
857 # default value is 2 (since 4.0)
859 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
860 # needs to be a multiple of the target page size
864 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
865 # Defaults to 0 (unlimited). In bytes per second.
868 # @max-cpu-throttle: maximum cpu throttle percentage.
869 # The default value is 99. (Since 3.1)
871 # @multifd-compression: Which compression method to use.
872 # Defaults to none. (Since 5.0)
874 # @multifd-zlib-level: Set the compression level to be used in live
875 # migration, the compression level is an integer between 0
876 # and 9, where 0 means no compression, 1 means the best
877 # compression speed, and 9 means best compression ratio which
878 # will consume more CPU.
879 # Defaults to 1. (Since 5.0)
881 # @multifd-zstd-level: Set the compression level to be used in live
882 # migration, the compression level is an integer between 0
883 # and 20, where 0 means no compression, 1 means the best
884 # compression speed, and 20 means best compression ratio which
885 # will consume more CPU.
886 # Defaults to 1. (Since 5.0)
888 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
889 # aliases for the purpose of dirty bitmap migration. Such
890 # aliases may for example be the corresponding names on the
892 # The mapping must be one-to-one, but not necessarily
893 # complete: On the source, unmapped bitmaps and all bitmaps
894 # on unmapped nodes will be ignored. On the destination,
895 # encountering an unmapped alias in the incoming migration
896 # stream will result in a report, and all further bitmap
897 # migration data will then be discarded.
898 # Note that the destination does not know about bitmaps it
899 # does not receive, so there is no limitation or requirement
900 # regarding the number of bitmaps received, or how they are
901 # named, or on which nodes they are placed.
902 # By default (when this parameter has never been set), bitmap
903 # names are mapped to themselves. Nodes are mapped to their
904 # block device name if there is one, and to their node name
905 # otherwise. (Since 5.2)
909 # TODO either fuse back into MigrationParameters, or make
910 # MigrationParameters members mandatory
911 { 'struct': 'MigrateSetParameters',
912 'data': { '*announce-initial': 'size',
913 '*announce-max': 'size',
914 '*announce-rounds': 'size',
915 '*announce-step': 'size',
916 '*compress-level': 'uint8',
917 '*compress-threads': 'uint8',
918 '*compress-wait-thread': 'bool',
919 '*decompress-threads': 'uint8',
920 '*throttle-trigger-threshold': 'uint8',
921 '*cpu-throttle-initial': 'uint8',
922 '*cpu-throttle-increment': 'uint8',
923 '*cpu-throttle-tailslow': 'bool',
924 '*tls-creds': 'StrOrNull',
925 '*tls-hostname': 'StrOrNull',
926 '*tls-authz': 'StrOrNull',
927 '*max-bandwidth': 'size',
928 '*downtime-limit': 'uint64',
929 '*x-checkpoint-delay': 'uint32',
930 '*block-incremental': 'bool',
931 '*multifd-channels': 'uint8',
932 '*xbzrle-cache-size': 'size',
933 '*max-postcopy-bandwidth': 'size',
934 '*max-cpu-throttle': 'uint8',
935 '*multifd-compression': 'MultiFDCompression',
936 '*multifd-zlib-level': 'uint8',
937 '*multifd-zstd-level': 'uint8',
938 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ] } }
941 # @migrate-set-parameters:
943 # Set various migration parameters.
949 # -> { "execute": "migrate-set-parameters" ,
950 # "arguments": { "compress-level": 1 } }
953 { 'command': 'migrate-set-parameters', 'boxed': true,
954 'data': 'MigrateSetParameters' }
957 # @MigrationParameters:
959 # The optional members aren't actually optional.
961 # @announce-initial: Initial delay (in milliseconds) before sending the
962 # first announce (Since 4.0)
964 # @announce-max: Maximum delay (in milliseconds) between packets in the
965 # announcement (Since 4.0)
967 # @announce-rounds: Number of self-announce packets sent after migration
970 # @announce-step: Increase in delay (in milliseconds) between subsequent
971 # packets in the announcement (Since 4.0)
973 # @compress-level: compression level
975 # @compress-threads: compression thread count
977 # @compress-wait-thread: Controls behavior when all compression threads are
978 # currently busy. If true (default), wait for a free
979 # compression thread to become available; otherwise,
980 # send the page uncompressed. (Since 3.1)
982 # @decompress-threads: decompression thread count
984 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
985 # to trigger throttling. It is expressed as percentage.
986 # The default value is 50. (Since 5.0)
988 # @cpu-throttle-initial: Initial percentage of time guest cpus are
989 # throttled when migration auto-converge is activated.
992 # @cpu-throttle-increment: throttle percentage increase each time
993 # auto-converge detects that migration is not making
994 # progress. (Since 2.7)
996 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
997 # At the tail stage of throttling, the Guest is very
998 # sensitive to CPU percentage while the @cpu-throttle
999 # -increment is excessive usually at tail stage.
1000 # If this parameter is true, we will compute the ideal
1001 # CPU percentage used by the Guest, which may exactly make
1002 # the dirty rate match the dirty rate threshold. Then we
1003 # will choose a smaller throttle increment between the
1004 # one specified by @cpu-throttle-increment and the one
1005 # generated by ideal CPU percentage.
1006 # Therefore, it is compatible to traditional throttling,
1007 # meanwhile the throttle increment won't be excessive
1009 # The default value is false. (Since 5.1)
1011 # @tls-creds: ID of the 'tls-creds' object that provides credentials
1012 # for establishing a TLS connection over the migration data
1013 # channel. On the outgoing side of the migration, the credentials
1014 # must be for a 'client' endpoint, while for the incoming side the
1015 # credentials must be for a 'server' endpoint.
1016 # An empty string means that QEMU will use plain text mode for
1017 # migration, rather than TLS (Since 2.7)
1018 # Note: 2.8 reports this by omitting tls-creds instead.
1020 # @tls-hostname: hostname of the target host for the migration. This
1021 # is required when using x509 based TLS credentials and the
1022 # migration URI does not already include a hostname. For
1023 # example if using fd: or exec: based migration, the
1024 # hostname must be provided so that the server's x509
1025 # certificate identity can be validated. (Since 2.7)
1026 # An empty string means that QEMU will use the hostname
1027 # associated with the migration URI, if any. (Since 2.9)
1028 # Note: 2.8 reports this by omitting tls-hostname instead.
1030 # @tls-authz: ID of the 'authz' object subclass that provides access control
1031 # checking of the TLS x509 certificate distinguished name. (Since
1034 # @max-bandwidth: to set maximum speed for migration. maximum speed in
1035 # bytes per second. (Since 2.8)
1037 # @downtime-limit: set maximum tolerated downtime for migration. maximum
1038 # downtime in milliseconds (Since 2.8)
1040 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1042 # @block-incremental: Affects how much storage is migrated when the
1043 # block migration capability is enabled. When false, the entire
1044 # storage backing chain is migrated into a flattened image at
1045 # the destination; when true, only the active qcow2 layer is
1046 # migrated and the destination must already have access to the
1047 # same backing chain as was used on the source. (since 2.10)
1049 # @multifd-channels: Number of channels used to migrate data in
1050 # parallel. This is the same number that the
1051 # number of sockets used for migration.
1052 # The default value is 2 (since 4.0)
1054 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
1055 # needs to be a multiple of the target page size
1059 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
1060 # Defaults to 0 (unlimited). In bytes per second.
1063 # @max-cpu-throttle: maximum cpu throttle percentage.
1067 # @multifd-compression: Which compression method to use.
1068 # Defaults to none. (Since 5.0)
1070 # @multifd-zlib-level: Set the compression level to be used in live
1071 # migration, the compression level is an integer between 0
1072 # and 9, where 0 means no compression, 1 means the best
1073 # compression speed, and 9 means best compression ratio which
1074 # will consume more CPU.
1075 # Defaults to 1. (Since 5.0)
1077 # @multifd-zstd-level: Set the compression level to be used in live
1078 # migration, the compression level is an integer between 0
1079 # and 20, where 0 means no compression, 1 means the best
1080 # compression speed, and 20 means best compression ratio which
1081 # will consume more CPU.
1082 # Defaults to 1. (Since 5.0)
1084 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
1085 # aliases for the purpose of dirty bitmap migration. Such
1086 # aliases may for example be the corresponding names on the
1088 # The mapping must be one-to-one, but not necessarily
1089 # complete: On the source, unmapped bitmaps and all bitmaps
1090 # on unmapped nodes will be ignored. On the destination,
1091 # encountering an unmapped alias in the incoming migration
1092 # stream will result in a report, and all further bitmap
1093 # migration data will then be discarded.
1094 # Note that the destination does not know about bitmaps it
1095 # does not receive, so there is no limitation or requirement
1096 # regarding the number of bitmaps received, or how they are
1097 # named, or on which nodes they are placed.
1098 # By default (when this parameter has never been set), bitmap
1099 # names are mapped to themselves. Nodes are mapped to their
1100 # block device name if there is one, and to their node name
1101 # otherwise. (Since 5.2)
1105 { 'struct': 'MigrationParameters',
1106 'data': { '*announce-initial': 'size',
1107 '*announce-max': 'size',
1108 '*announce-rounds': 'size',
1109 '*announce-step': 'size',
1110 '*compress-level': 'uint8',
1111 '*compress-threads': 'uint8',
1112 '*compress-wait-thread': 'bool',
1113 '*decompress-threads': 'uint8',
1114 '*throttle-trigger-threshold': 'uint8',
1115 '*cpu-throttle-initial': 'uint8',
1116 '*cpu-throttle-increment': 'uint8',
1117 '*cpu-throttle-tailslow': 'bool',
1118 '*tls-creds': 'str',
1119 '*tls-hostname': 'str',
1120 '*tls-authz': 'str',
1121 '*max-bandwidth': 'size',
1122 '*downtime-limit': 'uint64',
1123 '*x-checkpoint-delay': 'uint32',
1124 '*block-incremental': 'bool',
1125 '*multifd-channels': 'uint8',
1126 '*xbzrle-cache-size': 'size',
1127 '*max-postcopy-bandwidth': 'size',
1128 '*max-cpu-throttle': 'uint8',
1129 '*multifd-compression': 'MultiFDCompression',
1130 '*multifd-zlib-level': 'uint8',
1131 '*multifd-zstd-level': 'uint8',
1132 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ] } }
1135 # @query-migrate-parameters:
1137 # Returns information about the current migration parameters
1139 # Returns: @MigrationParameters
1145 # -> { "execute": "query-migrate-parameters" }
1147 # "decompress-threads": 2,
1148 # "cpu-throttle-increment": 10,
1149 # "compress-threads": 8,
1150 # "compress-level": 1,
1151 # "cpu-throttle-initial": 20,
1152 # "max-bandwidth": 33554432,
1153 # "downtime-limit": 300
1158 { 'command': 'query-migrate-parameters',
1159 'returns': 'MigrationParameters' }
1162 # @client_migrate_info:
1164 # Set migration information for remote display. This makes the server
1165 # ask the client to automatically reconnect using the new parameters
1166 # once migration finished successfully. Only implemented for SPICE.
1168 # @protocol: must be "spice"
1169 # @hostname: migration target hostname
1170 # @port: spice tcp port for plaintext channels
1171 # @tls-port: spice tcp port for tls-secured channels
1172 # @cert-subject: server certificate subject
1178 # -> { "execute": "client_migrate_info",
1179 # "arguments": { "protocol": "spice",
1180 # "hostname": "virt42.lab.kraxel.org",
1182 # <- { "return": {} }
1185 { 'command': 'client_migrate_info',
1186 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1187 '*tls-port': 'int', '*cert-subject': 'str' } }
1190 # @migrate-start-postcopy:
1192 # Followup to a migration command to switch the migration to postcopy mode.
1193 # The postcopy-ram capability must be set on both source and destination
1194 # before the original migration command.
1200 # -> { "execute": "migrate-start-postcopy" }
1201 # <- { "return": {} }
1204 { 'command': 'migrate-start-postcopy' }
1209 # Emitted when a migration event happens
1211 # @status: @MigrationStatus describing the current migration status.
1217 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
1218 # "event": "MIGRATION",
1219 # "data": {"status": "completed"} }
1222 { 'event': 'MIGRATION',
1223 'data': {'status': 'MigrationStatus'}}
1228 # Emitted from the source side of a migration at the start of each pass
1229 # (when it syncs the dirty bitmap)
1231 # @pass: An incrementing count (starting at 1 on the first pass)
1237 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
1238 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
1241 { 'event': 'MIGRATION_PASS',
1242 'data': { 'pass': 'int' } }
1247 # The message transmission between Primary side and Secondary side.
1249 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1251 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1253 # @checkpoint-reply: SVM gets PVM's checkpoint request
1255 # @vmstate-send: VM's state will be sent by PVM.
1257 # @vmstate-size: The total size of VMstate.
1259 # @vmstate-received: VM's state has been received by SVM.
1261 # @vmstate-loaded: VM's state has been loaded by SVM.
1265 { 'enum': 'COLOMessage',
1266 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1267 'vmstate-send', 'vmstate-size', 'vmstate-received',
1268 'vmstate-loaded' ] }
1273 # The COLO current mode.
1275 # @none: COLO is disabled.
1277 # @primary: COLO node in primary side.
1279 # @secondary: COLO node in slave side.
1283 { 'enum': 'COLOMode',
1284 'data': [ 'none', 'primary', 'secondary'] }
1289 # An enumeration of COLO failover status
1291 # @none: no failover has ever happened
1293 # @require: got failover requirement but not handled
1295 # @active: in the process of doing failover
1297 # @completed: finish the process of failover
1299 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1303 { 'enum': 'FailoverStatus',
1304 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1309 # Emitted when VM finishes COLO mode due to some errors happening or
1310 # at the request of users.
1312 # @mode: report COLO mode when COLO exited.
1314 # @reason: describes the reason for the COLO exit.
1320 # <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
1321 # "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
1324 { 'event': 'COLO_EXIT',
1325 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1330 # The reason for a COLO exit.
1332 # @none: failover has never happened. This state does not occur
1333 # in the COLO_EXIT event, and is only visible in the result of
1334 # query-colo-status.
1336 # @request: COLO exit is due to an external request.
1338 # @error: COLO exit is due to an internal error.
1340 # @processing: COLO is currently handling a failover (since 4.0).
1344 { 'enum': 'COLOExitReason',
1345 'data': [ 'none', 'request', 'error' , 'processing' ] }
1348 # @x-colo-lost-heartbeat:
1350 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1351 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1352 # If sent to the Secondary, the Secondary side will run failover work,
1353 # then takes over server operation to become the service VM.
1359 # -> { "execute": "x-colo-lost-heartbeat" }
1360 # <- { "return": {} }
1363 { 'command': 'x-colo-lost-heartbeat' }
1368 # Cancel the current executing migration process.
1370 # Returns: nothing on success
1372 # Notes: This command succeeds even if there is no migration process running.
1378 # -> { "execute": "migrate_cancel" }
1379 # <- { "return": {} }
1382 { 'command': 'migrate_cancel' }
1385 # @migrate-continue:
1387 # Continue migration when it's in a paused state.
1389 # @state: The state the migration is currently expected to be in
1391 # Returns: nothing on success
1395 # -> { "execute": "migrate-continue" , "arguments":
1396 # { "state": "pre-switchover" } }
1397 # <- { "return": {} }
1399 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
1402 # @migrate_set_downtime:
1404 # Set maximum tolerated downtime for migration.
1406 # @value: maximum downtime in seconds
1409 # @deprecated: This command is deprecated. Use
1410 # 'migrate-set-parameters' instead.
1412 # Returns: nothing on success
1418 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
1419 # <- { "return": {} }
1422 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'},
1423 'features': [ 'deprecated' ] }
1426 # @migrate_set_speed:
1428 # Set maximum speed for migration.
1430 # @value: maximum speed in bytes per second.
1433 # @deprecated: This command is deprecated. Use
1434 # 'migrate-set-parameters' instead.
1436 # Returns: nothing on success
1442 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
1443 # <- { "return": {} }
1446 { 'command': 'migrate_set_speed', 'data': {'value': 'int'},
1447 'features': [ 'deprecated' ] }
1450 # @migrate-set-cache-size:
1452 # Set cache size to be used by XBZRLE migration
1454 # @value: cache size in bytes
1457 # @deprecated: This command is deprecated. Use
1458 # 'migrate-set-parameters' instead.
1460 # The size will be rounded down to the nearest power of 2.
1461 # The cache size can be modified before and during ongoing migration
1463 # Returns: nothing on success
1469 # -> { "execute": "migrate-set-cache-size",
1470 # "arguments": { "value": 536870912 } }
1471 # <- { "return": {} }
1474 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'},
1475 'features': [ 'deprecated' ] }
1478 # @query-migrate-cache-size:
1480 # Query migration XBZRLE cache size
1483 # @deprecated: This command is deprecated. Use
1484 # 'query-migrate-parameters' instead.
1486 # Returns: XBZRLE cache size in bytes
1492 # -> { "execute": "query-migrate-cache-size" }
1493 # <- { "return": 67108864 }
1496 { 'command': 'query-migrate-cache-size', 'returns': 'size',
1497 'features': [ 'deprecated' ] }
1502 # Migrates the current running guest to another Virtual Machine.
1504 # @uri: the Uniform Resource Identifier of the destination VM
1506 # @blk: do block migration (full disk copy)
1508 # @inc: incremental disk copy migration
1510 # @detach: this argument exists only for compatibility reasons and
1511 # is ignored by QEMU
1513 # @resume: resume one paused migration, default "off". (since 3.0)
1515 # Returns: nothing on success
1521 # 1. The 'query-migrate' command should be used to check migration's progress
1522 # and final result (this information is provided by the 'status' member)
1524 # 2. All boolean arguments default to false
1526 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1531 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1532 # <- { "return": {} }
1535 { 'command': 'migrate',
1536 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1537 '*detach': 'bool', '*resume': 'bool' } }
1540 # @migrate-incoming:
1542 # Start an incoming migration, the qemu must have been started
1543 # with -incoming defer
1545 # @uri: The Uniform Resource Identifier identifying the source or
1546 # address to listen on
1548 # Returns: nothing on success
1554 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1555 # compatible with -incoming and the format of the uri is already exposed
1558 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1561 # 3. The uri format is the same as for -incoming
1565 # -> { "execute": "migrate-incoming",
1566 # "arguments": { "uri": "tcp::4446" } }
1567 # <- { "return": {} }
1570 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1573 # @xen-save-devices-state:
1575 # Save the state of all devices to file. The RAM and the block devices
1576 # of the VM are not saved by this command.
1578 # @filename: the file to save the state of the devices to as binary
1579 # data. See xen-save-devices-state.txt for a description of the binary
1582 # @live: Optional argument to ask QEMU to treat this command as part of a live
1583 # migration. Default to true. (since 2.11)
1585 # Returns: Nothing on success
1591 # -> { "execute": "xen-save-devices-state",
1592 # "arguments": { "filename": "/tmp/save" } }
1593 # <- { "return": {} }
1596 { 'command': 'xen-save-devices-state',
1597 'data': {'filename': 'str', '*live':'bool' } }
1600 # @xen-set-global-dirty-log:
1602 # Enable or disable the global dirty log mode.
1604 # @enable: true to enable, false to disable.
1612 # -> { "execute": "xen-set-global-dirty-log",
1613 # "arguments": { "enable": true } }
1614 # <- { "return": {} }
1617 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1620 # @xen-load-devices-state:
1622 # Load the state of all devices from file. The RAM and the block devices
1623 # of the VM are not loaded by this command.
1625 # @filename: the file to load the state of the devices from as binary
1626 # data. See xen-save-devices-state.txt for a description of the binary
1633 # -> { "execute": "xen-load-devices-state",
1634 # "arguments": { "filename": "/tmp/resume" } }
1635 # <- { "return": {} }
1638 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
1641 # @xen-set-replication:
1643 # Enable or disable replication.
1645 # @enable: true to enable, false to disable.
1647 # @primary: true for primary or false for secondary.
1649 # @failover: true to do failover, false to stop. but cannot be
1650 # specified if 'enable' is true. default value is false.
1656 # -> { "execute": "xen-set-replication",
1657 # "arguments": {"enable": true, "primary": false} }
1658 # <- { "return": {} }
1662 { 'command': 'xen-set-replication',
1663 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' },
1664 'if': 'defined(CONFIG_REPLICATION)' }
1667 # @ReplicationStatus:
1669 # The result format for 'query-xen-replication-status'.
1671 # @error: true if an error happened, false if replication is normal.
1673 # @desc: the human readable error description string, when
1678 { 'struct': 'ReplicationStatus',
1679 'data': { 'error': 'bool', '*desc': 'str' },
1680 'if': 'defined(CONFIG_REPLICATION)' }
1683 # @query-xen-replication-status:
1685 # Query replication status while the vm is running.
1687 # Returns: A @ReplicationResult object showing the status.
1691 # -> { "execute": "query-xen-replication-status" }
1692 # <- { "return": { "error": false } }
1696 { 'command': 'query-xen-replication-status',
1697 'returns': 'ReplicationStatus',
1698 'if': 'defined(CONFIG_REPLICATION)' }
1701 # @xen-colo-do-checkpoint:
1703 # Xen uses this command to notify replication to trigger a checkpoint.
1709 # -> { "execute": "xen-colo-do-checkpoint" }
1710 # <- { "return": {} }
1714 { 'command': 'xen-colo-do-checkpoint',
1715 'if': 'defined(CONFIG_REPLICATION)' }
1720 # The result format for 'query-colo-status'.
1722 # @mode: COLO running mode. If COLO is running, this field will return
1723 # 'primary' or 'secondary'.
1725 # @last-mode: COLO last running mode. If COLO is running, this field
1726 # will return same like mode field, after failover we can
1727 # use this field to get last colo mode. (since 4.0)
1729 # @reason: describes the reason for the COLO exit.
1733 { 'struct': 'COLOStatus',
1734 'data': { 'mode': 'COLOMode', 'last-mode': 'COLOMode',
1735 'reason': 'COLOExitReason' } }
1738 # @query-colo-status:
1740 # Query COLO status while the vm is running.
1742 # Returns: A @COLOStatus object showing the status.
1746 # -> { "execute": "query-colo-status" }
1747 # <- { "return": { "mode": "primary", "reason": "request" } }
1751 { 'command': 'query-colo-status',
1752 'returns': 'COLOStatus' }
1757 # Provide a recovery migration stream URI.
1759 # @uri: the URI to be used for the recovery of migration stream.
1765 # -> { "execute": "migrate-recover",
1766 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1767 # <- { "return": {} }
1771 { 'command': 'migrate-recover',
1772 'data': { 'uri': 'str' },
1778 # Pause a migration. Currently it only supports postcopy.
1784 # -> { "execute": "migrate-pause" }
1785 # <- { "return": {} }
1789 { 'command': 'migrate-pause', 'allow-oob': true }
1794 # Emitted from source side of a migration when migration state is
1795 # WAIT_UNPLUG. Device was unplugged by guest operating system.
1796 # Device resources in QEMU are kept on standby to be able to re-plug it in case
1797 # of migration failure.
1799 # @device-id: QEMU device id of the unplugged device
1804 # {"event": "UNPLUG_PRIMARY", "data": {"device-id": "hostdev0"} }
1807 { 'event': 'UNPLUG_PRIMARY',
1808 'data': { 'device-id': 'str' } }
1813 # An enumeration of dirtyrate status.
1815 # @unstarted: the dirtyrate thread has not been started.
1817 # @measuring: the dirtyrate thread is measuring.
1819 # @measured: the dirtyrate thread has measured and results are available.
1824 { 'enum': 'DirtyRateStatus',
1825 'data': [ 'unstarted', 'measuring', 'measured'] }
1830 # Information about current dirty page rate of vm.
1832 # @dirty-rate: an estimate of the dirty page rate of the VM in units of
1833 # MB/s, present only when estimating the rate has completed.
1835 # @status: status containing dirtyrate query status includes
1836 # 'unstarted' or 'measuring' or 'measured'
1838 # @start-time: start time in units of second for calculation
1840 # @calc-time: time in units of second for sample dirty pages
1845 { 'struct': 'DirtyRateInfo',
1846 'data': {'*dirty-rate': 'int64',
1847 'status': 'DirtyRateStatus',
1848 'start-time': 'int64',
1849 'calc-time': 'int64'} }
1854 # start calculating dirty page rate for vm
1856 # @calc-time: time in units of second for sample dirty pages
1861 # {"command": "calc-dirty-rate", "data": {"calc-time": 1} }
1864 { 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64'} }
1867 # @query-dirty-rate:
1869 # query dirty page rate in units of MB/s for vm
1873 { 'command': 'query-dirty-rate', 'returns': 'DirtyRateInfo' }
1878 # Save a VM snapshot
1880 # @job-id: identifier for the newly created job
1881 # @tag: name of the snapshot to create
1882 # @vmstate: block device node name to save vmstate to
1883 # @devices: list of block device node names to save a snapshot to
1885 # Applications should not assume that the snapshot save is complete
1886 # when this command returns. The job commands / events must be used
1887 # to determine completion and to fetch details of any errors that arise.
1889 # Note that execution of the guest CPUs may be stopped during the
1890 # time it takes to save the snapshot. A future version of QEMU
1891 # may ensure CPUs are executing continuously.
1893 # It is strongly recommended that @devices contain all writable
1894 # block device nodes if a consistent snapshot is required.
1896 # If @tag already exists, an error will be reported
1902 # -> { "execute": "snapshot-save",
1904 # "job-id": "snapsave0",
1906 # "vmstate": "disk0",
1907 # "devices": ["disk0", "disk1"]
1910 # <- { "return": { } }
1911 # <- {"event": "JOB_STATUS_CHANGE",
1912 # "data": {"status": "created", "id": "snapsave0"}}
1913 # <- {"event": "JOB_STATUS_CHANGE",
1914 # "data": {"status": "running", "id": "snapsave0"}}
1915 # <- {"event": "STOP"}
1916 # <- {"event": "RESUME"}
1917 # <- {"event": "JOB_STATUS_CHANGE",
1918 # "data": {"status": "waiting", "id": "snapsave0"}}
1919 # <- {"event": "JOB_STATUS_CHANGE",
1920 # "data": {"status": "pending", "id": "snapsave0"}}
1921 # <- {"event": "JOB_STATUS_CHANGE",
1922 # "data": {"status": "concluded", "id": "snapsave0"}}
1923 # -> {"execute": "query-jobs"}
1924 # <- {"return": [{"current-progress": 1,
1925 # "status": "concluded",
1926 # "total-progress": 1,
1927 # "type": "snapshot-save",
1928 # "id": "snapsave0"}]}
1932 { 'command': 'snapshot-save',
1933 'data': { 'job-id': 'str',
1936 'devices': ['str'] } }
1941 # Load a VM snapshot
1943 # @job-id: identifier for the newly created job
1944 # @tag: name of the snapshot to load.
1945 # @vmstate: block device node name to load vmstate from
1946 # @devices: list of block device node names to load a snapshot from
1948 # Applications should not assume that the snapshot load is complete
1949 # when this command returns. The job commands / events must be used
1950 # to determine completion and to fetch details of any errors that arise.
1952 # Note that execution of the guest CPUs will be stopped during the
1953 # time it takes to load the snapshot.
1955 # It is strongly recommended that @devices contain all writable
1956 # block device nodes that can have changed since the original
1957 # @snapshot-save command execution.
1963 # -> { "execute": "snapshot-load",
1965 # "job-id": "snapload0",
1967 # "vmstate": "disk0",
1968 # "devices": ["disk0", "disk1"]
1971 # <- { "return": { } }
1972 # <- {"event": "JOB_STATUS_CHANGE",
1973 # "data": {"status": "created", "id": "snapload0"}}
1974 # <- {"event": "JOB_STATUS_CHANGE",
1975 # "data": {"status": "running", "id": "snapload0"}}
1976 # <- {"event": "STOP"}
1977 # <- {"event": "RESUME"}
1978 # <- {"event": "JOB_STATUS_CHANGE",
1979 # "data": {"status": "waiting", "id": "snapload0"}}
1980 # <- {"event": "JOB_STATUS_CHANGE",
1981 # "data": {"status": "pending", "id": "snapload0"}}
1982 # <- {"event": "JOB_STATUS_CHANGE",
1983 # "data": {"status": "concluded", "id": "snapload0"}}
1984 # -> {"execute": "query-jobs"}
1985 # <- {"return": [{"current-progress": 1,
1986 # "status": "concluded",
1987 # "total-progress": 1,
1988 # "type": "snapshot-load",
1989 # "id": "snapload0"}]}
1993 { 'command': 'snapshot-load',
1994 'data': { 'job-id': 'str',
1997 'devices': ['str'] } }
2002 # Delete a VM snapshot
2004 # @job-id: identifier for the newly created job
2005 # @tag: name of the snapshot to delete.
2006 # @devices: list of block device node names to delete a snapshot from
2008 # Applications should not assume that the snapshot delete is complete
2009 # when this command returns. The job commands / events must be used
2010 # to determine completion and to fetch details of any errors that arise.
2016 # -> { "execute": "snapshot-delete",
2018 # "job-id": "snapdelete0",
2020 # "devices": ["disk0", "disk1"]
2023 # <- { "return": { } }
2024 # <- {"event": "JOB_STATUS_CHANGE",
2025 # "data": {"status": "created", "id": "snapdelete0"}}
2026 # <- {"event": "JOB_STATUS_CHANGE",
2027 # "data": {"status": "running", "id": "snapdelete0"}}
2028 # <- {"event": "JOB_STATUS_CHANGE",
2029 # "data": {"status": "waiting", "id": "snapdelete0"}}
2030 # <- {"event": "JOB_STATUS_CHANGE",
2031 # "data": {"status": "pending", "id": "snapdelete0"}}
2032 # <- {"event": "JOB_STATUS_CHANGE",
2033 # "data": {"status": "concluded", "id": "snapdelete0"}}
2034 # -> {"execute": "query-jobs"}
2035 # <- {"return": [{"current-progress": 1,
2036 # "status": "concluded",
2037 # "total-progress": 1,
2038 # "type": "snapshot-delete",
2039 # "id": "snapdelete0"}]}
2043 { 'command': 'snapshot-delete',
2044 'data': { 'job-id': 'str',
2046 'devices': ['str'] } }