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)
46 { 'struct': 'MigrationStats',
47 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
48 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
49 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
50 'mbps' : 'number', 'dirty-sync-count' : 'int',
51 'postcopy-requests' : 'int', 'page-size' : 'int',
52 'multifd-bytes' : 'uint64' } }
57 # Detailed XBZRLE migration cache statistics
59 # @cache-size: XBZRLE cache size
61 # @bytes: amount of bytes already transferred to the target VM
63 # @pages: amount of pages transferred to the target VM
65 # @cache-miss: number of cache miss
67 # @cache-miss-rate: rate of cache miss (since 2.1)
69 # @overflow: number of overflows
73 { 'struct': 'XBZRLECacheStats',
74 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
75 'cache-miss': 'int', 'cache-miss-rate': 'number',
81 # Detailed migration compression statistics
83 # @pages: amount of pages compressed and transferred to the target VM
85 # @busy: count of times that no free thread was available to compress data
87 # @busy-rate: rate of thread busy
89 # @compressed-size: amount of bytes after compression
91 # @compression-rate: rate of compressed size
95 { 'struct': 'CompressionStats',
96 'data': {'pages': 'int', 'busy': 'int', 'busy-rate': 'number',
97 'compressed-size': 'int', 'compression-rate': 'number' } }
102 # An enumeration of migration status.
104 # @none: no migration has ever happened.
106 # @setup: migration process has been initiated.
108 # @cancelling: in the process of cancelling migration.
110 # @cancelled: cancelling migration is finished.
112 # @active: in the process of doing migration.
114 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
116 # @postcopy-paused: during postcopy but paused. (since 3.0)
118 # @postcopy-recover: trying to recover from a paused postcopy. (since 3.0)
120 # @completed: migration is finished.
122 # @failed: some error occurred during migration process.
124 # @colo: VM is in the process of fault tolerance, VM can not get into this
125 # state unless colo capability is enabled for migration. (since 2.8)
127 # @pre-switchover: Paused before device serialisation. (since 2.11)
129 # @device: During device serialisation when pause-before-switchover is enabled
135 { 'enum': 'MigrationStatus',
136 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
137 'active', 'postcopy-active', 'postcopy-paused',
138 'postcopy-recover', 'completed', 'failed', 'colo',
139 'pre-switchover', 'device' ] }
144 # Information about current migration process.
146 # @status: @MigrationStatus describing the current migration status.
147 # If this field is not returned, no migration process
150 # @ram: @MigrationStats containing detailed migration
151 # status, only returned if status is 'active' or
152 # 'completed'(since 1.2)
154 # @disk: @MigrationStats containing detailed disk migration
155 # status, only returned if status is 'active' and it is a block
158 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
159 # migration statistics, only returned if XBZRLE feature is on and
160 # status is 'active' or 'completed' (since 1.2)
162 # @total-time: total amount of milliseconds since migration started.
163 # If migration has ended, it returns the total migration
166 # @downtime: only present when migration finishes correctly
167 # total downtime in milliseconds for the guest.
170 # @expected-downtime: only present while migration is active
171 # expected downtime in milliseconds for the guest in last walk
172 # of the dirty bitmap. (since 1.3)
174 # @setup-time: amount of setup time in milliseconds _before_ the
175 # iterations begin but _after_ the QMP command is issued. This is designed
176 # to provide an accounting of any activities (such as RDMA pinning) which
177 # may be expensive, but do not actually occur during the iterative
178 # migration rounds themselves. (since 1.6)
180 # @cpu-throttle-percentage: percentage of time guest cpus are being
181 # throttled during auto-converge. This is only present when auto-converge
182 # has started throttling guest cpus. (Since 2.7)
184 # @error-desc: the human readable error description string, when
185 # @status is 'failed'. Clients should not attempt to parse the
186 # error strings. (Since 2.7)
188 # @postcopy-blocktime: total time when all vCPU were blocked during postcopy
189 # live migration. This is only present when the postcopy-blocktime
190 # migration capability is enabled. (Since 3.0)
192 # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU. This is
193 # only present when the postcopy-blocktime migration capability
194 # is enabled. (Since 3.0)
196 # @compression: migration compression statistics, only returned if compression
197 # feature is on and status is 'active' or 'completed' (Since 3.1)
201 { 'struct': 'MigrationInfo',
202 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
203 '*disk': 'MigrationStats',
204 '*xbzrle-cache': 'XBZRLECacheStats',
205 '*total-time': 'int',
206 '*expected-downtime': 'int',
208 '*setup-time': 'int',
209 '*cpu-throttle-percentage': 'int',
210 '*error-desc': 'str',
211 '*postcopy-blocktime' : 'uint32',
212 '*postcopy-vcpu-blocktime': ['uint32'],
213 '*compression': 'CompressionStats'} }
218 # Returns information about current migration process. If migration
219 # is active there will be another json-object with RAM migration
220 # status and if block migration is active another one with block
223 # Returns: @MigrationInfo
229 # 1. Before the first migration
231 # -> { "execute": "query-migrate" }
232 # <- { "return": {} }
234 # 2. Migration is done and has succeeded
236 # -> { "execute": "query-migrate" }
238 # "status": "completed",
239 # "total-time":12345,
240 # "setup-time":12345,
248 # "normal-bytes":123456,
249 # "dirty-sync-count":15
254 # 3. Migration is done and has failed
256 # -> { "execute": "query-migrate" }
257 # <- { "return": { "status": "failed" } }
259 # 4. Migration is being performed and is not a block migration:
261 # -> { "execute": "query-migrate" }
265 # "total-time":12345,
266 # "setup-time":12345,
267 # "expected-downtime":12345,
274 # "normal-bytes":123456,
275 # "dirty-sync-count":15
280 # 5. Migration is being performed and is a block migration:
282 # -> { "execute": "query-migrate" }
286 # "total-time":12345,
287 # "setup-time":12345,
288 # "expected-downtime":12345,
291 # "remaining":1053304,
292 # "transferred":3720,
295 # "normal-bytes":123456,
296 # "dirty-sync-count":15
300 # "remaining":20880384,
301 # "transferred":91136
306 # 6. Migration is being performed and XBZRLE is active:
308 # -> { "execute": "query-migrate" }
312 # "total-time":12345,
313 # "setup-time":12345,
314 # "expected-downtime":12345,
317 # "remaining":1053304,
318 # "transferred":3720,
321 # "normal-bytes":3412992,
322 # "dirty-sync-count":15
325 # "cache-size":67108864,
329 # "cache-miss-rate":0.123,
336 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
339 # @MigrationCapability:
341 # Migration capabilities enumeration
343 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
344 # This feature allows us to minimize migration traffic for certain work
345 # loads, by sending compressed difference of the pages
347 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
348 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
349 # Disabled by default. (since 2.0)
351 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
352 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
353 # source and target VM to support this feature. To enable it is sufficient
354 # to enable the capability on the source VM. The feature is disabled by
355 # default. (since 1.6)
357 # @compress: Use multiple compression threads to accelerate live migration.
358 # This feature can help to reduce the migration traffic, by sending
359 # compressed pages. Please note that if compress and xbzrle are both
360 # on, compress only takes effect in the ram bulk stage, after that,
361 # it will be disabled and only xbzrle takes effect, this can help to
362 # minimize migration traffic. The feature is disabled by default.
365 # @events: generate events for each migration state change
368 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
369 # to speed up convergence of RAM migration. (since 1.6)
371 # @postcopy-ram: Start executing on the migration target before all of RAM has
372 # been migrated, pulling the remaining pages along as needed. The
373 # capacity must have the same setting on both source and target
374 # or migration will not even start. NOTE: If the migration fails during
375 # postcopy the VM will fail. (since 2.6)
377 # @x-colo: If enabled, migration will never end, and the state of the VM on the
378 # primary side will be migrated continuously to the VM on secondary
379 # side, this process is called COarse-Grain LOck Stepping (COLO) for
380 # Non-stop Service. (since 2.8)
382 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
383 # during postcopy-ram migration. (since 2.9)
385 # @block: If enabled, QEMU will also migrate the contents of all block
386 # devices. Default is disabled. A possible alternative uses
387 # mirror jobs to a builtin NBD server on the destination, which
388 # offers more flexibility.
391 # @return-path: If enabled, migration will use the return path even
392 # for precopy. (since 2.10)
394 # @pause-before-switchover: Pause outgoing migration before serialising device
395 # state and before disabling block IO (since 2.11)
397 # @x-multifd: Use more than one fd for migration (since 2.11)
399 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
402 # @postcopy-blocktime: Calculate downtime for postcopy live migration
405 # @late-block-activate: If enabled, the destination will not activate block
406 # devices (and thus take locks) immediately at the end of migration.
411 { 'enum': 'MigrationCapability',
412 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
413 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
414 'block', 'return-path', 'pause-before-switchover', 'x-multifd',
415 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate' ] }
418 # @MigrationCapabilityStatus:
420 # Migration capability information
422 # @capability: capability enum
424 # @state: capability state bool
428 { 'struct': 'MigrationCapabilityStatus',
429 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
432 # @migrate-set-capabilities:
434 # Enable/Disable the following migration capabilities (like xbzrle)
436 # @capabilities: json array of capability modifications to make
442 # -> { "execute": "migrate-set-capabilities" , "arguments":
443 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
446 { 'command': 'migrate-set-capabilities',
447 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
450 # @query-migrate-capabilities:
452 # Returns information about the current migration capabilities status
454 # Returns: @MigrationCapabilitiesStatus
460 # -> { "execute": "query-migrate-capabilities" }
462 # {"state": false, "capability": "xbzrle"},
463 # {"state": false, "capability": "rdma-pin-all"},
464 # {"state": false, "capability": "auto-converge"},
465 # {"state": false, "capability": "zero-blocks"},
466 # {"state": false, "capability": "compress"},
467 # {"state": true, "capability": "events"},
468 # {"state": false, "capability": "postcopy-ram"},
469 # {"state": false, "capability": "x-colo"}
473 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
476 # @MigrationParameter:
478 # Migration parameters enumeration
480 # @compress-level: Set the compression level to be used in live migration,
481 # the compression level is an integer between 0 and 9, where 0 means
482 # no compression, 1 means the best compression speed, and 9 means best
483 # compression ratio which will consume more CPU.
485 # @compress-threads: Set compression thread count to be used in live migration,
486 # the compression thread count is an integer between 1 and 255.
488 # @compress-wait-thread: Controls behavior when all compression threads are
489 # currently busy. If true (default), wait for a free
490 # compression thread to become available; otherwise,
491 # send the page uncompressed. (Since 3.1)
493 # @decompress-threads: Set decompression thread count to be used in live
494 # migration, the decompression thread count is an integer between 1
495 # and 255. Usually, decompression is at least 4 times as fast as
496 # compression, so set the decompress-threads to the number about 1/4
497 # of compress-threads is adequate.
499 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
500 # when migration auto-converge is activated. The
501 # default value is 20. (Since 2.7)
503 # @cpu-throttle-increment: throttle percentage increase each time
504 # auto-converge detects that migration is not making
505 # progress. The default value is 10. (Since 2.7)
507 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
508 # establishing a TLS connection over the migration data channel.
509 # On the outgoing side of the migration, the credentials must
510 # be for a 'client' endpoint, while for the incoming side the
511 # credentials must be for a 'server' endpoint. Setting this
512 # will enable TLS for all migrations. The default is unset,
513 # resulting in unsecured migration at the QEMU level. (Since 2.7)
515 # @tls-hostname: hostname of the target host for the migration. This is
516 # required when using x509 based TLS credentials and the
517 # migration URI does not already include a hostname. For
518 # example if using fd: or exec: based migration, the
519 # hostname must be provided so that the server's x509
520 # certificate identity can be validated. (Since 2.7)
522 # @max-bandwidth: to set maximum speed for migration. maximum speed in
523 # bytes per second. (Since 2.8)
525 # @downtime-limit: set maximum tolerated downtime for migration. maximum
526 # downtime in milliseconds (Since 2.8)
528 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
529 # periodic mode. (Since 2.8)
531 # @block-incremental: Affects how much storage is migrated when the
532 # block migration capability is enabled. When false, the entire
533 # storage backing chain is migrated into a flattened image at
534 # the destination; when true, only the active qcow2 layer is
535 # migrated and the destination must already have access to the
536 # same backing chain as was used on the source. (since 2.10)
538 # @x-multifd-channels: Number of channels used to migrate data in
539 # parallel. This is the same number that the
540 # number of sockets used for migration. The
541 # default value is 2 (since 2.11)
543 # @x-multifd-page-count: Number of pages sent together to a thread.
544 # The default value is 16 (since 2.11)
546 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
547 # needs to be a multiple of the target page size
551 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
552 # Defaults to 0 (unlimited). In bytes per second.
555 # @max-cpu-throttle: maximum cpu throttle percentage.
556 # Defaults to 99. (Since 3.1)
559 { 'enum': 'MigrationParameter',
560 'data': ['compress-level', 'compress-threads', 'decompress-threads',
561 'compress-wait-thread',
562 'cpu-throttle-initial', 'cpu-throttle-increment',
563 'tls-creds', 'tls-hostname', 'max-bandwidth',
564 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
565 'x-multifd-channels', 'x-multifd-page-count',
566 'xbzrle-cache-size', 'max-postcopy-bandwidth',
567 'max-cpu-throttle' ] }
570 # @MigrateSetParameters:
572 # @compress-level: compression level
574 # @compress-threads: compression thread count
576 # @compress-wait-thread: Controls behavior when all compression threads are
577 # currently busy. If true (default), wait for a free
578 # compression thread to become available; otherwise,
579 # send the page uncompressed. (Since 3.1)
581 # @decompress-threads: decompression thread count
583 # @cpu-throttle-initial: Initial percentage of time guest cpus are
584 # throttled when migration auto-converge is activated.
585 # The default value is 20. (Since 2.7)
587 # @cpu-throttle-increment: throttle percentage increase each time
588 # auto-converge detects that migration is not making
589 # progress. The default value is 10. (Since 2.7)
591 # @tls-creds: ID of the 'tls-creds' object that provides credentials
592 # for establishing a TLS connection over the migration data
593 # channel. On the outgoing side of the migration, the credentials
594 # must be for a 'client' endpoint, while for the incoming side the
595 # credentials must be for a 'server' endpoint. Setting this
596 # to a non-empty string enables TLS for all migrations.
597 # An empty string means that QEMU will use plain text mode for
598 # migration, rather than TLS (Since 2.9)
599 # Previously (since 2.7), this was reported by omitting
602 # @tls-hostname: hostname of the target host for the migration. This
603 # is required when using x509 based TLS credentials and the
604 # migration URI does not already include a hostname. For
605 # example if using fd: or exec: based migration, the
606 # hostname must be provided so that the server's x509
607 # certificate identity can be validated. (Since 2.7)
608 # An empty string means that QEMU will use the hostname
609 # associated with the migration URI, if any. (Since 2.9)
610 # Previously (since 2.7), this was reported by omitting
611 # tls-hostname instead.
613 # @max-bandwidth: to set maximum speed for migration. maximum speed in
614 # bytes per second. (Since 2.8)
616 # @downtime-limit: set maximum tolerated downtime for migration. maximum
617 # downtime in milliseconds (Since 2.8)
619 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
621 # @block-incremental: Affects how much storage is migrated when the
622 # block migration capability is enabled. When false, the entire
623 # storage backing chain is migrated into a flattened image at
624 # the destination; when true, only the active qcow2 layer is
625 # migrated and the destination must already have access to the
626 # same backing chain as was used on the source. (since 2.10)
628 # @x-multifd-channels: Number of channels used to migrate data in
629 # parallel. This is the same number that the
630 # number of sockets used for migration. The
631 # default value is 2 (since 2.11)
633 # @x-multifd-page-count: Number of pages sent together to a thread.
634 # The default value is 16 (since 2.11)
636 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
637 # needs to be a multiple of the target page size
641 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
642 # Defaults to 0 (unlimited). In bytes per second.
645 # @max-cpu-throttle: maximum cpu throttle percentage.
646 # The default value is 99. (Since 3.1)
650 # TODO either fuse back into MigrationParameters, or make
651 # MigrationParameters members mandatory
652 { 'struct': 'MigrateSetParameters',
653 'data': { '*compress-level': 'int',
654 '*compress-threads': 'int',
655 '*compress-wait-thread': 'bool',
656 '*decompress-threads': 'int',
657 '*cpu-throttle-initial': 'int',
658 '*cpu-throttle-increment': 'int',
659 '*tls-creds': 'StrOrNull',
660 '*tls-hostname': 'StrOrNull',
661 '*max-bandwidth': 'int',
662 '*downtime-limit': 'int',
663 '*x-checkpoint-delay': 'int',
664 '*block-incremental': 'bool',
665 '*x-multifd-channels': 'int',
666 '*x-multifd-page-count': 'int',
667 '*xbzrle-cache-size': 'size',
668 '*max-postcopy-bandwidth': 'size',
669 '*max-cpu-throttle': 'int' } }
672 # @migrate-set-parameters:
674 # Set various migration parameters.
680 # -> { "execute": "migrate-set-parameters" ,
681 # "arguments": { "compress-level": 1 } }
684 { 'command': 'migrate-set-parameters', 'boxed': true,
685 'data': 'MigrateSetParameters' }
688 # @MigrationParameters:
690 # The optional members aren't actually optional.
692 # @compress-level: compression level
694 # @compress-threads: compression thread count
696 # @compress-wait-thread: Controls behavior when all compression threads are
697 # currently busy. If true (default), wait for a free
698 # compression thread to become available; otherwise,
699 # send the page uncompressed. (Since 3.1)
701 # @decompress-threads: decompression thread count
703 # @cpu-throttle-initial: Initial percentage of time guest cpus are
704 # throttled when migration auto-converge is activated.
707 # @cpu-throttle-increment: throttle percentage increase each time
708 # auto-converge detects that migration is not making
709 # progress. (Since 2.7)
711 # @tls-creds: ID of the 'tls-creds' object that provides credentials
712 # for establishing a TLS connection over the migration data
713 # channel. On the outgoing side of the migration, the credentials
714 # must be for a 'client' endpoint, while for the incoming side the
715 # credentials must be for a 'server' endpoint.
716 # An empty string means that QEMU will use plain text mode for
717 # migration, rather than TLS (Since 2.7)
718 # Note: 2.8 reports this by omitting tls-creds instead.
720 # @tls-hostname: hostname of the target host for the migration. This
721 # is required when using x509 based TLS credentials and the
722 # migration URI does not already include a hostname. For
723 # example if using fd: or exec: based migration, the
724 # hostname must be provided so that the server's x509
725 # certificate identity can be validated. (Since 2.7)
726 # An empty string means that QEMU will use the hostname
727 # associated with the migration URI, if any. (Since 2.9)
728 # Note: 2.8 reports this by omitting tls-hostname instead.
730 # @max-bandwidth: to set maximum speed for migration. maximum speed in
731 # bytes per second. (Since 2.8)
733 # @downtime-limit: set maximum tolerated downtime for migration. maximum
734 # downtime in milliseconds (Since 2.8)
736 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
738 # @block-incremental: Affects how much storage is migrated when the
739 # block migration capability is enabled. When false, the entire
740 # storage backing chain is migrated into a flattened image at
741 # the destination; when true, only the active qcow2 layer is
742 # migrated and the destination must already have access to the
743 # same backing chain as was used on the source. (since 2.10)
745 # @x-multifd-channels: Number of channels used to migrate data in
746 # parallel. This is the same number that the
747 # number of sockets used for migration.
748 # The default value is 2 (since 2.11)
750 # @x-multifd-page-count: Number of pages sent together to a thread.
751 # The default value is 16 (since 2.11)
753 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
754 # needs to be a multiple of the target page size
758 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
759 # Defaults to 0 (unlimited). In bytes per second.
762 # @max-cpu-throttle: maximum cpu throttle percentage.
768 { 'struct': 'MigrationParameters',
769 'data': { '*compress-level': 'uint8',
770 '*compress-threads': 'uint8',
771 '*compress-wait-thread': 'bool',
772 '*decompress-threads': 'uint8',
773 '*cpu-throttle-initial': 'uint8',
774 '*cpu-throttle-increment': 'uint8',
776 '*tls-hostname': 'str',
777 '*max-bandwidth': 'size',
778 '*downtime-limit': 'uint64',
779 '*x-checkpoint-delay': 'uint32',
780 '*block-incremental': 'bool' ,
781 '*x-multifd-channels': 'uint8',
782 '*x-multifd-page-count': 'uint32',
783 '*xbzrle-cache-size': 'size',
784 '*max-postcopy-bandwidth': 'size',
785 '*max-cpu-throttle':'uint8'} }
788 # @query-migrate-parameters:
790 # Returns information about the current migration parameters
792 # Returns: @MigrationParameters
798 # -> { "execute": "query-migrate-parameters" }
800 # "decompress-threads": 2,
801 # "cpu-throttle-increment": 10,
802 # "compress-threads": 8,
803 # "compress-level": 1,
804 # "cpu-throttle-initial": 20,
805 # "max-bandwidth": 33554432,
806 # "downtime-limit": 300
811 { 'command': 'query-migrate-parameters',
812 'returns': 'MigrationParameters' }
815 # @client_migrate_info:
817 # Set migration information for remote display. This makes the server
818 # ask the client to automatically reconnect using the new parameters
819 # once migration finished successfully. Only implemented for SPICE.
821 # @protocol: must be "spice"
822 # @hostname: migration target hostname
823 # @port: spice tcp port for plaintext channels
824 # @tls-port: spice tcp port for tls-secured channels
825 # @cert-subject: server certificate subject
831 # -> { "execute": "client_migrate_info",
832 # "arguments": { "protocol": "spice",
833 # "hostname": "virt42.lab.kraxel.org",
835 # <- { "return": {} }
838 { 'command': 'client_migrate_info',
839 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
840 '*tls-port': 'int', '*cert-subject': 'str' } }
843 # @migrate-start-postcopy:
845 # Followup to a migration command to switch the migration to postcopy mode.
846 # The postcopy-ram capability must be set on both source and destination
847 # before the original migration command.
853 # -> { "execute": "migrate-start-postcopy" }
854 # <- { "return": {} }
857 { 'command': 'migrate-start-postcopy' }
862 # Emitted when a migration event happens
864 # @status: @MigrationStatus describing the current migration status.
870 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
871 # "event": "MIGRATION",
872 # "data": {"status": "completed"} }
875 { 'event': 'MIGRATION',
876 'data': {'status': 'MigrationStatus'}}
881 # Emitted from the source side of a migration at the start of each pass
882 # (when it syncs the dirty bitmap)
884 # @pass: An incrementing count (starting at 1 on the first pass)
890 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
891 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
894 { 'event': 'MIGRATION_PASS',
895 'data': { 'pass': 'int' } }
900 # The message transmission between Primary side and Secondary side.
902 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
904 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
906 # @checkpoint-reply: SVM gets PVM's checkpoint request
908 # @vmstate-send: VM's state will be sent by PVM.
910 # @vmstate-size: The total size of VMstate.
912 # @vmstate-received: VM's state has been received by SVM.
914 # @vmstate-loaded: VM's state has been loaded by SVM.
918 { 'enum': 'COLOMessage',
919 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
920 'vmstate-send', 'vmstate-size', 'vmstate-received',
926 # The COLO current mode.
928 # @none: COLO is disabled.
930 # @primary: COLO node in primary side.
932 # @secondary: COLO node in slave side.
936 { 'enum': 'COLOMode',
937 'data': [ 'none', 'primary', 'secondary'] }
942 # An enumeration of COLO failover status
944 # @none: no failover has ever happened
946 # @require: got failover requirement but not handled
948 # @active: in the process of doing failover
950 # @completed: finish the process of failover
952 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
956 { 'enum': 'FailoverStatus',
957 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
962 # Emitted when VM finishes COLO mode due to some errors happening or
963 # at the request of users.
965 # @mode: report COLO mode when COLO exited.
967 # @reason: describes the reason for the COLO exit.
973 # <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
974 # "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
977 { 'event': 'COLO_EXIT',
978 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
983 # The reason for a COLO exit
985 # @none: no failover has ever happened. This can't occur in the
986 # COLO_EXIT event, only in the result of query-colo-status.
988 # @request: COLO exit is due to an external request
990 # @error: COLO exit is due to an internal error
994 { 'enum': 'COLOExitReason',
995 'data': [ 'none', 'request', 'error' ] }
998 # @x-colo-lost-heartbeat:
1000 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
1001 # If this command is sent to the PVM, the Primary side will exit COLO mode.
1002 # If sent to the Secondary, the Secondary side will run failover work,
1003 # then takes over server operation to become the service VM.
1009 # -> { "execute": "x-colo-lost-heartbeat" }
1010 # <- { "return": {} }
1013 { 'command': 'x-colo-lost-heartbeat' }
1018 # Cancel the current executing migration process.
1020 # Returns: nothing on success
1022 # Notes: This command succeeds even if there is no migration process running.
1028 # -> { "execute": "migrate_cancel" }
1029 # <- { "return": {} }
1032 { 'command': 'migrate_cancel' }
1035 # @migrate-continue:
1037 # Continue migration when it's in a paused state.
1039 # @state: The state the migration is currently expected to be in
1041 # Returns: nothing on success
1045 # -> { "execute": "migrate-continue" , "arguments":
1046 # { "state": "pre-switchover" } }
1047 # <- { "return": {} }
1049 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
1052 # @migrate_set_downtime:
1054 # Set maximum tolerated downtime for migration.
1056 # @value: maximum downtime in seconds
1058 # Returns: nothing on success
1060 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1066 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
1067 # <- { "return": {} }
1070 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1073 # @migrate_set_speed:
1075 # Set maximum speed for migration.
1077 # @value: maximum speed in bytes per second.
1079 # Returns: nothing on success
1081 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1087 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
1088 # <- { "return": {} }
1091 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1094 # @migrate-set-cache-size:
1096 # Set cache size to be used by XBZRLE migration
1098 # @value: cache size in bytes
1100 # The size will be rounded down to the nearest power of 2.
1101 # The cache size can be modified before and during ongoing migration
1103 # Returns: nothing on success
1105 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1111 # -> { "execute": "migrate-set-cache-size",
1112 # "arguments": { "value": 536870912 } }
1113 # <- { "return": {} }
1116 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1119 # @query-migrate-cache-size:
1121 # Query migration XBZRLE cache size
1123 # Returns: XBZRLE cache size in bytes
1125 # Notes: This command is deprecated in favor of 'query-migrate-parameters'
1131 # -> { "execute": "query-migrate-cache-size" }
1132 # <- { "return": 67108864 }
1135 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1140 # Migrates the current running guest to another Virtual Machine.
1142 # @uri: the Uniform Resource Identifier of the destination VM
1144 # @blk: do block migration (full disk copy)
1146 # @inc: incremental disk copy migration
1148 # @detach: this argument exists only for compatibility reasons and
1149 # is ignored by QEMU
1151 # @resume: resume one paused migration, default "off". (since 3.0)
1153 # Returns: nothing on success
1159 # 1. The 'query-migrate' command should be used to check migration's progress
1160 # and final result (this information is provided by the 'status' member)
1162 # 2. All boolean arguments default to false
1164 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1169 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1170 # <- { "return": {} }
1173 { 'command': 'migrate',
1174 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1175 '*detach': 'bool', '*resume': 'bool' } }
1178 # @migrate-incoming:
1180 # Start an incoming migration, the qemu must have been started
1181 # with -incoming defer
1183 # @uri: The Uniform Resource Identifier identifying the source or
1184 # address to listen on
1186 # Returns: nothing on success
1192 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1193 # compatible with -incoming and the format of the uri is already exposed
1196 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1199 # 3. The uri format is the same as for -incoming
1203 # -> { "execute": "migrate-incoming",
1204 # "arguments": { "uri": "tcp::4446" } }
1205 # <- { "return": {} }
1208 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1211 # @xen-save-devices-state:
1213 # Save the state of all devices to file. The RAM and the block devices
1214 # of the VM are not saved by this command.
1216 # @filename: the file to save the state of the devices to as binary
1217 # data. See xen-save-devices-state.txt for a description of the binary
1220 # @live: Optional argument to ask QEMU to treat this command as part of a live
1221 # migration. Default to true. (since 2.11)
1223 # Returns: Nothing on success
1229 # -> { "execute": "xen-save-devices-state",
1230 # "arguments": { "filename": "/tmp/save" } }
1231 # <- { "return": {} }
1234 { 'command': 'xen-save-devices-state',
1235 'data': {'filename': 'str', '*live':'bool' } }
1238 # @xen-set-replication:
1240 # Enable or disable replication.
1242 # @enable: true to enable, false to disable.
1244 # @primary: true for primary or false for secondary.
1246 # @failover: true to do failover, false to stop. but cannot be
1247 # specified if 'enable' is true. default value is false.
1253 # -> { "execute": "xen-set-replication",
1254 # "arguments": {"enable": true, "primary": false} }
1255 # <- { "return": {} }
1259 { 'command': 'xen-set-replication',
1260 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' },
1261 'if': 'defined(CONFIG_REPLICATION)' }
1264 # @ReplicationStatus:
1266 # The result format for 'query-xen-replication-status'.
1268 # @error: true if an error happened, false if replication is normal.
1270 # @desc: the human readable error description string, when
1275 { 'struct': 'ReplicationStatus',
1276 'data': { 'error': 'bool', '*desc': 'str' },
1277 'if': 'defined(CONFIG_REPLICATION)' }
1280 # @query-xen-replication-status:
1282 # Query replication status while the vm is running.
1284 # Returns: A @ReplicationResult object showing the status.
1288 # -> { "execute": "query-xen-replication-status" }
1289 # <- { "return": { "error": false } }
1293 { 'command': 'query-xen-replication-status',
1294 'returns': 'ReplicationStatus',
1295 'if': 'defined(CONFIG_REPLICATION)' }
1298 # @xen-colo-do-checkpoint:
1300 # Xen uses this command to notify replication to trigger a checkpoint.
1306 # -> { "execute": "xen-colo-do-checkpoint" }
1307 # <- { "return": {} }
1311 { 'command': 'xen-colo-do-checkpoint',
1312 'if': 'defined(CONFIG_REPLICATION)' }
1317 # The result format for 'query-colo-status'.
1319 # @mode: COLO running mode. If COLO is running, this field will return
1320 # 'primary' or 'secondary'.
1322 # @reason: describes the reason for the COLO exit.
1326 { 'struct': 'COLOStatus',
1327 'data': { 'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1330 # @query-colo-status:
1332 # Query COLO status while the vm is running.
1334 # Returns: A @COLOStatus object showing the status.
1338 # -> { "execute": "query-colo-status" }
1339 # <- { "return": { "mode": "primary", "active": true, "reason": "request" } }
1343 { 'command': 'query-colo-status',
1344 'returns': 'COLOStatus' }
1349 # Provide a recovery migration stream URI.
1351 # @uri: the URI to be used for the recovery of migration stream.
1357 # -> { "execute": "migrate-recover",
1358 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1359 # <- { "return": {} }
1363 { 'command': 'migrate-recover',
1364 'data': { 'uri': 'str' },
1370 # Pause a migration. Currently it only supports postcopy.
1376 # -> { "execute": "migrate-pause" }
1377 # <- { "return": {} }
1381 { 'command': 'migrate-pause', 'allow-oob': true }