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
22 # @total: total amount of bytes involved in the migration process
24 # @duplicate: number of duplicate (zero) pages (since 1.2)
26 # @skipped: number of skipped zero pages. Always zero, only provided for
27 # compatibility (since 1.5)
29 # @normal: number of normal pages (since 1.2)
31 # @normal-bytes: number of normal bytes sent (since 1.2)
33 # @dirty-pages-rate: number of pages dirtied by second by the guest
36 # @mbps: throughput in megabits/sec. (since 1.6)
38 # @dirty-sync-count: number of times that dirty ram was synchronized
41 # @postcopy-requests: The number of page requests received from the
42 # destination (since 2.7)
44 # @page-size: The number of bytes per page for the various page-based
45 # statistics (since 2.10)
47 # @multifd-bytes: The number of bytes sent through multifd (since 3.0)
49 # @pages-per-second: the number of memory pages transferred per second
52 # @precopy-bytes: The number of bytes sent in the pre-copy phase
55 # @downtime-bytes: The number of bytes sent while the guest is paused
58 # @postcopy-bytes: The number of bytes sent during the post-copy phase
61 # @dirty-sync-missed-zero-copy: Number of times dirty RAM
62 # synchronization could not avoid copying dirty pages. This is
63 # between 0 and @dirty-sync-count * @multifd-channels. (since
68 # @deprecated: Member @skipped is always zero since 1.5.3
73 { 'struct': 'MigrationStats',
74 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
76 'skipped': { 'type': 'int', 'features': ['deprecated'] },
78 'normal-bytes': 'int', 'dirty-pages-rate': 'int',
79 'mbps': 'number', 'dirty-sync-count': 'int',
80 'postcopy-requests': 'int', 'page-size': 'int',
81 'multifd-bytes': 'uint64', 'pages-per-second': 'uint64',
82 'precopy-bytes': 'uint64', 'downtime-bytes': 'uint64',
83 'postcopy-bytes': 'uint64',
84 'dirty-sync-missed-zero-copy': 'uint64' } }
89 # Detailed XBZRLE migration cache statistics
91 # @cache-size: XBZRLE cache size
93 # @bytes: amount of bytes already transferred to the target VM
95 # @pages: amount of pages transferred to the target VM
97 # @cache-miss: number of cache miss
99 # @cache-miss-rate: rate of cache miss (since 2.1)
101 # @encoding-rate: rate of encoded bytes (since 5.1)
103 # @overflow: number of overflows
107 { 'struct': 'XBZRLECacheStats',
108 'data': {'cache-size': 'size', 'bytes': 'int', 'pages': 'int',
109 'cache-miss': 'int', 'cache-miss-rate': 'number',
110 'encoding-rate': 'number', 'overflow': 'int' } }
115 # Detailed migration compression statistics
117 # @pages: amount of pages compressed and transferred to the target VM
119 # @busy: count of times that no free thread was available to compress
122 # @busy-rate: rate of thread busy
124 # @compressed-size: amount of bytes after compression
126 # @compression-rate: rate of compressed size
130 { 'struct': 'CompressionStats',
131 'data': {'pages': 'int', 'busy': 'int', 'busy-rate': 'number',
132 'compressed-size': 'int', 'compression-rate': 'number' } }
137 # An enumeration of migration status.
139 # @none: no migration has ever happened.
141 # @setup: migration process has been initiated.
143 # @cancelling: in the process of cancelling migration.
145 # @cancelled: cancelling migration is finished.
147 # @active: in the process of doing migration.
149 # @postcopy-active: like active, but now in postcopy mode. (since
152 # @postcopy-paused: during postcopy but paused. (since 3.0)
154 # @postcopy-recover: trying to recover from a paused postcopy. (since
157 # @completed: migration is finished.
159 # @failed: some error occurred during migration process.
161 # @colo: VM is in the process of fault tolerance, VM can not get into
162 # this state unless colo capability is enabled for migration.
165 # @pre-switchover: Paused before device serialisation. (since 2.11)
167 # @device: During device serialisation when pause-before-switchover is
168 # enabled (since 2.11)
170 # @wait-unplug: wait for device unplug request by guest OS to be
171 # completed. (since 4.2)
175 { 'enum': 'MigrationStatus',
176 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
177 'active', 'postcopy-active', 'postcopy-paused',
178 'postcopy-recover', 'completed', 'failed', 'colo',
179 'pre-switchover', 'device', 'wait-unplug' ] }
183 # Detailed VFIO devices migration statistics
185 # @transferred: amount of bytes transferred to the target VM by VFIO
190 { 'struct': 'VfioStats',
191 'data': {'transferred': 'int' } }
196 # Information about current migration process.
198 # @status: @MigrationStatus describing the current migration status.
199 # If this field is not returned, no migration process has been
202 # @ram: @MigrationStats containing detailed migration status, only
203 # returned if status is 'active' or 'completed'(since 1.2)
205 # @disk: @MigrationStats containing detailed disk migration status,
206 # only returned if status is 'active' and it is a block migration
208 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
209 # migration statistics, only returned if XBZRLE feature is on and
210 # status is 'active' or 'completed' (since 1.2)
212 # @total-time: total amount of milliseconds since migration started.
213 # If migration has ended, it returns the total migration time.
216 # @downtime: only present when migration finishes correctly total
217 # downtime in milliseconds for the guest. (since 1.3)
219 # @expected-downtime: only present while migration is active expected
220 # downtime in milliseconds for the guest in last walk of the dirty
221 # bitmap. (since 1.3)
223 # @setup-time: amount of setup time in milliseconds *before* the
224 # iterations begin but *after* the QMP command is issued. This is
225 # designed to provide an accounting of any activities (such as
226 # RDMA pinning) which may be expensive, but do not actually occur
227 # during the iterative migration rounds themselves. (since 1.6)
229 # @cpu-throttle-percentage: percentage of time guest cpus are being
230 # throttled during auto-converge. This is only present when
231 # auto-converge has started throttling guest cpus. (Since 2.7)
233 # @error-desc: the human readable error description string, when
234 # @status is 'failed'. Clients should not attempt to parse the
235 # error strings. (Since 2.7)
237 # @postcopy-blocktime: total time when all vCPU were blocked during
238 # postcopy live migration. This is only present when the
239 # postcopy-blocktime migration capability is enabled. (Since 3.0)
241 # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU.
242 # This is only present when the postcopy-blocktime migration
243 # capability is enabled. (Since 3.0)
245 # @compression: migration compression statistics, only returned if
246 # compression feature is on and status is 'active' or 'completed'
249 # @socket-address: Only used for tcp, to know what the real port is
252 # @vfio: @VfioStats containing detailed VFIO devices migration
253 # statistics, only returned if VFIO device is present, migration
254 # is supported by all VFIO devices and status is 'active' or
255 # 'completed' (since 5.2)
257 # @blocked-reasons: A list of reasons an outgoing migration is
258 # blocked. Present and non-empty when migration is blocked.
261 # @dirty-limit-throttle-time-per-round: Maximum throttle time
262 # (in microseconds) of virtual CPUs each dirty ring full round,
263 # which shows how MigrationCapability dirty-limit affects the
264 # guest during live migration. (Since 8.1)
266 # @dirty-limit-ring-full-time: Estimated average dirty ring full time
267 # (in microseconds) for each dirty ring full round. The value
268 # equals the dirty ring memory size divided by the average dirty
269 # page rate of the virtual CPU, which can be used to observe the
270 # average memory load of the virtual CPU indirectly. Note that
271 # zero means guest doesn't dirty memory. (Since 8.1)
275 { 'struct': 'MigrationInfo',
276 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
277 '*disk': 'MigrationStats',
278 '*vfio': 'VfioStats',
279 '*xbzrle-cache': 'XBZRLECacheStats',
280 '*total-time': 'int',
281 '*expected-downtime': 'int',
283 '*setup-time': 'int',
284 '*cpu-throttle-percentage': 'int',
285 '*error-desc': 'str',
286 '*blocked-reasons': ['str'],
287 '*postcopy-blocktime': 'uint32',
288 '*postcopy-vcpu-blocktime': ['uint32'],
289 '*compression': 'CompressionStats',
290 '*socket-address': ['SocketAddress'],
291 '*dirty-limit-throttle-time-per-round': 'uint64',
292 '*dirty-limit-ring-full-time': 'uint64'} }
297 # Returns information about current migration process. If migration
298 # is active there will be another json-object with RAM migration
299 # status and if block migration is active another one with block
302 # Returns: @MigrationInfo
308 # 1. Before the first migration
310 # -> { "execute": "query-migrate" }
311 # <- { "return": {} }
313 # 2. Migration is done and has succeeded
315 # -> { "execute": "query-migrate" }
317 # "status": "completed",
318 # "total-time":12345,
319 # "setup-time":12345,
327 # "normal-bytes":123456,
328 # "dirty-sync-count":15
333 # 3. Migration is done and has failed
335 # -> { "execute": "query-migrate" }
336 # <- { "return": { "status": "failed" } }
338 # 4. Migration is being performed and is not a block migration:
340 # -> { "execute": "query-migrate" }
344 # "total-time":12345,
345 # "setup-time":12345,
346 # "expected-downtime":12345,
353 # "normal-bytes":123456,
354 # "dirty-sync-count":15
359 # 5. Migration is being performed and is a block migration:
361 # -> { "execute": "query-migrate" }
365 # "total-time":12345,
366 # "setup-time":12345,
367 # "expected-downtime":12345,
370 # "remaining":1053304,
371 # "transferred":3720,
374 # "normal-bytes":123456,
375 # "dirty-sync-count":15
379 # "remaining":20880384,
380 # "transferred":91136
385 # 6. Migration is being performed and XBZRLE is active:
387 # -> { "execute": "query-migrate" }
391 # "total-time":12345,
392 # "setup-time":12345,
393 # "expected-downtime":12345,
396 # "remaining":1053304,
397 # "transferred":3720,
400 # "normal-bytes":3412992,
401 # "dirty-sync-count":15
404 # "cache-size":67108864,
408 # "cache-miss-rate":0.123,
409 # "encoding-rate":80.1,
415 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
418 # @MigrationCapability:
420 # Migration capabilities enumeration
422 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length
423 # Encoding). This feature allows us to minimize migration traffic
424 # for certain work loads, by sending compressed difference of the
427 # @rdma-pin-all: Controls whether or not the entire VM memory
428 # footprint is mlock()'d on demand or all at once. Refer to
429 # docs/rdma.txt for usage. Disabled by default. (since 2.0)
431 # @zero-blocks: During storage migration encode blocks of zeroes
432 # efficiently. This essentially saves 1MB of zeroes per block on
433 # the wire. Enabling requires source and target VM to support
434 # this feature. To enable it is sufficient to enable the
435 # capability on the source VM. The feature is disabled by default.
438 # @compress: Use multiple compression threads to accelerate live
439 # migration. This feature can help to reduce the migration
440 # traffic, by sending compressed pages. Please note that if
441 # compress and xbzrle are both on, compress only takes effect in
442 # the ram bulk stage, after that, it will be disabled and only
443 # xbzrle takes effect, this can help to minimize migration
444 # traffic. The feature is disabled by default. (since 2.4 )
446 # @events: generate events for each migration state change (since 2.4
449 # @auto-converge: If enabled, QEMU will automatically throttle down
450 # the guest to speed up convergence of RAM migration. (since 1.6)
452 # @postcopy-ram: Start executing on the migration target before all of
453 # RAM has been migrated, pulling the remaining pages along as
454 # needed. The capacity must have the same setting on both source
455 # and target or migration will not even start. NOTE: If the
456 # migration fails during postcopy the VM will fail. (since 2.6)
458 # @x-colo: If enabled, migration will never end, and the state of the
459 # VM on the primary side will be migrated continuously to the VM
460 # on secondary side, this process is called COarse-Grain LOck
461 # Stepping (COLO) for Non-stop Service. (since 2.8)
463 # @release-ram: if enabled, qemu will free the migrated ram pages on
464 # the source during postcopy-ram migration. (since 2.9)
466 # @block: If enabled, QEMU will also migrate the contents of all block
467 # devices. Default is disabled. A possible alternative uses
468 # mirror jobs to a builtin NBD server on the destination, which
469 # offers more flexibility. (Since 2.10)
471 # @return-path: If enabled, migration will use the return path even
472 # for precopy. (since 2.10)
474 # @pause-before-switchover: Pause outgoing migration before
475 # serialising device state and before disabling block IO (since
478 # @multifd: Use more than one fd for migration (since 4.0)
480 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
483 # @postcopy-blocktime: Calculate downtime for postcopy live migration
486 # @late-block-activate: If enabled, the destination will not activate
487 # block devices (and thus take locks) immediately at the end of
488 # migration. (since 3.0)
490 # @x-ignore-shared: If enabled, QEMU will not migrate shared memory
491 # that is accessible on the destination machine. (since 4.0)
493 # @validate-uuid: Send the UUID of the source to allow the destination
494 # to ensure it is the same. (since 4.2)
496 # @background-snapshot: If enabled, the migration stream will be a
497 # snapshot of the VM exactly at the point when the migration
498 # procedure starts. The VM RAM is saved with running VM. (since
501 # @zero-copy-send: Controls behavior on sending memory pages on
502 # migration. When true, enables a zero-copy mechanism for sending
503 # memory pages, if host supports it. Requires that QEMU be
504 # permitted to use locked memory for guest RAM pages. (since 7.1)
506 # @postcopy-preempt: If enabled, the migration process will allow
507 # postcopy requests to preempt precopy stream, so postcopy
508 # requests will be handled faster. This is a performance feature
509 # and should not affect the correctness of postcopy migration.
512 # @switchover-ack: If enabled, migration will not stop the source VM
513 # and complete the migration until an ACK is received from the
514 # destination that it's OK to do so. Exactly when this ACK is
515 # sent depends on the migrated devices that use this feature. For
516 # example, a device can use it to make sure some of its data is
517 # sent and loaded in the destination before doing switchover.
518 # This can reduce downtime if devices that support this capability
519 # are present. 'return-path' capability must be enabled to use
522 # @dirty-limit: If enabled, migration will use the dirty-limit
523 # algorithim to throttle down guest instead of auto-converge
524 # algorithim. Throttle algorithim only works when vCPU's dirtyrate
525 # greater than 'vcpu-dirty-limit', read processes in guest os
526 # aren't penalized any more, so this algorithim can improve
527 # performance of vCPU during live migration. This is an optional
528 # performance feature and should not affect the correctness of the
529 # existing auto-converge algorithim. (Since 8.1)
533 # @unstable: Members @x-colo and @x-ignore-shared are experimental.
537 { 'enum': 'MigrationCapability',
538 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
539 'compress', 'events', 'postcopy-ram',
540 { 'name': 'x-colo', 'features': [ 'unstable' ] },
542 'block', 'return-path', 'pause-before-switchover', 'multifd',
543 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
544 { 'name': 'x-ignore-shared', 'features': [ 'unstable' ] },
545 'validate-uuid', 'background-snapshot',
546 'zero-copy-send', 'postcopy-preempt', 'switchover-ack',
550 # @MigrationCapabilityStatus:
552 # Migration capability information
554 # @capability: capability enum
556 # @state: capability state bool
560 { 'struct': 'MigrationCapabilityStatus',
561 'data': { 'capability': 'MigrationCapability', 'state': 'bool' } }
564 # @migrate-set-capabilities:
566 # Enable/Disable the following migration capabilities (like xbzrle)
568 # @capabilities: json array of capability modifications to make
574 # -> { "execute": "migrate-set-capabilities" , "arguments":
575 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
576 # <- { "return": {} }
578 { 'command': 'migrate-set-capabilities',
579 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
582 # @query-migrate-capabilities:
584 # Returns information about the current migration capabilities status
586 # Returns: @MigrationCapabilityStatus
592 # -> { "execute": "query-migrate-capabilities" }
594 # {"state": false, "capability": "xbzrle"},
595 # {"state": false, "capability": "rdma-pin-all"},
596 # {"state": false, "capability": "auto-converge"},
597 # {"state": false, "capability": "zero-blocks"},
598 # {"state": false, "capability": "compress"},
599 # {"state": true, "capability": "events"},
600 # {"state": false, "capability": "postcopy-ram"},
601 # {"state": false, "capability": "x-colo"}
604 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
607 # @MultiFDCompression:
609 # An enumeration of multifd compression methods.
611 # @none: no compression.
613 # @zlib: use zlib compression method.
615 # @zstd: use zstd compression method.
619 { 'enum': 'MultiFDCompression',
620 'data': [ 'none', 'zlib',
621 { 'name': 'zstd', 'if': 'CONFIG_ZSTD' } ] }
624 # @BitmapMigrationBitmapAliasTransform:
626 # @persistent: If present, the bitmap will be made persistent or
627 # transient depending on this parameter.
631 { 'struct': 'BitmapMigrationBitmapAliasTransform',
633 '*persistent': 'bool'
637 # @BitmapMigrationBitmapAlias:
639 # @name: The name of the bitmap.
641 # @alias: An alias name for migration (for example the bitmap name on
642 # the opposite site).
644 # @transform: Allows the modification of the migrated bitmap. (since
649 { 'struct': 'BitmapMigrationBitmapAlias',
653 '*transform': 'BitmapMigrationBitmapAliasTransform'
657 # @BitmapMigrationNodeAlias:
659 # Maps a block node name and the bitmaps it has to aliases for dirty
662 # @node-name: A block node name.
664 # @alias: An alias block node name for migration (for example the node
665 # name on the opposite site).
667 # @bitmaps: Mappings for the bitmaps on this node.
671 { 'struct': 'BitmapMigrationNodeAlias',
675 'bitmaps': [ 'BitmapMigrationBitmapAlias' ]
679 # @MigrationParameter:
681 # Migration parameters enumeration
683 # @announce-initial: Initial delay (in milliseconds) before sending
684 # the first announce (Since 4.0)
686 # @announce-max: Maximum delay (in milliseconds) between packets in
687 # the announcement (Since 4.0)
689 # @announce-rounds: Number of self-announce packets sent after
690 # migration (Since 4.0)
692 # @announce-step: Increase in delay (in milliseconds) between
693 # subsequent packets in the announcement (Since 4.0)
695 # @compress-level: Set the compression level to be used in live
696 # migration, the compression level is an integer between 0 and 9,
697 # where 0 means no compression, 1 means the best compression
698 # speed, and 9 means best compression ratio which will consume
701 # @compress-threads: Set compression thread count to be used in live
702 # migration, the compression thread count is an integer between 1
705 # @compress-wait-thread: Controls behavior when all compression
706 # threads are currently busy. If true (default), wait for a free
707 # compression thread to become available; otherwise, send the page
708 # uncompressed. (Since 3.1)
710 # @decompress-threads: Set decompression thread count to be used in
711 # live migration, the decompression thread count is an integer
712 # between 1 and 255. Usually, decompression is at least 4 times as
713 # fast as compression, so set the decompress-threads to the number
714 # about 1/4 of compress-threads is adequate.
716 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and
717 # bytes_xfer_period to trigger throttling. It is expressed as
718 # percentage. The default value is 50. (Since 5.0)
720 # @cpu-throttle-initial: Initial percentage of time guest cpus are
721 # throttled when migration auto-converge is activated. The
722 # default value is 20. (Since 2.7)
724 # @cpu-throttle-increment: throttle percentage increase each time
725 # auto-converge detects that migration is not making progress.
726 # The default value is 10. (Since 2.7)
728 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage At
729 # the tail stage of throttling, the Guest is very sensitive to CPU
730 # percentage while the @cpu-throttle -increment is excessive
731 # usually at tail stage. If this parameter is true, we will
732 # compute the ideal CPU percentage used by the Guest, which may
733 # exactly make the dirty rate match the dirty rate threshold.
734 # Then we will choose a smaller throttle increment between the one
735 # specified by @cpu-throttle-increment and the one generated by
736 # ideal CPU percentage. Therefore, it is compatible to
737 # traditional throttling, meanwhile the throttle increment won't
738 # be excessive at tail stage. The default value is false. (Since
741 # @tls-creds: ID of the 'tls-creds' object that provides credentials
742 # for establishing a TLS connection over the migration data
743 # channel. On the outgoing side of the migration, the credentials
744 # must be for a 'client' endpoint, while for the incoming side the
745 # credentials must be for a 'server' endpoint. Setting this will
746 # enable TLS for all migrations. The default is unset, resulting
747 # in unsecured migration at the QEMU level. (Since 2.7)
749 # @tls-hostname: hostname of the target host for the migration. This
750 # is required when using x509 based TLS credentials and the
751 # migration URI does not already include a hostname. For example
752 # if using fd: or exec: based migration, the hostname must be
753 # provided so that the server's x509 certificate identity can be
754 # validated. (Since 2.7)
756 # @tls-authz: ID of the 'authz' object subclass that provides access
757 # control checking of the TLS x509 certificate distinguished name.
758 # This object is only resolved at time of use, so can be deleted
759 # and recreated on the fly while the migration server is active.
760 # If missing, it will default to denying access (Since 4.0)
762 # @max-bandwidth: to set maximum speed for migration. maximum speed
763 # in bytes per second. (Since 2.8)
765 # @downtime-limit: set maximum tolerated downtime for migration.
766 # maximum downtime in milliseconds (Since 2.8)
768 # @x-checkpoint-delay: The delay time (in ms) between two COLO
769 # checkpoints in periodic mode. (Since 2.8)
771 # @block-incremental: Affects how much storage is migrated when the
772 # block migration capability is enabled. When false, the entire
773 # storage backing chain is migrated into a flattened image at the
774 # destination; when true, only the active qcow2 layer is migrated
775 # and the destination must already have access to the same backing
776 # chain as was used on the source. (since 2.10)
778 # @multifd-channels: Number of channels used to migrate data in
779 # parallel. This is the same number that the number of sockets
780 # used for migration. The default value is 2 (since 4.0)
782 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
783 # needs to be a multiple of the target page size and a power of 2
786 # @max-postcopy-bandwidth: Background transfer bandwidth during
787 # postcopy. Defaults to 0 (unlimited). In bytes per second.
790 # @max-cpu-throttle: maximum cpu throttle percentage. Defaults to 99.
793 # @multifd-compression: Which compression method to use. Defaults to
796 # @multifd-zlib-level: Set the compression level to be used in live
797 # migration, the compression level is an integer between 0 and 9,
798 # where 0 means no compression, 1 means the best compression
799 # speed, and 9 means best compression ratio which will consume
800 # more CPU. Defaults to 1. (Since 5.0)
802 # @multifd-zstd-level: Set the compression level to be used in live
803 # migration, the compression level is an integer between 0 and 20,
804 # where 0 means no compression, 1 means the best compression
805 # speed, and 20 means best compression ratio which will consume
806 # more CPU. Defaults to 1. (Since 5.0)
808 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
809 # aliases for the purpose of dirty bitmap migration. Such aliases
810 # may for example be the corresponding names on the opposite site.
811 # The mapping must be one-to-one, but not necessarily complete: On
812 # the source, unmapped bitmaps and all bitmaps on unmapped nodes
813 # will be ignored. On the destination, encountering an unmapped
814 # alias in the incoming migration stream will result in a report,
815 # and all further bitmap migration data will then be discarded.
816 # Note that the destination does not know about bitmaps it does
817 # not receive, so there is no limitation or requirement regarding
818 # the number of bitmaps received, or how they are named, or on
819 # which nodes they are placed. By default (when this parameter
820 # has never been set), bitmap names are mapped to themselves.
821 # Nodes are mapped to their block device name if there is one, and
822 # to their node name otherwise. (Since 5.2)
824 # @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty
825 # limit during live migration. Should be in the range 1 to 1000ms.
826 # Defaults to 1000ms. (Since 8.1)
828 # @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration.
829 # Defaults to 1. (Since 8.1)
833 # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
838 { 'enum': 'MigrationParameter',
839 'data': ['announce-initial', 'announce-max',
840 'announce-rounds', 'announce-step',
841 'compress-level', 'compress-threads', 'decompress-threads',
842 'compress-wait-thread', 'throttle-trigger-threshold',
843 'cpu-throttle-initial', 'cpu-throttle-increment',
844 'cpu-throttle-tailslow',
845 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
847 { 'name': 'x-checkpoint-delay', 'features': [ 'unstable' ] },
850 'xbzrle-cache-size', 'max-postcopy-bandwidth',
851 'max-cpu-throttle', 'multifd-compression',
852 'multifd-zlib-level', 'multifd-zstd-level',
853 'block-bitmap-mapping',
854 { 'name': 'x-vcpu-dirty-limit-period', 'features': ['unstable'] },
855 'vcpu-dirty-limit'] }
858 # @MigrateSetParameters:
860 # @announce-initial: Initial delay (in milliseconds) before sending
861 # the first announce (Since 4.0)
863 # @announce-max: Maximum delay (in milliseconds) between packets in
864 # the announcement (Since 4.0)
866 # @announce-rounds: Number of self-announce packets sent after
867 # migration (Since 4.0)
869 # @announce-step: Increase in delay (in milliseconds) between
870 # subsequent packets in the announcement (Since 4.0)
872 # @compress-level: compression level
874 # @compress-threads: compression thread count
876 # @compress-wait-thread: Controls behavior when all compression
877 # threads are currently busy. If true (default), wait for a free
878 # compression thread to become available; otherwise, send the page
879 # uncompressed. (Since 3.1)
881 # @decompress-threads: decompression thread count
883 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and
884 # bytes_xfer_period to trigger throttling. It is expressed as
885 # percentage. The default value is 50. (Since 5.0)
887 # @cpu-throttle-initial: Initial percentage of time guest cpus are
888 # throttled when migration auto-converge is activated. The
889 # default value is 20. (Since 2.7)
891 # @cpu-throttle-increment: throttle percentage increase each time
892 # auto-converge detects that migration is not making progress.
893 # The default value is 10. (Since 2.7)
895 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage At
896 # the tail stage of throttling, the Guest is very sensitive to CPU
897 # percentage while the @cpu-throttle -increment is excessive
898 # usually at tail stage. If this parameter is true, we will
899 # compute the ideal CPU percentage used by the Guest, which may
900 # exactly make the dirty rate match the dirty rate threshold.
901 # Then we will choose a smaller throttle increment between the one
902 # specified by @cpu-throttle-increment and the one generated by
903 # ideal CPU percentage. Therefore, it is compatible to
904 # traditional throttling, meanwhile the throttle increment won't
905 # be excessive at tail stage. The default value is false. (Since
908 # @tls-creds: ID of the 'tls-creds' object that provides credentials
909 # for establishing a TLS connection over the migration data
910 # channel. On the outgoing side of the migration, the credentials
911 # must be for a 'client' endpoint, while for the incoming side the
912 # credentials must be for a 'server' endpoint. Setting this to a
913 # non-empty string enables TLS for all migrations. An empty
914 # string means that QEMU will use plain text mode for migration,
915 # rather than TLS (Since 2.9) Previously (since 2.7), this was
916 # reported by omitting tls-creds instead.
918 # @tls-hostname: hostname of the target host for the migration. This
919 # is required when using x509 based TLS credentials and the
920 # migration URI does not already include a hostname. For example
921 # if using fd: or exec: based migration, the hostname must be
922 # provided so that the server's x509 certificate identity can be
923 # validated. (Since 2.7) An empty string means that QEMU will use
924 # the hostname associated with the migration URI, if any. (Since
925 # 2.9) Previously (since 2.7), this was reported by omitting
926 # tls-hostname instead.
928 # @max-bandwidth: to set maximum speed for migration. maximum speed
929 # in bytes per second. (Since 2.8)
931 # @downtime-limit: set maximum tolerated downtime for migration.
932 # maximum downtime in milliseconds (Since 2.8)
934 # @x-checkpoint-delay: the delay time between two COLO checkpoints.
937 # @block-incremental: Affects how much storage is migrated when the
938 # block migration capability is enabled. When false, the entire
939 # storage backing chain is migrated into a flattened image at the
940 # destination; when true, only the active qcow2 layer is migrated
941 # and the destination must already have access to the same backing
942 # chain as was used on the source. (since 2.10)
944 # @multifd-channels: Number of channels used to migrate data in
945 # parallel. This is the same number that the number of sockets
946 # used for migration. The default value is 2 (since 4.0)
948 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
949 # needs to be a multiple of the target page size and a power of 2
952 # @max-postcopy-bandwidth: Background transfer bandwidth during
953 # postcopy. Defaults to 0 (unlimited). In bytes per second.
956 # @max-cpu-throttle: maximum cpu throttle percentage. The default
957 # value is 99. (Since 3.1)
959 # @multifd-compression: Which compression method to use. Defaults to
962 # @multifd-zlib-level: Set the compression level to be used in live
963 # migration, the compression level is an integer between 0 and 9,
964 # where 0 means no compression, 1 means the best compression
965 # speed, and 9 means best compression ratio which will consume
966 # more CPU. Defaults to 1. (Since 5.0)
968 # @multifd-zstd-level: Set the compression level to be used in live
969 # migration, the compression level is an integer between 0 and 20,
970 # where 0 means no compression, 1 means the best compression
971 # speed, and 20 means best compression ratio which will consume
972 # more CPU. Defaults to 1. (Since 5.0)
974 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
975 # aliases for the purpose of dirty bitmap migration. Such aliases
976 # may for example be the corresponding names on the opposite site.
977 # The mapping must be one-to-one, but not necessarily complete: On
978 # the source, unmapped bitmaps and all bitmaps on unmapped nodes
979 # will be ignored. On the destination, encountering an unmapped
980 # alias in the incoming migration stream will result in a report,
981 # and all further bitmap migration data will then be discarded.
982 # Note that the destination does not know about bitmaps it does
983 # not receive, so there is no limitation or requirement regarding
984 # the number of bitmaps received, or how they are named, or on
985 # which nodes they are placed. By default (when this parameter
986 # has never been set), bitmap names are mapped to themselves.
987 # Nodes are mapped to their block device name if there is one, and
988 # to their node name otherwise. (Since 5.2)
990 # @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty
991 # limit during live migration. Should be in the range 1 to 1000ms.
992 # Defaults to 1000ms. (Since 8.1)
994 # @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration.
995 # Defaults to 1. (Since 8.1)
999 # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
1002 # TODO: either fuse back into MigrationParameters, or make
1003 # MigrationParameters members mandatory
1007 { 'struct': 'MigrateSetParameters',
1008 'data': { '*announce-initial': 'size',
1009 '*announce-max': 'size',
1010 '*announce-rounds': 'size',
1011 '*announce-step': 'size',
1012 '*compress-level': 'uint8',
1013 '*compress-threads': 'uint8',
1014 '*compress-wait-thread': 'bool',
1015 '*decompress-threads': 'uint8',
1016 '*throttle-trigger-threshold': 'uint8',
1017 '*cpu-throttle-initial': 'uint8',
1018 '*cpu-throttle-increment': 'uint8',
1019 '*cpu-throttle-tailslow': 'bool',
1020 '*tls-creds': 'StrOrNull',
1021 '*tls-hostname': 'StrOrNull',
1022 '*tls-authz': 'StrOrNull',
1023 '*max-bandwidth': 'size',
1024 '*downtime-limit': 'uint64',
1025 '*x-checkpoint-delay': { 'type': 'uint32',
1026 'features': [ 'unstable' ] },
1027 '*block-incremental': 'bool',
1028 '*multifd-channels': 'uint8',
1029 '*xbzrle-cache-size': 'size',
1030 '*max-postcopy-bandwidth': 'size',
1031 '*max-cpu-throttle': 'uint8',
1032 '*multifd-compression': 'MultiFDCompression',
1033 '*multifd-zlib-level': 'uint8',
1034 '*multifd-zstd-level': 'uint8',
1035 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ],
1036 '*x-vcpu-dirty-limit-period': { 'type': 'uint64',
1037 'features': [ 'unstable' ] },
1038 '*vcpu-dirty-limit': 'uint64'} }
1041 # @migrate-set-parameters:
1043 # Set various migration parameters.
1049 # -> { "execute": "migrate-set-parameters" ,
1050 # "arguments": { "compress-level": 1 } }
1051 # <- { "return": {} }
1053 { 'command': 'migrate-set-parameters', 'boxed': true,
1054 'data': 'MigrateSetParameters' }
1057 # @MigrationParameters:
1059 # The optional members aren't actually optional.
1061 # @announce-initial: Initial delay (in milliseconds) before sending
1062 # the first announce (Since 4.0)
1064 # @announce-max: Maximum delay (in milliseconds) between packets in
1065 # the announcement (Since 4.0)
1067 # @announce-rounds: Number of self-announce packets sent after
1068 # migration (Since 4.0)
1070 # @announce-step: Increase in delay (in milliseconds) between
1071 # subsequent packets in the announcement (Since 4.0)
1073 # @compress-level: compression level
1075 # @compress-threads: compression thread count
1077 # @compress-wait-thread: Controls behavior when all compression
1078 # threads are currently busy. If true (default), wait for a free
1079 # compression thread to become available; otherwise, send the page
1080 # uncompressed. (Since 3.1)
1082 # @decompress-threads: decompression thread count
1084 # @throttle-trigger-threshold: The ratio of bytes_dirty_period and
1085 # bytes_xfer_period to trigger throttling. It is expressed as
1086 # percentage. The default value is 50. (Since 5.0)
1088 # @cpu-throttle-initial: Initial percentage of time guest cpus are
1089 # throttled when migration auto-converge is activated. (Since
1092 # @cpu-throttle-increment: throttle percentage increase each time
1093 # auto-converge detects that migration is not making progress.
1096 # @cpu-throttle-tailslow: Make CPU throttling slower at tail stage At
1097 # the tail stage of throttling, the Guest is very sensitive to CPU
1098 # percentage while the @cpu-throttle -increment is excessive
1099 # usually at tail stage. If this parameter is true, we will
1100 # compute the ideal CPU percentage used by the Guest, which may
1101 # exactly make the dirty rate match the dirty rate threshold.
1102 # Then we will choose a smaller throttle increment between the one
1103 # specified by @cpu-throttle-increment and the one generated by
1104 # ideal CPU percentage. Therefore, it is compatible to
1105 # traditional throttling, meanwhile the throttle increment won't
1106 # be excessive at tail stage. The default value is false. (Since
1109 # @tls-creds: ID of the 'tls-creds' object that provides credentials
1110 # for establishing a TLS connection over the migration data
1111 # channel. On the outgoing side of the migration, the credentials
1112 # must be for a 'client' endpoint, while for the incoming side the
1113 # credentials must be for a 'server' endpoint. An empty string
1114 # means that QEMU will use plain text mode for migration, rather
1115 # than TLS (Since 2.7) Note: 2.8 reports this by omitting
1116 # tls-creds instead.
1118 # @tls-hostname: hostname of the target host for the migration. This
1119 # is required when using x509 based TLS credentials and the
1120 # migration URI does not already include a hostname. For example
1121 # if using fd: or exec: based migration, the hostname must be
1122 # provided so that the server's x509 certificate identity can be
1123 # validated. (Since 2.7) An empty string means that QEMU will use
1124 # the hostname associated with the migration URI, if any. (Since
1125 # 2.9) Note: 2.8 reports this by omitting tls-hostname instead.
1127 # @tls-authz: ID of the 'authz' object subclass that provides access
1128 # control checking of the TLS x509 certificate distinguished name.
1131 # @max-bandwidth: to set maximum speed for migration. maximum speed
1132 # in bytes per second. (Since 2.8)
1134 # @downtime-limit: set maximum tolerated downtime for migration.
1135 # maximum downtime in milliseconds (Since 2.8)
1137 # @x-checkpoint-delay: the delay time between two COLO checkpoints.
1140 # @block-incremental: Affects how much storage is migrated when the
1141 # block migration capability is enabled. When false, the entire
1142 # storage backing chain is migrated into a flattened image at the
1143 # destination; when true, only the active qcow2 layer is migrated
1144 # and the destination must already have access to the same backing
1145 # chain as was used on the source. (since 2.10)
1147 # @multifd-channels: Number of channels used to migrate data in
1148 # parallel. This is the same number that the number of sockets
1149 # used for migration. The default value is 2 (since 4.0)
1151 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
1152 # needs to be a multiple of the target page size and a power of 2
1155 # @max-postcopy-bandwidth: Background transfer bandwidth during
1156 # postcopy. Defaults to 0 (unlimited). In bytes per second.
1159 # @max-cpu-throttle: maximum cpu throttle percentage. Defaults to 99.
1162 # @multifd-compression: Which compression method to use. Defaults to
1165 # @multifd-zlib-level: Set the compression level to be used in live
1166 # migration, the compression level is an integer between 0 and 9,
1167 # where 0 means no compression, 1 means the best compression
1168 # speed, and 9 means best compression ratio which will consume
1169 # more CPU. Defaults to 1. (Since 5.0)
1171 # @multifd-zstd-level: Set the compression level to be used in live
1172 # migration, the compression level is an integer between 0 and 20,
1173 # where 0 means no compression, 1 means the best compression
1174 # speed, and 20 means best compression ratio which will consume
1175 # more CPU. Defaults to 1. (Since 5.0)
1177 # @block-bitmap-mapping: Maps block nodes and bitmaps on them to
1178 # aliases for the purpose of dirty bitmap migration. Such aliases
1179 # may for example be the corresponding names on the opposite site.
1180 # The mapping must be one-to-one, but not necessarily complete: On
1181 # the source, unmapped bitmaps and all bitmaps on unmapped nodes
1182 # will be ignored. On the destination, encountering an unmapped
1183 # alias in the incoming migration stream will result in a report,
1184 # and all further bitmap migration data will then be discarded.
1185 # Note that the destination does not know about bitmaps it does
1186 # not receive, so there is no limitation or requirement regarding
1187 # the number of bitmaps received, or how they are named, or on
1188 # which nodes they are placed. By default (when this parameter
1189 # has never been set), bitmap names are mapped to themselves.
1190 # Nodes are mapped to their block device name if there is one, and
1191 # to their node name otherwise. (Since 5.2)
1193 # @x-vcpu-dirty-limit-period: Periodic time (in milliseconds) of dirty
1194 # limit during live migration. Should be in the range 1 to 1000ms.
1195 # Defaults to 1000ms. (Since 8.1)
1197 # @vcpu-dirty-limit: Dirtyrate limit (MB/s) during live migration.
1198 # Defaults to 1. (Since 8.1)
1202 # @unstable: Members @x-checkpoint-delay and @x-vcpu-dirty-limit-period
1207 { 'struct': 'MigrationParameters',
1208 'data': { '*announce-initial': 'size',
1209 '*announce-max': 'size',
1210 '*announce-rounds': 'size',
1211 '*announce-step': 'size',
1212 '*compress-level': 'uint8',
1213 '*compress-threads': 'uint8',
1214 '*compress-wait-thread': 'bool',
1215 '*decompress-threads': 'uint8',
1216 '*throttle-trigger-threshold': 'uint8',
1217 '*cpu-throttle-initial': 'uint8',
1218 '*cpu-throttle-increment': 'uint8',
1219 '*cpu-throttle-tailslow': 'bool',
1220 '*tls-creds': 'str',
1221 '*tls-hostname': 'str',
1222 '*tls-authz': 'str',
1223 '*max-bandwidth': 'size',
1224 '*downtime-limit': 'uint64',
1225 '*x-checkpoint-delay': { 'type': 'uint32',
1226 'features': [ 'unstable' ] },
1227 '*block-incremental': 'bool',
1228 '*multifd-channels': 'uint8',
1229 '*xbzrle-cache-size': 'size',
1230 '*max-postcopy-bandwidth': 'size',
1231 '*max-cpu-throttle': 'uint8',
1232 '*multifd-compression': 'MultiFDCompression',
1233 '*multifd-zlib-level': 'uint8',
1234 '*multifd-zstd-level': 'uint8',
1235 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ],
1236 '*x-vcpu-dirty-limit-period': { 'type': 'uint64',
1237 'features': [ 'unstable' ] },
1238 '*vcpu-dirty-limit': 'uint64'} }
1241 # @query-migrate-parameters:
1243 # Returns information about the current migration parameters
1245 # Returns: @MigrationParameters
1251 # -> { "execute": "query-migrate-parameters" }
1253 # "decompress-threads": 2,
1254 # "cpu-throttle-increment": 10,
1255 # "compress-threads": 8,
1256 # "compress-level": 1,
1257 # "cpu-throttle-initial": 20,
1258 # "max-bandwidth": 33554432,
1259 # "downtime-limit": 300
1263 { 'command': 'query-migrate-parameters',
1264 'returns': 'MigrationParameters' }
1267 # @migrate-start-postcopy:
1269 # Followup to a migration command to switch the migration to postcopy
1270 # mode. The postcopy-ram capability must be set on both source and
1271 # destination before the original migration command.
1277 # -> { "execute": "migrate-start-postcopy" }
1278 # <- { "return": {} }
1280 { 'command': 'migrate-start-postcopy' }
1285 # Emitted when a migration event happens
1287 # @status: @MigrationStatus describing the current migration status.
1293 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
1294 # "event": "MIGRATION",
1295 # "data": {"status": "completed"} }
1297 { 'event': 'MIGRATION',
1298 'data': {'status': 'MigrationStatus'}}
1303 # Emitted from the source side of a migration at the start of each
1304 # pass (when it syncs the dirty bitmap)
1306 # @pass: An incrementing count (starting at 1 on the first pass)
1312 # <- { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
1313 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
1315 { 'event': 'MIGRATION_PASS',
1316 'data': { 'pass': 'int' } }
1321 # The message transmission between Primary side and Secondary side.
1323 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1325 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for
1328 # @checkpoint-reply: SVM gets PVM's checkpoint request
1330 # @vmstate-send: VM's state will be sent by PVM.
1332 # @vmstate-size: The total size of VMstate.
1334 # @vmstate-received: VM's state has been received by SVM.
1336 # @vmstate-loaded: VM's state has been loaded by SVM.
1340 { 'enum': 'COLOMessage',
1341 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1342 'vmstate-send', 'vmstate-size', 'vmstate-received',
1343 'vmstate-loaded' ] }
1348 # The COLO current mode.
1350 # @none: COLO is disabled.
1352 # @primary: COLO node in primary side.
1354 # @secondary: COLO node in slave side.
1358 { 'enum': 'COLOMode',
1359 'data': [ 'none', 'primary', 'secondary'] }
1364 # An enumeration of COLO failover status
1366 # @none: no failover has ever happened
1368 # @require: got failover requirement but not handled
1370 # @active: in the process of doing failover
1372 # @completed: finish the process of failover
1374 # @relaunch: restart the failover process, from 'none' -> 'completed'
1379 { 'enum': 'FailoverStatus',
1380 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1385 # Emitted when VM finishes COLO mode due to some errors happening or
1386 # at the request of users.
1388 # @mode: report COLO mode when COLO exited.
1390 # @reason: describes the reason for the COLO exit.
1396 # <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
1397 # "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
1399 { 'event': 'COLO_EXIT',
1400 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1405 # The reason for a COLO exit.
1407 # @none: failover has never happened. This state does not occur in
1408 # the COLO_EXIT event, and is only visible in the result of
1409 # query-colo-status.
1411 # @request: COLO exit is due to an external request.
1413 # @error: COLO exit is due to an internal error.
1415 # @processing: COLO is currently handling a failover (since 4.0).
1419 { 'enum': 'COLOExitReason',
1420 'data': [ 'none', 'request', 'error' , 'processing' ] }
1423 # @x-colo-lost-heartbeat:
1425 # Tell qemu that heartbeat is lost, request it to do takeover
1426 # procedures. If this command is sent to the PVM, the Primary side
1427 # will exit COLO mode. If sent to the Secondary, the Secondary side
1428 # will run failover work, then takes over server operation to become
1433 # @unstable: This command is experimental.
1439 # -> { "execute": "x-colo-lost-heartbeat" }
1440 # <- { "return": {} }
1442 { 'command': 'x-colo-lost-heartbeat',
1443 'features': [ 'unstable' ],
1444 'if': 'CONFIG_REPLICATION' }
1449 # Cancel the current executing migration process.
1451 # Returns: nothing on success
1453 # Notes: This command succeeds even if there is no migration process
1460 # -> { "execute": "migrate_cancel" }
1461 # <- { "return": {} }
1463 { 'command': 'migrate_cancel' }
1466 # @migrate-continue:
1468 # Continue migration when it's in a paused state.
1470 # @state: The state the migration is currently expected to be in
1472 # Returns: nothing on success
1478 # -> { "execute": "migrate-continue" , "arguments":
1479 # { "state": "pre-switchover" } }
1480 # <- { "return": {} }
1482 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
1487 # Migrates the current running guest to another Virtual Machine.
1489 # @uri: the Uniform Resource Identifier of the destination VM
1491 # @blk: do block migration (full disk copy)
1493 # @inc: incremental disk copy migration
1495 # @detach: this argument exists only for compatibility reasons and is
1498 # @resume: resume one paused migration, default "off". (since 3.0)
1500 # Returns: nothing on success
1506 # 1. The 'query-migrate' command should be used to check migration's
1507 # progress and final result (this information is provided by the
1510 # 2. All boolean arguments default to false
1512 # 3. The user Monitor's "detach" argument is invalid in QMP and should
1517 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1518 # <- { "return": {} }
1520 { 'command': 'migrate',
1521 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1522 '*detach': 'bool', '*resume': 'bool' } }
1525 # @migrate-incoming:
1527 # Start an incoming migration, the qemu must have been started with
1530 # @uri: The Uniform Resource Identifier identifying the source or
1531 # address to listen on
1533 # Returns: nothing on success
1539 # 1. It's a bad idea to use a string for the uri, but it needs
1540 # to stay compatible with -incoming and the format of the uri
1541 # is already exposed above libvirt.
1543 # 2. QEMU must be started with -incoming defer to allow
1544 # migrate-incoming to be used.
1546 # 3. The uri format is the same as for -incoming
1550 # -> { "execute": "migrate-incoming",
1551 # "arguments": { "uri": "tcp::4446" } }
1552 # <- { "return": {} }
1554 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1557 # @xen-save-devices-state:
1559 # Save the state of all devices to file. The RAM and the block
1560 # devices of the VM are not saved by this command.
1562 # @filename: the file to save the state of the devices to as binary
1563 # data. See xen-save-devices-state.txt for a description of the
1566 # @live: Optional argument to ask QEMU to treat this command as part
1567 # of a live migration. Default to true. (since 2.11)
1569 # Returns: Nothing on success
1575 # -> { "execute": "xen-save-devices-state",
1576 # "arguments": { "filename": "/tmp/save" } }
1577 # <- { "return": {} }
1579 { 'command': 'xen-save-devices-state',
1580 'data': {'filename': 'str', '*live':'bool' } }
1583 # @xen-set-global-dirty-log:
1585 # Enable or disable the global dirty log mode.
1587 # @enable: true to enable, false to disable.
1595 # -> { "execute": "xen-set-global-dirty-log",
1596 # "arguments": { "enable": true } }
1597 # <- { "return": {} }
1599 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1602 # @xen-load-devices-state:
1604 # Load the state of all devices from file. The RAM and the block
1605 # devices of the VM are not loaded by this command.
1607 # @filename: the file to load the state of the devices from as binary
1608 # data. See xen-save-devices-state.txt for a description of the
1615 # -> { "execute": "xen-load-devices-state",
1616 # "arguments": { "filename": "/tmp/resume" } }
1617 # <- { "return": {} }
1619 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
1622 # @xen-set-replication:
1624 # Enable or disable replication.
1626 # @enable: true to enable, false to disable.
1628 # @primary: true for primary or false for secondary.
1630 # @failover: true to do failover, false to stop. but cannot be
1631 # specified if 'enable' is true. default value is false.
1637 # -> { "execute": "xen-set-replication",
1638 # "arguments": {"enable": true, "primary": false} }
1639 # <- { "return": {} }
1643 { 'command': 'xen-set-replication',
1644 'data': { 'enable': 'bool', 'primary': 'bool', '*failover': 'bool' },
1645 'if': 'CONFIG_REPLICATION' }
1648 # @ReplicationStatus:
1650 # The result format for 'query-xen-replication-status'.
1652 # @error: true if an error happened, false if replication is normal.
1654 # @desc: the human readable error description string, when @error is
1659 { 'struct': 'ReplicationStatus',
1660 'data': { 'error': 'bool', '*desc': 'str' },
1661 'if': 'CONFIG_REPLICATION' }
1664 # @query-xen-replication-status:
1666 # Query replication status while the vm is running.
1668 # Returns: A @ReplicationStatus object showing the status.
1672 # -> { "execute": "query-xen-replication-status" }
1673 # <- { "return": { "error": false } }
1677 { 'command': 'query-xen-replication-status',
1678 'returns': 'ReplicationStatus',
1679 'if': 'CONFIG_REPLICATION' }
1682 # @xen-colo-do-checkpoint:
1684 # Xen uses this command to notify replication to trigger a checkpoint.
1690 # -> { "execute": "xen-colo-do-checkpoint" }
1691 # <- { "return": {} }
1695 { 'command': 'xen-colo-do-checkpoint',
1696 'if': 'CONFIG_REPLICATION' }
1701 # The result format for 'query-colo-status'.
1703 # @mode: COLO running mode. If COLO is running, this field will
1704 # return 'primary' or 'secondary'.
1706 # @last-mode: COLO last running mode. If COLO is running, this field
1707 # will return same like mode field, after failover we can use this
1708 # field to get last colo mode. (since 4.0)
1710 # @reason: describes the reason for the COLO exit.
1714 { 'struct': 'COLOStatus',
1715 'data': { 'mode': 'COLOMode', 'last-mode': 'COLOMode',
1716 'reason': 'COLOExitReason' },
1717 'if': 'CONFIG_REPLICATION' }
1720 # @query-colo-status:
1722 # Query COLO status while the vm is running.
1724 # Returns: A @COLOStatus object showing the status.
1728 # -> { "execute": "query-colo-status" }
1729 # <- { "return": { "mode": "primary", "last-mode": "none", "reason": "request" } }
1733 { 'command': 'query-colo-status',
1734 'returns': 'COLOStatus',
1735 'if': 'CONFIG_REPLICATION' }
1740 # Provide a recovery migration stream URI.
1742 # @uri: the URI to be used for the recovery of migration stream.
1748 # -> { "execute": "migrate-recover",
1749 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1750 # <- { "return": {} }
1754 { 'command': 'migrate-recover',
1755 'data': { 'uri': 'str' },
1761 # Pause a migration. Currently it only supports postcopy.
1767 # -> { "execute": "migrate-pause" }
1768 # <- { "return": {} }
1772 { 'command': 'migrate-pause', 'allow-oob': true }
1777 # Emitted from source side of a migration when migration state is
1778 # WAIT_UNPLUG. Device was unplugged by guest operating system. Device
1779 # resources in QEMU are kept on standby to be able to re-plug it in
1780 # case of migration failure.
1782 # @device-id: QEMU device id of the unplugged device
1788 # <- { "event": "UNPLUG_PRIMARY",
1789 # "data": { "device-id": "hostdev0" },
1790 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1792 { 'event': 'UNPLUG_PRIMARY',
1793 'data': { 'device-id': 'str' } }
1798 # Dirty rate of vcpu.
1802 # @dirty-rate: dirty rate.
1806 { 'struct': 'DirtyRateVcpu',
1807 'data': { 'id': 'int', 'dirty-rate': 'int64' } }
1812 # Dirty page rate measurement status.
1814 # @unstarted: measuring thread has not been started yet
1816 # @measuring: measuring thread is running
1818 # @measured: dirty page rate is measured and the results are available
1822 { 'enum': 'DirtyRateStatus',
1823 'data': [ 'unstarted', 'measuring', 'measured'] }
1826 # @DirtyRateMeasureMode:
1828 # Method used to measure dirty page rate. Differences between
1829 # available methods are explained in @calc-dirty-rate.
1831 # @page-sampling: use page sampling
1833 # @dirty-ring: use dirty ring
1835 # @dirty-bitmap: use dirty bitmap
1839 { 'enum': 'DirtyRateMeasureMode',
1840 'data': ['page-sampling', 'dirty-ring', 'dirty-bitmap'] }
1845 # Information about measured dirty page rate.
1847 # @dirty-rate: an estimate of the dirty page rate of the VM in units
1848 # of MiB/s. Value is present only when @status is 'measured'.
1850 # @status: current status of dirty page rate measurements
1852 # @start-time: start time in units of second for calculation
1854 # @calc-time: time period for which dirty page rate was measured
1857 # @sample-pages: number of sampled pages per GiB of guest memory.
1858 # Valid only in page-sampling mode (Since 6.1)
1860 # @mode: mode that was used to measure dirty page rate (Since 6.2)
1862 # @vcpu-dirty-rate: dirty rate for each vCPU if dirty-ring mode was
1863 # specified (Since 6.2)
1867 { 'struct': 'DirtyRateInfo',
1868 'data': {'*dirty-rate': 'int64',
1869 'status': 'DirtyRateStatus',
1870 'start-time': 'int64',
1871 'calc-time': 'int64',
1872 'sample-pages': 'uint64',
1873 'mode': 'DirtyRateMeasureMode',
1874 '*vcpu-dirty-rate': [ 'DirtyRateVcpu' ] } }
1879 # Start measuring dirty page rate of the VM. Results can be retrieved
1880 # with @query-dirty-rate after measurements are completed.
1882 # Dirty page rate is the number of pages changed in a given time
1883 # period expressed in MiB/s. The following methods of calculation are
1886 # 1. In page sampling mode, a random subset of pages are selected and
1887 # hashed twice: once at the beginning of measurement time period,
1888 # and once again at the end. If two hashes for some page are
1889 # different, the page is counted as changed. Since this method
1890 # relies on sampling and hashing, calculated dirty page rate is
1891 # only an estimate of its true value. Increasing @sample-pages
1892 # improves estimation quality at the cost of higher computational
1895 # 2. Dirty bitmap mode captures writes to memory (for example by
1896 # temporarily revoking write access to all pages) and counting page
1897 # faults. Information about modified pages is collected into a
1898 # bitmap, where each bit corresponds to one guest page. This mode
1899 # requires that KVM accelerator property "dirty-ring-size" is *not*
1902 # 3. Dirty ring mode is similar to dirty bitmap mode, but the
1903 # information about modified pages is collected into ring buffer.
1904 # This mode tracks page modification per each vCPU separately. It
1905 # requires that KVM accelerator property "dirty-ring-size" is set.
1907 # @calc-time: time period in units of second for which dirty page rate
1908 # is calculated. Note that larger @calc-time values will
1909 # typically result in smaller dirty page rates because page
1910 # dirtying is a one-time event. Once some page is counted as
1911 # dirty during @calc-time period, further writes to this page will
1912 # not increase dirty page rate anymore.
1914 # @sample-pages: number of sampled pages per each GiB of guest memory.
1915 # Default value is 512. For 4KiB guest pages this corresponds to
1916 # sampling ratio of 0.2%. This argument is used only in page
1917 # sampling mode. (Since 6.1)
1919 # @mode: mechanism for tracking dirty pages. Default value is
1920 # 'page-sampling'. Others are 'dirty-bitmap' and 'dirty-ring'.
1927 # -> {"execute": "calc-dirty-rate", "arguments": {"calc-time": 1,
1928 # 'sample-pages': 512} }
1929 # <- { "return": {} }
1931 { 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64',
1932 '*sample-pages': 'int',
1933 '*mode': 'DirtyRateMeasureMode'} }
1936 # @query-dirty-rate:
1938 # Query results of the most recent invocation of @calc-dirty-rate.
1944 # 1. Measurement is in progress:
1946 # <- {"status": "measuring", "sample-pages": 512,
1947 # "mode": "page-sampling", "start-time": 3665220, "calc-time": 10}
1949 # 2. Measurement has been completed:
1951 # <- {"status": "measured", "sample-pages": 512, "dirty-rate": 108,
1952 # "mode": "page-sampling", "start-time": 3665220, "calc-time": 10}
1954 { 'command': 'query-dirty-rate', 'returns': 'DirtyRateInfo' }
1959 # Dirty page rate limit information of a virtual CPU.
1961 # @cpu-index: index of a virtual CPU.
1963 # @limit-rate: upper limit of dirty page rate (MB/s) for a virtual
1964 # CPU, 0 means unlimited.
1966 # @current-rate: current dirty page rate (MB/s) for a virtual CPU.
1970 { 'struct': 'DirtyLimitInfo',
1971 'data': { 'cpu-index': 'int',
1972 'limit-rate': 'uint64',
1973 'current-rate': 'uint64' } }
1976 # @set-vcpu-dirty-limit:
1978 # Set the upper limit of dirty page rate for virtual CPUs.
1980 # Requires KVM with accelerator property "dirty-ring-size" set. A
1981 # virtual CPU's dirty page rate is a measure of its memory load. To
1982 # observe dirty page rates, use @calc-dirty-rate.
1984 # @cpu-index: index of a virtual CPU, default is all.
1986 # @dirty-rate: upper limit of dirty page rate (MB/s) for virtual CPUs.
1992 # -> {"execute": "set-vcpu-dirty-limit"}
1993 # "arguments": { "dirty-rate": 200,
1994 # "cpu-index": 1 } }
1995 # <- { "return": {} }
1997 { 'command': 'set-vcpu-dirty-limit',
1998 'data': { '*cpu-index': 'int',
1999 'dirty-rate': 'uint64' } }
2002 # @cancel-vcpu-dirty-limit:
2004 # Cancel the upper limit of dirty page rate for virtual CPUs.
2006 # Cancel the dirty page limit for the vCPU which has been set with
2007 # set-vcpu-dirty-limit command. Note that this command requires
2008 # support from dirty ring, same as the "set-vcpu-dirty-limit".
2010 # @cpu-index: index of a virtual CPU, default is all.
2016 # -> {"execute": "cancel-vcpu-dirty-limit"},
2017 # "arguments": { "cpu-index": 1 } }
2018 # <- { "return": {} }
2020 { 'command': 'cancel-vcpu-dirty-limit',
2021 'data': { '*cpu-index': 'int'} }
2024 # @query-vcpu-dirty-limit:
2026 # Returns information about virtual CPU dirty page rate limits, if
2033 # -> {"execute": "query-vcpu-dirty-limit"}
2035 # { "limit-rate": 60, "current-rate": 3, "cpu-index": 0},
2036 # { "limit-rate": 60, "current-rate": 3, "cpu-index": 1}]}
2038 { 'command': 'query-vcpu-dirty-limit',
2039 'returns': [ 'DirtyLimitInfo' ] }
2042 # @MigrationThreadInfo:
2044 # Information about migrationthreads
2046 # @name: the name of migration thread
2048 # @thread-id: ID of the underlying host thread
2052 { 'struct': 'MigrationThreadInfo',
2053 'data': {'name': 'str',
2054 'thread-id': 'int'} }
2057 # @query-migrationthreads:
2059 # Returns information of migration threads
2061 # data: migration thread name
2063 # Returns: information about migration threads
2067 { 'command': 'query-migrationthreads',
2068 'returns': ['MigrationThreadInfo'] }
2073 # Save a VM snapshot
2075 # @job-id: identifier for the newly created job
2077 # @tag: name of the snapshot to create
2079 # @vmstate: block device node name to save vmstate to
2081 # @devices: list of block device node names to save a snapshot to
2083 # Applications should not assume that the snapshot save is complete
2084 # when this command returns. The job commands / events must be used
2085 # to determine completion and to fetch details of any errors that
2088 # Note that execution of the guest CPUs may be stopped during the time
2089 # it takes to save the snapshot. A future version of QEMU may ensure
2090 # CPUs are executing continuously.
2092 # It is strongly recommended that @devices contain all writable block
2093 # device nodes if a consistent snapshot is required.
2095 # If @tag already exists, an error will be reported
2101 # -> { "execute": "snapshot-save",
2103 # "job-id": "snapsave0",
2105 # "vmstate": "disk0",
2106 # "devices": ["disk0", "disk1"]
2109 # <- { "return": { } }
2110 # <- {"event": "JOB_STATUS_CHANGE",
2111 # "timestamp": {"seconds": 1432121972, "microseconds": 744001},
2112 # "data": {"status": "created", "id": "snapsave0"}}
2113 # <- {"event": "JOB_STATUS_CHANGE",
2114 # "timestamp": {"seconds": 1432122172, "microseconds": 744001},
2115 # "data": {"status": "running", "id": "snapsave0"}}
2116 # <- {"event": "STOP",
2117 # "timestamp": {"seconds": 1432122372, "microseconds": 744001} }
2118 # <- {"event": "RESUME",
2119 # "timestamp": {"seconds": 1432122572, "microseconds": 744001} }
2120 # <- {"event": "JOB_STATUS_CHANGE",
2121 # "timestamp": {"seconds": 1432122772, "microseconds": 744001},
2122 # "data": {"status": "waiting", "id": "snapsave0"}}
2123 # <- {"event": "JOB_STATUS_CHANGE",
2124 # "timestamp": {"seconds": 1432122972, "microseconds": 744001},
2125 # "data": {"status": "pending", "id": "snapsave0"}}
2126 # <- {"event": "JOB_STATUS_CHANGE",
2127 # "timestamp": {"seconds": 1432123172, "microseconds": 744001},
2128 # "data": {"status": "concluded", "id": "snapsave0"}}
2129 # -> {"execute": "query-jobs"}
2130 # <- {"return": [{"current-progress": 1,
2131 # "status": "concluded",
2132 # "total-progress": 1,
2133 # "type": "snapshot-save",
2134 # "id": "snapsave0"}]}
2138 { 'command': 'snapshot-save',
2139 'data': { 'job-id': 'str',
2142 'devices': ['str'] } }
2147 # Load a VM snapshot
2149 # @job-id: identifier for the newly created job
2151 # @tag: name of the snapshot to load.
2153 # @vmstate: block device node name to load vmstate from
2155 # @devices: list of block device node names to load a snapshot from
2157 # Applications should not assume that the snapshot load is complete
2158 # when this command returns. The job commands / events must be used
2159 # to determine completion and to fetch details of any errors that
2162 # Note that execution of the guest CPUs will be stopped during the
2163 # time it takes to load the snapshot.
2165 # It is strongly recommended that @devices contain all writable block
2166 # device nodes that can have changed since the original @snapshot-save
2167 # command execution.
2173 # -> { "execute": "snapshot-load",
2175 # "job-id": "snapload0",
2177 # "vmstate": "disk0",
2178 # "devices": ["disk0", "disk1"]
2181 # <- { "return": { } }
2182 # <- {"event": "JOB_STATUS_CHANGE",
2183 # "timestamp": {"seconds": 1472124172, "microseconds": 744001},
2184 # "data": {"status": "created", "id": "snapload0"}}
2185 # <- {"event": "JOB_STATUS_CHANGE",
2186 # "timestamp": {"seconds": 1472125172, "microseconds": 744001},
2187 # "data": {"status": "running", "id": "snapload0"}}
2188 # <- {"event": "STOP",
2189 # "timestamp": {"seconds": 1472125472, "microseconds": 744001} }
2190 # <- {"event": "RESUME",
2191 # "timestamp": {"seconds": 1472125872, "microseconds": 744001} }
2192 # <- {"event": "JOB_STATUS_CHANGE",
2193 # "timestamp": {"seconds": 1472126172, "microseconds": 744001},
2194 # "data": {"status": "waiting", "id": "snapload0"}}
2195 # <- {"event": "JOB_STATUS_CHANGE",
2196 # "timestamp": {"seconds": 1472127172, "microseconds": 744001},
2197 # "data": {"status": "pending", "id": "snapload0"}}
2198 # <- {"event": "JOB_STATUS_CHANGE",
2199 # "timestamp": {"seconds": 1472128172, "microseconds": 744001},
2200 # "data": {"status": "concluded", "id": "snapload0"}}
2201 # -> {"execute": "query-jobs"}
2202 # <- {"return": [{"current-progress": 1,
2203 # "status": "concluded",
2204 # "total-progress": 1,
2205 # "type": "snapshot-load",
2206 # "id": "snapload0"}]}
2210 { 'command': 'snapshot-load',
2211 'data': { 'job-id': 'str',
2214 'devices': ['str'] } }
2219 # Delete a VM snapshot
2221 # @job-id: identifier for the newly created job
2223 # @tag: name of the snapshot to delete.
2225 # @devices: list of block device node names to delete a snapshot from
2227 # Applications should not assume that the snapshot delete is complete
2228 # when this command returns. The job commands / events must be used
2229 # to determine completion and to fetch details of any errors that
2236 # -> { "execute": "snapshot-delete",
2238 # "job-id": "snapdelete0",
2240 # "devices": ["disk0", "disk1"]
2243 # <- { "return": { } }
2244 # <- {"event": "JOB_STATUS_CHANGE",
2245 # "timestamp": {"seconds": 1442124172, "microseconds": 744001},
2246 # "data": {"status": "created", "id": "snapdelete0"}}
2247 # <- {"event": "JOB_STATUS_CHANGE",
2248 # "timestamp": {"seconds": 1442125172, "microseconds": 744001},
2249 # "data": {"status": "running", "id": "snapdelete0"}}
2250 # <- {"event": "JOB_STATUS_CHANGE",
2251 # "timestamp": {"seconds": 1442126172, "microseconds": 744001},
2252 # "data": {"status": "waiting", "id": "snapdelete0"}}
2253 # <- {"event": "JOB_STATUS_CHANGE",
2254 # "timestamp": {"seconds": 1442127172, "microseconds": 744001},
2255 # "data": {"status": "pending", "id": "snapdelete0"}}
2256 # <- {"event": "JOB_STATUS_CHANGE",
2257 # "timestamp": {"seconds": 1442128172, "microseconds": 744001},
2258 # "data": {"status": "concluded", "id": "snapdelete0"}}
2259 # -> {"execute": "query-jobs"}
2260 # <- {"return": [{"current-progress": 1,
2261 # "status": "concluded",
2262 # "total-progress": 1,
2263 # "type": "snapshot-delete",
2264 # "id": "snapdelete0"}]}
2268 { 'command': 'snapshot-delete',
2269 'data': { 'job-id': 'str',
2271 'devices': ['str'] } }