8 { 'include': 'common.json' }
9 { 'include': 'sockets.json' }
14 # Detailed migration status.
16 # @transferred: amount of bytes already transferred to the target VM
18 # @remaining: amount of bytes remaining to be transferred to the target VM
20 # @total: total amount of bytes involved in the migration process
22 # @duplicate: number of duplicate (zero) pages (since 1.2)
24 # @skipped: number of skipped zero pages (since 1.5)
26 # @normal: number of normal pages (since 1.2)
28 # @normal-bytes: number of normal bytes sent (since 1.2)
30 # @dirty-pages-rate: number of pages dirtied by second by the
33 # @mbps: throughput in megabits/sec. (since 1.6)
35 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
37 # @postcopy-requests: The number of page requests received from the destination
40 # @page-size: The number of bytes per page for the various page-based
41 # statistics (since 2.10)
43 # @multifd-bytes: The number of bytes sent through multifd (since 3.0)
45 # @pages-per-second: the number of memory pages transferred per second
50 { 'struct': 'MigrationStats',
51 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
52 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
53 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
54 'mbps' : 'number', 'dirty-sync-count' : 'int',
55 'postcopy-requests' : 'int', 'page-size' : 'int',
56 'multifd-bytes' : 'uint64', 'pages-per-second' : 'uint64' } }
61 # Detailed XBZRLE migration cache statistics
63 # @cache-size: XBZRLE cache size
65 # @bytes: amount of bytes already transferred to the target VM
67 # @pages: amount of pages transferred to the target VM
69 # @cache-miss: number of cache miss
71 # @cache-miss-rate: rate of cache miss (since 2.1)
73 # @overflow: number of overflows
77 { 'struct': 'XBZRLECacheStats',
78 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
79 'cache-miss': 'int', 'cache-miss-rate': 'number',
85 # Detailed migration compression statistics
87 # @pages: amount of pages compressed and transferred to the target VM
89 # @busy: count of times that no free thread was available to compress data
91 # @busy-rate: rate of thread busy
93 # @compressed-size: amount of bytes after compression
95 # @compression-rate: rate of compressed size
99 { 'struct': 'CompressionStats',
100 'data': {'pages': 'int', 'busy': 'int', 'busy-rate': 'number',
101 'compressed-size': 'int', 'compression-rate': 'number' } }
106 # An enumeration of migration status.
108 # @none: no migration has ever happened.
110 # @setup: migration process has been initiated.
112 # @cancelling: in the process of cancelling migration.
114 # @cancelled: cancelling migration is finished.
116 # @active: in the process of doing migration.
118 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
120 # @postcopy-paused: during postcopy but paused. (since 3.0)
122 # @postcopy-recover: trying to recover from a paused postcopy. (since 3.0)
124 # @completed: migration is finished.
126 # @failed: some error occurred during migration process.
128 # @colo: VM is in the process of fault tolerance, VM can not get into this
129 # state unless colo capability is enabled for migration. (since 2.8)
131 # @pre-switchover: Paused before device serialisation. (since 2.11)
133 # @device: During device serialisation when pause-before-switchover is enabled
136 # @wait-unplug: wait for device unplug request by guest OS to be completed.
142 { 'enum': 'MigrationStatus',
143 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
144 'active', 'postcopy-active', 'postcopy-paused',
145 'postcopy-recover', 'completed', 'failed', 'colo',
146 'pre-switchover', 'device', 'wait-unplug' ] }
151 # Information about current migration process.
153 # @status: @MigrationStatus describing the current migration status.
154 # If this field is not returned, no migration process
157 # @ram: @MigrationStats containing detailed migration
158 # status, only returned if status is 'active' or
159 # 'completed'(since 1.2)
161 # @disk: @MigrationStats containing detailed disk migration
162 # status, only returned if status is 'active' and it is a block
165 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
166 # migration statistics, only returned if XBZRLE feature is on and
167 # status is 'active' or 'completed' (since 1.2)
169 # @total-time: total amount of milliseconds since migration started.
170 # If migration has ended, it returns the total migration
173 # @downtime: only present when migration finishes correctly
174 # total downtime in milliseconds for the guest.
177 # @expected-downtime: only present while migration is active
178 # expected downtime in milliseconds for the guest in last walk
179 # of the dirty bitmap. (since 1.3)
181 # @setup-time: amount of setup time in milliseconds *before* the
182 # iterations begin but *after* the QMP command is issued. This is designed
183 # to provide an accounting of any activities (such as RDMA pinning) which
184 # may be expensive, but do not actually occur during the iterative
185 # migration rounds themselves. (since 1.6)
187 # @cpu-throttle-percentage: percentage of time guest cpus are being
188 # throttled during auto-converge. This is only present when auto-converge
189 # has started throttling guest cpus. (Since 2.7)
191 # @error-desc: the human readable error description string, when
192 # @status is 'failed'. Clients should not attempt to parse the
193 # error strings. (Since 2.7)
195 # @postcopy-blocktime: total time when all vCPU were blocked during postcopy
196 # live migration. This is only present when the postcopy-blocktime
197 # migration capability is enabled. (Since 3.0)
199 # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU. This is
200 # only present when the postcopy-blocktime migration capability
201 # is enabled. (Since 3.0)
203 # @compression: migration compression statistics, only returned if compression
204 # feature is on and status is 'active' or 'completed' (Since 3.1)
206 # @socket-address: Only used for tcp, to know what the real port is (Since 4.0)
210 { 'struct': 'MigrationInfo',
211 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
212 '*disk': 'MigrationStats',
213 '*xbzrle-cache': 'XBZRLECacheStats',
214 '*total-time': 'int',
215 '*expected-downtime': 'int',
217 '*setup-time': 'int',
218 '*cpu-throttle-percentage': 'int',
219 '*error-desc': 'str',
220 '*postcopy-blocktime' : 'uint32',
221 '*postcopy-vcpu-blocktime': ['uint32'],
222 '*compression': 'CompressionStats',
223 '*socket-address': ['SocketAddress'] } }
228 # Returns information about current migration process. If migration
229 # is active there will be another json-object with RAM migration
230 # status and if block migration is active another one with block
233 # Returns: @MigrationInfo
239 # 1. Before the first migration
241 # -> { "execute": "query-migrate" }
242 # <- { "return": {} }
244 # 2. Migration is done and has succeeded
246 # -> { "execute": "query-migrate" }
248 # "status": "completed",
249 # "total-time":12345,
250 # "setup-time":12345,
258 # "normal-bytes":123456,
259 # "dirty-sync-count":15
264 # 3. Migration is done and has failed
266 # -> { "execute": "query-migrate" }
267 # <- { "return": { "status": "failed" } }
269 # 4. Migration is being performed and is not a block migration:
271 # -> { "execute": "query-migrate" }
275 # "total-time":12345,
276 # "setup-time":12345,
277 # "expected-downtime":12345,
284 # "normal-bytes":123456,
285 # "dirty-sync-count":15
290 # 5. Migration is being performed and is a block migration:
292 # -> { "execute": "query-migrate" }
296 # "total-time":12345,
297 # "setup-time":12345,
298 # "expected-downtime":12345,
301 # "remaining":1053304,
302 # "transferred":3720,
305 # "normal-bytes":123456,
306 # "dirty-sync-count":15
310 # "remaining":20880384,
311 # "transferred":91136
316 # 6. Migration is being performed and XBZRLE is active:
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":3412992,
332 # "dirty-sync-count":15
335 # "cache-size":67108864,
339 # "cache-miss-rate":0.123,
346 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
349 # @MigrationCapability:
351 # Migration capabilities enumeration
353 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
354 # This feature allows us to minimize migration traffic for certain work
355 # loads, by sending compressed difference of the pages
357 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
358 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
359 # Disabled by default. (since 2.0)
361 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
362 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
363 # source and target VM to support this feature. To enable it is sufficient
364 # to enable the capability on the source VM. The feature is disabled by
365 # default. (since 1.6)
367 # @compress: Use multiple compression threads to accelerate live migration.
368 # This feature can help to reduce the migration traffic, by sending
369 # compressed pages. Please note that if compress and xbzrle are both
370 # on, compress only takes effect in the ram bulk stage, after that,
371 # it will be disabled and only xbzrle takes effect, this can help to
372 # minimize migration traffic. The feature is disabled by default.
375 # @events: generate events for each migration state change
378 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
379 # to speed up convergence of RAM migration. (since 1.6)
381 # @postcopy-ram: Start executing on the migration target before all of RAM has
382 # been migrated, pulling the remaining pages along as needed. The
383 # capacity must have the same setting on both source and target
384 # or migration will not even start. NOTE: If the migration fails during
385 # postcopy the VM will fail. (since 2.6)
387 # @x-colo: If enabled, migration will never end, and the state of the VM on the
388 # primary side will be migrated continuously to the VM on secondary
389 # side, this process is called COarse-Grain LOck Stepping (COLO) for
390 # Non-stop Service. (since 2.8)
392 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
393 # during postcopy-ram migration. (since 2.9)
395 # @block: If enabled, QEMU will also migrate the contents of all block
396 # devices. Default is disabled. A possible alternative uses
397 # mirror jobs to a builtin NBD server on the destination, which
398 # offers more flexibility.
401 # @return-path: If enabled, migration will use the return path even
402 # for precopy. (since 2.10)
404 # @pause-before-switchover: Pause outgoing migration before serialising device
405 # state and before disabling block IO (since 2.11)
407 # @multifd: Use more than one fd for migration (since 4.0)
409 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
412 # @postcopy-blocktime: Calculate downtime for postcopy live migration
415 # @late-block-activate: If enabled, the destination will not activate block
416 # devices (and thus take locks) immediately at the end of migration.
419 # @x-ignore-shared: If enabled, QEMU will not migrate shared memory (since 4.0)
421 # @validate-uuid: Send the UUID of the source to allow the destination
422 # to ensure it is the same. (since 4.2)
426 { 'enum': 'MigrationCapability',
427 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
428 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
429 'block', 'return-path', 'pause-before-switchover', 'multifd',
430 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
431 'x-ignore-shared', 'validate-uuid' ] }
434 # @MigrationCapabilityStatus:
436 # Migration capability information
438 # @capability: capability enum
440 # @state: capability state bool
444 { 'struct': 'MigrationCapabilityStatus',
445 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
448 # @migrate-set-capabilities:
450 # Enable/Disable the following migration capabilities (like xbzrle)
452 # @capabilities: json array of capability modifications to make
458 # -> { "execute": "migrate-set-capabilities" , "arguments":
459 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
462 { 'command': 'migrate-set-capabilities',
463 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
466 # @query-migrate-capabilities:
468 # Returns information about the current migration capabilities status
470 # Returns: @MigrationCapabilitiesStatus
476 # -> { "execute": "query-migrate-capabilities" }
478 # {"state": false, "capability": "xbzrle"},
479 # {"state": false, "capability": "rdma-pin-all"},
480 # {"state": false, "capability": "auto-converge"},
481 # {"state": false, "capability": "zero-blocks"},
482 # {"state": false, "capability": "compress"},
483 # {"state": true, "capability": "events"},
484 # {"state": false, "capability": "postcopy-ram"},
485 # {"state": false, "capability": "x-colo"}
489 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
492 # @MultiFDCompression:
494 # An enumeration of multifd compression methods.
496 # @none: no compression.
501 { 'enum': 'MultiFDCompression',
505 # @MigrationParameter:
507 # Migration parameters enumeration
509 # @announce-initial: Initial delay (in milliseconds) before sending the first
510 # announce (Since 4.0)
512 # @announce-max: Maximum delay (in milliseconds) between packets in the
513 # announcement (Since 4.0)
515 # @announce-rounds: Number of self-announce packets sent after migration
518 # @announce-step: Increase in delay (in milliseconds) between subsequent
519 # packets in the announcement (Since 4.0)
521 # @compress-level: Set the compression level to be used in live migration,
522 # the compression level is an integer between 0 and 9, where 0 means
523 # no compression, 1 means the best compression speed, and 9 means best
524 # compression ratio which will consume more CPU.
526 # @compress-threads: Set compression thread count to be used in live migration,
527 # the compression thread count is an integer between 1 and 255.
529 # @compress-wait-thread: Controls behavior when all compression threads are
530 # currently busy. If true (default), wait for a free
531 # compression thread to become available; otherwise,
532 # send the page uncompressed. (Since 3.1)
534 # @decompress-threads: Set decompression thread count to be used in live
535 # migration, the decompression thread count is an integer between 1
536 # and 255. Usually, decompression is at least 4 times as fast as
537 # compression, so set the decompress-threads to the number about 1/4
538 # of compress-threads is adequate.
540 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
541 # when migration auto-converge is activated. The
542 # default value is 20. (Since 2.7)
544 # @cpu-throttle-increment: throttle percentage increase each time
545 # auto-converge detects that migration is not making
546 # progress. The default value is 10. (Since 2.7)
548 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
549 # establishing a TLS connection over the migration data channel.
550 # On the outgoing side of the migration, the credentials must
551 # be for a 'client' endpoint, while for the incoming side the
552 # credentials must be for a 'server' endpoint. Setting this
553 # will enable TLS for all migrations. The default is unset,
554 # resulting in unsecured migration at the QEMU level. (Since 2.7)
556 # @tls-hostname: hostname of the target host for the migration. This is
557 # required when using x509 based TLS credentials and the
558 # migration URI does not already include a hostname. For
559 # example if using fd: or exec: based migration, the
560 # hostname must be provided so that the server's x509
561 # certificate identity can be validated. (Since 2.7)
563 # @tls-authz: ID of the 'authz' object subclass that provides access control
564 # checking of the TLS x509 certificate distinguished name.
565 # This object is only resolved at time of use, so can be deleted
566 # and recreated on the fly while the migration server is active.
567 # If missing, it will default to denying access (Since 4.0)
569 # @max-bandwidth: to set maximum speed for migration. maximum speed in
570 # bytes per second. (Since 2.8)
572 # @downtime-limit: set maximum tolerated downtime for migration. maximum
573 # downtime in milliseconds (Since 2.8)
575 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
576 # periodic mode. (Since 2.8)
578 # @block-incremental: Affects how much storage is migrated when the
579 # block migration capability is enabled. When false, the entire
580 # storage backing chain is migrated into a flattened image at
581 # the destination; when true, only the active qcow2 layer is
582 # migrated and the destination must already have access to the
583 # same backing chain as was used on the source. (since 2.10)
585 # @multifd-channels: Number of channels used to migrate data in
586 # parallel. This is the same number that the
587 # number of sockets used for migration. The
588 # default value is 2 (since 4.0)
590 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
591 # needs to be a multiple of the target page size
595 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
596 # Defaults to 0 (unlimited). In bytes per second.
599 # @max-cpu-throttle: maximum cpu throttle percentage.
600 # Defaults to 99. (Since 3.1)
602 # @multifd-compression: Which compression method to use.
603 # Defaults to none. (Since 5.0)
607 { 'enum': 'MigrationParameter',
608 'data': ['announce-initial', 'announce-max',
609 'announce-rounds', 'announce-step',
610 'compress-level', 'compress-threads', 'decompress-threads',
611 'compress-wait-thread',
612 'cpu-throttle-initial', 'cpu-throttle-increment',
613 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
614 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
616 'xbzrle-cache-size', 'max-postcopy-bandwidth',
617 'max-cpu-throttle', 'multifd-compression' ] }
620 # @MigrateSetParameters:
622 # @announce-initial: Initial delay (in milliseconds) before sending the first
623 # announce (Since 4.0)
625 # @announce-max: Maximum delay (in milliseconds) between packets in the
626 # announcement (Since 4.0)
628 # @announce-rounds: Number of self-announce packets sent after migration
631 # @announce-step: Increase in delay (in milliseconds) between subsequent
632 # packets in the announcement (Since 4.0)
634 # @compress-level: compression level
636 # @compress-threads: compression thread count
638 # @compress-wait-thread: Controls behavior when all compression threads are
639 # currently busy. If true (default), wait for a free
640 # compression thread to become available; otherwise,
641 # send the page uncompressed. (Since 3.1)
643 # @decompress-threads: decompression thread count
645 # @cpu-throttle-initial: Initial percentage of time guest cpus are
646 # throttled when migration auto-converge is activated.
647 # The default value is 20. (Since 2.7)
649 # @cpu-throttle-increment: throttle percentage increase each time
650 # auto-converge detects that migration is not making
651 # progress. The default value is 10. (Since 2.7)
653 # @tls-creds: ID of the 'tls-creds' object that provides credentials
654 # for establishing a TLS connection over the migration data
655 # channel. On the outgoing side of the migration, the credentials
656 # must be for a 'client' endpoint, while for the incoming side the
657 # credentials must be for a 'server' endpoint. Setting this
658 # to a non-empty string enables TLS for all migrations.
659 # An empty string means that QEMU will use plain text mode for
660 # migration, rather than TLS (Since 2.9)
661 # Previously (since 2.7), this was reported by omitting
664 # @tls-hostname: hostname of the target host for the migration. This
665 # is required when using x509 based TLS credentials and the
666 # migration URI does not already include a hostname. For
667 # example if using fd: or exec: based migration, the
668 # hostname must be provided so that the server's x509
669 # certificate identity can be validated. (Since 2.7)
670 # An empty string means that QEMU will use the hostname
671 # associated with the migration URI, if any. (Since 2.9)
672 # Previously (since 2.7), this was reported by omitting
673 # tls-hostname instead.
675 # @max-bandwidth: to set maximum speed for migration. maximum speed in
676 # bytes per second. (Since 2.8)
678 # @downtime-limit: set maximum tolerated downtime for migration. maximum
679 # downtime in milliseconds (Since 2.8)
681 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
683 # @block-incremental: Affects how much storage is migrated when the
684 # block migration capability is enabled. When false, the entire
685 # storage backing chain is migrated into a flattened image at
686 # the destination; when true, only the active qcow2 layer is
687 # migrated and the destination must already have access to the
688 # same backing chain as was used on the source. (since 2.10)
690 # @multifd-channels: Number of channels used to migrate data in
691 # parallel. This is the same number that the
692 # number of sockets used for migration. The
693 # default value is 2 (since 4.0)
695 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
696 # needs to be a multiple of the target page size
700 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
701 # Defaults to 0 (unlimited). In bytes per second.
704 # @max-cpu-throttle: maximum cpu throttle percentage.
705 # The default value is 99. (Since 3.1)
707 # @multifd-compression: Which compression method to use.
708 # Defaults to none. (Since 5.0)
712 # TODO either fuse back into MigrationParameters, or make
713 # MigrationParameters members mandatory
714 { 'struct': 'MigrateSetParameters',
715 'data': { '*announce-initial': 'size',
716 '*announce-max': 'size',
717 '*announce-rounds': 'size',
718 '*announce-step': 'size',
719 '*compress-level': 'int',
720 '*compress-threads': 'int',
721 '*compress-wait-thread': 'bool',
722 '*decompress-threads': 'int',
723 '*cpu-throttle-initial': 'int',
724 '*cpu-throttle-increment': 'int',
725 '*tls-creds': 'StrOrNull',
726 '*tls-hostname': 'StrOrNull',
727 '*tls-authz': 'StrOrNull',
728 '*max-bandwidth': 'int',
729 '*downtime-limit': 'int',
730 '*x-checkpoint-delay': 'int',
731 '*block-incremental': 'bool',
732 '*multifd-channels': 'int',
733 '*xbzrle-cache-size': 'size',
734 '*max-postcopy-bandwidth': 'size',
735 '*max-cpu-throttle': 'int',
736 '*multifd-compression': 'MultiFDCompression' } }
739 # @migrate-set-parameters:
741 # Set various migration parameters.
747 # -> { "execute": "migrate-set-parameters" ,
748 # "arguments": { "compress-level": 1 } }
751 { 'command': 'migrate-set-parameters', 'boxed': true,
752 'data': 'MigrateSetParameters' }
755 # @MigrationParameters:
757 # The optional members aren't actually optional.
759 # @announce-initial: Initial delay (in milliseconds) before sending the
760 # first announce (Since 4.0)
762 # @announce-max: Maximum delay (in milliseconds) between packets in the
763 # announcement (Since 4.0)
765 # @announce-rounds: Number of self-announce packets sent after migration
768 # @announce-step: Increase in delay (in milliseconds) between subsequent
769 # packets in the announcement (Since 4.0)
771 # @compress-level: compression level
773 # @compress-threads: compression thread count
775 # @compress-wait-thread: Controls behavior when all compression threads are
776 # currently busy. If true (default), wait for a free
777 # compression thread to become available; otherwise,
778 # send the page uncompressed. (Since 3.1)
780 # @decompress-threads: decompression thread count
782 # @cpu-throttle-initial: Initial percentage of time guest cpus are
783 # throttled when migration auto-converge is activated.
786 # @cpu-throttle-increment: throttle percentage increase each time
787 # auto-converge detects that migration is not making
788 # progress. (Since 2.7)
790 # @tls-creds: ID of the 'tls-creds' object that provides credentials
791 # for establishing a TLS connection over the migration data
792 # channel. On the outgoing side of the migration, the credentials
793 # must be for a 'client' endpoint, while for the incoming side the
794 # credentials must be for a 'server' endpoint.
795 # An empty string means that QEMU will use plain text mode for
796 # migration, rather than TLS (Since 2.7)
797 # Note: 2.8 reports this by omitting tls-creds instead.
799 # @tls-hostname: hostname of the target host for the migration. This
800 # is required when using x509 based TLS credentials and the
801 # migration URI does not already include a hostname. For
802 # example if using fd: or exec: based migration, the
803 # hostname must be provided so that the server's x509
804 # certificate identity can be validated. (Since 2.7)
805 # An empty string means that QEMU will use the hostname
806 # associated with the migration URI, if any. (Since 2.9)
807 # Note: 2.8 reports this by omitting tls-hostname instead.
809 # @tls-authz: ID of the 'authz' object subclass that provides access control
810 # checking of the TLS x509 certificate distinguished name. (Since
813 # @max-bandwidth: to set maximum speed for migration. maximum speed in
814 # bytes per second. (Since 2.8)
816 # @downtime-limit: set maximum tolerated downtime for migration. maximum
817 # downtime in milliseconds (Since 2.8)
819 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
821 # @block-incremental: Affects how much storage is migrated when the
822 # block migration capability is enabled. When false, the entire
823 # storage backing chain is migrated into a flattened image at
824 # the destination; when true, only the active qcow2 layer is
825 # migrated and the destination must already have access to the
826 # same backing chain as was used on the source. (since 2.10)
828 # @multifd-channels: Number of channels used to migrate data in
829 # parallel. This is the same number that the
830 # number of sockets used for migration.
831 # The default value is 2 (since 4.0)
833 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
834 # needs to be a multiple of the target page size
838 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
839 # Defaults to 0 (unlimited). In bytes per second.
842 # @max-cpu-throttle: maximum cpu throttle percentage.
846 # @multifd-compression: Which compression method to use.
847 # Defaults to none. (Since 5.0)
851 { 'struct': 'MigrationParameters',
852 'data': { '*announce-initial': 'size',
853 '*announce-max': 'size',
854 '*announce-rounds': 'size',
855 '*announce-step': 'size',
856 '*compress-level': 'uint8',
857 '*compress-threads': 'uint8',
858 '*compress-wait-thread': 'bool',
859 '*decompress-threads': 'uint8',
860 '*cpu-throttle-initial': 'uint8',
861 '*cpu-throttle-increment': 'uint8',
863 '*tls-hostname': 'str',
865 '*max-bandwidth': 'size',
866 '*downtime-limit': 'uint64',
867 '*x-checkpoint-delay': 'uint32',
868 '*block-incremental': 'bool' ,
869 '*multifd-channels': 'uint8',
870 '*xbzrle-cache-size': 'size',
871 '*max-postcopy-bandwidth': 'size',
872 '*max-cpu-throttle': 'uint8',
873 '*multifd-compression': 'MultiFDCompression' } }
876 # @query-migrate-parameters:
878 # Returns information about the current migration parameters
880 # Returns: @MigrationParameters
886 # -> { "execute": "query-migrate-parameters" }
888 # "decompress-threads": 2,
889 # "cpu-throttle-increment": 10,
890 # "compress-threads": 8,
891 # "compress-level": 1,
892 # "cpu-throttle-initial": 20,
893 # "max-bandwidth": 33554432,
894 # "downtime-limit": 300
899 { 'command': 'query-migrate-parameters',
900 'returns': 'MigrationParameters' }
903 # @client_migrate_info:
905 # Set migration information for remote display. This makes the server
906 # ask the client to automatically reconnect using the new parameters
907 # once migration finished successfully. Only implemented for SPICE.
909 # @protocol: must be "spice"
910 # @hostname: migration target hostname
911 # @port: spice tcp port for plaintext channels
912 # @tls-port: spice tcp port for tls-secured channels
913 # @cert-subject: server certificate subject
919 # -> { "execute": "client_migrate_info",
920 # "arguments": { "protocol": "spice",
921 # "hostname": "virt42.lab.kraxel.org",
923 # <- { "return": {} }
926 { 'command': 'client_migrate_info',
927 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
928 '*tls-port': 'int', '*cert-subject': 'str' } }
931 # @migrate-start-postcopy:
933 # Followup to a migration command to switch the migration to postcopy mode.
934 # The postcopy-ram capability must be set on both source and destination
935 # before the original migration command.
941 # -> { "execute": "migrate-start-postcopy" }
942 # <- { "return": {} }
945 { 'command': 'migrate-start-postcopy' }
950 # Emitted when a migration event happens
952 # @status: @MigrationStatus describing the current migration status.
958 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
959 # "event": "MIGRATION",
960 # "data": {"status": "completed"} }
963 { 'event': 'MIGRATION',
964 'data': {'status': 'MigrationStatus'}}
969 # Emitted from the source side of a migration at the start of each pass
970 # (when it syncs the dirty bitmap)
972 # @pass: An incrementing count (starting at 1 on the first pass)
978 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
979 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
982 { 'event': 'MIGRATION_PASS',
983 'data': { 'pass': 'int' } }
988 # The message transmission between Primary side and Secondary side.
990 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
992 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
994 # @checkpoint-reply: SVM gets PVM's checkpoint request
996 # @vmstate-send: VM's state will be sent by PVM.
998 # @vmstate-size: The total size of VMstate.
1000 # @vmstate-received: VM's state has been received by SVM.
1002 # @vmstate-loaded: VM's state has been loaded by SVM.
1006 { 'enum': 'COLOMessage',
1007 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1008 'vmstate-send', 'vmstate-size', 'vmstate-received',
1009 'vmstate-loaded' ] }
1014 # The COLO current mode.
1016 # @none: COLO is disabled.
1018 # @primary: COLO node in primary side.
1020 # @secondary: COLO node in slave side.
1024 { 'enum': 'COLOMode',
1025 'data': [ 'none', 'primary', 'secondary'] }
1030 # An enumeration of COLO failover status
1032 # @none: no failover has ever happened
1034 # @require: got failover requirement but not handled
1036 # @active: in the process of doing failover
1038 # @completed: finish the process of failover
1040 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1044 { 'enum': 'FailoverStatus',
1045 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1050 # Emitted when VM finishes COLO mode due to some errors happening or
1051 # at the request of users.
1053 # @mode: report COLO mode when COLO exited.
1055 # @reason: describes the reason for the COLO exit.
1061 # <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
1062 # "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
1065 { 'event': 'COLO_EXIT',
1066 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1071 # The reason for a COLO exit.
1073 # @none: failover has never happened. This state does not occur
1074 # in the COLO_EXIT event, and is only visible in the result of
1075 # query-colo-status.
1077 # @request: COLO exit is due to an external request.
1079 # @error: COLO exit is due to an internal error.
1081 # @processing: COLO is currently handling a failover (since 4.0).
1085 { 'enum': 'COLOExitReason',
1086 'data': [ 'none', 'request', 'error' , 'processing' ] }
1089 # @x-colo-lost-heartbeat:
1091 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1092 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1093 # If sent to the Secondary, the Secondary side will run failover work,
1094 # then takes over server operation to become the service VM.
1100 # -> { "execute": "x-colo-lost-heartbeat" }
1101 # <- { "return": {} }
1104 { 'command': 'x-colo-lost-heartbeat' }
1109 # Cancel the current executing migration process.
1111 # Returns: nothing on success
1113 # Notes: This command succeeds even if there is no migration process running.
1119 # -> { "execute": "migrate_cancel" }
1120 # <- { "return": {} }
1123 { 'command': 'migrate_cancel' }
1126 # @migrate-continue:
1128 # Continue migration when it's in a paused state.
1130 # @state: The state the migration is currently expected to be in
1132 # Returns: nothing on success
1136 # -> { "execute": "migrate-continue" , "arguments":
1137 # { "state": "pre-switchover" } }
1138 # <- { "return": {} }
1140 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
1143 # @migrate_set_downtime:
1145 # Set maximum tolerated downtime for migration.
1147 # @value: maximum downtime in seconds
1149 # Returns: nothing on success
1151 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1157 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
1158 # <- { "return": {} }
1161 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1164 # @migrate_set_speed:
1166 # Set maximum speed for migration.
1168 # @value: maximum speed in bytes per second.
1170 # Returns: nothing on success
1172 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1178 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
1179 # <- { "return": {} }
1182 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1185 # @migrate-set-cache-size:
1187 # Set cache size to be used by XBZRLE migration
1189 # @value: cache size in bytes
1191 # The size will be rounded down to the nearest power of 2.
1192 # The cache size can be modified before and during ongoing migration
1194 # Returns: nothing on success
1196 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1202 # -> { "execute": "migrate-set-cache-size",
1203 # "arguments": { "value": 536870912 } }
1204 # <- { "return": {} }
1207 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1210 # @query-migrate-cache-size:
1212 # Query migration XBZRLE cache size
1214 # Returns: XBZRLE cache size in bytes
1216 # Notes: This command is deprecated in favor of 'query-migrate-parameters'
1222 # -> { "execute": "query-migrate-cache-size" }
1223 # <- { "return": 67108864 }
1226 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1231 # Migrates the current running guest to another Virtual Machine.
1233 # @uri: the Uniform Resource Identifier of the destination VM
1235 # @blk: do block migration (full disk copy)
1237 # @inc: incremental disk copy migration
1239 # @detach: this argument exists only for compatibility reasons and
1240 # is ignored by QEMU
1242 # @resume: resume one paused migration, default "off". (since 3.0)
1244 # Returns: nothing on success
1250 # 1. The 'query-migrate' command should be used to check migration's progress
1251 # and final result (this information is provided by the 'status' member)
1253 # 2. All boolean arguments default to false
1255 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1260 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1261 # <- { "return": {} }
1264 { 'command': 'migrate',
1265 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1266 '*detach': 'bool', '*resume': 'bool' } }
1269 # @migrate-incoming:
1271 # Start an incoming migration, the qemu must have been started
1272 # with -incoming defer
1274 # @uri: The Uniform Resource Identifier identifying the source or
1275 # address to listen on
1277 # Returns: nothing on success
1283 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1284 # compatible with -incoming and the format of the uri is already exposed
1287 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1290 # 3. The uri format is the same as for -incoming
1294 # -> { "execute": "migrate-incoming",
1295 # "arguments": { "uri": "tcp::4446" } }
1296 # <- { "return": {} }
1299 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1302 # @xen-save-devices-state:
1304 # Save the state of all devices to file. The RAM and the block devices
1305 # of the VM are not saved by this command.
1307 # @filename: the file to save the state of the devices to as binary
1308 # data. See xen-save-devices-state.txt for a description of the binary
1311 # @live: Optional argument to ask QEMU to treat this command as part of a live
1312 # migration. Default to true. (since 2.11)
1314 # Returns: Nothing on success
1320 # -> { "execute": "xen-save-devices-state",
1321 # "arguments": { "filename": "/tmp/save" } }
1322 # <- { "return": {} }
1325 { 'command': 'xen-save-devices-state',
1326 'data': {'filename': 'str', '*live':'bool' } }
1329 # @xen-set-replication:
1331 # Enable or disable replication.
1333 # @enable: true to enable, false to disable.
1335 # @primary: true for primary or false for secondary.
1337 # @failover: true to do failover, false to stop. but cannot be
1338 # specified if 'enable' is true. default value is false.
1344 # -> { "execute": "xen-set-replication",
1345 # "arguments": {"enable": true, "primary": false} }
1346 # <- { "return": {} }
1350 { 'command': 'xen-set-replication',
1351 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' },
1352 'if': 'defined(CONFIG_REPLICATION)' }
1355 # @ReplicationStatus:
1357 # The result format for 'query-xen-replication-status'.
1359 # @error: true if an error happened, false if replication is normal.
1361 # @desc: the human readable error description string, when
1366 { 'struct': 'ReplicationStatus',
1367 'data': { 'error': 'bool', '*desc': 'str' },
1368 'if': 'defined(CONFIG_REPLICATION)' }
1371 # @query-xen-replication-status:
1373 # Query replication status while the vm is running.
1375 # Returns: A @ReplicationResult object showing the status.
1379 # -> { "execute": "query-xen-replication-status" }
1380 # <- { "return": { "error": false } }
1384 { 'command': 'query-xen-replication-status',
1385 'returns': 'ReplicationStatus',
1386 'if': 'defined(CONFIG_REPLICATION)' }
1389 # @xen-colo-do-checkpoint:
1391 # Xen uses this command to notify replication to trigger a checkpoint.
1397 # -> { "execute": "xen-colo-do-checkpoint" }
1398 # <- { "return": {} }
1402 { 'command': 'xen-colo-do-checkpoint',
1403 'if': 'defined(CONFIG_REPLICATION)' }
1408 # The result format for 'query-colo-status'.
1410 # @mode: COLO running mode. If COLO is running, this field will return
1411 # 'primary' or 'secondary'.
1413 # @last-mode: COLO last running mode. If COLO is running, this field
1414 # will return same like mode field, after failover we can
1415 # use this field to get last colo mode. (since 4.0)
1417 # @reason: describes the reason for the COLO exit.
1421 { 'struct': 'COLOStatus',
1422 'data': { 'mode': 'COLOMode', 'last-mode': 'COLOMode',
1423 'reason': 'COLOExitReason' } }
1426 # @query-colo-status:
1428 # Query COLO status while the vm is running.
1430 # Returns: A @COLOStatus object showing the status.
1434 # -> { "execute": "query-colo-status" }
1435 # <- { "return": { "mode": "primary", "reason": "request" } }
1439 { 'command': 'query-colo-status',
1440 'returns': 'COLOStatus' }
1445 # Provide a recovery migration stream URI.
1447 # @uri: the URI to be used for the recovery of migration stream.
1453 # -> { "execute": "migrate-recover",
1454 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1455 # <- { "return": {} }
1459 { 'command': 'migrate-recover',
1460 'data': { 'uri': 'str' },
1466 # Pause a migration. Currently it only supports postcopy.
1472 # -> { "execute": "migrate-pause" }
1473 # <- { "return": {} }
1477 { 'command': 'migrate-pause', 'allow-oob': true }
1482 # Emitted from source side of a migration when migration state is
1483 # WAIT_UNPLUG. Device was unplugged by guest operating system.
1484 # Device resources in QEMU are kept on standby to be able to re-plug it in case
1485 # of migration failure.
1487 # @device-id: QEMU device id of the unplugged device
1492 # {"event": "UNPLUG_PRIMARY", "data": {"device-id": "hostdev0"} }
1495 { 'event': 'UNPLUG_PRIMARY',
1496 'data': { 'device-id': 'str' } }