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
139 { 'enum': 'MigrationStatus',
140 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
141 'active', 'postcopy-active', 'postcopy-paused',
142 'postcopy-recover', 'completed', 'failed', 'colo',
143 'pre-switchover', 'device' ] }
148 # Information about current migration process.
150 # @status: @MigrationStatus describing the current migration status.
151 # If this field is not returned, no migration process
154 # @ram: @MigrationStats containing detailed migration
155 # status, only returned if status is 'active' or
156 # 'completed'(since 1.2)
158 # @disk: @MigrationStats containing detailed disk migration
159 # status, only returned if status is 'active' and it is a block
162 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
163 # migration statistics, only returned if XBZRLE feature is on and
164 # status is 'active' or 'completed' (since 1.2)
166 # @total-time: total amount of milliseconds since migration started.
167 # If migration has ended, it returns the total migration
170 # @downtime: only present when migration finishes correctly
171 # total downtime in milliseconds for the guest.
174 # @expected-downtime: only present while migration is active
175 # expected downtime in milliseconds for the guest in last walk
176 # of the dirty bitmap. (since 1.3)
178 # @setup-time: amount of setup time in milliseconds _before_ the
179 # iterations begin but _after_ the QMP command is issued. This is designed
180 # to provide an accounting of any activities (such as RDMA pinning) which
181 # may be expensive, but do not actually occur during the iterative
182 # migration rounds themselves. (since 1.6)
184 # @cpu-throttle-percentage: percentage of time guest cpus are being
185 # throttled during auto-converge. This is only present when auto-converge
186 # has started throttling guest cpus. (Since 2.7)
188 # @error-desc: the human readable error description string, when
189 # @status is 'failed'. Clients should not attempt to parse the
190 # error strings. (Since 2.7)
192 # @postcopy-blocktime: total time when all vCPU were blocked during postcopy
193 # live migration. This is only present when the postcopy-blocktime
194 # migration capability is enabled. (Since 3.0)
196 # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU. This is
197 # only present when the postcopy-blocktime migration capability
198 # is enabled. (Since 3.0)
200 # @compression: migration compression statistics, only returned if compression
201 # feature is on and status is 'active' or 'completed' (Since 3.1)
203 # @socket-address: Only used for tcp, to know what the real port is (Since 4.0)
207 { 'struct': 'MigrationInfo',
208 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
209 '*disk': 'MigrationStats',
210 '*xbzrle-cache': 'XBZRLECacheStats',
211 '*total-time': 'int',
212 '*expected-downtime': 'int',
214 '*setup-time': 'int',
215 '*cpu-throttle-percentage': 'int',
216 '*error-desc': 'str',
217 '*postcopy-blocktime' : 'uint32',
218 '*postcopy-vcpu-blocktime': ['uint32'],
219 '*compression': 'CompressionStats',
220 '*socket-address': ['SocketAddress'] } }
225 # Returns information about current migration process. If migration
226 # is active there will be another json-object with RAM migration
227 # status and if block migration is active another one with block
230 # Returns: @MigrationInfo
236 # 1. Before the first migration
238 # -> { "execute": "query-migrate" }
239 # <- { "return": {} }
241 # 2. Migration is done and has succeeded
243 # -> { "execute": "query-migrate" }
245 # "status": "completed",
246 # "total-time":12345,
247 # "setup-time":12345,
255 # "normal-bytes":123456,
256 # "dirty-sync-count":15
261 # 3. Migration is done and has failed
263 # -> { "execute": "query-migrate" }
264 # <- { "return": { "status": "failed" } }
266 # 4. Migration is being performed and is not a block migration:
268 # -> { "execute": "query-migrate" }
272 # "total-time":12345,
273 # "setup-time":12345,
274 # "expected-downtime":12345,
281 # "normal-bytes":123456,
282 # "dirty-sync-count":15
287 # 5. Migration is being performed and is a block migration:
289 # -> { "execute": "query-migrate" }
293 # "total-time":12345,
294 # "setup-time":12345,
295 # "expected-downtime":12345,
298 # "remaining":1053304,
299 # "transferred":3720,
302 # "normal-bytes":123456,
303 # "dirty-sync-count":15
307 # "remaining":20880384,
308 # "transferred":91136
313 # 6. Migration is being performed and XBZRLE is active:
315 # -> { "execute": "query-migrate" }
319 # "total-time":12345,
320 # "setup-time":12345,
321 # "expected-downtime":12345,
324 # "remaining":1053304,
325 # "transferred":3720,
328 # "normal-bytes":3412992,
329 # "dirty-sync-count":15
332 # "cache-size":67108864,
336 # "cache-miss-rate":0.123,
343 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
346 # @MigrationCapability:
348 # Migration capabilities enumeration
350 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
351 # This feature allows us to minimize migration traffic for certain work
352 # loads, by sending compressed difference of the pages
354 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
355 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
356 # Disabled by default. (since 2.0)
358 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
359 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
360 # source and target VM to support this feature. To enable it is sufficient
361 # to enable the capability on the source VM. The feature is disabled by
362 # default. (since 1.6)
364 # @compress: Use multiple compression threads to accelerate live migration.
365 # This feature can help to reduce the migration traffic, by sending
366 # compressed pages. Please note that if compress and xbzrle are both
367 # on, compress only takes effect in the ram bulk stage, after that,
368 # it will be disabled and only xbzrle takes effect, this can help to
369 # minimize migration traffic. The feature is disabled by default.
372 # @events: generate events for each migration state change
375 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
376 # to speed up convergence of RAM migration. (since 1.6)
378 # @postcopy-ram: Start executing on the migration target before all of RAM has
379 # been migrated, pulling the remaining pages along as needed. The
380 # capacity must have the same setting on both source and target
381 # or migration will not even start. NOTE: If the migration fails during
382 # postcopy the VM will fail. (since 2.6)
384 # @x-colo: If enabled, migration will never end, and the state of the VM on the
385 # primary side will be migrated continuously to the VM on secondary
386 # side, this process is called COarse-Grain LOck Stepping (COLO) for
387 # Non-stop Service. (since 2.8)
389 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
390 # during postcopy-ram migration. (since 2.9)
392 # @block: If enabled, QEMU will also migrate the contents of all block
393 # devices. Default is disabled. A possible alternative uses
394 # mirror jobs to a builtin NBD server on the destination, which
395 # offers more flexibility.
398 # @return-path: If enabled, migration will use the return path even
399 # for precopy. (since 2.10)
401 # @pause-before-switchover: Pause outgoing migration before serialising device
402 # state and before disabling block IO (since 2.11)
404 # @multifd: Use more than one fd for migration (since 4.0)
406 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
409 # @postcopy-blocktime: Calculate downtime for postcopy live migration
412 # @late-block-activate: If enabled, the destination will not activate block
413 # devices (and thus take locks) immediately at the end of migration.
416 # @x-ignore-shared: If enabled, QEMU will not migrate shared memory (since 4.0)
420 { 'enum': 'MigrationCapability',
421 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
422 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
423 'block', 'return-path', 'pause-before-switchover', 'multifd',
424 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
425 'x-ignore-shared' ] }
428 # @MigrationCapabilityStatus:
430 # Migration capability information
432 # @capability: capability enum
434 # @state: capability state bool
438 { 'struct': 'MigrationCapabilityStatus',
439 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
442 # @migrate-set-capabilities:
444 # Enable/Disable the following migration capabilities (like xbzrle)
446 # @capabilities: json array of capability modifications to make
452 # -> { "execute": "migrate-set-capabilities" , "arguments":
453 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
456 { 'command': 'migrate-set-capabilities',
457 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
460 # @query-migrate-capabilities:
462 # Returns information about the current migration capabilities status
464 # Returns: @MigrationCapabilitiesStatus
470 # -> { "execute": "query-migrate-capabilities" }
472 # {"state": false, "capability": "xbzrle"},
473 # {"state": false, "capability": "rdma-pin-all"},
474 # {"state": false, "capability": "auto-converge"},
475 # {"state": false, "capability": "zero-blocks"},
476 # {"state": false, "capability": "compress"},
477 # {"state": true, "capability": "events"},
478 # {"state": false, "capability": "postcopy-ram"},
479 # {"state": false, "capability": "x-colo"}
483 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
486 # @MigrationParameter:
488 # Migration parameters enumeration
490 # @announce-initial: Initial delay (in milliseconds) before sending the first
491 # announce (Since 4.0)
493 # @announce-max: Maximum delay (in milliseconds) between packets in the
494 # announcement (Since 4.0)
496 # @announce-rounds: Number of self-announce packets sent after migration
499 # @announce-step: Increase in delay (in milliseconds) between subsequent
500 # packets in the announcement (Since 4.0)
502 # @compress-level: Set the compression level to be used in live migration,
503 # the compression level is an integer between 0 and 9, where 0 means
504 # no compression, 1 means the best compression speed, and 9 means best
505 # compression ratio which will consume more CPU.
507 # @compress-threads: Set compression thread count to be used in live migration,
508 # the compression thread count is an integer between 1 and 255.
510 # @compress-wait-thread: Controls behavior when all compression threads are
511 # currently busy. If true (default), wait for a free
512 # compression thread to become available; otherwise,
513 # send the page uncompressed. (Since 3.1)
515 # @decompress-threads: Set decompression thread count to be used in live
516 # migration, the decompression thread count is an integer between 1
517 # and 255. Usually, decompression is at least 4 times as fast as
518 # compression, so set the decompress-threads to the number about 1/4
519 # of compress-threads is adequate.
521 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
522 # when migration auto-converge is activated. The
523 # default value is 20. (Since 2.7)
525 # @cpu-throttle-increment: throttle percentage increase each time
526 # auto-converge detects that migration is not making
527 # progress. The default value is 10. (Since 2.7)
529 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
530 # establishing a TLS connection over the migration data channel.
531 # On the outgoing side of the migration, the credentials must
532 # be for a 'client' endpoint, while for the incoming side the
533 # credentials must be for a 'server' endpoint. Setting this
534 # will enable TLS for all migrations. The default is unset,
535 # resulting in unsecured migration at the QEMU level. (Since 2.7)
537 # @tls-hostname: hostname of the target host for the migration. This is
538 # required when using x509 based TLS credentials and the
539 # migration URI does not already include a hostname. For
540 # example if using fd: or exec: based migration, the
541 # hostname must be provided so that the server's x509
542 # certificate identity can be validated. (Since 2.7)
544 # @tls-authz: ID of the 'authz' object subclass that provides access control
545 # checking of the TLS x509 certificate distinguished name.
546 # This object is only resolved at time of use, so can be deleted
547 # and recreated on the fly while the migration server is active.
548 # If missing, it will default to denying access (Since 4.0)
550 # @max-bandwidth: to set maximum speed for migration. maximum speed in
551 # bytes per second. (Since 2.8)
553 # @downtime-limit: set maximum tolerated downtime for migration. maximum
554 # downtime in milliseconds (Since 2.8)
556 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
557 # periodic mode. (Since 2.8)
559 # @block-incremental: Affects how much storage is migrated when the
560 # block migration capability is enabled. When false, the entire
561 # storage backing chain is migrated into a flattened image at
562 # the destination; when true, only the active qcow2 layer is
563 # migrated and the destination must already have access to the
564 # same backing chain as was used on the source. (since 2.10)
566 # @multifd-channels: Number of channels used to migrate data in
567 # parallel. This is the same number that the
568 # number of sockets used for migration. The
569 # default value is 2 (since 4.0)
571 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
572 # needs to be a multiple of the target page size
576 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
577 # Defaults to 0 (unlimited). In bytes per second.
580 # @max-cpu-throttle: maximum cpu throttle percentage.
581 # Defaults to 99. (Since 3.1)
585 { 'enum': 'MigrationParameter',
586 'data': ['announce-initial', 'announce-max',
587 'announce-rounds', 'announce-step',
588 'compress-level', 'compress-threads', 'decompress-threads',
589 'compress-wait-thread',
590 'cpu-throttle-initial', 'cpu-throttle-increment',
591 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
592 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
594 'xbzrle-cache-size', 'max-postcopy-bandwidth',
595 'max-cpu-throttle' ] }
598 # @MigrateSetParameters:
600 # @announce-initial: Initial delay (in milliseconds) before sending the first
601 # announce (Since 4.0)
603 # @announce-max: Maximum delay (in milliseconds) between packets in the
604 # announcement (Since 4.0)
606 # @announce-rounds: Number of self-announce packets sent after migration
609 # @announce-step: Increase in delay (in milliseconds) between subsequent
610 # packets in the announcement (Since 4.0)
612 # @compress-level: compression level
614 # @compress-threads: compression thread count
616 # @compress-wait-thread: Controls behavior when all compression threads are
617 # currently busy. If true (default), wait for a free
618 # compression thread to become available; otherwise,
619 # send the page uncompressed. (Since 3.1)
621 # @decompress-threads: decompression thread count
623 # @cpu-throttle-initial: Initial percentage of time guest cpus are
624 # throttled when migration auto-converge is activated.
625 # The default value is 20. (Since 2.7)
627 # @cpu-throttle-increment: throttle percentage increase each time
628 # auto-converge detects that migration is not making
629 # progress. The default value is 10. (Since 2.7)
631 # @tls-creds: ID of the 'tls-creds' object that provides credentials
632 # for establishing a TLS connection over the migration data
633 # channel. On the outgoing side of the migration, the credentials
634 # must be for a 'client' endpoint, while for the incoming side the
635 # credentials must be for a 'server' endpoint. Setting this
636 # to a non-empty string enables TLS for all migrations.
637 # An empty string means that QEMU will use plain text mode for
638 # migration, rather than TLS (Since 2.9)
639 # Previously (since 2.7), this was reported by omitting
642 # @tls-hostname: hostname of the target host for the migration. This
643 # is required when using x509 based TLS credentials and the
644 # migration URI does not already include a hostname. For
645 # example if using fd: or exec: based migration, the
646 # hostname must be provided so that the server's x509
647 # certificate identity can be validated. (Since 2.7)
648 # An empty string means that QEMU will use the hostname
649 # associated with the migration URI, if any. (Since 2.9)
650 # Previously (since 2.7), this was reported by omitting
651 # tls-hostname instead.
653 # @max-bandwidth: to set maximum speed for migration. maximum speed in
654 # bytes per second. (Since 2.8)
656 # @downtime-limit: set maximum tolerated downtime for migration. maximum
657 # downtime in milliseconds (Since 2.8)
659 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
661 # @block-incremental: Affects how much storage is migrated when the
662 # block migration capability is enabled. When false, the entire
663 # storage backing chain is migrated into a flattened image at
664 # the destination; when true, only the active qcow2 layer is
665 # migrated and the destination must already have access to the
666 # same backing chain as was used on the source. (since 2.10)
668 # @multifd-channels: Number of channels used to migrate data in
669 # parallel. This is the same number that the
670 # number of sockets used for migration. The
671 # default value is 2 (since 4.0)
673 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
674 # needs to be a multiple of the target page size
678 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
679 # Defaults to 0 (unlimited). In bytes per second.
682 # @max-cpu-throttle: maximum cpu throttle percentage.
683 # The default value is 99. (Since 3.1)
687 # TODO either fuse back into MigrationParameters, or make
688 # MigrationParameters members mandatory
689 { 'struct': 'MigrateSetParameters',
690 'data': { '*announce-initial': 'size',
691 '*announce-max': 'size',
692 '*announce-rounds': 'size',
693 '*announce-step': 'size',
694 '*compress-level': 'int',
695 '*compress-threads': 'int',
696 '*compress-wait-thread': 'bool',
697 '*decompress-threads': 'int',
698 '*cpu-throttle-initial': 'int',
699 '*cpu-throttle-increment': 'int',
700 '*tls-creds': 'StrOrNull',
701 '*tls-hostname': 'StrOrNull',
702 '*tls-authz': 'StrOrNull',
703 '*max-bandwidth': 'int',
704 '*downtime-limit': 'int',
705 '*x-checkpoint-delay': 'int',
706 '*block-incremental': 'bool',
707 '*multifd-channels': 'int',
708 '*xbzrle-cache-size': 'size',
709 '*max-postcopy-bandwidth': 'size',
710 '*max-cpu-throttle': 'int' } }
713 # @migrate-set-parameters:
715 # Set various migration parameters.
721 # -> { "execute": "migrate-set-parameters" ,
722 # "arguments": { "compress-level": 1 } }
725 { 'command': 'migrate-set-parameters', 'boxed': true,
726 'data': 'MigrateSetParameters' }
729 # @MigrationParameters:
731 # The optional members aren't actually optional.
733 # @announce-initial: Initial delay (in milliseconds) before sending the
734 # first announce (Since 4.0)
736 # @announce-max: Maximum delay (in milliseconds) between packets in the
737 # announcement (Since 4.0)
739 # @announce-rounds: Number of self-announce packets sent after migration
742 # @announce-step: Increase in delay (in milliseconds) between subsequent
743 # packets in the announcement (Since 4.0)
745 # @compress-level: compression level
747 # @compress-threads: compression thread count
749 # @compress-wait-thread: Controls behavior when all compression threads are
750 # currently busy. If true (default), wait for a free
751 # compression thread to become available; otherwise,
752 # send the page uncompressed. (Since 3.1)
754 # @decompress-threads: decompression thread count
756 # @cpu-throttle-initial: Initial percentage of time guest cpus are
757 # throttled when migration auto-converge is activated.
760 # @cpu-throttle-increment: throttle percentage increase each time
761 # auto-converge detects that migration is not making
762 # progress. (Since 2.7)
764 # @tls-creds: ID of the 'tls-creds' object that provides credentials
765 # for establishing a TLS connection over the migration data
766 # channel. On the outgoing side of the migration, the credentials
767 # must be for a 'client' endpoint, while for the incoming side the
768 # credentials must be for a 'server' endpoint.
769 # An empty string means that QEMU will use plain text mode for
770 # migration, rather than TLS (Since 2.7)
771 # Note: 2.8 reports this by omitting tls-creds instead.
773 # @tls-hostname: hostname of the target host for the migration. This
774 # is required when using x509 based TLS credentials and the
775 # migration URI does not already include a hostname. For
776 # example if using fd: or exec: based migration, the
777 # hostname must be provided so that the server's x509
778 # certificate identity can be validated. (Since 2.7)
779 # An empty string means that QEMU will use the hostname
780 # associated with the migration URI, if any. (Since 2.9)
781 # Note: 2.8 reports this by omitting tls-hostname instead.
783 # @tls-authz: ID of the 'authz' object subclass that provides access control
784 # checking of the TLS x509 certificate distinguished name. (Since
787 # @max-bandwidth: to set maximum speed for migration. maximum speed in
788 # bytes per second. (Since 2.8)
790 # @downtime-limit: set maximum tolerated downtime for migration. maximum
791 # downtime in milliseconds (Since 2.8)
793 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
795 # @block-incremental: Affects how much storage is migrated when the
796 # block migration capability is enabled. When false, the entire
797 # storage backing chain is migrated into a flattened image at
798 # the destination; when true, only the active qcow2 layer is
799 # migrated and the destination must already have access to the
800 # same backing chain as was used on the source. (since 2.10)
802 # @multifd-channels: Number of channels used to migrate data in
803 # parallel. This is the same number that the
804 # number of sockets used for migration.
805 # The default value is 2 (since 4.0)
807 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
808 # needs to be a multiple of the target page size
812 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
813 # Defaults to 0 (unlimited). In bytes per second.
816 # @max-cpu-throttle: maximum cpu throttle percentage.
822 { 'struct': 'MigrationParameters',
823 'data': { '*announce-initial': 'size',
824 '*announce-max': 'size',
825 '*announce-rounds': 'size',
826 '*announce-step': 'size',
827 '*compress-level': 'uint8',
828 '*compress-threads': 'uint8',
829 '*compress-wait-thread': 'bool',
830 '*decompress-threads': 'uint8',
831 '*cpu-throttle-initial': 'uint8',
832 '*cpu-throttle-increment': 'uint8',
834 '*tls-hostname': 'str',
836 '*max-bandwidth': 'size',
837 '*downtime-limit': 'uint64',
838 '*x-checkpoint-delay': 'uint32',
839 '*block-incremental': 'bool' ,
840 '*multifd-channels': 'uint8',
841 '*xbzrle-cache-size': 'size',
842 '*max-postcopy-bandwidth': 'size',
843 '*max-cpu-throttle':'uint8'} }
846 # @query-migrate-parameters:
848 # Returns information about the current migration parameters
850 # Returns: @MigrationParameters
856 # -> { "execute": "query-migrate-parameters" }
858 # "decompress-threads": 2,
859 # "cpu-throttle-increment": 10,
860 # "compress-threads": 8,
861 # "compress-level": 1,
862 # "cpu-throttle-initial": 20,
863 # "max-bandwidth": 33554432,
864 # "downtime-limit": 300
869 { 'command': 'query-migrate-parameters',
870 'returns': 'MigrationParameters' }
873 # @client_migrate_info:
875 # Set migration information for remote display. This makes the server
876 # ask the client to automatically reconnect using the new parameters
877 # once migration finished successfully. Only implemented for SPICE.
879 # @protocol: must be "spice"
880 # @hostname: migration target hostname
881 # @port: spice tcp port for plaintext channels
882 # @tls-port: spice tcp port for tls-secured channels
883 # @cert-subject: server certificate subject
889 # -> { "execute": "client_migrate_info",
890 # "arguments": { "protocol": "spice",
891 # "hostname": "virt42.lab.kraxel.org",
893 # <- { "return": {} }
896 { 'command': 'client_migrate_info',
897 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
898 '*tls-port': 'int', '*cert-subject': 'str' } }
901 # @migrate-start-postcopy:
903 # Followup to a migration command to switch the migration to postcopy mode.
904 # The postcopy-ram capability must be set on both source and destination
905 # before the original migration command.
911 # -> { "execute": "migrate-start-postcopy" }
912 # <- { "return": {} }
915 { 'command': 'migrate-start-postcopy' }
920 # Emitted when a migration event happens
922 # @status: @MigrationStatus describing the current migration status.
928 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
929 # "event": "MIGRATION",
930 # "data": {"status": "completed"} }
933 { 'event': 'MIGRATION',
934 'data': {'status': 'MigrationStatus'}}
939 # Emitted from the source side of a migration at the start of each pass
940 # (when it syncs the dirty bitmap)
942 # @pass: An incrementing count (starting at 1 on the first pass)
948 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
949 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
952 { 'event': 'MIGRATION_PASS',
953 'data': { 'pass': 'int' } }
958 # The message transmission between Primary side and Secondary side.
960 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
962 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
964 # @checkpoint-reply: SVM gets PVM's checkpoint request
966 # @vmstate-send: VM's state will be sent by PVM.
968 # @vmstate-size: The total size of VMstate.
970 # @vmstate-received: VM's state has been received by SVM.
972 # @vmstate-loaded: VM's state has been loaded by SVM.
976 { 'enum': 'COLOMessage',
977 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
978 'vmstate-send', 'vmstate-size', 'vmstate-received',
984 # The COLO current mode.
986 # @none: COLO is disabled.
988 # @primary: COLO node in primary side.
990 # @secondary: COLO node in slave side.
994 { 'enum': 'COLOMode',
995 'data': [ 'none', 'primary', 'secondary'] }
1000 # An enumeration of COLO failover status
1002 # @none: no failover has ever happened
1004 # @require: got failover requirement but not handled
1006 # @active: in the process of doing failover
1008 # @completed: finish the process of failover
1010 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1014 { 'enum': 'FailoverStatus',
1015 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1020 # Emitted when VM finishes COLO mode due to some errors happening or
1021 # at the request of users.
1023 # @mode: report COLO mode when COLO exited.
1025 # @reason: describes the reason for the COLO exit.
1031 # <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
1032 # "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
1035 { 'event': 'COLO_EXIT',
1036 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1041 # The reason for a COLO exit.
1043 # @none: failover has never happened. This state does not occur
1044 # in the COLO_EXIT event, and is only visible in the result of
1045 # query-colo-status.
1047 # @request: COLO exit is due to an external request.
1049 # @error: COLO exit is due to an internal error.
1051 # @processing: COLO is currently handling a failover (since 4.0).
1055 { 'enum': 'COLOExitReason',
1056 'data': [ 'none', 'request', 'error' , 'processing' ] }
1059 # @x-colo-lost-heartbeat:
1061 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1062 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1063 # If sent to the Secondary, the Secondary side will run failover work,
1064 # then takes over server operation to become the service VM.
1070 # -> { "execute": "x-colo-lost-heartbeat" }
1071 # <- { "return": {} }
1074 { 'command': 'x-colo-lost-heartbeat' }
1079 # Cancel the current executing migration process.
1081 # Returns: nothing on success
1083 # Notes: This command succeeds even if there is no migration process running.
1089 # -> { "execute": "migrate_cancel" }
1090 # <- { "return": {} }
1093 { 'command': 'migrate_cancel' }
1096 # @migrate-continue:
1098 # Continue migration when it's in a paused state.
1100 # @state: The state the migration is currently expected to be in
1102 # Returns: nothing on success
1106 # -> { "execute": "migrate-continue" , "arguments":
1107 # { "state": "pre-switchover" } }
1108 # <- { "return": {} }
1110 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
1113 # @migrate_set_downtime:
1115 # Set maximum tolerated downtime for migration.
1117 # @value: maximum downtime in seconds
1119 # Returns: nothing on success
1121 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1127 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
1128 # <- { "return": {} }
1131 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1134 # @migrate_set_speed:
1136 # Set maximum speed for migration.
1138 # @value: maximum speed in bytes per second.
1140 # Returns: nothing on success
1142 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1148 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
1149 # <- { "return": {} }
1152 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1155 # @migrate-set-cache-size:
1157 # Set cache size to be used by XBZRLE migration
1159 # @value: cache size in bytes
1161 # The size will be rounded down to the nearest power of 2.
1162 # The cache size can be modified before and during ongoing migration
1164 # Returns: nothing on success
1166 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1172 # -> { "execute": "migrate-set-cache-size",
1173 # "arguments": { "value": 536870912 } }
1174 # <- { "return": {} }
1177 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1180 # @query-migrate-cache-size:
1182 # Query migration XBZRLE cache size
1184 # Returns: XBZRLE cache size in bytes
1186 # Notes: This command is deprecated in favor of 'query-migrate-parameters'
1192 # -> { "execute": "query-migrate-cache-size" }
1193 # <- { "return": 67108864 }
1196 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1201 # Migrates the current running guest to another Virtual Machine.
1203 # @uri: the Uniform Resource Identifier of the destination VM
1205 # @blk: do block migration (full disk copy)
1207 # @inc: incremental disk copy migration
1209 # @detach: this argument exists only for compatibility reasons and
1210 # is ignored by QEMU
1212 # @resume: resume one paused migration, default "off". (since 3.0)
1214 # Returns: nothing on success
1220 # 1. The 'query-migrate' command should be used to check migration's progress
1221 # and final result (this information is provided by the 'status' member)
1223 # 2. All boolean arguments default to false
1225 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1230 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1231 # <- { "return": {} }
1234 { 'command': 'migrate',
1235 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1236 '*detach': 'bool', '*resume': 'bool' } }
1239 # @migrate-incoming:
1241 # Start an incoming migration, the qemu must have been started
1242 # with -incoming defer
1244 # @uri: The Uniform Resource Identifier identifying the source or
1245 # address to listen on
1247 # Returns: nothing on success
1253 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1254 # compatible with -incoming and the format of the uri is already exposed
1257 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1260 # 3. The uri format is the same as for -incoming
1264 # -> { "execute": "migrate-incoming",
1265 # "arguments": { "uri": "tcp::4446" } }
1266 # <- { "return": {} }
1269 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1272 # @xen-save-devices-state:
1274 # Save the state of all devices to file. The RAM and the block devices
1275 # of the VM are not saved by this command.
1277 # @filename: the file to save the state of the devices to as binary
1278 # data. See xen-save-devices-state.txt for a description of the binary
1281 # @live: Optional argument to ask QEMU to treat this command as part of a live
1282 # migration. Default to true. (since 2.11)
1284 # Returns: Nothing on success
1290 # -> { "execute": "xen-save-devices-state",
1291 # "arguments": { "filename": "/tmp/save" } }
1292 # <- { "return": {} }
1295 { 'command': 'xen-save-devices-state',
1296 'data': {'filename': 'str', '*live':'bool' } }
1299 # @xen-set-replication:
1301 # Enable or disable replication.
1303 # @enable: true to enable, false to disable.
1305 # @primary: true for primary or false for secondary.
1307 # @failover: true to do failover, false to stop. but cannot be
1308 # specified if 'enable' is true. default value is false.
1314 # -> { "execute": "xen-set-replication",
1315 # "arguments": {"enable": true, "primary": false} }
1316 # <- { "return": {} }
1320 { 'command': 'xen-set-replication',
1321 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' },
1322 'if': 'defined(CONFIG_REPLICATION)' }
1325 # @ReplicationStatus:
1327 # The result format for 'query-xen-replication-status'.
1329 # @error: true if an error happened, false if replication is normal.
1331 # @desc: the human readable error description string, when
1336 { 'struct': 'ReplicationStatus',
1337 'data': { 'error': 'bool', '*desc': 'str' },
1338 'if': 'defined(CONFIG_REPLICATION)' }
1341 # @query-xen-replication-status:
1343 # Query replication status while the vm is running.
1345 # Returns: A @ReplicationResult object showing the status.
1349 # -> { "execute": "query-xen-replication-status" }
1350 # <- { "return": { "error": false } }
1354 { 'command': 'query-xen-replication-status',
1355 'returns': 'ReplicationStatus',
1356 'if': 'defined(CONFIG_REPLICATION)' }
1359 # @xen-colo-do-checkpoint:
1361 # Xen uses this command to notify replication to trigger a checkpoint.
1367 # -> { "execute": "xen-colo-do-checkpoint" }
1368 # <- { "return": {} }
1372 { 'command': 'xen-colo-do-checkpoint',
1373 'if': 'defined(CONFIG_REPLICATION)' }
1378 # The result format for 'query-colo-status'.
1380 # @mode: COLO running mode. If COLO is running, this field will return
1381 # 'primary' or 'secondary'.
1383 # @last-mode: COLO last running mode. If COLO is running, this field
1384 # will return same like mode field, after failover we can
1385 # use this field to get last colo mode. (since 4.0)
1387 # @reason: describes the reason for the COLO exit.
1391 { 'struct': 'COLOStatus',
1392 'data': { 'mode': 'COLOMode', 'last-mode': 'COLOMode',
1393 'reason': 'COLOExitReason' } }
1396 # @query-colo-status:
1398 # Query COLO status while the vm is running.
1400 # Returns: A @COLOStatus object showing the status.
1404 # -> { "execute": "query-colo-status" }
1405 # <- { "return": { "mode": "primary", "reason": "request" } }
1409 { 'command': 'query-colo-status',
1410 'returns': 'COLOStatus' }
1415 # Provide a recovery migration stream URI.
1417 # @uri: the URI to be used for the recovery of migration stream.
1423 # -> { "execute": "migrate-recover",
1424 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1425 # <- { "return": {} }
1429 { 'command': 'migrate-recover',
1430 'data': { 'uri': 'str' },
1436 # Pause a migration. Currently it only supports postcopy.
1442 # -> { "execute": "migrate-pause" }
1443 # <- { "return": {} }
1447 { 'command': 'migrate-pause', 'allow-oob': true }