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 # @compress-wait-thread: Controls behavior when all compression threads are
465 # currently busy. If true (default), wait for a free
466 # compression thread to become available; otherwise,
467 # send the page uncompressed. (Since 3.1)
469 # @decompress-threads: Set decompression thread count to be used in live
470 # migration, the decompression thread count is an integer between 1
471 # and 255. Usually, decompression is at least 4 times as fast as
472 # compression, so set the decompress-threads to the number about 1/4
473 # of compress-threads is adequate.
475 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
476 # when migration auto-converge is activated. The
477 # default value is 20. (Since 2.7)
479 # @cpu-throttle-increment: throttle percentage increase each time
480 # auto-converge detects that migration is not making
481 # progress. The default value is 10. (Since 2.7)
483 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
484 # establishing a TLS connection over the migration data channel.
485 # On the outgoing side of the migration, the credentials must
486 # be for a 'client' endpoint, while for the incoming side the
487 # credentials must be for a 'server' endpoint. Setting this
488 # will enable TLS for all migrations. The default is unset,
489 # resulting in unsecured migration at the QEMU level. (Since 2.7)
491 # @tls-hostname: hostname of the target host for the migration. This is
492 # required when using x509 based TLS credentials and the
493 # migration URI does not already include a hostname. For
494 # example if using fd: or exec: based migration, the
495 # hostname must be provided so that the server's x509
496 # certificate identity can be validated. (Since 2.7)
498 # @max-bandwidth: to set maximum speed for migration. maximum speed in
499 # bytes per second. (Since 2.8)
501 # @downtime-limit: set maximum tolerated downtime for migration. maximum
502 # downtime in milliseconds (Since 2.8)
504 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
505 # periodic mode. (Since 2.8)
507 # @block-incremental: Affects how much storage is migrated when the
508 # block migration capability is enabled. When false, the entire
509 # storage backing chain is migrated into a flattened image at
510 # the destination; when true, only the active qcow2 layer is
511 # migrated and the destination must already have access to the
512 # same backing chain as was used on the source. (since 2.10)
514 # @x-multifd-channels: Number of channels used to migrate data in
515 # parallel. This is the same number that the
516 # number of sockets used for migration. The
517 # default value is 2 (since 2.11)
519 # @x-multifd-page-count: Number of pages sent together to a thread.
520 # The default value is 16 (since 2.11)
522 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
523 # needs to be a multiple of the target page size
527 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
528 # Defaults to 0 (unlimited). In bytes per second.
531 # @max-cpu-throttle: maximum cpu throttle percentage.
532 # Defaults to 99. (Since 3.1)
535 { 'enum': 'MigrationParameter',
536 'data': ['compress-level', 'compress-threads', 'decompress-threads',
537 'compress-wait-thread',
538 'cpu-throttle-initial', 'cpu-throttle-increment',
539 'tls-creds', 'tls-hostname', 'max-bandwidth',
540 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
541 'x-multifd-channels', 'x-multifd-page-count',
542 'xbzrle-cache-size', 'max-postcopy-bandwidth',
543 'max-cpu-throttle' ] }
546 # @MigrateSetParameters:
548 # @compress-level: compression level
550 # @compress-threads: compression thread count
552 # @compress-wait-thread: Controls behavior when all compression threads are
553 # currently busy. If true (default), wait for a free
554 # compression thread to become available; otherwise,
555 # send the page uncompressed. (Since 3.1)
557 # @decompress-threads: decompression thread count
559 # @cpu-throttle-initial: Initial percentage of time guest cpus are
560 # throttled when migration auto-converge is activated.
561 # The default value is 20. (Since 2.7)
563 # @cpu-throttle-increment: throttle percentage increase each time
564 # auto-converge detects that migration is not making
565 # progress. The default value is 10. (Since 2.7)
567 # @tls-creds: ID of the 'tls-creds' object that provides credentials
568 # for establishing a TLS connection over the migration data
569 # channel. On the outgoing side of the migration, the credentials
570 # must be for a 'client' endpoint, while for the incoming side the
571 # credentials must be for a 'server' endpoint. Setting this
572 # to a non-empty string enables TLS for all migrations.
573 # An empty string means that QEMU will use plain text mode for
574 # migration, rather than TLS (Since 2.9)
575 # Previously (since 2.7), this was reported by omitting
578 # @tls-hostname: hostname of the target host for the migration. This
579 # is required when using x509 based TLS credentials and the
580 # migration URI does not already include a hostname. For
581 # example if using fd: or exec: based migration, the
582 # hostname must be provided so that the server's x509
583 # certificate identity can be validated. (Since 2.7)
584 # An empty string means that QEMU will use the hostname
585 # associated with the migration URI, if any. (Since 2.9)
586 # Previously (since 2.7), this was reported by omitting
587 # tls-hostname instead.
589 # @max-bandwidth: to set maximum speed for migration. maximum speed in
590 # bytes per second. (Since 2.8)
592 # @downtime-limit: set maximum tolerated downtime for migration. maximum
593 # downtime in milliseconds (Since 2.8)
595 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
597 # @block-incremental: Affects how much storage is migrated when the
598 # block migration capability is enabled. When false, the entire
599 # storage backing chain is migrated into a flattened image at
600 # the destination; when true, only the active qcow2 layer is
601 # migrated and the destination must already have access to the
602 # same backing chain as was used on the source. (since 2.10)
604 # @x-multifd-channels: Number of channels used to migrate data in
605 # parallel. This is the same number that the
606 # number of sockets used for migration. The
607 # default value is 2 (since 2.11)
609 # @x-multifd-page-count: Number of pages sent together to a thread.
610 # The default value is 16 (since 2.11)
612 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
613 # needs to be a multiple of the target page size
617 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
618 # Defaults to 0 (unlimited). In bytes per second.
621 # @max-cpu-throttle: maximum cpu throttle percentage.
622 # The default value is 99. (Since 3.1)
626 # TODO either fuse back into MigrationParameters, or make
627 # MigrationParameters members mandatory
628 { 'struct': 'MigrateSetParameters',
629 'data': { '*compress-level': 'int',
630 '*compress-threads': 'int',
631 '*compress-wait-thread': 'bool',
632 '*decompress-threads': 'int',
633 '*cpu-throttle-initial': 'int',
634 '*cpu-throttle-increment': 'int',
635 '*tls-creds': 'StrOrNull',
636 '*tls-hostname': 'StrOrNull',
637 '*max-bandwidth': 'int',
638 '*downtime-limit': 'int',
639 '*x-checkpoint-delay': 'int',
640 '*block-incremental': 'bool',
641 '*x-multifd-channels': 'int',
642 '*x-multifd-page-count': 'int',
643 '*xbzrle-cache-size': 'size',
644 '*max-postcopy-bandwidth': 'size',
645 '*max-cpu-throttle': 'int' } }
648 # @migrate-set-parameters:
650 # Set various migration parameters.
656 # -> { "execute": "migrate-set-parameters" ,
657 # "arguments": { "compress-level": 1 } }
660 { 'command': 'migrate-set-parameters', 'boxed': true,
661 'data': 'MigrateSetParameters' }
664 # @MigrationParameters:
666 # The optional members aren't actually optional.
668 # @compress-level: compression level
670 # @compress-threads: compression thread count
672 # @compress-wait-thread: Controls behavior when all compression threads are
673 # currently busy. If true (default), wait for a free
674 # compression thread to become available; otherwise,
675 # send the page uncompressed. (Since 3.1)
677 # @decompress-threads: decompression thread count
679 # @cpu-throttle-initial: Initial percentage of time guest cpus are
680 # throttled when migration auto-converge is activated.
683 # @cpu-throttle-increment: throttle percentage increase each time
684 # auto-converge detects that migration is not making
685 # progress. (Since 2.7)
687 # @tls-creds: ID of the 'tls-creds' object that provides credentials
688 # for establishing a TLS connection over the migration data
689 # channel. On the outgoing side of the migration, the credentials
690 # must be for a 'client' endpoint, while for the incoming side the
691 # credentials must be for a 'server' endpoint.
692 # An empty string means that QEMU will use plain text mode for
693 # migration, rather than TLS (Since 2.7)
694 # Note: 2.8 reports this by omitting tls-creds instead.
696 # @tls-hostname: hostname of the target host for the migration. This
697 # is required when using x509 based TLS credentials and the
698 # migration URI does not already include a hostname. For
699 # example if using fd: or exec: based migration, the
700 # hostname must be provided so that the server's x509
701 # certificate identity can be validated. (Since 2.7)
702 # An empty string means that QEMU will use the hostname
703 # associated with the migration URI, if any. (Since 2.9)
704 # Note: 2.8 reports this by omitting tls-hostname instead.
706 # @max-bandwidth: to set maximum speed for migration. maximum speed in
707 # bytes per second. (Since 2.8)
709 # @downtime-limit: set maximum tolerated downtime for migration. maximum
710 # downtime in milliseconds (Since 2.8)
712 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
714 # @block-incremental: Affects how much storage is migrated when the
715 # block migration capability is enabled. When false, the entire
716 # storage backing chain is migrated into a flattened image at
717 # the destination; when true, only the active qcow2 layer is
718 # migrated and the destination must already have access to the
719 # same backing chain as was used on the source. (since 2.10)
721 # @x-multifd-channels: Number of channels used to migrate data in
722 # parallel. This is the same number that the
723 # number of sockets used for migration.
724 # The default value is 2 (since 2.11)
726 # @x-multifd-page-count: Number of pages sent together to a thread.
727 # The default value is 16 (since 2.11)
729 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
730 # needs to be a multiple of the target page size
734 # @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
735 # Defaults to 0 (unlimited). In bytes per second.
738 # @max-cpu-throttle: maximum cpu throttle percentage.
744 { 'struct': 'MigrationParameters',
745 'data': { '*compress-level': 'uint8',
746 '*compress-threads': 'uint8',
747 '*compress-wait-thread': 'bool',
748 '*decompress-threads': 'uint8',
749 '*cpu-throttle-initial': 'uint8',
750 '*cpu-throttle-increment': 'uint8',
752 '*tls-hostname': 'str',
753 '*max-bandwidth': 'size',
754 '*downtime-limit': 'uint64',
755 '*x-checkpoint-delay': 'uint32',
756 '*block-incremental': 'bool' ,
757 '*x-multifd-channels': 'uint8',
758 '*x-multifd-page-count': 'uint32',
759 '*xbzrle-cache-size': 'size',
760 '*max-postcopy-bandwidth': 'size',
761 '*max-cpu-throttle':'uint8'} }
764 # @query-migrate-parameters:
766 # Returns information about the current migration parameters
768 # Returns: @MigrationParameters
774 # -> { "execute": "query-migrate-parameters" }
776 # "decompress-threads": 2,
777 # "cpu-throttle-increment": 10,
778 # "compress-threads": 8,
779 # "compress-level": 1,
780 # "cpu-throttle-initial": 20,
781 # "max-bandwidth": 33554432,
782 # "downtime-limit": 300
787 { 'command': 'query-migrate-parameters',
788 'returns': 'MigrationParameters' }
791 # @client_migrate_info:
793 # Set migration information for remote display. This makes the server
794 # ask the client to automatically reconnect using the new parameters
795 # once migration finished successfully. Only implemented for SPICE.
797 # @protocol: must be "spice"
798 # @hostname: migration target hostname
799 # @port: spice tcp port for plaintext channels
800 # @tls-port: spice tcp port for tls-secured channels
801 # @cert-subject: server certificate subject
807 # -> { "execute": "client_migrate_info",
808 # "arguments": { "protocol": "spice",
809 # "hostname": "virt42.lab.kraxel.org",
811 # <- { "return": {} }
814 { 'command': 'client_migrate_info',
815 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
816 '*tls-port': 'int', '*cert-subject': 'str' } }
819 # @migrate-start-postcopy:
821 # Followup to a migration command to switch the migration to postcopy mode.
822 # The postcopy-ram capability must be set on both source and destination
823 # before the original migration command.
829 # -> { "execute": "migrate-start-postcopy" }
830 # <- { "return": {} }
833 { 'command': 'migrate-start-postcopy' }
838 # Emitted when a migration event happens
840 # @status: @MigrationStatus describing the current migration status.
846 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
847 # "event": "MIGRATION",
848 # "data": {"status": "completed"} }
851 { 'event': 'MIGRATION',
852 'data': {'status': 'MigrationStatus'}}
857 # Emitted from the source side of a migration at the start of each pass
858 # (when it syncs the dirty bitmap)
860 # @pass: An incrementing count (starting at 1 on the first pass)
866 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
867 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
870 { 'event': 'MIGRATION_PASS',
871 'data': { 'pass': 'int' } }
876 # The message transmission between Primary side and Secondary side.
878 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
880 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
882 # @checkpoint-reply: SVM gets PVM's checkpoint request
884 # @vmstate-send: VM's state will be sent by PVM.
886 # @vmstate-size: The total size of VMstate.
888 # @vmstate-received: VM's state has been received by SVM.
890 # @vmstate-loaded: VM's state has been loaded by SVM.
894 { 'enum': 'COLOMessage',
895 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
896 'vmstate-send', 'vmstate-size', 'vmstate-received',
904 # @unknown: unknown mode
906 # @primary: master side
908 # @secondary: slave side
912 { 'enum': 'COLOMode',
913 'data': [ 'unknown', 'primary', 'secondary'] }
918 # An enumeration of COLO failover status
920 # @none: no failover has ever happened
922 # @require: got failover requirement but not handled
924 # @active: in the process of doing failover
926 # @completed: finish the process of failover
928 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
932 { 'enum': 'FailoverStatus',
933 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
936 # @x-colo-lost-heartbeat:
938 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
939 # If this command is sent to the PVM, the Primary side will exit COLO mode.
940 # If sent to the Secondary, the Secondary side will run failover work,
941 # then takes over server operation to become the service VM.
947 # -> { "execute": "x-colo-lost-heartbeat" }
948 # <- { "return": {} }
951 { 'command': 'x-colo-lost-heartbeat' }
956 # Cancel the current executing migration process.
958 # Returns: nothing on success
960 # Notes: This command succeeds even if there is no migration process running.
966 # -> { "execute": "migrate_cancel" }
967 # <- { "return": {} }
970 { 'command': 'migrate_cancel' }
975 # Continue migration when it's in a paused state.
977 # @state: The state the migration is currently expected to be in
979 # Returns: nothing on success
983 # -> { "execute": "migrate-continue" , "arguments":
984 # { "state": "pre-switchover" } }
985 # <- { "return": {} }
987 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
990 # @migrate_set_downtime:
992 # Set maximum tolerated downtime for migration.
994 # @value: maximum downtime in seconds
996 # Returns: nothing on success
998 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1004 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
1005 # <- { "return": {} }
1008 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1011 # @migrate_set_speed:
1013 # Set maximum speed for migration.
1015 # @value: maximum speed in bytes per second.
1017 # Returns: nothing on success
1019 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1025 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
1026 # <- { "return": {} }
1029 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1032 # @migrate-set-cache-size:
1034 # Set cache size to be used by XBZRLE migration
1036 # @value: cache size in bytes
1038 # The size will be rounded down to the nearest power of 2.
1039 # The cache size can be modified before and during ongoing migration
1041 # Returns: nothing on success
1043 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
1049 # -> { "execute": "migrate-set-cache-size",
1050 # "arguments": { "value": 536870912 } }
1051 # <- { "return": {} }
1054 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1057 # @query-migrate-cache-size:
1059 # Query migration XBZRLE cache size
1061 # Returns: XBZRLE cache size in bytes
1063 # Notes: This command is deprecated in favor of 'query-migrate-parameters'
1069 # -> { "execute": "query-migrate-cache-size" }
1070 # <- { "return": 67108864 }
1073 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1078 # Migrates the current running guest to another Virtual Machine.
1080 # @uri: the Uniform Resource Identifier of the destination VM
1082 # @blk: do block migration (full disk copy)
1084 # @inc: incremental disk copy migration
1086 # @detach: this argument exists only for compatibility reasons and
1087 # is ignored by QEMU
1089 # @resume: resume one paused migration, default "off". (since 3.0)
1091 # Returns: nothing on success
1097 # 1. The 'query-migrate' command should be used to check migration's progress
1098 # and final result (this information is provided by the 'status' member)
1100 # 2. All boolean arguments default to false
1102 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1107 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1108 # <- { "return": {} }
1111 { 'command': 'migrate',
1112 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1113 '*detach': 'bool', '*resume': 'bool' } }
1116 # @migrate-incoming:
1118 # Start an incoming migration, the qemu must have been started
1119 # with -incoming defer
1121 # @uri: The Uniform Resource Identifier identifying the source or
1122 # address to listen on
1124 # Returns: nothing on success
1130 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1131 # compatible with -incoming and the format of the uri is already exposed
1134 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1137 # 3. The uri format is the same as for -incoming
1141 # -> { "execute": "migrate-incoming",
1142 # "arguments": { "uri": "tcp::4446" } }
1143 # <- { "return": {} }
1146 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1149 # @xen-save-devices-state:
1151 # Save the state of all devices to file. The RAM and the block devices
1152 # of the VM are not saved by this command.
1154 # @filename: the file to save the state of the devices to as binary
1155 # data. See xen-save-devices-state.txt for a description of the binary
1158 # @live: Optional argument to ask QEMU to treat this command as part of a live
1159 # migration. Default to true. (since 2.11)
1161 # Returns: Nothing on success
1167 # -> { "execute": "xen-save-devices-state",
1168 # "arguments": { "filename": "/tmp/save" } }
1169 # <- { "return": {} }
1172 { 'command': 'xen-save-devices-state',
1173 'data': {'filename': 'str', '*live':'bool' } }
1176 # @xen-set-replication:
1178 # Enable or disable replication.
1180 # @enable: true to enable, false to disable.
1182 # @primary: true for primary or false for secondary.
1184 # @failover: true to do failover, false to stop. but cannot be
1185 # specified if 'enable' is true. default value is false.
1191 # -> { "execute": "xen-set-replication",
1192 # "arguments": {"enable": true, "primary": false} }
1193 # <- { "return": {} }
1197 { 'command': 'xen-set-replication',
1198 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
1201 # @ReplicationStatus:
1203 # The result format for 'query-xen-replication-status'.
1205 # @error: true if an error happened, false if replication is normal.
1207 # @desc: the human readable error description string, when
1212 { 'struct': 'ReplicationStatus',
1213 'data': { 'error': 'bool', '*desc': 'str' } }
1216 # @query-xen-replication-status:
1218 # Query replication status while the vm is running.
1220 # Returns: A @ReplicationResult object showing the status.
1224 # -> { "execute": "query-xen-replication-status" }
1225 # <- { "return": { "error": false } }
1229 { 'command': 'query-xen-replication-status',
1230 'returns': 'ReplicationStatus' }
1233 # @xen-colo-do-checkpoint:
1235 # Xen uses this command to notify replication to trigger a checkpoint.
1241 # -> { "execute": "xen-colo-do-checkpoint" }
1242 # <- { "return": {} }
1246 { 'command': 'xen-colo-do-checkpoint' }
1251 # Provide a recovery migration stream URI.
1253 # @uri: the URI to be used for the recovery of migration stream.
1259 # -> { "execute": "migrate-recover",
1260 # "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1261 # <- { "return": {} }
1265 { 'command': 'migrate-recover', 'data': { 'uri': 'str' },
1271 # Pause a migration. Currently it only supports postcopy.
1277 # -> { "execute": "migrate-pause" }
1278 # <- { "return": {} }
1282 { 'command': 'migrate-pause', 'allow-oob': true }