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)
44 { 'struct': 'MigrationStats',
45 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
46 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
47 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
48 'mbps' : 'number', 'dirty-sync-count' : 'int',
49 'postcopy-requests' : 'int', 'page-size' : 'int' } }
54 # Detailed XBZRLE migration cache statistics
56 # @cache-size: XBZRLE cache size
58 # @bytes: amount of bytes already transferred to the target VM
60 # @pages: amount of pages transferred to the target VM
62 # @cache-miss: number of cache miss
64 # @cache-miss-rate: rate of cache miss (since 2.1)
66 # @overflow: number of overflows
70 { 'struct': 'XBZRLECacheStats',
71 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
72 'cache-miss': 'int', 'cache-miss-rate': 'number',
78 # An enumeration of migration status.
80 # @none: no migration has ever happened.
82 # @setup: migration process has been initiated.
84 # @cancelling: in the process of cancelling migration.
86 # @cancelled: cancelling migration is finished.
88 # @active: in the process of doing migration.
90 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
92 # @postcopy-paused: during postcopy but paused. (since 2.13)
94 # @completed: migration is finished.
96 # @failed: some error occurred during migration process.
98 # @colo: VM is in the process of fault tolerance, VM can not get into this
99 # state unless colo capability is enabled for migration. (since 2.8)
101 # @pre-switchover: Paused before device serialisation. (since 2.11)
103 # @device: During device serialisation when pause-before-switchover is enabled
109 { 'enum': 'MigrationStatus',
110 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
111 'active', 'postcopy-active', 'postcopy-paused',
112 'completed', 'failed', 'colo',
113 'pre-switchover', 'device' ] }
118 # Information about current migration process.
120 # @status: @MigrationStatus describing the current migration status.
121 # If this field is not returned, no migration process
124 # @ram: @MigrationStats containing detailed migration
125 # status, only returned if status is 'active' or
126 # 'completed'(since 1.2)
128 # @disk: @MigrationStats containing detailed disk migration
129 # status, only returned if status is 'active' and it is a block
132 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
133 # migration statistics, only returned if XBZRLE feature is on and
134 # status is 'active' or 'completed' (since 1.2)
136 # @total-time: total amount of milliseconds since migration started.
137 # If migration has ended, it returns the total migration
140 # @downtime: only present when migration finishes correctly
141 # total downtime in milliseconds for the guest.
144 # @expected-downtime: only present while migration is active
145 # expected downtime in milliseconds for the guest in last walk
146 # of the dirty bitmap. (since 1.3)
148 # @setup-time: amount of setup time in milliseconds _before_ the
149 # iterations begin but _after_ the QMP command is issued. This is designed
150 # to provide an accounting of any activities (such as RDMA pinning) which
151 # may be expensive, but do not actually occur during the iterative
152 # migration rounds themselves. (since 1.6)
154 # @cpu-throttle-percentage: percentage of time guest cpus are being
155 # throttled during auto-converge. This is only present when auto-converge
156 # has started throttling guest cpus. (Since 2.7)
158 # @error-desc: the human readable error description string, when
159 # @status is 'failed'. Clients should not attempt to parse the
160 # error strings. (Since 2.7)
162 # @postcopy-blocktime: total time when all vCPU were blocked during postcopy
163 # live migration (Since 2.13)
165 # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU (Since 2.13)
171 { 'struct': 'MigrationInfo',
172 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
173 '*disk': 'MigrationStats',
174 '*xbzrle-cache': 'XBZRLECacheStats',
175 '*total-time': 'int',
176 '*expected-downtime': 'int',
178 '*setup-time': 'int',
179 '*cpu-throttle-percentage': 'int',
180 '*error-desc': 'str',
181 '*postcopy-blocktime' : 'uint32',
182 '*postcopy-vcpu-blocktime': ['uint32']} }
187 # Returns information about current migration process. If migration
188 # is active there will be another json-object with RAM migration
189 # status and if block migration is active another one with block
192 # Returns: @MigrationInfo
198 # 1. Before the first migration
200 # -> { "execute": "query-migrate" }
201 # <- { "return": {} }
203 # 2. Migration is done and has succeeded
205 # -> { "execute": "query-migrate" }
207 # "status": "completed",
212 # "total-time":12345,
213 # "setup-time":12345,
217 # "normal-bytes":123456,
218 # "dirty-sync-count":15
223 # 3. Migration is done and has failed
225 # -> { "execute": "query-migrate" }
226 # <- { "return": { "status": "failed" } }
228 # 4. Migration is being performed and is not a block migration:
230 # -> { "execute": "query-migrate" }
238 # "total-time":12345,
239 # "setup-time":12345,
240 # "expected-downtime":12345,
243 # "normal-bytes":123456,
244 # "dirty-sync-count":15
249 # 5. Migration is being performed and is a block migration:
251 # -> { "execute": "query-migrate" }
257 # "remaining":1053304,
258 # "transferred":3720,
259 # "total-time":12345,
260 # "setup-time":12345,
261 # "expected-downtime":12345,
264 # "normal-bytes":123456,
265 # "dirty-sync-count":15
269 # "remaining":20880384,
270 # "transferred":91136
275 # 6. Migration is being performed and XBZRLE is active:
277 # -> { "execute": "query-migrate" }
281 # "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
284 # "remaining":1053304,
285 # "transferred":3720,
286 # "total-time":12345,
287 # "setup-time":12345,
288 # "expected-downtime":12345,
291 # "normal-bytes":3412992,
292 # "dirty-sync-count":15
295 # "cache-size":67108864,
299 # "cache-miss-rate":0.123,
306 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
309 # @MigrationCapability:
311 # Migration capabilities enumeration
313 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
314 # This feature allows us to minimize migration traffic for certain work
315 # loads, by sending compressed difference of the pages
317 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
318 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
319 # Disabled by default. (since 2.0)
321 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
322 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
323 # source and target VM to support this feature. To enable it is sufficient
324 # to enable the capability on the source VM. The feature is disabled by
325 # default. (since 1.6)
327 # @compress: Use multiple compression threads to accelerate live migration.
328 # This feature can help to reduce the migration traffic, by sending
329 # compressed pages. Please note that if compress and xbzrle are both
330 # on, compress only takes effect in the ram bulk stage, after that,
331 # it will be disabled and only xbzrle takes effect, this can help to
332 # minimize migration traffic. The feature is disabled by default.
335 # @events: generate events for each migration state change
338 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
339 # to speed up convergence of RAM migration. (since 1.6)
341 # @postcopy-ram: Start executing on the migration target before all of RAM has
342 # been migrated, pulling the remaining pages along as needed. The
343 # capacity must have the same setting on both source and target
344 # or migration will not even start. NOTE: If the migration fails during
345 # postcopy the VM will fail. (since 2.6)
347 # @x-colo: If enabled, migration will never end, and the state of the VM on the
348 # primary side will be migrated continuously to the VM on secondary
349 # side, this process is called COarse-Grain LOck Stepping (COLO) for
350 # Non-stop Service. (since 2.8)
352 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
353 # during postcopy-ram migration. (since 2.9)
355 # @block: If enabled, QEMU will also migrate the contents of all block
356 # devices. Default is disabled. A possible alternative uses
357 # mirror jobs to a builtin NBD server on the destination, which
358 # offers more flexibility.
361 # @return-path: If enabled, migration will use the return path even
362 # for precopy. (since 2.10)
364 # @pause-before-switchover: Pause outgoing migration before serialising device
365 # state and before disabling block IO (since 2.11)
367 # @x-multifd: Use more than one fd for migration (since 2.11)
370 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
373 # @postcopy-blocktime: Calculate downtime for postcopy live migration
378 { 'enum': 'MigrationCapability',
379 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
380 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
381 'block', 'return-path', 'pause-before-switchover', 'x-multifd',
382 'dirty-bitmaps', 'postcopy-blocktime' ] }
385 # @MigrationCapabilityStatus:
387 # Migration capability information
389 # @capability: capability enum
391 # @state: capability state bool
395 { 'struct': 'MigrationCapabilityStatus',
396 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
399 # @migrate-set-capabilities:
401 # Enable/Disable the following migration capabilities (like xbzrle)
403 # @capabilities: json array of capability modifications to make
409 # -> { "execute": "migrate-set-capabilities" , "arguments":
410 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
413 { 'command': 'migrate-set-capabilities',
414 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
417 # @query-migrate-capabilities:
419 # Returns information about the current migration capabilities status
421 # Returns: @MigrationCapabilitiesStatus
427 # -> { "execute": "query-migrate-capabilities" }
429 # {"state": false, "capability": "xbzrle"},
430 # {"state": false, "capability": "rdma-pin-all"},
431 # {"state": false, "capability": "auto-converge"},
432 # {"state": false, "capability": "zero-blocks"},
433 # {"state": false, "capability": "compress"},
434 # {"state": true, "capability": "events"},
435 # {"state": false, "capability": "postcopy-ram"},
436 # {"state": false, "capability": "x-colo"}
440 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
443 # @MigrationParameter:
445 # Migration parameters enumeration
447 # @compress-level: Set the compression level to be used in live migration,
448 # the compression level is an integer between 0 and 9, where 0 means
449 # no compression, 1 means the best compression speed, and 9 means best
450 # compression ratio which will consume more CPU.
452 # @compress-threads: Set compression thread count to be used in live migration,
453 # the compression thread count is an integer between 1 and 255.
455 # @decompress-threads: Set decompression thread count to be used in live
456 # migration, the decompression thread count is an integer between 1
457 # and 255. Usually, decompression is at least 4 times as fast as
458 # compression, so set the decompress-threads to the number about 1/4
459 # of compress-threads is adequate.
461 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
462 # when migration auto-converge is activated. The
463 # default value is 20. (Since 2.7)
465 # @cpu-throttle-increment: throttle percentage increase each time
466 # auto-converge detects that migration is not making
467 # progress. The default value is 10. (Since 2.7)
469 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
470 # establishing a TLS connection over the migration data channel.
471 # On the outgoing side of the migration, the credentials must
472 # be for a 'client' endpoint, while for the incoming side the
473 # credentials must be for a 'server' endpoint. Setting this
474 # will enable TLS for all migrations. The default is unset,
475 # resulting in unsecured migration at the QEMU level. (Since 2.7)
477 # @tls-hostname: hostname of the target host for the migration. This is
478 # required when using x509 based TLS credentials and the
479 # migration URI does not already include a hostname. For
480 # example if using fd: or exec: based migration, the
481 # hostname must be provided so that the server's x509
482 # certificate identity can be validated. (Since 2.7)
484 # @max-bandwidth: to set maximum speed for migration. maximum speed in
485 # bytes per second. (Since 2.8)
487 # @downtime-limit: set maximum tolerated downtime for migration. maximum
488 # downtime in milliseconds (Since 2.8)
490 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
491 # periodic mode. (Since 2.8)
493 # @block-incremental: Affects how much storage is migrated when the
494 # block migration capability is enabled. When false, the entire
495 # storage backing chain is migrated into a flattened image at
496 # the destination; when true, only the active qcow2 layer is
497 # migrated and the destination must already have access to the
498 # same backing chain as was used on the source. (since 2.10)
500 # @x-multifd-channels: Number of channels used to migrate data in
501 # parallel. This is the same number that the
502 # number of sockets used for migration. The
503 # default value is 2 (since 2.11)
505 # @x-multifd-page-count: Number of pages sent together to a thread.
506 # The default value is 16 (since 2.11)
508 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
509 # needs to be a multiple of the target page size
515 { 'enum': 'MigrationParameter',
516 'data': ['compress-level', 'compress-threads', 'decompress-threads',
517 'cpu-throttle-initial', 'cpu-throttle-increment',
518 'tls-creds', 'tls-hostname', 'max-bandwidth',
519 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
520 'x-multifd-channels', 'x-multifd-page-count',
521 'xbzrle-cache-size' ] }
524 # @MigrateSetParameters:
526 # @compress-level: compression level
528 # @compress-threads: compression thread count
530 # @decompress-threads: decompression thread count
532 # @cpu-throttle-initial: Initial percentage of time guest cpus are
533 # throttled when migration auto-converge is activated.
534 # The default value is 20. (Since 2.7)
536 # @cpu-throttle-increment: throttle percentage increase each time
537 # auto-converge detects that migration is not making
538 # progress. The default value is 10. (Since 2.7)
540 # @tls-creds: ID of the 'tls-creds' object that provides credentials
541 # for establishing a TLS connection over the migration data
542 # channel. On the outgoing side of the migration, the credentials
543 # must be for a 'client' endpoint, while for the incoming side the
544 # credentials must be for a 'server' endpoint. Setting this
545 # to a non-empty string enables TLS for all migrations.
546 # An empty string means that QEMU will use plain text mode for
547 # migration, rather than TLS (Since 2.9)
548 # Previously (since 2.7), this was reported by omitting
551 # @tls-hostname: hostname of the target host for the migration. This
552 # is required when using x509 based TLS credentials and the
553 # migration URI does not already include a hostname. For
554 # example if using fd: or exec: based migration, the
555 # hostname must be provided so that the server's x509
556 # certificate identity can be validated. (Since 2.7)
557 # An empty string means that QEMU will use the hostname
558 # associated with the migration URI, if any. (Since 2.9)
559 # Previously (since 2.7), this was reported by omitting
560 # tls-hostname instead.
562 # @max-bandwidth: to set maximum speed for migration. maximum speed in
563 # bytes per second. (Since 2.8)
565 # @downtime-limit: set maximum tolerated downtime for migration. maximum
566 # downtime in milliseconds (Since 2.8)
568 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
570 # @block-incremental: Affects how much storage is migrated when the
571 # block migration capability is enabled. When false, the entire
572 # storage backing chain is migrated into a flattened image at
573 # the destination; when true, only the active qcow2 layer is
574 # migrated and the destination must already have access to the
575 # same backing chain as was used on the source. (since 2.10)
577 # @x-multifd-channels: Number of channels used to migrate data in
578 # parallel. This is the same number that the
579 # number of sockets used for migration. The
580 # default value is 2 (since 2.11)
582 # @x-multifd-page-count: Number of pages sent together to a thread.
583 # The default value is 16 (since 2.11)
585 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
586 # needs to be a multiple of the target page size
591 # TODO either fuse back into MigrationParameters, or make
592 # MigrationParameters members mandatory
593 { 'struct': 'MigrateSetParameters',
594 'data': { '*compress-level': 'int',
595 '*compress-threads': 'int',
596 '*decompress-threads': 'int',
597 '*cpu-throttle-initial': 'int',
598 '*cpu-throttle-increment': 'int',
599 '*tls-creds': 'StrOrNull',
600 '*tls-hostname': 'StrOrNull',
601 '*max-bandwidth': 'int',
602 '*downtime-limit': 'int',
603 '*x-checkpoint-delay': 'int',
604 '*block-incremental': 'bool',
605 '*x-multifd-channels': 'int',
606 '*x-multifd-page-count': 'int',
607 '*xbzrle-cache-size': 'size' } }
610 # @migrate-set-parameters:
612 # Set various migration parameters.
618 # -> { "execute": "migrate-set-parameters" ,
619 # "arguments": { "compress-level": 1 } }
622 { 'command': 'migrate-set-parameters', 'boxed': true,
623 'data': 'MigrateSetParameters' }
626 # @MigrationParameters:
628 # The optional members aren't actually optional.
630 # @compress-level: compression level
632 # @compress-threads: compression thread count
634 # @decompress-threads: decompression thread count
636 # @cpu-throttle-initial: Initial percentage of time guest cpus are
637 # throttled when migration auto-converge is activated.
640 # @cpu-throttle-increment: throttle percentage increase each time
641 # auto-converge detects that migration is not making
642 # progress. (Since 2.7)
644 # @tls-creds: ID of the 'tls-creds' object that provides credentials
645 # for establishing a TLS connection over the migration data
646 # channel. On the outgoing side of the migration, the credentials
647 # must be for a 'client' endpoint, while for the incoming side the
648 # credentials must be for a 'server' endpoint.
649 # An empty string means that QEMU will use plain text mode for
650 # migration, rather than TLS (Since 2.7)
651 # Note: 2.8 reports this by omitting tls-creds instead.
653 # @tls-hostname: hostname of the target host for the migration. This
654 # is required when using x509 based TLS credentials and the
655 # migration URI does not already include a hostname. For
656 # example if using fd: or exec: based migration, the
657 # hostname must be provided so that the server's x509
658 # certificate identity can be validated. (Since 2.7)
659 # An empty string means that QEMU will use the hostname
660 # associated with the migration URI, if any. (Since 2.9)
661 # Note: 2.8 reports this by omitting tls-hostname instead.
663 # @max-bandwidth: to set maximum speed for migration. maximum speed in
664 # bytes per second. (Since 2.8)
666 # @downtime-limit: set maximum tolerated downtime for migration. maximum
667 # downtime in milliseconds (Since 2.8)
669 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
671 # @block-incremental: Affects how much storage is migrated when the
672 # block migration capability is enabled. When false, the entire
673 # storage backing chain is migrated into a flattened image at
674 # the destination; when true, only the active qcow2 layer is
675 # migrated and the destination must already have access to the
676 # same backing chain as was used on the source. (since 2.10)
678 # @x-multifd-channels: Number of channels used to migrate data in
679 # parallel. This is the same number that the
680 # number of sockets used for migration.
681 # The default value is 2 (since 2.11)
683 # @x-multifd-page-count: Number of pages sent together to a thread.
684 # The default value is 16 (since 2.11)
686 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
687 # needs to be a multiple of the target page size
692 { 'struct': 'MigrationParameters',
693 'data': { '*compress-level': 'uint8',
694 '*compress-threads': 'uint8',
695 '*decompress-threads': 'uint8',
696 '*cpu-throttle-initial': 'uint8',
697 '*cpu-throttle-increment': 'uint8',
699 '*tls-hostname': 'str',
700 '*max-bandwidth': 'size',
701 '*downtime-limit': 'uint64',
702 '*x-checkpoint-delay': 'uint32',
703 '*block-incremental': 'bool' ,
704 '*x-multifd-channels': 'uint8',
705 '*x-multifd-page-count': 'uint32',
706 '*xbzrle-cache-size': 'size' } }
709 # @query-migrate-parameters:
711 # Returns information about the current migration parameters
713 # Returns: @MigrationParameters
719 # -> { "execute": "query-migrate-parameters" }
721 # "decompress-threads": 2,
722 # "cpu-throttle-increment": 10,
723 # "compress-threads": 8,
724 # "compress-level": 1,
725 # "cpu-throttle-initial": 20,
726 # "max-bandwidth": 33554432,
727 # "downtime-limit": 300
732 { 'command': 'query-migrate-parameters',
733 'returns': 'MigrationParameters' }
736 # @client_migrate_info:
738 # Set migration information for remote display. This makes the server
739 # ask the client to automatically reconnect using the new parameters
740 # once migration finished successfully. Only implemented for SPICE.
742 # @protocol: must be "spice"
743 # @hostname: migration target hostname
744 # @port: spice tcp port for plaintext channels
745 # @tls-port: spice tcp port for tls-secured channels
746 # @cert-subject: server certificate subject
752 # -> { "execute": "client_migrate_info",
753 # "arguments": { "protocol": "spice",
754 # "hostname": "virt42.lab.kraxel.org",
756 # <- { "return": {} }
759 { 'command': 'client_migrate_info',
760 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
761 '*tls-port': 'int', '*cert-subject': 'str' } }
764 # @migrate-start-postcopy:
766 # Followup to a migration command to switch the migration to postcopy mode.
767 # The postcopy-ram capability must be set on both source and destination
768 # before the original migration command.
774 # -> { "execute": "migrate-start-postcopy" }
775 # <- { "return": {} }
778 { 'command': 'migrate-start-postcopy' }
783 # Emitted when a migration event happens
785 # @status: @MigrationStatus describing the current migration status.
791 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
792 # "event": "MIGRATION",
793 # "data": {"status": "completed"} }
796 { 'event': 'MIGRATION',
797 'data': {'status': 'MigrationStatus'}}
802 # Emitted from the source side of a migration at the start of each pass
803 # (when it syncs the dirty bitmap)
805 # @pass: An incrementing count (starting at 1 on the first pass)
811 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
812 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
815 { 'event': 'MIGRATION_PASS',
816 'data': { 'pass': 'int' } }
821 # The message transmission between Primary side and Secondary side.
823 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
825 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
827 # @checkpoint-reply: SVM gets PVM's checkpoint request
829 # @vmstate-send: VM's state will be sent by PVM.
831 # @vmstate-size: The total size of VMstate.
833 # @vmstate-received: VM's state has been received by SVM.
835 # @vmstate-loaded: VM's state has been loaded by SVM.
839 { 'enum': 'COLOMessage',
840 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
841 'vmstate-send', 'vmstate-size', 'vmstate-received',
849 # @unknown: unknown mode
851 # @primary: master side
853 # @secondary: slave side
857 { 'enum': 'COLOMode',
858 'data': [ 'unknown', 'primary', 'secondary'] }
863 # An enumeration of COLO failover status
865 # @none: no failover has ever happened
867 # @require: got failover requirement but not handled
869 # @active: in the process of doing failover
871 # @completed: finish the process of failover
873 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
877 { 'enum': 'FailoverStatus',
878 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
881 # @x-colo-lost-heartbeat:
883 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
884 # If this command is sent to the PVM, the Primary side will exit COLO mode.
885 # If sent to the Secondary, the Secondary side will run failover work,
886 # then takes over server operation to become the service VM.
892 # -> { "execute": "x-colo-lost-heartbeat" }
893 # <- { "return": {} }
896 { 'command': 'x-colo-lost-heartbeat' }
901 # Cancel the current executing migration process.
903 # Returns: nothing on success
905 # Notes: This command succeeds even if there is no migration process running.
911 # -> { "execute": "migrate_cancel" }
912 # <- { "return": {} }
915 { 'command': 'migrate_cancel' }
920 # Continue migration when it's in a paused state.
922 # @state: The state the migration is currently expected to be in
924 # Returns: nothing on success
928 # -> { "execute": "migrate-continue" , "arguments":
929 # { "state": "pre-switchover" } }
930 # <- { "return": {} }
932 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
935 # @migrate_set_downtime:
937 # Set maximum tolerated downtime for migration.
939 # @value: maximum downtime in seconds
941 # Returns: nothing on success
943 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
949 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
950 # <- { "return": {} }
953 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
956 # @migrate_set_speed:
958 # Set maximum speed for migration.
960 # @value: maximum speed in bytes per second.
962 # Returns: nothing on success
964 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
970 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
971 # <- { "return": {} }
974 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
977 # @migrate-set-cache-size:
979 # Set cache size to be used by XBZRLE migration
981 # @value: cache size in bytes
983 # The size will be rounded down to the nearest power of 2.
984 # The cache size can be modified before and during ongoing migration
986 # Returns: nothing on success
988 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
994 # -> { "execute": "migrate-set-cache-size",
995 # "arguments": { "value": 536870912 } }
996 # <- { "return": {} }
999 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1002 # @query-migrate-cache-size:
1004 # Query migration XBZRLE cache size
1006 # Returns: XBZRLE cache size in bytes
1008 # Notes: This command is deprecated in favor of 'query-migrate-parameters'
1014 # -> { "execute": "query-migrate-cache-size" }
1015 # <- { "return": 67108864 }
1018 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1023 # Migrates the current running guest to another Virtual Machine.
1025 # @uri: the Uniform Resource Identifier of the destination VM
1027 # @blk: do block migration (full disk copy)
1029 # @inc: incremental disk copy migration
1031 # @detach: this argument exists only for compatibility reasons and
1032 # is ignored by QEMU
1034 # @resume: resume one paused migration, default "off". (since 2.13)
1036 # Returns: nothing on success
1042 # 1. The 'query-migrate' command should be used to check migration's progress
1043 # and final result (this information is provided by the 'status' member)
1045 # 2. All boolean arguments default to false
1047 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1052 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1053 # <- { "return": {} }
1056 { 'command': 'migrate',
1057 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1058 '*detach': 'bool', '*resume': 'bool' } }
1061 # @migrate-incoming:
1063 # Start an incoming migration, the qemu must have been started
1064 # with -incoming defer
1066 # @uri: The Uniform Resource Identifier identifying the source or
1067 # address to listen on
1069 # Returns: nothing on success
1075 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1076 # compatible with -incoming and the format of the uri is already exposed
1079 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1082 # 3. The uri format is the same as for -incoming
1086 # -> { "execute": "migrate-incoming",
1087 # "arguments": { "uri": "tcp::4446" } }
1088 # <- { "return": {} }
1091 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1094 # @xen-save-devices-state:
1096 # Save the state of all devices to file. The RAM and the block devices
1097 # of the VM are not saved by this command.
1099 # @filename: the file to save the state of the devices to as binary
1100 # data. See xen-save-devices-state.txt for a description of the binary
1103 # @live: Optional argument to ask QEMU to treat this command as part of a live
1104 # migration. Default to true. (since 2.11)
1106 # Returns: Nothing on success
1112 # -> { "execute": "xen-save-devices-state",
1113 # "arguments": { "filename": "/tmp/save" } }
1114 # <- { "return": {} }
1117 { 'command': 'xen-save-devices-state',
1118 'data': {'filename': 'str', '*live':'bool' } }
1121 # @xen-set-replication:
1123 # Enable or disable replication.
1125 # @enable: true to enable, false to disable.
1127 # @primary: true for primary or false for secondary.
1129 # @failover: true to do failover, false to stop. but cannot be
1130 # specified if 'enable' is true. default value is false.
1136 # -> { "execute": "xen-set-replication",
1137 # "arguments": {"enable": true, "primary": false} }
1138 # <- { "return": {} }
1142 { 'command': 'xen-set-replication',
1143 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
1146 # @ReplicationStatus:
1148 # The result format for 'query-xen-replication-status'.
1150 # @error: true if an error happened, false if replication is normal.
1152 # @desc: the human readable error description string, when
1157 { 'struct': 'ReplicationStatus',
1158 'data': { 'error': 'bool', '*desc': 'str' } }
1161 # @query-xen-replication-status:
1163 # Query replication status while the vm is running.
1165 # Returns: A @ReplicationResult object showing the status.
1169 # -> { "execute": "query-xen-replication-status" }
1170 # <- { "return": { "error": false } }
1174 { 'command': 'query-xen-replication-status',
1175 'returns': 'ReplicationStatus' }
1178 # @xen-colo-do-checkpoint:
1180 # Xen uses this command to notify replication to trigger a checkpoint.
1186 # -> { "execute": "xen-colo-do-checkpoint" }
1187 # <- { "return": {} }
1191 { 'command': 'xen-colo-do-checkpoint' }