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",
219 # "total-time":12345,
220 # "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" }
245 # "total-time":12345,
246 # "setup-time":12345,
247 # "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" }
264 # "remaining":1053304,
265 # "transferred":3720,
266 # "total-time":12345,
267 # "setup-time":12345,
268 # "expected-downtime":12345,
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 # "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
291 # "remaining":1053304,
292 # "transferred":3720,
293 # "total-time":12345,
294 # "setup-time":12345,
295 # "expected-downtime":12345,
298 # "normal-bytes":3412992,
299 # "dirty-sync-count":15
302 # "cache-size":67108864,
306 # "cache-miss-rate":0.123,
313 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
316 # @MigrationCapability:
318 # Migration capabilities enumeration
320 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
321 # This feature allows us to minimize migration traffic for certain work
322 # loads, by sending compressed difference of the pages
324 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
325 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
326 # Disabled by default. (since 2.0)
328 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
329 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
330 # source and target VM to support this feature. To enable it is sufficient
331 # to enable the capability on the source VM. The feature is disabled by
332 # default. (since 1.6)
334 # @compress: Use multiple compression threads to accelerate live migration.
335 # This feature can help to reduce the migration traffic, by sending
336 # compressed pages. Please note that if compress and xbzrle are both
337 # on, compress only takes effect in the ram bulk stage, after that,
338 # it will be disabled and only xbzrle takes effect, this can help to
339 # minimize migration traffic. The feature is disabled by default.
342 # @events: generate events for each migration state change
345 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
346 # to speed up convergence of RAM migration. (since 1.6)
348 # @postcopy-ram: Start executing on the migration target before all of RAM has
349 # been migrated, pulling the remaining pages along as needed. The
350 # capacity must have the same setting on both source and target
351 # or migration will not even start. NOTE: If the migration fails during
352 # postcopy the VM will fail. (since 2.6)
354 # @x-colo: If enabled, migration will never end, and the state of the VM on the
355 # primary side will be migrated continuously to the VM on secondary
356 # side, this process is called COarse-Grain LOck Stepping (COLO) for
357 # Non-stop Service. (since 2.8)
359 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
360 # during postcopy-ram migration. (since 2.9)
362 # @block: If enabled, QEMU will also migrate the contents of all block
363 # devices. Default is disabled. A possible alternative uses
364 # mirror jobs to a builtin NBD server on the destination, which
365 # offers more flexibility.
368 # @return-path: If enabled, migration will use the return path even
369 # for precopy. (since 2.10)
371 # @pause-before-switchover: Pause outgoing migration before serialising device
372 # state and before disabling block IO (since 2.11)
374 # @x-multifd: Use more than one fd for migration (since 2.11)
376 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
379 # @postcopy-blocktime: Calculate downtime for postcopy live migration
382 # @late-block-activate: If enabled, the destination will not activate block
383 # devices (and thus take locks) immediately at the end of migration.
388 { 'enum': 'MigrationCapability',
389 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
390 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
391 'block', 'return-path', 'pause-before-switchover', 'x-multifd',
392 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate' ] }
395 # @MigrationCapabilityStatus:
397 # Migration capability information
399 # @capability: capability enum
401 # @state: capability state bool
405 { 'struct': 'MigrationCapabilityStatus',
406 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
409 # @migrate-set-capabilities:
411 # Enable/Disable the following migration capabilities (like xbzrle)
413 # @capabilities: json array of capability modifications to make
419 # -> { "execute": "migrate-set-capabilities" , "arguments":
420 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
423 { 'command': 'migrate-set-capabilities',
424 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
427 # @query-migrate-capabilities:
429 # Returns information about the current migration capabilities status
431 # Returns: @MigrationCapabilitiesStatus
437 # -> { "execute": "query-migrate-capabilities" }
439 # {"state": false, "capability": "xbzrle"},
440 # {"state": false, "capability": "rdma-pin-all"},
441 # {"state": false, "capability": "auto-converge"},
442 # {"state": false, "capability": "zero-blocks"},
443 # {"state": false, "capability": "compress"},
444 # {"state": true, "capability": "events"},
445 # {"state": false, "capability": "postcopy-ram"},
446 # {"state": false, "capability": "x-colo"}
450 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
453 # @MigrationParameter:
455 # Migration parameters enumeration
457 # @compress-level: Set the compression level to be used in live migration,
458 # the compression level is an integer between 0 and 9, where 0 means
459 # no compression, 1 means the best compression speed, and 9 means best
460 # compression ratio which will consume more CPU.
462 # @compress-threads: Set compression thread count to be used in live migration,
463 # the compression thread count is an integer between 1 and 255.
465 # @decompress-threads: Set decompression thread count to be used in live
466 # migration, the decompression thread count is an integer between 1
467 # and 255. Usually, decompression is at least 4 times as fast as
468 # compression, so set the decompress-threads to the number about 1/4
469 # of compress-threads is adequate.
471 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
472 # when migration auto-converge is activated. The
473 # default value is 20. (Since 2.7)
475 # @cpu-throttle-increment: throttle percentage increase each time
476 # auto-converge detects that migration is not making
477 # progress. The default value is 10. (Since 2.7)
479 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
480 # establishing a TLS connection over the migration data channel.
481 # On the outgoing side of the migration, the credentials must
482 # be for a 'client' endpoint, while for the incoming side the
483 # credentials must be for a 'server' endpoint. Setting this
484 # will enable TLS for all migrations. The default is unset,
485 # resulting in unsecured migration at the QEMU level. (Since 2.7)
487 # @tls-hostname: hostname of the target host for the migration. This is
488 # required when using x509 based TLS credentials and the
489 # migration URI does not already include a hostname. For
490 # example if using fd: or exec: based migration, the
491 # hostname must be provided so that the server's x509
492 # certificate identity can be validated. (Since 2.7)
494 # @max-bandwidth: to set maximum speed for migration. maximum speed in
495 # bytes per second. (Since 2.8)
497 # @downtime-limit: set maximum tolerated downtime for migration. maximum
498 # downtime in milliseconds (Since 2.8)
500 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
501 # periodic mode. (Since 2.8)
503 # @block-incremental: Affects how much storage is migrated when the
504 # block migration capability is enabled. When false, the entire
505 # storage backing chain is migrated into a flattened image at
506 # the destination; when true, only the active qcow2 layer is
507 # migrated and the destination must already have access to the
508 # same backing chain as was used on the source. (since 2.10)
510 # @x-multifd-channels: Number of channels used to migrate data in
511 # parallel. This is the same number that the
512 # number of sockets used for migration. The
513 # default value is 2 (since 2.11)
515 # @x-multifd-page-count: Number of pages sent together to a thread.
516 # The default value is 16 (since 2.11)
518 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
519 # needs to be a multiple of the target page size
523 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
524 # Defaults to 0 (unlimited). In bytes per second.
528 { 'enum': 'MigrationParameter',
529 'data': ['compress-level', 'compress-threads', 'decompress-threads',
530 'cpu-throttle-initial', 'cpu-throttle-increment',
531 'tls-creds', 'tls-hostname', 'max-bandwidth',
532 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
533 'x-multifd-channels', 'x-multifd-page-count',
534 'xbzrle-cache-size', 'max-postcopy-bandwidth' ] }
537 # @MigrateSetParameters:
539 # @compress-level: compression level
541 # @compress-threads: compression thread count
543 # @decompress-threads: decompression thread count
545 # @cpu-throttle-initial: Initial percentage of time guest cpus are
546 # throttled when migration auto-converge is activated.
547 # The default value is 20. (Since 2.7)
549 # @cpu-throttle-increment: throttle percentage increase each time
550 # auto-converge detects that migration is not making
551 # progress. The default value is 10. (Since 2.7)
553 # @tls-creds: ID of the 'tls-creds' object that provides credentials
554 # for establishing a TLS connection over the migration data
555 # channel. On the outgoing side of the migration, the credentials
556 # must be for a 'client' endpoint, while for the incoming side the
557 # credentials must be for a 'server' endpoint. Setting this
558 # to a non-empty string enables TLS for all migrations.
559 # An empty string means that QEMU will use plain text mode for
560 # migration, rather than TLS (Since 2.9)
561 # Previously (since 2.7), this was reported by omitting
564 # @tls-hostname: hostname of the target host for the migration. This
565 # is required when using x509 based TLS credentials and the
566 # migration URI does not already include a hostname. For
567 # example if using fd: or exec: based migration, the
568 # hostname must be provided so that the server's x509
569 # certificate identity can be validated. (Since 2.7)
570 # An empty string means that QEMU will use the hostname
571 # associated with the migration URI, if any. (Since 2.9)
572 # Previously (since 2.7), this was reported by omitting
573 # tls-hostname instead.
575 # @max-bandwidth: to set maximum speed for migration. maximum speed in
576 # bytes per second. (Since 2.8)
578 # @downtime-limit: set maximum tolerated downtime for migration. maximum
579 # downtime in milliseconds (Since 2.8)
581 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
583 # @block-incremental: Affects how much storage is migrated when the
584 # block migration capability is enabled. When false, the entire
585 # storage backing chain is migrated into a flattened image at
586 # the destination; when true, only the active qcow2 layer is
587 # migrated and the destination must already have access to the
588 # same backing chain as was used on the source. (since 2.10)
590 # @x-multifd-channels: Number of channels used to migrate data in
591 # parallel. This is the same number that the
592 # number of sockets used for migration. The
593 # default value is 2 (since 2.11)
595 # @x-multifd-page-count: Number of pages sent together to a thread.
596 # The default value is 16 (since 2.11)
598 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
599 # needs to be a multiple of the target page size
603 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
604 # Defaults to 0 (unlimited). In bytes per second.
608 # TODO either fuse back into MigrationParameters, or make
609 # MigrationParameters members mandatory
610 { 'struct': 'MigrateSetParameters',
611 'data': { '*compress-level': 'int',
612 '*compress-threads': 'int',
613 '*decompress-threads': 'int',
614 '*cpu-throttle-initial': 'int',
615 '*cpu-throttle-increment': 'int',
616 '*tls-creds': 'StrOrNull',
617 '*tls-hostname': 'StrOrNull',
618 '*max-bandwidth': 'int',
619 '*downtime-limit': 'int',
620 '*x-checkpoint-delay': 'int',
621 '*block-incremental': 'bool',
622 '*x-multifd-channels': 'int',
623 '*x-multifd-page-count': 'int',
624 '*xbzrle-cache-size': 'size',
625 '*max-postcopy-bandwidth': 'size' } }
628 # @migrate-set-parameters:
630 # Set various migration parameters.
636 # -> { "execute": "migrate-set-parameters" ,
637 # "arguments": { "compress-level": 1 } }
640 { 'command': 'migrate-set-parameters', 'boxed': true,
641 'data': 'MigrateSetParameters' }
644 # @MigrationParameters:
646 # The optional members aren't actually optional.
648 # @compress-level: compression level
650 # @compress-threads: compression thread count
652 # @decompress-threads: decompression thread count
654 # @cpu-throttle-initial: Initial percentage of time guest cpus are
655 # throttled when migration auto-converge is activated.
658 # @cpu-throttle-increment: throttle percentage increase each time
659 # auto-converge detects that migration is not making
660 # progress. (Since 2.7)
662 # @tls-creds: ID of the 'tls-creds' object that provides credentials
663 # for establishing a TLS connection over the migration data
664 # channel. On the outgoing side of the migration, the credentials
665 # must be for a 'client' endpoint, while for the incoming side the
666 # credentials must be for a 'server' endpoint.
667 # An empty string means that QEMU will use plain text mode for
668 # migration, rather than TLS (Since 2.7)
669 # Note: 2.8 reports this by omitting tls-creds instead.
671 # @tls-hostname: hostname of the target host for the migration. This
672 # is required when using x509 based TLS credentials and the
673 # migration URI does not already include a hostname. For
674 # example if using fd: or exec: based migration, the
675 # hostname must be provided so that the server's x509
676 # certificate identity can be validated. (Since 2.7)
677 # An empty string means that QEMU will use the hostname
678 # associated with the migration URI, if any. (Since 2.9)
679 # Note: 2.8 reports this by omitting tls-hostname instead.
681 # @max-bandwidth: to set maximum speed for migration. maximum speed in
682 # bytes per second. (Since 2.8)
684 # @downtime-limit: set maximum tolerated downtime for migration. maximum
685 # downtime in milliseconds (Since 2.8)
687 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
689 # @block-incremental: Affects how much storage is migrated when the
690 # block migration capability is enabled. When false, the entire
691 # storage backing chain is migrated into a flattened image at
692 # the destination; when true, only the active qcow2 layer is
693 # migrated and the destination must already have access to the
694 # same backing chain as was used on the source. (since 2.10)
696 # @x-multifd-channels: Number of channels used to migrate data in
697 # parallel. This is the same number that the
698 # number of sockets used for migration.
699 # The default value is 2 (since 2.11)
701 # @x-multifd-page-count: Number of pages sent together to a thread.
702 # The default value is 16 (since 2.11)
704 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
705 # needs to be a multiple of the target page size
709 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
710 # Defaults to 0 (unlimited). In bytes per second.
714 { 'struct': 'MigrationParameters',
715 'data': { '*compress-level': 'uint8',
716 '*compress-threads': 'uint8',
717 '*decompress-threads': 'uint8',
718 '*cpu-throttle-initial': 'uint8',
719 '*cpu-throttle-increment': 'uint8',
721 '*tls-hostname': 'str',
722 '*max-bandwidth': 'size',
723 '*downtime-limit': 'uint64',
724 '*x-checkpoint-delay': 'uint32',
725 '*block-incremental': 'bool' ,
726 '*x-multifd-channels': 'uint8',
727 '*x-multifd-page-count': 'uint32',
728 '*xbzrle-cache-size': 'size',
729 '*max-postcopy-bandwidth': 'size' } }
732 # @query-migrate-parameters:
734 # Returns information about the current migration parameters
736 # Returns: @MigrationParameters
742 # -> { "execute": "query-migrate-parameters" }
744 # "decompress-threads": 2,
745 # "cpu-throttle-increment": 10,
746 # "compress-threads": 8,
747 # "compress-level": 1,
748 # "cpu-throttle-initial": 20,
749 # "max-bandwidth": 33554432,
750 # "downtime-limit": 300
755 { 'command': 'query-migrate-parameters',
756 'returns': 'MigrationParameters' }
759 # @client_migrate_info:
761 # Set migration information for remote display. This makes the server
762 # ask the client to automatically reconnect using the new parameters
763 # once migration finished successfully. Only implemented for SPICE.
765 # @protocol: must be "spice"
766 # @hostname: migration target hostname
767 # @port: spice tcp port for plaintext channels
768 # @tls-port: spice tcp port for tls-secured channels
769 # @cert-subject: server certificate subject
775 # -> { "execute": "client_migrate_info",
776 # "arguments": { "protocol": "spice",
777 # "hostname": "virt42.lab.kraxel.org",
779 # <- { "return": {} }
782 { 'command': 'client_migrate_info',
783 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
784 '*tls-port': 'int', '*cert-subject': 'str' } }
787 # @migrate-start-postcopy:
789 # Followup to a migration command to switch the migration to postcopy mode.
790 # The postcopy-ram capability must be set on both source and destination
791 # before the original migration command.
797 # -> { "execute": "migrate-start-postcopy" }
798 # <- { "return": {} }
801 { 'command': 'migrate-start-postcopy' }
806 # Emitted when a migration event happens
808 # @status: @MigrationStatus describing the current migration status.
814 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
815 # "event": "MIGRATION",
816 # "data": {"status": "completed"} }
819 { 'event': 'MIGRATION',
820 'data': {'status': 'MigrationStatus'}}
825 # Emitted from the source side of a migration at the start of each pass
826 # (when it syncs the dirty bitmap)
828 # @pass: An incrementing count (starting at 1 on the first pass)
834 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
835 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
838 { 'event': 'MIGRATION_PASS',
839 'data': { 'pass': 'int' } }
844 # The message transmission between Primary side and Secondary side.
846 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
848 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
850 # @checkpoint-reply: SVM gets PVM's checkpoint request
852 # @vmstate-send: VM's state will be sent by PVM.
854 # @vmstate-size: The total size of VMstate.
856 # @vmstate-received: VM's state has been received by SVM.
858 # @vmstate-loaded: VM's state has been loaded by SVM.
862 { 'enum': 'COLOMessage',
863 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
864 'vmstate-send', 'vmstate-size', 'vmstate-received',
872 # @unknown: unknown mode
874 # @primary: master side
876 # @secondary: slave side
880 { 'enum': 'COLOMode',
881 'data': [ 'unknown', 'primary', 'secondary'] }
886 # An enumeration of COLO failover status
888 # @none: no failover has ever happened
890 # @require: got failover requirement but not handled
892 # @active: in the process of doing failover
894 # @completed: finish the process of failover
896 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
900 { 'enum': 'FailoverStatus',
901 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
904 # @x-colo-lost-heartbeat:
906 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
907 # If this command is sent to the PVM, the Primary side will exit COLO mode.
908 # If sent to the Secondary, the Secondary side will run failover work,
909 # then takes over server operation to become the service VM.
915 # -> { "execute": "x-colo-lost-heartbeat" }
916 # <- { "return": {} }
919 { 'command': 'x-colo-lost-heartbeat' }
924 # Cancel the current executing migration process.
926 # Returns: nothing on success
928 # Notes: This command succeeds even if there is no migration process running.
934 # -> { "execute": "migrate_cancel" }
935 # <- { "return": {} }
938 { 'command': 'migrate_cancel' }
943 # Continue migration when it's in a paused state.
945 # @state: The state the migration is currently expected to be in
947 # Returns: nothing on success
951 # -> { "execute": "migrate-continue" , "arguments":
952 # { "state": "pre-switchover" } }
953 # <- { "return": {} }
955 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
958 # @migrate_set_downtime:
960 # Set maximum tolerated downtime for migration.
962 # @value: maximum downtime in seconds
964 # Returns: nothing on success
966 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
972 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
973 # <- { "return": {} }
976 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
979 # @migrate_set_speed:
981 # Set maximum speed for migration.
983 # @value: maximum speed in bytes per second.
985 # Returns: nothing on success
987 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
993 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
994 # <- { "return": {} }
997 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1000 # @migrate-set-cache-size:
1002 # Set cache size to be used by XBZRLE migration
1004 # @value: cache size in bytes
1006 # The size will be rounded down to the nearest power of 2.
1007 # The cache size can be modified before and during ongoing migration
1009 # Returns: nothing on success
1011 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1017 # -> { "execute": "migrate-set-cache-size",
1018 # "arguments": { "value": 536870912 } }
1019 # <- { "return": {} }
1022 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1025 # @query-migrate-cache-size:
1027 # Query migration XBZRLE cache size
1029 # Returns: XBZRLE cache size in bytes
1031 # Notes: This command is deprecated in favor of 'query-migrate-parameters'
1037 # -> { "execute": "query-migrate-cache-size" }
1038 # <- { "return": 67108864 }
1041 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1046 # Migrates the current running guest to another Virtual Machine.
1048 # @uri: the Uniform Resource Identifier of the destination VM
1050 # @blk: do block migration (full disk copy)
1052 # @inc: incremental disk copy migration
1054 # @detach: this argument exists only for compatibility reasons and
1055 # is ignored by QEMU
1057 # @resume: resume one paused migration, default "off". (since 3.0)
1059 # Returns: nothing on success
1065 # 1. The 'query-migrate' command should be used to check migration's progress
1066 # and final result (this information is provided by the 'status' member)
1068 # 2. All boolean arguments default to false
1070 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1075 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1076 # <- { "return": {} }
1079 { 'command': 'migrate',
1080 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1081 '*detach': 'bool', '*resume': 'bool' } }
1084 # @migrate-incoming:
1086 # Start an incoming migration, the qemu must have been started
1087 # with -incoming defer
1089 # @uri: The Uniform Resource Identifier identifying the source or
1090 # address to listen on
1092 # Returns: nothing on success
1098 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1099 # compatible with -incoming and the format of the uri is already exposed
1102 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1105 # 3. The uri format is the same as for -incoming
1109 # -> { "execute": "migrate-incoming",
1110 # "arguments": { "uri": "tcp::4446" } }
1111 # <- { "return": {} }
1114 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1117 # @xen-save-devices-state:
1119 # Save the state of all devices to file. The RAM and the block devices
1120 # of the VM are not saved by this command.
1122 # @filename: the file to save the state of the devices to as binary
1123 # data. See xen-save-devices-state.txt for a description of the binary
1126 # @live: Optional argument to ask QEMU to treat this command as part of a live
1127 # migration. Default to true. (since 2.11)
1129 # Returns: Nothing on success
1135 # -> { "execute": "xen-save-devices-state",
1136 # "arguments": { "filename": "/tmp/save" } }
1137 # <- { "return": {} }
1140 { 'command': 'xen-save-devices-state',
1141 'data': {'filename': 'str', '*live':'bool' } }
1144 # @xen-set-replication:
1146 # Enable or disable replication.
1148 # @enable: true to enable, false to disable.
1150 # @primary: true for primary or false for secondary.
1152 # @failover: true to do failover, false to stop. but cannot be
1153 # specified if 'enable' is true. default value is false.
1159 # -> { "execute": "xen-set-replication",
1160 # "arguments": {"enable": true, "primary": false} }
1161 # <- { "return": {} }
1165 { 'command': 'xen-set-replication',
1166 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
1169 # @ReplicationStatus:
1171 # The result format for 'query-xen-replication-status'.
1173 # @error: true if an error happened, false if replication is normal.
1175 # @desc: the human readable error description string, when
1180 { 'struct': 'ReplicationStatus',
1181 'data': { 'error': 'bool', '*desc': 'str' } }
1184 # @query-xen-replication-status:
1186 # Query replication status while the vm is running.
1188 # Returns: A @ReplicationResult object showing the status.
1192 # -> { "execute": "query-xen-replication-status" }
1193 # <- { "return": { "error": false } }
1197 { 'command': 'query-xen-replication-status',
1198 'returns': 'ReplicationStatus' }
1201 # @xen-colo-do-checkpoint:
1203 # Xen uses this command to notify replication to trigger a checkpoint.
1209 # -> { "execute": "xen-colo-do-checkpoint" }
1210 # <- { "return": {} }
1214 { 'command': 'xen-colo-do-checkpoint' }
1219 # Provide a recovery migration stream URI.
1221 # @uri: the URI to be used for the recovery of migration stream.
1227 # -> { "execute": "migrate-recover",
1228 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1229 # <- { "return": {} }
1233 { 'command': 'migrate-recover', 'data': { 'uri': 'str' },
1239 # Pause a migration. Currently it only supports postcopy.
1245 # -> { "execute": "migrate-pause" }
1246 # <- { "return": {} }
1250 { 'command': 'migrate-pause', 'allow-oob': true }