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 # An enumeration of migration status.
83 # @none: no migration has ever happened.
85 # @setup: migration process has been initiated.
87 # @cancelling: in the process of cancelling migration.
89 # @cancelled: cancelling migration is finished.
91 # @active: in the process of doing migration.
93 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
95 # @postcopy-paused: during postcopy but paused. (since 3.0)
97 # @postcopy-recover: trying to recover from a paused postcopy. (since 3.0)
99 # @completed: migration is finished.
101 # @failed: some error occurred during migration process.
103 # @colo: VM is in the process of fault tolerance, VM can not get into this
104 # state unless colo capability is enabled for migration. (since 2.8)
106 # @pre-switchover: Paused before device serialisation. (since 2.11)
108 # @device: During device serialisation when pause-before-switchover is enabled
114 { 'enum': 'MigrationStatus',
115 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
116 'active', 'postcopy-active', 'postcopy-paused',
117 'postcopy-recover', 'completed', 'failed', 'colo',
118 'pre-switchover', 'device' ] }
123 # Information about current migration process.
125 # @status: @MigrationStatus describing the current migration status.
126 # If this field is not returned, no migration process
129 # @ram: @MigrationStats containing detailed migration
130 # status, only returned if status is 'active' or
131 # 'completed'(since 1.2)
133 # @disk: @MigrationStats containing detailed disk migration
134 # status, only returned if status is 'active' and it is a block
137 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
138 # migration statistics, only returned if XBZRLE feature is on and
139 # status is 'active' or 'completed' (since 1.2)
141 # @total-time: total amount of milliseconds since migration started.
142 # If migration has ended, it returns the total migration
145 # @downtime: only present when migration finishes correctly
146 # total downtime in milliseconds for the guest.
149 # @expected-downtime: only present while migration is active
150 # expected downtime in milliseconds for the guest in last walk
151 # of the dirty bitmap. (since 1.3)
153 # @setup-time: amount of setup time in milliseconds _before_ the
154 # iterations begin but _after_ the QMP command is issued. This is designed
155 # to provide an accounting of any activities (such as RDMA pinning) which
156 # may be expensive, but do not actually occur during the iterative
157 # migration rounds themselves. (since 1.6)
159 # @cpu-throttle-percentage: percentage of time guest cpus are being
160 # throttled during auto-converge. This is only present when auto-converge
161 # has started throttling guest cpus. (Since 2.7)
163 # @error-desc: the human readable error description string, when
164 # @status is 'failed'. Clients should not attempt to parse the
165 # error strings. (Since 2.7)
167 # @postcopy-blocktime: total time when all vCPU were blocked during postcopy
168 # live migration. This is only present when the postcopy-blocktime
169 # migration capability is enabled. (Since 3.0)
171 # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU. This is
172 # only present when the postcopy-blocktime migration capability
173 # is enabled. (Since 3.0)
178 { 'struct': 'MigrationInfo',
179 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
180 '*disk': 'MigrationStats',
181 '*xbzrle-cache': 'XBZRLECacheStats',
182 '*total-time': 'int',
183 '*expected-downtime': 'int',
185 '*setup-time': 'int',
186 '*cpu-throttle-percentage': 'int',
187 '*error-desc': 'str',
188 '*postcopy-blocktime' : 'uint32',
189 '*postcopy-vcpu-blocktime': ['uint32']} }
194 # Returns information about current migration process. If migration
195 # is active there will be another json-object with RAM migration
196 # status and if block migration is active another one with block
199 # Returns: @MigrationInfo
205 # 1. Before the first migration
207 # -> { "execute": "query-migrate" }
208 # <- { "return": {} }
210 # 2. Migration is done and has succeeded
212 # -> { "execute": "query-migrate" }
214 # "status": "completed",
215 # "total-time":12345,
216 # "setup-time":12345,
224 # "normal-bytes":123456,
225 # "dirty-sync-count":15
230 # 3. Migration is done and has failed
232 # -> { "execute": "query-migrate" }
233 # <- { "return": { "status": "failed" } }
235 # 4. Migration is being performed and is not a block migration:
237 # -> { "execute": "query-migrate" }
241 # "total-time":12345,
242 # "setup-time":12345,
243 # "expected-downtime":12345,
250 # "normal-bytes":123456,
251 # "dirty-sync-count":15
256 # 5. Migration is being performed and is a block migration:
258 # -> { "execute": "query-migrate" }
262 # "total-time":12345,
263 # "setup-time":12345,
264 # "expected-downtime":12345,
267 # "remaining":1053304,
268 # "transferred":3720,
271 # "normal-bytes":123456,
272 # "dirty-sync-count":15
276 # "remaining":20880384,
277 # "transferred":91136
282 # 6. Migration is being performed and XBZRLE is active:
284 # -> { "execute": "query-migrate" }
288 # "total-time":12345,
289 # "setup-time":12345,
290 # "expected-downtime":12345,
293 # "remaining":1053304,
294 # "transferred":3720,
297 # "normal-bytes":3412992,
298 # "dirty-sync-count":15
301 # "cache-size":67108864,
305 # "cache-miss-rate":0.123,
312 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
315 # @MigrationCapability:
317 # Migration capabilities enumeration
319 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
320 # This feature allows us to minimize migration traffic for certain work
321 # loads, by sending compressed difference of the pages
323 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
324 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
325 # Disabled by default. (since 2.0)
327 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
328 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
329 # source and target VM to support this feature. To enable it is sufficient
330 # to enable the capability on the source VM. The feature is disabled by
331 # default. (since 1.6)
333 # @compress: Use multiple compression threads to accelerate live migration.
334 # This feature can help to reduce the migration traffic, by sending
335 # compressed pages. Please note that if compress and xbzrle are both
336 # on, compress only takes effect in the ram bulk stage, after that,
337 # it will be disabled and only xbzrle takes effect, this can help to
338 # minimize migration traffic. The feature is disabled by default.
341 # @events: generate events for each migration state change
344 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
345 # to speed up convergence of RAM migration. (since 1.6)
347 # @postcopy-ram: Start executing on the migration target before all of RAM has
348 # been migrated, pulling the remaining pages along as needed. The
349 # capacity must have the same setting on both source and target
350 # or migration will not even start. NOTE: If the migration fails during
351 # postcopy the VM will fail. (since 2.6)
353 # @x-colo: If enabled, migration will never end, and the state of the VM on the
354 # primary side will be migrated continuously to the VM on secondary
355 # side, this process is called COarse-Grain LOck Stepping (COLO) for
356 # Non-stop Service. (since 2.8)
358 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
359 # during postcopy-ram migration. (since 2.9)
361 # @block: If enabled, QEMU will also migrate the contents of all block
362 # devices. Default is disabled. A possible alternative uses
363 # mirror jobs to a builtin NBD server on the destination, which
364 # offers more flexibility.
367 # @return-path: If enabled, migration will use the return path even
368 # for precopy. (since 2.10)
370 # @pause-before-switchover: Pause outgoing migration before serialising device
371 # state and before disabling block IO (since 2.11)
373 # @x-multifd: Use more than one fd for migration (since 2.11)
375 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
378 # @postcopy-blocktime: Calculate downtime for postcopy live migration
381 # @late-block-activate: If enabled, the destination will not activate block
382 # devices (and thus take locks) immediately at the end of migration.
387 { 'enum': 'MigrationCapability',
388 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
389 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
390 'block', 'return-path', 'pause-before-switchover', 'x-multifd',
391 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate' ] }
394 # @MigrationCapabilityStatus:
396 # Migration capability information
398 # @capability: capability enum
400 # @state: capability state bool
404 { 'struct': 'MigrationCapabilityStatus',
405 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
408 # @migrate-set-capabilities:
410 # Enable/Disable the following migration capabilities (like xbzrle)
412 # @capabilities: json array of capability modifications to make
418 # -> { "execute": "migrate-set-capabilities" , "arguments":
419 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
422 { 'command': 'migrate-set-capabilities',
423 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
426 # @query-migrate-capabilities:
428 # Returns information about the current migration capabilities status
430 # Returns: @MigrationCapabilitiesStatus
436 # -> { "execute": "query-migrate-capabilities" }
438 # {"state": false, "capability": "xbzrle"},
439 # {"state": false, "capability": "rdma-pin-all"},
440 # {"state": false, "capability": "auto-converge"},
441 # {"state": false, "capability": "zero-blocks"},
442 # {"state": false, "capability": "compress"},
443 # {"state": true, "capability": "events"},
444 # {"state": false, "capability": "postcopy-ram"},
445 # {"state": false, "capability": "x-colo"}
449 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
452 # @MigrationParameter:
454 # Migration parameters enumeration
456 # @compress-level: Set the compression level to be used in live migration,
457 # the compression level is an integer between 0 and 9, where 0 means
458 # no compression, 1 means the best compression speed, and 9 means best
459 # compression ratio which will consume more CPU.
461 # @compress-threads: Set compression thread count to be used in live migration,
462 # the compression thread count is an integer between 1 and 255.
464 # @decompress-threads: Set decompression thread count to be used in live
465 # migration, the decompression thread count is an integer between 1
466 # and 255. Usually, decompression is at least 4 times as fast as
467 # compression, so set the decompress-threads to the number about 1/4
468 # of compress-threads is adequate.
470 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
471 # when migration auto-converge is activated. The
472 # default value is 20. (Since 2.7)
474 # @cpu-throttle-increment: throttle percentage increase each time
475 # auto-converge detects that migration is not making
476 # progress. The default value is 10. (Since 2.7)
478 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
479 # establishing a TLS connection over the migration data channel.
480 # On the outgoing side of the migration, the credentials must
481 # be for a 'client' endpoint, while for the incoming side the
482 # credentials must be for a 'server' endpoint. Setting this
483 # will enable TLS for all migrations. The default is unset,
484 # resulting in unsecured migration at the QEMU level. (Since 2.7)
486 # @tls-hostname: hostname of the target host for the migration. This is
487 # required when using x509 based TLS credentials and the
488 # migration URI does not already include a hostname. For
489 # example if using fd: or exec: based migration, the
490 # hostname must be provided so that the server's x509
491 # certificate identity can be validated. (Since 2.7)
493 # @max-bandwidth: to set maximum speed for migration. maximum speed in
494 # bytes per second. (Since 2.8)
496 # @downtime-limit: set maximum tolerated downtime for migration. maximum
497 # downtime in milliseconds (Since 2.8)
499 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
500 # periodic mode. (Since 2.8)
502 # @block-incremental: Affects how much storage is migrated when the
503 # block migration capability is enabled. When false, the entire
504 # storage backing chain is migrated into a flattened image at
505 # the destination; when true, only the active qcow2 layer is
506 # migrated and the destination must already have access to the
507 # same backing chain as was used on the source. (since 2.10)
509 # @x-multifd-channels: Number of channels used to migrate data in
510 # parallel. This is the same number that the
511 # number of sockets used for migration. The
512 # default value is 2 (since 2.11)
514 # @x-multifd-page-count: Number of pages sent together to a thread.
515 # The default value is 16 (since 2.11)
517 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
518 # needs to be a multiple of the target page size
522 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
523 # Defaults to 0 (unlimited). In bytes per second.
526 # @max-cpu-throttle: maximum cpu throttle percentage.
527 # Defaults to 99. (Since 3.1)
530 { 'enum': 'MigrationParameter',
531 'data': ['compress-level', 'compress-threads', 'decompress-threads',
532 'cpu-throttle-initial', 'cpu-throttle-increment',
533 'tls-creds', 'tls-hostname', 'max-bandwidth',
534 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
535 'x-multifd-channels', 'x-multifd-page-count',
536 'xbzrle-cache-size', 'max-postcopy-bandwidth',
537 'max-cpu-throttle' ] }
540 # @MigrateSetParameters:
542 # @compress-level: compression level
544 # @compress-threads: compression thread count
546 # @decompress-threads: decompression thread count
548 # @cpu-throttle-initial: Initial percentage of time guest cpus are
549 # throttled when migration auto-converge is activated.
550 # The default value is 20. (Since 2.7)
552 # @cpu-throttle-increment: throttle percentage increase each time
553 # auto-converge detects that migration is not making
554 # progress. The default value is 10. (Since 2.7)
556 # @tls-creds: ID of the 'tls-creds' object that provides credentials
557 # for establishing a TLS connection over the migration data
558 # channel. On the outgoing side of the migration, the credentials
559 # must be for a 'client' endpoint, while for the incoming side the
560 # credentials must be for a 'server' endpoint. Setting this
561 # to a non-empty string enables TLS for all migrations.
562 # An empty string means that QEMU will use plain text mode for
563 # migration, rather than TLS (Since 2.9)
564 # Previously (since 2.7), this was reported by omitting
567 # @tls-hostname: hostname of the target host for the migration. This
568 # is required when using x509 based TLS credentials and the
569 # migration URI does not already include a hostname. For
570 # example if using fd: or exec: based migration, the
571 # hostname must be provided so that the server's x509
572 # certificate identity can be validated. (Since 2.7)
573 # An empty string means that QEMU will use the hostname
574 # associated with the migration URI, if any. (Since 2.9)
575 # Previously (since 2.7), this was reported by omitting
576 # tls-hostname instead.
578 # @max-bandwidth: to set maximum speed for migration. maximum speed in
579 # bytes per second. (Since 2.8)
581 # @downtime-limit: set maximum tolerated downtime for migration. maximum
582 # downtime in milliseconds (Since 2.8)
584 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
586 # @block-incremental: Affects how much storage is migrated when the
587 # block migration capability is enabled. When false, the entire
588 # storage backing chain is migrated into a flattened image at
589 # the destination; when true, only the active qcow2 layer is
590 # migrated and the destination must already have access to the
591 # same backing chain as was used on the source. (since 2.10)
593 # @x-multifd-channels: Number of channels used to migrate data in
594 # parallel. This is the same number that the
595 # number of sockets used for migration. The
596 # default value is 2 (since 2.11)
598 # @x-multifd-page-count: Number of pages sent together to a thread.
599 # The default value is 16 (since 2.11)
601 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
602 # needs to be a multiple of the target page size
606 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
607 # Defaults to 0 (unlimited). In bytes per second.
610 # @max-cpu-throttle: maximum cpu throttle percentage.
611 # The default value is 99. (Since 3.1)
615 # TODO either fuse back into MigrationParameters, or make
616 # MigrationParameters members mandatory
617 { 'struct': 'MigrateSetParameters',
618 'data': { '*compress-level': 'int',
619 '*compress-threads': 'int',
620 '*decompress-threads': 'int',
621 '*cpu-throttle-initial': 'int',
622 '*cpu-throttle-increment': 'int',
623 '*tls-creds': 'StrOrNull',
624 '*tls-hostname': 'StrOrNull',
625 '*max-bandwidth': 'int',
626 '*downtime-limit': 'int',
627 '*x-checkpoint-delay': 'int',
628 '*block-incremental': 'bool',
629 '*x-multifd-channels': 'int',
630 '*x-multifd-page-count': 'int',
631 '*xbzrle-cache-size': 'size',
632 '*max-postcopy-bandwidth': 'size',
633 '*max-cpu-throttle': 'int' } }
636 # @migrate-set-parameters:
638 # Set various migration parameters.
644 # -> { "execute": "migrate-set-parameters" ,
645 # "arguments": { "compress-level": 1 } }
648 { 'command': 'migrate-set-parameters', 'boxed': true,
649 'data': 'MigrateSetParameters' }
652 # @MigrationParameters:
654 # The optional members aren't actually optional.
656 # @compress-level: compression level
658 # @compress-threads: compression thread count
660 # @decompress-threads: decompression thread count
662 # @cpu-throttle-initial: Initial percentage of time guest cpus are
663 # throttled when migration auto-converge is activated.
666 # @cpu-throttle-increment: throttle percentage increase each time
667 # auto-converge detects that migration is not making
668 # progress. (Since 2.7)
670 # @tls-creds: ID of the 'tls-creds' object that provides credentials
671 # for establishing a TLS connection over the migration data
672 # channel. On the outgoing side of the migration, the credentials
673 # must be for a 'client' endpoint, while for the incoming side the
674 # credentials must be for a 'server' endpoint.
675 # An empty string means that QEMU will use plain text mode for
676 # migration, rather than TLS (Since 2.7)
677 # Note: 2.8 reports this by omitting tls-creds instead.
679 # @tls-hostname: hostname of the target host for the migration. This
680 # is required when using x509 based TLS credentials and the
681 # migration URI does not already include a hostname. For
682 # example if using fd: or exec: based migration, the
683 # hostname must be provided so that the server's x509
684 # certificate identity can be validated. (Since 2.7)
685 # An empty string means that QEMU will use the hostname
686 # associated with the migration URI, if any. (Since 2.9)
687 # Note: 2.8 reports this by omitting tls-hostname instead.
689 # @max-bandwidth: to set maximum speed for migration. maximum speed in
690 # bytes per second. (Since 2.8)
692 # @downtime-limit: set maximum tolerated downtime for migration. maximum
693 # downtime in milliseconds (Since 2.8)
695 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
697 # @block-incremental: Affects how much storage is migrated when the
698 # block migration capability is enabled. When false, the entire
699 # storage backing chain is migrated into a flattened image at
700 # the destination; when true, only the active qcow2 layer is
701 # migrated and the destination must already have access to the
702 # same backing chain as was used on the source. (since 2.10)
704 # @x-multifd-channels: Number of channels used to migrate data in
705 # parallel. This is the same number that the
706 # number of sockets used for migration.
707 # The default value is 2 (since 2.11)
709 # @x-multifd-page-count: Number of pages sent together to a thread.
710 # The default value is 16 (since 2.11)
712 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
713 # needs to be a multiple of the target page size
717 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
718 # Defaults to 0 (unlimited). In bytes per second.
721 # @max-cpu-throttle: maximum cpu throttle percentage.
727 { 'struct': 'MigrationParameters',
728 'data': { '*compress-level': 'uint8',
729 '*compress-threads': 'uint8',
730 '*decompress-threads': 'uint8',
731 '*cpu-throttle-initial': 'uint8',
732 '*cpu-throttle-increment': 'uint8',
734 '*tls-hostname': 'str',
735 '*max-bandwidth': 'size',
736 '*downtime-limit': 'uint64',
737 '*x-checkpoint-delay': 'uint32',
738 '*block-incremental': 'bool' ,
739 '*x-multifd-channels': 'uint8',
740 '*x-multifd-page-count': 'uint32',
741 '*xbzrle-cache-size': 'size',
742 '*max-postcopy-bandwidth': 'size',
743 '*max-cpu-throttle':'uint8'} }
746 # @query-migrate-parameters:
748 # Returns information about the current migration parameters
750 # Returns: @MigrationParameters
756 # -> { "execute": "query-migrate-parameters" }
758 # "decompress-threads": 2,
759 # "cpu-throttle-increment": 10,
760 # "compress-threads": 8,
761 # "compress-level": 1,
762 # "cpu-throttle-initial": 20,
763 # "max-bandwidth": 33554432,
764 # "downtime-limit": 300
769 { 'command': 'query-migrate-parameters',
770 'returns': 'MigrationParameters' }
773 # @client_migrate_info:
775 # Set migration information for remote display. This makes the server
776 # ask the client to automatically reconnect using the new parameters
777 # once migration finished successfully. Only implemented for SPICE.
779 # @protocol: must be "spice"
780 # @hostname: migration target hostname
781 # @port: spice tcp port for plaintext channels
782 # @tls-port: spice tcp port for tls-secured channels
783 # @cert-subject: server certificate subject
789 # -> { "execute": "client_migrate_info",
790 # "arguments": { "protocol": "spice",
791 # "hostname": "virt42.lab.kraxel.org",
793 # <- { "return": {} }
796 { 'command': 'client_migrate_info',
797 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
798 '*tls-port': 'int', '*cert-subject': 'str' } }
801 # @migrate-start-postcopy:
803 # Followup to a migration command to switch the migration to postcopy mode.
804 # The postcopy-ram capability must be set on both source and destination
805 # before the original migration command.
811 # -> { "execute": "migrate-start-postcopy" }
812 # <- { "return": {} }
815 { 'command': 'migrate-start-postcopy' }
820 # Emitted when a migration event happens
822 # @status: @MigrationStatus describing the current migration status.
828 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
829 # "event": "MIGRATION",
830 # "data": {"status": "completed"} }
833 { 'event': 'MIGRATION',
834 'data': {'status': 'MigrationStatus'}}
839 # Emitted from the source side of a migration at the start of each pass
840 # (when it syncs the dirty bitmap)
842 # @pass: An incrementing count (starting at 1 on the first pass)
848 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
849 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
852 { 'event': 'MIGRATION_PASS',
853 'data': { 'pass': 'int' } }
858 # The message transmission between Primary side and Secondary side.
860 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
862 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
864 # @checkpoint-reply: SVM gets PVM's checkpoint request
866 # @vmstate-send: VM's state will be sent by PVM.
868 # @vmstate-size: The total size of VMstate.
870 # @vmstate-received: VM's state has been received by SVM.
872 # @vmstate-loaded: VM's state has been loaded by SVM.
876 { 'enum': 'COLOMessage',
877 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
878 'vmstate-send', 'vmstate-size', 'vmstate-received',
886 # @unknown: unknown mode
888 # @primary: master side
890 # @secondary: slave side
894 { 'enum': 'COLOMode',
895 'data': [ 'unknown', 'primary', 'secondary'] }
900 # An enumeration of COLO failover status
902 # @none: no failover has ever happened
904 # @require: got failover requirement but not handled
906 # @active: in the process of doing failover
908 # @completed: finish the process of failover
910 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
914 { 'enum': 'FailoverStatus',
915 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
918 # @x-colo-lost-heartbeat:
920 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
921 # If this command is sent to the PVM, the Primary side will exit COLO mode.
922 # If sent to the Secondary, the Secondary side will run failover work,
923 # then takes over server operation to become the service VM.
929 # -> { "execute": "x-colo-lost-heartbeat" }
930 # <- { "return": {} }
933 { 'command': 'x-colo-lost-heartbeat' }
938 # Cancel the current executing migration process.
940 # Returns: nothing on success
942 # Notes: This command succeeds even if there is no migration process running.
948 # -> { "execute": "migrate_cancel" }
949 # <- { "return": {} }
952 { 'command': 'migrate_cancel' }
957 # Continue migration when it's in a paused state.
959 # @state: The state the migration is currently expected to be in
961 # Returns: nothing on success
965 # -> { "execute": "migrate-continue" , "arguments":
966 # { "state": "pre-switchover" } }
967 # <- { "return": {} }
969 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
972 # @migrate_set_downtime:
974 # Set maximum tolerated downtime for migration.
976 # @value: maximum downtime in seconds
978 # Returns: nothing on success
980 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
986 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
987 # <- { "return": {} }
990 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
993 # @migrate_set_speed:
995 # Set maximum speed for migration.
997 # @value: maximum speed in bytes per second.
999 # Returns: nothing on success
1001 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1007 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
1008 # <- { "return": {} }
1011 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1014 # @migrate-set-cache-size:
1016 # Set cache size to be used by XBZRLE migration
1018 # @value: cache size in bytes
1020 # The size will be rounded down to the nearest power of 2.
1021 # The cache size can be modified before and during ongoing migration
1023 # Returns: nothing on success
1025 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1031 # -> { "execute": "migrate-set-cache-size",
1032 # "arguments": { "value": 536870912 } }
1033 # <- { "return": {} }
1036 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1039 # @query-migrate-cache-size:
1041 # Query migration XBZRLE cache size
1043 # Returns: XBZRLE cache size in bytes
1045 # Notes: This command is deprecated in favor of 'query-migrate-parameters'
1051 # -> { "execute": "query-migrate-cache-size" }
1052 # <- { "return": 67108864 }
1055 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1060 # Migrates the current running guest to another Virtual Machine.
1062 # @uri: the Uniform Resource Identifier of the destination VM
1064 # @blk: do block migration (full disk copy)
1066 # @inc: incremental disk copy migration
1068 # @detach: this argument exists only for compatibility reasons and
1069 # is ignored by QEMU
1071 # @resume: resume one paused migration, default "off". (since 3.0)
1073 # Returns: nothing on success
1079 # 1. The 'query-migrate' command should be used to check migration's progress
1080 # and final result (this information is provided by the 'status' member)
1082 # 2. All boolean arguments default to false
1084 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1089 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1090 # <- { "return": {} }
1093 { 'command': 'migrate',
1094 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1095 '*detach': 'bool', '*resume': 'bool' } }
1098 # @migrate-incoming:
1100 # Start an incoming migration, the qemu must have been started
1101 # with -incoming defer
1103 # @uri: The Uniform Resource Identifier identifying the source or
1104 # address to listen on
1106 # Returns: nothing on success
1112 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1113 # compatible with -incoming and the format of the uri is already exposed
1116 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1119 # 3. The uri format is the same as for -incoming
1123 # -> { "execute": "migrate-incoming",
1124 # "arguments": { "uri": "tcp::4446" } }
1125 # <- { "return": {} }
1128 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1131 # @xen-save-devices-state:
1133 # Save the state of all devices to file. The RAM and the block devices
1134 # of the VM are not saved by this command.
1136 # @filename: the file to save the state of the devices to as binary
1137 # data. See xen-save-devices-state.txt for a description of the binary
1140 # @live: Optional argument to ask QEMU to treat this command as part of a live
1141 # migration. Default to true. (since 2.11)
1143 # Returns: Nothing on success
1149 # -> { "execute": "xen-save-devices-state",
1150 # "arguments": { "filename": "/tmp/save" } }
1151 # <- { "return": {} }
1154 { 'command': 'xen-save-devices-state',
1155 'data': {'filename': 'str', '*live':'bool' } }
1158 # @xen-set-replication:
1160 # Enable or disable replication.
1162 # @enable: true to enable, false to disable.
1164 # @primary: true for primary or false for secondary.
1166 # @failover: true to do failover, false to stop. but cannot be
1167 # specified if 'enable' is true. default value is false.
1173 # -> { "execute": "xen-set-replication",
1174 # "arguments": {"enable": true, "primary": false} }
1175 # <- { "return": {} }
1179 { 'command': 'xen-set-replication',
1180 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
1183 # @ReplicationStatus:
1185 # The result format for 'query-xen-replication-status'.
1187 # @error: true if an error happened, false if replication is normal.
1189 # @desc: the human readable error description string, when
1194 { 'struct': 'ReplicationStatus',
1195 'data': { 'error': 'bool', '*desc': 'str' } }
1198 # @query-xen-replication-status:
1200 # Query replication status while the vm is running.
1202 # Returns: A @ReplicationResult object showing the status.
1206 # -> { "execute": "query-xen-replication-status" }
1207 # <- { "return": { "error": false } }
1211 { 'command': 'query-xen-replication-status',
1212 'returns': 'ReplicationStatus' }
1215 # @xen-colo-do-checkpoint:
1217 # Xen uses this command to notify replication to trigger a checkpoint.
1223 # -> { "execute": "xen-colo-do-checkpoint" }
1224 # <- { "return": {} }
1228 { 'command': 'xen-colo-do-checkpoint' }
1233 # Provide a recovery migration stream URI.
1235 # @uri: the URI to be used for the recovery of migration stream.
1241 # -> { "execute": "migrate-recover",
1242 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1243 # <- { "return": {} }
1247 { 'command': 'migrate-recover', 'data': { 'uri': 'str' },
1253 # Pause a migration. Currently it only supports postcopy.
1259 # -> { "execute": "migrate-pause" }
1260 # <- { "return": {} }
1264 { 'command': 'migrate-pause', 'allow-oob': true }