8 { 'include': 'common.json' }
13 # Detailed migration status.
15 # @transferred: amount of bytes already transferred to the target VM
17 # @remaining: amount of bytes remaining to be transferred to the target VM
19 # @total: total amount of bytes involved in the migration process
21 # @duplicate: number of duplicate (zero) pages (since 1.2)
23 # @skipped: number of skipped zero pages (since 1.5)
25 # @normal: number of normal pages (since 1.2)
27 # @normal-bytes: number of normal bytes sent (since 1.2)
29 # @dirty-pages-rate: number of pages dirtied by second by the
32 # @mbps: throughput in megabits/sec. (since 1.6)
34 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
36 # @postcopy-requests: The number of page requests received from the destination
39 # @page-size: The number of bytes per page for the various page-based
40 # statistics (since 2.10)
42 # @multifd-bytes: The number of bytes sent through multifd (since 3.0)
44 # @pages-per-second: the number of memory pages transferred per second
49 { 'struct': 'MigrationStats',
50 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
51 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
52 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
53 'mbps' : 'number', 'dirty-sync-count' : 'int',
54 'postcopy-requests' : 'int', 'page-size' : 'int',
55 'multifd-bytes' : 'uint64', 'pages-per-second' : 'uint64' } }
60 # Detailed XBZRLE migration cache statistics
62 # @cache-size: XBZRLE cache size
64 # @bytes: amount of bytes already transferred to the target VM
66 # @pages: amount of pages transferred to the target VM
68 # @cache-miss: number of cache miss
70 # @cache-miss-rate: rate of cache miss (since 2.1)
72 # @overflow: number of overflows
76 { 'struct': 'XBZRLECacheStats',
77 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
78 'cache-miss': 'int', 'cache-miss-rate': 'number',
84 # Detailed migration compression statistics
86 # @pages: amount of pages compressed and transferred to the target VM
88 # @busy: count of times that no free thread was available to compress data
90 # @busy-rate: rate of thread busy
92 # @compressed-size: amount of bytes after compression
94 # @compression-rate: rate of compressed size
98 { 'struct': 'CompressionStats',
99 'data': {'pages': 'int', 'busy': 'int', 'busy-rate': 'number',
100 'compressed-size': 'int', 'compression-rate': 'number' } }
105 # An enumeration of migration status.
107 # @none: no migration has ever happened.
109 # @setup: migration process has been initiated.
111 # @cancelling: in the process of cancelling migration.
113 # @cancelled: cancelling migration is finished.
115 # @active: in the process of doing migration.
117 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
119 # @postcopy-paused: during postcopy but paused. (since 3.0)
121 # @postcopy-recover: trying to recover from a paused postcopy. (since 3.0)
123 # @completed: migration is finished.
125 # @failed: some error occurred during migration process.
127 # @colo: VM is in the process of fault tolerance, VM can not get into this
128 # state unless colo capability is enabled for migration. (since 2.8)
130 # @pre-switchover: Paused before device serialisation. (since 2.11)
132 # @device: During device serialisation when pause-before-switchover is enabled
138 { 'enum': 'MigrationStatus',
139 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
140 'active', 'postcopy-active', 'postcopy-paused',
141 'postcopy-recover', 'completed', 'failed', 'colo',
142 'pre-switchover', 'device' ] }
147 # Information about current migration process.
149 # @status: @MigrationStatus describing the current migration status.
150 # If this field is not returned, no migration process
153 # @ram: @MigrationStats containing detailed migration
154 # status, only returned if status is 'active' or
155 # 'completed'(since 1.2)
157 # @disk: @MigrationStats containing detailed disk migration
158 # status, only returned if status is 'active' and it is a block
161 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
162 # migration statistics, only returned if XBZRLE feature is on and
163 # status is 'active' or 'completed' (since 1.2)
165 # @total-time: total amount of milliseconds since migration started.
166 # If migration has ended, it returns the total migration
169 # @downtime: only present when migration finishes correctly
170 # total downtime in milliseconds for the guest.
173 # @expected-downtime: only present while migration is active
174 # expected downtime in milliseconds for the guest in last walk
175 # of the dirty bitmap. (since 1.3)
177 # @setup-time: amount of setup time in milliseconds _before_ the
178 # iterations begin but _after_ the QMP command is issued. This is designed
179 # to provide an accounting of any activities (such as RDMA pinning) which
180 # may be expensive, but do not actually occur during the iterative
181 # migration rounds themselves. (since 1.6)
183 # @cpu-throttle-percentage: percentage of time guest cpus are being
184 # throttled during auto-converge. This is only present when auto-converge
185 # has started throttling guest cpus. (Since 2.7)
187 # @error-desc: the human readable error description string, when
188 # @status is 'failed'. Clients should not attempt to parse the
189 # error strings. (Since 2.7)
191 # @postcopy-blocktime: total time when all vCPU were blocked during postcopy
192 # live migration. This is only present when the postcopy-blocktime
193 # migration capability is enabled. (Since 3.0)
195 # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU. This is
196 # only present when the postcopy-blocktime migration capability
197 # is enabled. (Since 3.0)
199 # @compression: migration compression statistics, only returned if compression
200 # feature is on and status is 'active' or 'completed' (Since 3.1)
204 { 'struct': 'MigrationInfo',
205 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
206 '*disk': 'MigrationStats',
207 '*xbzrle-cache': 'XBZRLECacheStats',
208 '*total-time': 'int',
209 '*expected-downtime': 'int',
211 '*setup-time': 'int',
212 '*cpu-throttle-percentage': 'int',
213 '*error-desc': 'str',
214 '*postcopy-blocktime' : 'uint32',
215 '*postcopy-vcpu-blocktime': ['uint32'],
216 '*compression': 'CompressionStats'} }
221 # Returns information about current migration process. If migration
222 # is active there will be another json-object with RAM migration
223 # status and if block migration is active another one with block
226 # Returns: @MigrationInfo
232 # 1. Before the first migration
234 # -> { "execute": "query-migrate" }
235 # <- { "return": {} }
237 # 2. Migration is done and has succeeded
239 # -> { "execute": "query-migrate" }
241 # "status": "completed",
242 # "total-time":12345,
243 # "setup-time":12345,
251 # "normal-bytes":123456,
252 # "dirty-sync-count":15
257 # 3. Migration is done and has failed
259 # -> { "execute": "query-migrate" }
260 # <- { "return": { "status": "failed" } }
262 # 4. Migration is being performed and is not a block migration:
264 # -> { "execute": "query-migrate" }
268 # "total-time":12345,
269 # "setup-time":12345,
270 # "expected-downtime":12345,
277 # "normal-bytes":123456,
278 # "dirty-sync-count":15
283 # 5. Migration is being performed and is a block migration:
285 # -> { "execute": "query-migrate" }
289 # "total-time":12345,
290 # "setup-time":12345,
291 # "expected-downtime":12345,
294 # "remaining":1053304,
295 # "transferred":3720,
298 # "normal-bytes":123456,
299 # "dirty-sync-count":15
303 # "remaining":20880384,
304 # "transferred":91136
309 # 6. Migration is being performed and XBZRLE is active:
311 # -> { "execute": "query-migrate" }
315 # "total-time":12345,
316 # "setup-time":12345,
317 # "expected-downtime":12345,
320 # "remaining":1053304,
321 # "transferred":3720,
324 # "normal-bytes":3412992,
325 # "dirty-sync-count":15
328 # "cache-size":67108864,
332 # "cache-miss-rate":0.123,
339 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
342 # @MigrationCapability:
344 # Migration capabilities enumeration
346 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
347 # This feature allows us to minimize migration traffic for certain work
348 # loads, by sending compressed difference of the pages
350 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
351 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
352 # Disabled by default. (since 2.0)
354 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
355 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
356 # source and target VM to support this feature. To enable it is sufficient
357 # to enable the capability on the source VM. The feature is disabled by
358 # default. (since 1.6)
360 # @compress: Use multiple compression threads to accelerate live migration.
361 # This feature can help to reduce the migration traffic, by sending
362 # compressed pages. Please note that if compress and xbzrle are both
363 # on, compress only takes effect in the ram bulk stage, after that,
364 # it will be disabled and only xbzrle takes effect, this can help to
365 # minimize migration traffic. The feature is disabled by default.
368 # @events: generate events for each migration state change
371 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
372 # to speed up convergence of RAM migration. (since 1.6)
374 # @postcopy-ram: Start executing on the migration target before all of RAM has
375 # been migrated, pulling the remaining pages along as needed. The
376 # capacity must have the same setting on both source and target
377 # or migration will not even start. NOTE: If the migration fails during
378 # postcopy the VM will fail. (since 2.6)
380 # @x-colo: If enabled, migration will never end, and the state of the VM on the
381 # primary side will be migrated continuously to the VM on secondary
382 # side, this process is called COarse-Grain LOck Stepping (COLO) for
383 # Non-stop Service. (since 2.8)
385 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
386 # during postcopy-ram migration. (since 2.9)
388 # @block: If enabled, QEMU will also migrate the contents of all block
389 # devices. Default is disabled. A possible alternative uses
390 # mirror jobs to a builtin NBD server on the destination, which
391 # offers more flexibility.
394 # @return-path: If enabled, migration will use the return path even
395 # for precopy. (since 2.10)
397 # @pause-before-switchover: Pause outgoing migration before serialising device
398 # state and before disabling block IO (since 2.11)
400 # @x-multifd: Use more than one fd for migration (since 2.11)
402 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
405 # @postcopy-blocktime: Calculate downtime for postcopy live migration
408 # @late-block-activate: If enabled, the destination will not activate block
409 # devices (and thus take locks) immediately at the end of migration.
412 # @x-ignore-shared: If enabled, QEMU will not migrate shared memory (since 4.0)
416 { 'enum': 'MigrationCapability',
417 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
418 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
419 'block', 'return-path', 'pause-before-switchover', 'x-multifd',
420 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
421 'x-ignore-shared' ] }
424 # @MigrationCapabilityStatus:
426 # Migration capability information
428 # @capability: capability enum
430 # @state: capability state bool
434 { 'struct': 'MigrationCapabilityStatus',
435 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
438 # @migrate-set-capabilities:
440 # Enable/Disable the following migration capabilities (like xbzrle)
442 # @capabilities: json array of capability modifications to make
448 # -> { "execute": "migrate-set-capabilities" , "arguments":
449 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
452 { 'command': 'migrate-set-capabilities',
453 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
456 # @query-migrate-capabilities:
458 # Returns information about the current migration capabilities status
460 # Returns: @MigrationCapabilitiesStatus
466 # -> { "execute": "query-migrate-capabilities" }
468 # {"state": false, "capability": "xbzrle"},
469 # {"state": false, "capability": "rdma-pin-all"},
470 # {"state": false, "capability": "auto-converge"},
471 # {"state": false, "capability": "zero-blocks"},
472 # {"state": false, "capability": "compress"},
473 # {"state": true, "capability": "events"},
474 # {"state": false, "capability": "postcopy-ram"},
475 # {"state": false, "capability": "x-colo"}
479 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
482 # @MigrationParameter:
484 # Migration parameters enumeration
486 # @announce-initial: Initial delay (in milliseconds) before sending the first
487 # announce (Since 4.0)
489 # @announce-max: Maximum delay (in milliseconds) between packets in the
490 # announcement (Since 4.0)
492 # @announce-rounds: Number of self-announce packets sent after migration
495 # @announce-step: Increase in delay (in milliseconds) between subsequent
496 # packets in the announcement (Since 4.0)
498 # @compress-level: Set the compression level to be used in live migration,
499 # the compression level is an integer between 0 and 9, where 0 means
500 # no compression, 1 means the best compression speed, and 9 means best
501 # compression ratio which will consume more CPU.
503 # @compress-threads: Set compression thread count to be used in live migration,
504 # the compression thread count is an integer between 1 and 255.
506 # @compress-wait-thread: Controls behavior when all compression threads are
507 # currently busy. If true (default), wait for a free
508 # compression thread to become available; otherwise,
509 # send the page uncompressed. (Since 3.1)
511 # @decompress-threads: Set decompression thread count to be used in live
512 # migration, the decompression thread count is an integer between 1
513 # and 255. Usually, decompression is at least 4 times as fast as
514 # compression, so set the decompress-threads to the number about 1/4
515 # of compress-threads is adequate.
517 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
518 # when migration auto-converge is activated. The
519 # default value is 20. (Since 2.7)
521 # @cpu-throttle-increment: throttle percentage increase each time
522 # auto-converge detects that migration is not making
523 # progress. The default value is 10. (Since 2.7)
525 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
526 # establishing a TLS connection over the migration data channel.
527 # On the outgoing side of the migration, the credentials must
528 # be for a 'client' endpoint, while for the incoming side the
529 # credentials must be for a 'server' endpoint. Setting this
530 # will enable TLS for all migrations. The default is unset,
531 # resulting in unsecured migration at the QEMU level. (Since 2.7)
533 # @tls-hostname: hostname of the target host for the migration. This is
534 # required when using x509 based TLS credentials and the
535 # migration URI does not already include a hostname. For
536 # example if using fd: or exec: based migration, the
537 # hostname must be provided so that the server's x509
538 # certificate identity can be validated. (Since 2.7)
540 # @max-bandwidth: to set maximum speed for migration. maximum speed in
541 # bytes per second. (Since 2.8)
543 # @downtime-limit: set maximum tolerated downtime for migration. maximum
544 # downtime in milliseconds (Since 2.8)
546 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
547 # periodic mode. (Since 2.8)
549 # @block-incremental: Affects how much storage is migrated when the
550 # block migration capability is enabled. When false, the entire
551 # storage backing chain is migrated into a flattened image at
552 # the destination; when true, only the active qcow2 layer is
553 # migrated and the destination must already have access to the
554 # same backing chain as was used on the source. (since 2.10)
556 # @x-multifd-channels: Number of channels used to migrate data in
557 # parallel. This is the same number that the
558 # number of sockets used for migration. The
559 # default value is 2 (since 2.11)
561 # @x-multifd-page-count: Number of pages sent together to a thread.
562 # The default value is 16 (since 2.11)
564 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
565 # needs to be a multiple of the target page size
569 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
570 # Defaults to 0 (unlimited). In bytes per second.
573 # @max-cpu-throttle: maximum cpu throttle percentage.
574 # Defaults to 99. (Since 3.1)
578 { 'enum': 'MigrationParameter',
579 'data': ['announce-initial', 'announce-max',
580 'announce-rounds', 'announce-step',
581 'compress-level', 'compress-threads', 'decompress-threads',
582 'compress-wait-thread',
583 'cpu-throttle-initial', 'cpu-throttle-increment',
584 'tls-creds', 'tls-hostname', 'max-bandwidth',
585 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
586 'x-multifd-channels', 'x-multifd-page-count',
587 'xbzrle-cache-size', 'max-postcopy-bandwidth',
588 'max-cpu-throttle' ] }
591 # @MigrateSetParameters:
593 # @announce-initial: Initial delay (in milliseconds) before sending the first
594 # announce (Since 4.0)
596 # @announce-max: Maximum delay (in milliseconds) between packets in the
597 # announcement (Since 4.0)
599 # @announce-rounds: Number of self-announce packets sent after migration
602 # @announce-step: Increase in delay (in milliseconds) between subsequent
603 # packets in the announcement (Since 4.0)
605 # @compress-level: compression level
607 # @compress-threads: compression thread count
609 # @compress-wait-thread: Controls behavior when all compression threads are
610 # currently busy. If true (default), wait for a free
611 # compression thread to become available; otherwise,
612 # send the page uncompressed. (Since 3.1)
614 # @decompress-threads: decompression thread count
616 # @cpu-throttle-initial: Initial percentage of time guest cpus are
617 # throttled when migration auto-converge is activated.
618 # The default value is 20. (Since 2.7)
620 # @cpu-throttle-increment: throttle percentage increase each time
621 # auto-converge detects that migration is not making
622 # progress. The default value is 10. (Since 2.7)
624 # @tls-creds: ID of the 'tls-creds' object that provides credentials
625 # for establishing a TLS connection over the migration data
626 # channel. On the outgoing side of the migration, the credentials
627 # must be for a 'client' endpoint, while for the incoming side the
628 # credentials must be for a 'server' endpoint. Setting this
629 # to a non-empty string enables TLS for all migrations.
630 # An empty string means that QEMU will use plain text mode for
631 # migration, rather than TLS (Since 2.9)
632 # Previously (since 2.7), this was reported by omitting
635 # @tls-hostname: hostname of the target host for the migration. This
636 # is required when using x509 based TLS credentials and the
637 # migration URI does not already include a hostname. For
638 # example if using fd: or exec: based migration, the
639 # hostname must be provided so that the server's x509
640 # certificate identity can be validated. (Since 2.7)
641 # An empty string means that QEMU will use the hostname
642 # associated with the migration URI, if any. (Since 2.9)
643 # Previously (since 2.7), this was reported by omitting
644 # tls-hostname instead.
646 # @max-bandwidth: to set maximum speed for migration. maximum speed in
647 # bytes per second. (Since 2.8)
649 # @downtime-limit: set maximum tolerated downtime for migration. maximum
650 # downtime in milliseconds (Since 2.8)
652 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
654 # @block-incremental: Affects how much storage is migrated when the
655 # block migration capability is enabled. When false, the entire
656 # storage backing chain is migrated into a flattened image at
657 # the destination; when true, only the active qcow2 layer is
658 # migrated and the destination must already have access to the
659 # same backing chain as was used on the source. (since 2.10)
661 # @x-multifd-channels: Number of channels used to migrate data in
662 # parallel. This is the same number that the
663 # number of sockets used for migration. The
664 # default value is 2 (since 2.11)
666 # @x-multifd-page-count: Number of pages sent together to a thread.
667 # The default value is 16 (since 2.11)
669 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
670 # needs to be a multiple of the target page size
674 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
675 # Defaults to 0 (unlimited). In bytes per second.
678 # @max-cpu-throttle: maximum cpu throttle percentage.
679 # The default value is 99. (Since 3.1)
683 # TODO either fuse back into MigrationParameters, or make
684 # MigrationParameters members mandatory
685 { 'struct': 'MigrateSetParameters',
686 'data': { '*announce-initial': 'size',
687 '*announce-max': 'size',
688 '*announce-rounds': 'size',
689 '*announce-step': 'size',
690 '*compress-level': 'int',
691 '*compress-threads': 'int',
692 '*compress-wait-thread': 'bool',
693 '*decompress-threads': 'int',
694 '*cpu-throttle-initial': 'int',
695 '*cpu-throttle-increment': 'int',
696 '*tls-creds': 'StrOrNull',
697 '*tls-hostname': 'StrOrNull',
698 '*max-bandwidth': 'int',
699 '*downtime-limit': 'int',
700 '*x-checkpoint-delay': 'int',
701 '*block-incremental': 'bool',
702 '*x-multifd-channels': 'int',
703 '*x-multifd-page-count': 'int',
704 '*xbzrle-cache-size': 'size',
705 '*max-postcopy-bandwidth': 'size',
706 '*max-cpu-throttle': 'int' } }
709 # @migrate-set-parameters:
711 # Set various migration parameters.
717 # -> { "execute": "migrate-set-parameters" ,
718 # "arguments": { "compress-level": 1 } }
721 { 'command': 'migrate-set-parameters', 'boxed': true,
722 'data': 'MigrateSetParameters' }
725 # @MigrationParameters:
727 # The optional members aren't actually optional.
729 # @announce-initial: Initial delay (in milliseconds) before sending the
730 # first announce (Since 4.0)
732 # @announce-max: Maximum delay (in milliseconds) between packets in the
733 # announcement (Since 4.0)
735 # @announce-rounds: Number of self-announce packets sent after migration
738 # @announce-step: Increase in delay (in milliseconds) between subsequent
739 # packets in the announcement (Since 4.0)
741 # @compress-level: compression level
743 # @compress-threads: compression thread count
745 # @compress-wait-thread: Controls behavior when all compression threads are
746 # currently busy. If true (default), wait for a free
747 # compression thread to become available; otherwise,
748 # send the page uncompressed. (Since 3.1)
750 # @decompress-threads: decompression thread count
752 # @cpu-throttle-initial: Initial percentage of time guest cpus are
753 # throttled when migration auto-converge is activated.
756 # @cpu-throttle-increment: throttle percentage increase each time
757 # auto-converge detects that migration is not making
758 # progress. (Since 2.7)
760 # @tls-creds: ID of the 'tls-creds' object that provides credentials
761 # for establishing a TLS connection over the migration data
762 # channel. On the outgoing side of the migration, the credentials
763 # must be for a 'client' endpoint, while for the incoming side the
764 # credentials must be for a 'server' endpoint.
765 # An empty string means that QEMU will use plain text mode for
766 # migration, rather than TLS (Since 2.7)
767 # Note: 2.8 reports this by omitting tls-creds instead.
769 # @tls-hostname: hostname of the target host for the migration. This
770 # is required when using x509 based TLS credentials and the
771 # migration URI does not already include a hostname. For
772 # example if using fd: or exec: based migration, the
773 # hostname must be provided so that the server's x509
774 # certificate identity can be validated. (Since 2.7)
775 # An empty string means that QEMU will use the hostname
776 # associated with the migration URI, if any. (Since 2.9)
777 # Note: 2.8 reports this by omitting tls-hostname instead.
779 # @max-bandwidth: to set maximum speed for migration. maximum speed in
780 # bytes per second. (Since 2.8)
782 # @downtime-limit: set maximum tolerated downtime for migration. maximum
783 # downtime in milliseconds (Since 2.8)
785 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
787 # @block-incremental: Affects how much storage is migrated when the
788 # block migration capability is enabled. When false, the entire
789 # storage backing chain is migrated into a flattened image at
790 # the destination; when true, only the active qcow2 layer is
791 # migrated and the destination must already have access to the
792 # same backing chain as was used on the source. (since 2.10)
794 # @x-multifd-channels: Number of channels used to migrate data in
795 # parallel. This is the same number that the
796 # number of sockets used for migration.
797 # The default value is 2 (since 2.11)
799 # @x-multifd-page-count: Number of pages sent together to a thread.
800 # The default value is 16 (since 2.11)
802 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
803 # needs to be a multiple of the target page size
807 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
808 # Defaults to 0 (unlimited). In bytes per second.
811 # @max-cpu-throttle: maximum cpu throttle percentage.
817 { 'struct': 'MigrationParameters',
818 'data': { '*announce-initial': 'size',
819 '*announce-max': 'size',
820 '*announce-rounds': 'size',
821 '*announce-step': 'size',
822 '*compress-level': 'uint8',
823 '*compress-threads': 'uint8',
824 '*compress-wait-thread': 'bool',
825 '*decompress-threads': 'uint8',
826 '*cpu-throttle-initial': 'uint8',
827 '*cpu-throttle-increment': 'uint8',
829 '*tls-hostname': 'str',
830 '*max-bandwidth': 'size',
831 '*downtime-limit': 'uint64',
832 '*x-checkpoint-delay': 'uint32',
833 '*block-incremental': 'bool' ,
834 '*x-multifd-channels': 'uint8',
835 '*x-multifd-page-count': 'uint32',
836 '*xbzrle-cache-size': 'size',
837 '*max-postcopy-bandwidth': 'size',
838 '*max-cpu-throttle':'uint8'} }
841 # @query-migrate-parameters:
843 # Returns information about the current migration parameters
845 # Returns: @MigrationParameters
851 # -> { "execute": "query-migrate-parameters" }
853 # "decompress-threads": 2,
854 # "cpu-throttle-increment": 10,
855 # "compress-threads": 8,
856 # "compress-level": 1,
857 # "cpu-throttle-initial": 20,
858 # "max-bandwidth": 33554432,
859 # "downtime-limit": 300
864 { 'command': 'query-migrate-parameters',
865 'returns': 'MigrationParameters' }
868 # @client_migrate_info:
870 # Set migration information for remote display. This makes the server
871 # ask the client to automatically reconnect using the new parameters
872 # once migration finished successfully. Only implemented for SPICE.
874 # @protocol: must be "spice"
875 # @hostname: migration target hostname
876 # @port: spice tcp port for plaintext channels
877 # @tls-port: spice tcp port for tls-secured channels
878 # @cert-subject: server certificate subject
884 # -> { "execute": "client_migrate_info",
885 # "arguments": { "protocol": "spice",
886 # "hostname": "virt42.lab.kraxel.org",
888 # <- { "return": {} }
891 { 'command': 'client_migrate_info',
892 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
893 '*tls-port': 'int', '*cert-subject': 'str' } }
896 # @migrate-start-postcopy:
898 # Followup to a migration command to switch the migration to postcopy mode.
899 # The postcopy-ram capability must be set on both source and destination
900 # before the original migration command.
906 # -> { "execute": "migrate-start-postcopy" }
907 # <- { "return": {} }
910 { 'command': 'migrate-start-postcopy' }
915 # Emitted when a migration event happens
917 # @status: @MigrationStatus describing the current migration status.
923 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
924 # "event": "MIGRATION",
925 # "data": {"status": "completed"} }
928 { 'event': 'MIGRATION',
929 'data': {'status': 'MigrationStatus'}}
934 # Emitted from the source side of a migration at the start of each pass
935 # (when it syncs the dirty bitmap)
937 # @pass: An incrementing count (starting at 1 on the first pass)
943 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
944 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
947 { 'event': 'MIGRATION_PASS',
948 'data': { 'pass': 'int' } }
953 # The message transmission between Primary side and Secondary side.
955 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
957 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
959 # @checkpoint-reply: SVM gets PVM's checkpoint request
961 # @vmstate-send: VM's state will be sent by PVM.
963 # @vmstate-size: The total size of VMstate.
965 # @vmstate-received: VM's state has been received by SVM.
967 # @vmstate-loaded: VM's state has been loaded by SVM.
971 { 'enum': 'COLOMessage',
972 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
973 'vmstate-send', 'vmstate-size', 'vmstate-received',
979 # The COLO current mode.
981 # @none: COLO is disabled.
983 # @primary: COLO node in primary side.
985 # @secondary: COLO node in slave side.
989 { 'enum': 'COLOMode',
990 'data': [ 'none', 'primary', 'secondary'] }
995 # An enumeration of COLO failover status
997 # @none: no failover has ever happened
999 # @require: got failover requirement but not handled
1001 # @active: in the process of doing failover
1003 # @completed: finish the process of failover
1005 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1009 { 'enum': 'FailoverStatus',
1010 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1015 # Emitted when VM finishes COLO mode due to some errors happening or
1016 # at the request of users.
1018 # @mode: report COLO mode when COLO exited.
1020 # @reason: describes the reason for the COLO exit.
1026 # <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
1027 # "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
1030 { 'event': 'COLO_EXIT',
1031 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1036 # The reason for a COLO exit
1038 # @none: no failover has ever happened. This can't occur in the
1039 # COLO_EXIT event, only in the result of query-colo-status.
1041 # @request: COLO exit is due to an external request
1043 # @error: COLO exit is due to an internal error
1047 { 'enum': 'COLOExitReason',
1048 'data': [ 'none', 'request', 'error' ] }
1051 # @x-colo-lost-heartbeat:
1053 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1054 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1055 # If sent to the Secondary, the Secondary side will run failover work,
1056 # then takes over server operation to become the service VM.
1062 # -> { "execute": "x-colo-lost-heartbeat" }
1063 # <- { "return": {} }
1066 { 'command': 'x-colo-lost-heartbeat' }
1071 # Cancel the current executing migration process.
1073 # Returns: nothing on success
1075 # Notes: This command succeeds even if there is no migration process running.
1081 # -> { "execute": "migrate_cancel" }
1082 # <- { "return": {} }
1085 { 'command': 'migrate_cancel' }
1088 # @migrate-continue:
1090 # Continue migration when it's in a paused state.
1092 # @state: The state the migration is currently expected to be in
1094 # Returns: nothing on success
1098 # -> { "execute": "migrate-continue" , "arguments":
1099 # { "state": "pre-switchover" } }
1100 # <- { "return": {} }
1102 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
1105 # @migrate_set_downtime:
1107 # Set maximum tolerated downtime for migration.
1109 # @value: maximum downtime in seconds
1111 # Returns: nothing on success
1113 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1119 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
1120 # <- { "return": {} }
1123 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1126 # @migrate_set_speed:
1128 # Set maximum speed for migration.
1130 # @value: maximum speed in bytes per second.
1132 # Returns: nothing on success
1134 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1140 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
1141 # <- { "return": {} }
1144 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1147 # @migrate-set-cache-size:
1149 # Set cache size to be used by XBZRLE migration
1151 # @value: cache size in bytes
1153 # The size will be rounded down to the nearest power of 2.
1154 # The cache size can be modified before and during ongoing migration
1156 # Returns: nothing on success
1158 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1164 # -> { "execute": "migrate-set-cache-size",
1165 # "arguments": { "value": 536870912 } }
1166 # <- { "return": {} }
1169 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1172 # @query-migrate-cache-size:
1174 # Query migration XBZRLE cache size
1176 # Returns: XBZRLE cache size in bytes
1178 # Notes: This command is deprecated in favor of 'query-migrate-parameters'
1184 # -> { "execute": "query-migrate-cache-size" }
1185 # <- { "return": 67108864 }
1188 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1193 # Migrates the current running guest to another Virtual Machine.
1195 # @uri: the Uniform Resource Identifier of the destination VM
1197 # @blk: do block migration (full disk copy)
1199 # @inc: incremental disk copy migration
1201 # @detach: this argument exists only for compatibility reasons and
1202 # is ignored by QEMU
1204 # @resume: resume one paused migration, default "off". (since 3.0)
1206 # Returns: nothing on success
1212 # 1. The 'query-migrate' command should be used to check migration's progress
1213 # and final result (this information is provided by the 'status' member)
1215 # 2. All boolean arguments default to false
1217 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1222 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1223 # <- { "return": {} }
1226 { 'command': 'migrate',
1227 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1228 '*detach': 'bool', '*resume': 'bool' } }
1231 # @migrate-incoming:
1233 # Start an incoming migration, the qemu must have been started
1234 # with -incoming defer
1236 # @uri: The Uniform Resource Identifier identifying the source or
1237 # address to listen on
1239 # Returns: nothing on success
1245 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1246 # compatible with -incoming and the format of the uri is already exposed
1249 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1252 # 3. The uri format is the same as for -incoming
1256 # -> { "execute": "migrate-incoming",
1257 # "arguments": { "uri": "tcp::4446" } }
1258 # <- { "return": {} }
1261 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1264 # @xen-save-devices-state:
1266 # Save the state of all devices to file. The RAM and the block devices
1267 # of the VM are not saved by this command.
1269 # @filename: the file to save the state of the devices to as binary
1270 # data. See xen-save-devices-state.txt for a description of the binary
1273 # @live: Optional argument to ask QEMU to treat this command as part of a live
1274 # migration. Default to true. (since 2.11)
1276 # Returns: Nothing on success
1282 # -> { "execute": "xen-save-devices-state",
1283 # "arguments": { "filename": "/tmp/save" } }
1284 # <- { "return": {} }
1287 { 'command': 'xen-save-devices-state',
1288 'data': {'filename': 'str', '*live':'bool' } }
1291 # @xen-set-replication:
1293 # Enable or disable replication.
1295 # @enable: true to enable, false to disable.
1297 # @primary: true for primary or false for secondary.
1299 # @failover: true to do failover, false to stop. but cannot be
1300 # specified if 'enable' is true. default value is false.
1306 # -> { "execute": "xen-set-replication",
1307 # "arguments": {"enable": true, "primary": false} }
1308 # <- { "return": {} }
1312 { 'command': 'xen-set-replication',
1313 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' },
1314 'if': 'defined(CONFIG_REPLICATION)' }
1317 # @ReplicationStatus:
1319 # The result format for 'query-xen-replication-status'.
1321 # @error: true if an error happened, false if replication is normal.
1323 # @desc: the human readable error description string, when
1328 { 'struct': 'ReplicationStatus',
1329 'data': { 'error': 'bool', '*desc': 'str' },
1330 'if': 'defined(CONFIG_REPLICATION)' }
1333 # @query-xen-replication-status:
1335 # Query replication status while the vm is running.
1337 # Returns: A @ReplicationResult object showing the status.
1341 # -> { "execute": "query-xen-replication-status" }
1342 # <- { "return": { "error": false } }
1346 { 'command': 'query-xen-replication-status',
1347 'returns': 'ReplicationStatus',
1348 'if': 'defined(CONFIG_REPLICATION)' }
1351 # @xen-colo-do-checkpoint:
1353 # Xen uses this command to notify replication to trigger a checkpoint.
1359 # -> { "execute": "xen-colo-do-checkpoint" }
1360 # <- { "return": {} }
1364 { 'command': 'xen-colo-do-checkpoint',
1365 'if': 'defined(CONFIG_REPLICATION)' }
1370 # The result format for 'query-colo-status'.
1372 # @mode: COLO running mode. If COLO is running, this field will return
1373 # 'primary' or 'secondary'.
1375 # @reason: describes the reason for the COLO exit.
1379 { 'struct': 'COLOStatus',
1380 'data': { 'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1383 # @query-colo-status:
1385 # Query COLO status while the vm is running.
1387 # Returns: A @COLOStatus object showing the status.
1391 # -> { "execute": "query-colo-status" }
1392 # <- { "return": { "mode": "primary", "active": true, "reason": "request" } }
1396 { 'command': 'query-colo-status',
1397 'returns': 'COLOStatus' }
1402 # Provide a recovery migration stream URI.
1404 # @uri: the URI to be used for the recovery of migration stream.
1410 # -> { "execute": "migrate-recover",
1411 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1412 # <- { "return": {} }
1416 { 'command': 'migrate-recover',
1417 'data': { 'uri': 'str' },
1423 # Pause a migration. Currently it only supports postcopy.
1429 # -> { "execute": "migrate-pause" }
1430 # <- { "return": {} }
1434 { 'command': 'migrate-pause', 'allow-oob': true }