ppc: make cpu alias point only to real cpu models
[qemu/kevin.git] / qapi / migration.json
blobee2b3b873382f2c1cc40a93dbb513a2b4264b079
1 # -*- Mode: Python -*-
4 ##
5 # = Migration
6 ##
8 { 'include': 'common.json' }
11 # @MigrationStats:
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
30 #        guest (since 1.3)
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
37 #        (since 2.7)
39 # @page-size: The number of bytes per page for the various page-based
40 #        statistics (since 2.10)
42 # Since: 0.14.0
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' } }
52 # @XBZRLECacheStats:
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
68 # Since: 1.2
70 { 'struct': 'XBZRLECacheStats',
71   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
72            'cache-miss': 'int', 'cache-miss-rate': 'number',
73            'overflow': 'int' } }
76 # @MigrationStatus:
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 # @completed: migration is finished.
94 # @failed: some error occurred during migration process.
96 # @colo: VM is in the process of fault tolerance, VM can not get into this
97 #        state unless colo capability is enabled for migration. (since 2.8)
99 # Since: 2.3
102 { 'enum': 'MigrationStatus',
103   'data': [ 'none', 'setup', 'cancelling', 'cancelled',
104             'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
107 # @MigrationInfo:
109 # Information about current migration process.
111 # @status: @MigrationStatus describing the current migration status.
112 #          If this field is not returned, no migration process
113 #          has been initiated
115 # @ram: @MigrationStats containing detailed migration
116 #       status, only returned if status is 'active' or
117 #       'completed'(since 1.2)
119 # @disk: @MigrationStats containing detailed disk migration
120 #        status, only returned if status is 'active' and it is a block
121 #        migration
123 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
124 #                migration statistics, only returned if XBZRLE feature is on and
125 #                status is 'active' or 'completed' (since 1.2)
127 # @total-time: total amount of milliseconds since migration started.
128 #        If migration has ended, it returns the total migration
129 #        time. (since 1.2)
131 # @downtime: only present when migration finishes correctly
132 #        total downtime in milliseconds for the guest.
133 #        (since 1.3)
135 # @expected-downtime: only present while migration is active
136 #        expected downtime in milliseconds for the guest in last walk
137 #        of the dirty bitmap. (since 1.3)
139 # @setup-time: amount of setup time in milliseconds _before_ the
140 #        iterations begin but _after_ the QMP command is issued. This is designed
141 #        to provide an accounting of any activities (such as RDMA pinning) which
142 #        may be expensive, but do not actually occur during the iterative
143 #        migration rounds themselves. (since 1.6)
145 # @cpu-throttle-percentage: percentage of time guest cpus are being
146 #        throttled during auto-converge. This is only present when auto-converge
147 #        has started throttling guest cpus. (Since 2.7)
149 # @error-desc: the human readable error description string, when
150 #              @status is 'failed'. Clients should not attempt to parse the
151 #              error strings. (Since 2.7)
153 # Since: 0.14.0
155 { 'struct': 'MigrationInfo',
156   'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
157            '*disk': 'MigrationStats',
158            '*xbzrle-cache': 'XBZRLECacheStats',
159            '*total-time': 'int',
160            '*expected-downtime': 'int',
161            '*downtime': 'int',
162            '*setup-time': 'int',
163            '*cpu-throttle-percentage': 'int',
164            '*error-desc': 'str'} }
167 # @query-migrate:
169 # Returns information about current migration process. If migration
170 # is active there will be another json-object with RAM migration
171 # status and if block migration is active another one with block
172 # migration status.
174 # Returns: @MigrationInfo
176 # Since: 0.14.0
178 # Example:
180 # 1. Before the first migration
182 # -> { "execute": "query-migrate" }
183 # <- { "return": {} }
185 # 2. Migration is done and has succeeded
187 # -> { "execute": "query-migrate" }
188 # <- { "return": {
189 #         "status": "completed",
190 #         "ram":{
191 #           "transferred":123,
192 #           "remaining":123,
193 #           "total":246,
194 #           "total-time":12345,
195 #           "setup-time":12345,
196 #           "downtime":12345,
197 #           "duplicate":123,
198 #           "normal":123,
199 #           "normal-bytes":123456,
200 #           "dirty-sync-count":15
201 #         }
202 #      }
203 #    }
205 # 3. Migration is done and has failed
207 # -> { "execute": "query-migrate" }
208 # <- { "return": { "status": "failed" } }
210 # 4. Migration is being performed and is not a block migration:
212 # -> { "execute": "query-migrate" }
213 # <- {
214 #       "return":{
215 #          "status":"active",
216 #          "ram":{
217 #             "transferred":123,
218 #             "remaining":123,
219 #             "total":246,
220 #             "total-time":12345,
221 #             "setup-time":12345,
222 #             "expected-downtime":12345,
223 #             "duplicate":123,
224 #             "normal":123,
225 #             "normal-bytes":123456,
226 #             "dirty-sync-count":15
227 #          }
228 #       }
229 #    }
231 # 5. Migration is being performed and is a block migration:
233 # -> { "execute": "query-migrate" }
234 # <- {
235 #       "return":{
236 #          "status":"active",
237 #          "ram":{
238 #             "total":1057024,
239 #             "remaining":1053304,
240 #             "transferred":3720,
241 #             "total-time":12345,
242 #             "setup-time":12345,
243 #             "expected-downtime":12345,
244 #             "duplicate":123,
245 #             "normal":123,
246 #             "normal-bytes":123456,
247 #             "dirty-sync-count":15
248 #          },
249 #          "disk":{
250 #             "total":20971520,
251 #             "remaining":20880384,
252 #             "transferred":91136
253 #          }
254 #       }
255 #    }
257 # 6. Migration is being performed and XBZRLE is active:
259 # -> { "execute": "query-migrate" }
260 # <- {
261 #       "return":{
262 #          "status":"active",
263 #          "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
264 #          "ram":{
265 #             "total":1057024,
266 #             "remaining":1053304,
267 #             "transferred":3720,
268 #             "total-time":12345,
269 #             "setup-time":12345,
270 #             "expected-downtime":12345,
271 #             "duplicate":10,
272 #             "normal":3333,
273 #             "normal-bytes":3412992,
274 #             "dirty-sync-count":15
275 #          },
276 #          "xbzrle-cache":{
277 #             "cache-size":67108864,
278 #             "bytes":20971520,
279 #             "pages":2444343,
280 #             "cache-miss":2244,
281 #             "cache-miss-rate":0.123,
282 #             "overflow":34434
283 #          }
284 #       }
285 #    }
288 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
291 # @MigrationCapability:
293 # Migration capabilities enumeration
295 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
296 #          This feature allows us to minimize migration traffic for certain work
297 #          loads, by sending compressed difference of the pages
299 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
300 #          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
301 #          Disabled by default. (since 2.0)
303 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
304 #          essentially saves 1MB of zeroes per block on the wire. Enabling requires
305 #          source and target VM to support this feature. To enable it is sufficient
306 #          to enable the capability on the source VM. The feature is disabled by
307 #          default. (since 1.6)
309 # @compress: Use multiple compression threads to accelerate live migration.
310 #          This feature can help to reduce the migration traffic, by sending
311 #          compressed pages. Please note that if compress and xbzrle are both
312 #          on, compress only takes effect in the ram bulk stage, after that,
313 #          it will be disabled and only xbzrle takes effect, this can help to
314 #          minimize migration traffic. The feature is disabled by default.
315 #          (since 2.4 )
317 # @events: generate events for each migration state change
318 #          (since 2.4 )
320 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
321 #          to speed up convergence of RAM migration. (since 1.6)
323 # @postcopy-ram: Start executing on the migration target before all of RAM has
324 #          been migrated, pulling the remaining pages along as needed. NOTE: If
325 #          the migration fails during postcopy the VM will fail.  (since 2.6)
327 # @x-colo: If enabled, migration will never end, and the state of the VM on the
328 #        primary side will be migrated continuously to the VM on secondary
329 #        side, this process is called COarse-Grain LOck Stepping (COLO) for
330 #        Non-stop Service. (since 2.8)
332 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
333 #        during postcopy-ram migration. (since 2.9)
335 # @block: If enabled, QEMU will also migrate the contents of all block
336 #          devices.  Default is disabled.  A possible alternative uses
337 #          mirror jobs to a builtin NBD server on the destination, which
338 #          offers more flexibility.
339 #          (Since 2.10)
341 # @return-path: If enabled, migration will use the return path even
342 #               for precopy. (since 2.10)
344 # Since: 1.2
346 { 'enum': 'MigrationCapability',
347   'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
348            'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
349            'block', 'return-path' ] }
352 # @MigrationCapabilityStatus:
354 # Migration capability information
356 # @capability: capability enum
358 # @state: capability state bool
360 # Since: 1.2
362 { 'struct': 'MigrationCapabilityStatus',
363   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
366 # @migrate-set-capabilities:
368 # Enable/Disable the following migration capabilities (like xbzrle)
370 # @capabilities: json array of capability modifications to make
372 # Since: 1.2
374 # Example:
376 # -> { "execute": "migrate-set-capabilities" , "arguments":
377 #      { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
380 { 'command': 'migrate-set-capabilities',
381   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
384 # @query-migrate-capabilities:
386 # Returns information about the current migration capabilities status
388 # Returns: @MigrationCapabilitiesStatus
390 # Since: 1.2
392 # Example:
394 # -> { "execute": "query-migrate-capabilities" }
395 # <- { "return": [
396 #       {"state": false, "capability": "xbzrle"},
397 #       {"state": false, "capability": "rdma-pin-all"},
398 #       {"state": false, "capability": "auto-converge"},
399 #       {"state": false, "capability": "zero-blocks"},
400 #       {"state": false, "capability": "compress"},
401 #       {"state": true, "capability": "events"},
402 #       {"state": false, "capability": "postcopy-ram"},
403 #       {"state": false, "capability": "x-colo"}
404 #    ]}
407 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
410 # @MigrationParameter:
412 # Migration parameters enumeration
414 # @compress-level: Set the compression level to be used in live migration,
415 #          the compression level is an integer between 0 and 9, where 0 means
416 #          no compression, 1 means the best compression speed, and 9 means best
417 #          compression ratio which will consume more CPU.
419 # @compress-threads: Set compression thread count to be used in live migration,
420 #          the compression thread count is an integer between 1 and 255.
422 # @decompress-threads: Set decompression thread count to be used in live
423 #          migration, the decompression thread count is an integer between 1
424 #          and 255. Usually, decompression is at least 4 times as fast as
425 #          compression, so set the decompress-threads to the number about 1/4
426 #          of compress-threads is adequate.
428 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
429 #                        when migration auto-converge is activated. The
430 #                        default value is 20. (Since 2.7)
432 # @cpu-throttle-increment: throttle percentage increase each time
433 #                          auto-converge detects that migration is not making
434 #                          progress. The default value is 10. (Since 2.7)
436 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
437 #             establishing a TLS connection over the migration data channel.
438 #             On the outgoing side of the migration, the credentials must
439 #             be for a 'client' endpoint, while for the incoming side the
440 #             credentials must be for a 'server' endpoint. Setting this
441 #             will enable TLS for all migrations. The default is unset,
442 #             resulting in unsecured migration at the QEMU level. (Since 2.7)
444 # @tls-hostname: hostname of the target host for the migration. This is
445 #                required when using x509 based TLS credentials and the
446 #                migration URI does not already include a hostname. For
447 #                example if using fd: or exec: based migration, the
448 #                hostname must be provided so that the server's x509
449 #                certificate identity can be validated. (Since 2.7)
451 # @max-bandwidth: to set maximum speed for migration. maximum speed in
452 #                 bytes per second. (Since 2.8)
454 # @downtime-limit: set maximum tolerated downtime for migration. maximum
455 #                  downtime in milliseconds (Since 2.8)
457 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
458 #          periodic mode. (Since 2.8)
460 # @block-incremental: Affects how much storage is migrated when the
461 #       block migration capability is enabled.  When false, the entire
462 #       storage backing chain is migrated into a flattened image at
463 #       the destination; when true, only the active qcow2 layer is
464 #       migrated and the destination must already have access to the
465 #       same backing chain as was used on the source.  (since 2.10)
467 # Since: 2.4
469 { 'enum': 'MigrationParameter',
470   'data': ['compress-level', 'compress-threads', 'decompress-threads',
471            'cpu-throttle-initial', 'cpu-throttle-increment',
472            'tls-creds', 'tls-hostname', 'max-bandwidth',
473            'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] }
476 # @MigrateSetParameters:
478 # @compress-level: compression level
480 # @compress-threads: compression thread count
482 # @decompress-threads: decompression thread count
484 # @cpu-throttle-initial: Initial percentage of time guest cpus are
485 #                        throttled when migration auto-converge is activated.
486 #                        The default value is 20. (Since 2.7)
488 # @cpu-throttle-increment: throttle percentage increase each time
489 #                          auto-converge detects that migration is not making
490 #                          progress. The default value is 10. (Since 2.7)
492 # @tls-creds: ID of the 'tls-creds' object that provides credentials
493 #             for establishing a TLS connection over the migration data
494 #             channel. On the outgoing side of the migration, the credentials
495 #             must be for a 'client' endpoint, while for the incoming side the
496 #             credentials must be for a 'server' endpoint. Setting this
497 #             to a non-empty string enables TLS for all migrations.
498 #             An empty string means that QEMU will use plain text mode for
499 #             migration, rather than TLS (Since 2.9)
500 #             Previously (since 2.7), this was reported by omitting
501 #             tls-creds instead.
503 # @tls-hostname: hostname of the target host for the migration. This
504 #                is required when using x509 based TLS credentials and the
505 #                migration URI does not already include a hostname. For
506 #                example if using fd: or exec: based migration, the
507 #                hostname must be provided so that the server's x509
508 #                certificate identity can be validated. (Since 2.7)
509 #                An empty string means that QEMU will use the hostname
510 #                associated with the migration URI, if any. (Since 2.9)
511 #                Previously (since 2.7), this was reported by omitting
512 #                tls-hostname instead.
514 # @max-bandwidth: to set maximum speed for migration. maximum speed in
515 #                 bytes per second. (Since 2.8)
517 # @downtime-limit: set maximum tolerated downtime for migration. maximum
518 #                  downtime in milliseconds (Since 2.8)
520 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
522 # @block-incremental: Affects how much storage is migrated when the
523 #       block migration capability is enabled.  When false, the entire
524 #       storage backing chain is migrated into a flattened image at
525 #       the destination; when true, only the active qcow2 layer is
526 #       migrated and the destination must already have access to the
527 #       same backing chain as was used on the source.  (since 2.10)
529 # Since: 2.4
531 # TODO either fuse back into MigrationParameters, or make
532 # MigrationParameters members mandatory
533 { 'struct': 'MigrateSetParameters',
534   'data': { '*compress-level': 'int',
535             '*compress-threads': 'int',
536             '*decompress-threads': 'int',
537             '*cpu-throttle-initial': 'int',
538             '*cpu-throttle-increment': 'int',
539             '*tls-creds': 'StrOrNull',
540             '*tls-hostname': 'StrOrNull',
541             '*max-bandwidth': 'int',
542             '*downtime-limit': 'int',
543             '*x-checkpoint-delay': 'int',
544             '*block-incremental': 'bool' } }
547 # @migrate-set-parameters:
549 # Set various migration parameters.
551 # Since: 2.4
553 # Example:
555 # -> { "execute": "migrate-set-parameters" ,
556 #      "arguments": { "compress-level": 1 } }
559 { 'command': 'migrate-set-parameters', 'boxed': true,
560   'data': 'MigrateSetParameters' }
563 # @MigrationParameters:
565 # The optional members aren't actually optional.
567 # @compress-level: compression level
569 # @compress-threads: compression thread count
571 # @decompress-threads: decompression thread count
573 # @cpu-throttle-initial: Initial percentage of time guest cpus are
574 #                        throttled when migration auto-converge is activated.
575 #                        (Since 2.7)
577 # @cpu-throttle-increment: throttle percentage increase each time
578 #                          auto-converge detects that migration is not making
579 #                          progress. (Since 2.7)
581 # @tls-creds: ID of the 'tls-creds' object that provides credentials
582 #             for establishing a TLS connection over the migration data
583 #             channel. On the outgoing side of the migration, the credentials
584 #             must be for a 'client' endpoint, while for the incoming side the
585 #             credentials must be for a 'server' endpoint.
586 #             An empty string means that QEMU will use plain text mode for
587 #             migration, rather than TLS (Since 2.7)
588 #             Note: 2.8 reports this by omitting tls-creds instead.
590 # @tls-hostname: hostname of the target host for the migration. This
591 #                is required when using x509 based TLS credentials and the
592 #                migration URI does not already include a hostname. For
593 #                example if using fd: or exec: based migration, the
594 #                hostname must be provided so that the server's x509
595 #                certificate identity can be validated. (Since 2.7)
596 #                An empty string means that QEMU will use the hostname
597 #                associated with the migration URI, if any. (Since 2.9)
598 #                Note: 2.8 reports this by omitting tls-hostname instead.
600 # @max-bandwidth: to set maximum speed for migration. maximum speed in
601 #                 bytes per second. (Since 2.8)
603 # @downtime-limit: set maximum tolerated downtime for migration. maximum
604 #                  downtime in milliseconds (Since 2.8)
606 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
608 # @block-incremental: Affects how much storage is migrated when the
609 #       block migration capability is enabled.  When false, the entire
610 #       storage backing chain is migrated into a flattened image at
611 #       the destination; when true, only the active qcow2 layer is
612 #       migrated and the destination must already have access to the
613 #       same backing chain as was used on the source.  (since 2.10)
615 # Since: 2.4
617 { 'struct': 'MigrationParameters',
618   'data': { '*compress-level': 'int',
619             '*compress-threads': 'int',
620             '*decompress-threads': 'int',
621             '*cpu-throttle-initial': 'int',
622             '*cpu-throttle-increment': 'int',
623             '*tls-creds': 'str',
624             '*tls-hostname': 'str',
625             '*max-bandwidth': 'int',
626             '*downtime-limit': 'int',
627             '*x-checkpoint-delay': 'int',
628             '*block-incremental': 'bool' } }
631 # @query-migrate-parameters:
633 # Returns information about the current migration parameters
635 # Returns: @MigrationParameters
637 # Since: 2.4
639 # Example:
641 # -> { "execute": "query-migrate-parameters" }
642 # <- { "return": {
643 #          "decompress-threads": 2,
644 #          "cpu-throttle-increment": 10,
645 #          "compress-threads": 8,
646 #          "compress-level": 1,
647 #          "cpu-throttle-initial": 20,
648 #          "max-bandwidth": 33554432,
649 #          "downtime-limit": 300
650 #       }
651 #    }
654 { 'command': 'query-migrate-parameters',
655   'returns': 'MigrationParameters' }
658 # @client_migrate_info:
660 # Set migration information for remote display.  This makes the server
661 # ask the client to automatically reconnect using the new parameters
662 # once migration finished successfully.  Only implemented for SPICE.
664 # @protocol:     must be "spice"
665 # @hostname:     migration target hostname
666 # @port:         spice tcp port for plaintext channels
667 # @tls-port:     spice tcp port for tls-secured channels
668 # @cert-subject: server certificate subject
670 # Since: 0.14.0
672 # Example:
674 # -> { "execute": "client_migrate_info",
675 #      "arguments": { "protocol": "spice",
676 #                     "hostname": "virt42.lab.kraxel.org",
677 #                     "port": 1234 } }
678 # <- { "return": {} }
681 { 'command': 'client_migrate_info',
682   'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
683             '*tls-port': 'int', '*cert-subject': 'str' } }
686 # @migrate-start-postcopy:
688 # Followup to a migration command to switch the migration to postcopy mode.
689 # The postcopy-ram capability must be set before the original migration
690 # command.
692 # Since: 2.5
694 # Example:
696 # -> { "execute": "migrate-start-postcopy" }
697 # <- { "return": {} }
700 { 'command': 'migrate-start-postcopy' }
703 # @MIGRATION:
705 # Emitted when a migration event happens
707 # @status: @MigrationStatus describing the current migration status.
709 # Since: 2.4
711 # Example:
713 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
714 #     "event": "MIGRATION",
715 #     "data": {"status": "completed"} }
718 { 'event': 'MIGRATION',
719   'data': {'status': 'MigrationStatus'}}
722 # @MIGRATION_PASS:
724 # Emitted from the source side of a migration at the start of each pass
725 # (when it syncs the dirty bitmap)
727 # @pass: An incrementing count (starting at 1 on the first pass)
729 # Since: 2.6
731 # Example:
733 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
734 #   "event": "MIGRATION_PASS", "data": {"pass": 2} }
737 { 'event': 'MIGRATION_PASS',
738   'data': { 'pass': 'int' } }
741 # @COLOMessage:
743 # The message transmission between Primary side and Secondary side.
745 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
747 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
749 # @checkpoint-reply: SVM gets PVM's checkpoint request
751 # @vmstate-send: VM's state will be sent by PVM.
753 # @vmstate-size: The total size of VMstate.
755 # @vmstate-received: VM's state has been received by SVM.
757 # @vmstate-loaded: VM's state has been loaded by SVM.
759 # Since: 2.8
761 { 'enum': 'COLOMessage',
762   'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
763             'vmstate-send', 'vmstate-size', 'vmstate-received',
764             'vmstate-loaded' ] }
767 # @COLOMode:
769 # The colo mode
771 # @unknown: unknown mode
773 # @primary: master side
775 # @secondary: slave side
777 # Since: 2.8
779 { 'enum': 'COLOMode',
780   'data': [ 'unknown', 'primary', 'secondary'] }
783 # @FailoverStatus:
785 # An enumeration of COLO failover status
787 # @none: no failover has ever happened
789 # @require: got failover requirement but not handled
791 # @active: in the process of doing failover
793 # @completed: finish the process of failover
795 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
797 # Since: 2.8
799 { 'enum': 'FailoverStatus',
800   'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
803 # @x-colo-lost-heartbeat:
805 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
806 # If this command is sent to the PVM, the Primary side will exit COLO mode.
807 # If sent to the Secondary, the Secondary side will run failover work,
808 # then takes over server operation to become the service VM.
810 # Since: 2.8
812 # Example:
814 # -> { "execute": "x-colo-lost-heartbeat" }
815 # <- { "return": {} }
818 { 'command': 'x-colo-lost-heartbeat' }
821 # @migrate_cancel:
823 # Cancel the current executing migration process.
825 # Returns: nothing on success
827 # Notes: This command succeeds even if there is no migration process running.
829 # Since: 0.14.0
831 # Example:
833 # -> { "execute": "migrate_cancel" }
834 # <- { "return": {} }
837 { 'command': 'migrate_cancel' }
840 # @migrate_set_downtime:
842 # Set maximum tolerated downtime for migration.
844 # @value: maximum downtime in seconds
846 # Returns: nothing on success
848 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
850 # Since: 0.14.0
852 # Example:
854 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
855 # <- { "return": {} }
858 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
861 # @migrate_set_speed:
863 # Set maximum speed for migration.
865 # @value: maximum speed in bytes per second.
867 # Returns: nothing on success
869 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
871 # Since: 0.14.0
873 # Example:
875 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
876 # <- { "return": {} }
879 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
882 # @migrate-set-cache-size:
884 # Set cache size to be used by XBZRLE migration
886 # @value: cache size in bytes
888 # The size will be rounded down to the nearest power of 2.
889 # The cache size can be modified before and during ongoing migration
891 # Returns: nothing on success
893 # Since: 1.2
895 # Example:
897 # -> { "execute": "migrate-set-cache-size",
898 #      "arguments": { "value": 536870912 } }
899 # <- { "return": {} }
902 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
905 # @query-migrate-cache-size:
907 # Query migration XBZRLE cache size
909 # Returns: XBZRLE cache size in bytes
911 # Since: 1.2
913 # Example:
915 # -> { "execute": "query-migrate-cache-size" }
916 # <- { "return": 67108864 }
919 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
922 # @migrate:
924 # Migrates the current running guest to another Virtual Machine.
926 # @uri: the Uniform Resource Identifier of the destination VM
928 # @blk: do block migration (full disk copy)
930 # @inc: incremental disk copy migration
932 # @detach: this argument exists only for compatibility reasons and
933 #          is ignored by QEMU
935 # Returns: nothing on success
937 # Since: 0.14.0
939 # Notes:
941 # 1. The 'query-migrate' command should be used to check migration's progress
942 #    and final result (this information is provided by the 'status' member)
944 # 2. All boolean arguments default to false
946 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
947 #    be used
949 # Example:
951 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
952 # <- { "return": {} }
955 { 'command': 'migrate',
956   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
959 # @migrate-incoming:
961 # Start an incoming migration, the qemu must have been started
962 # with -incoming defer
964 # @uri: The Uniform Resource Identifier identifying the source or
965 #       address to listen on
967 # Returns: nothing on success
969 # Since: 2.3
971 # Notes:
973 # 1. It's a bad idea to use a string for the uri, but it needs to stay
974 #    compatible with -incoming and the format of the uri is already exposed
975 #    above libvirt.
977 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
978 #    be used.
980 # 3. The uri format is the same as for -incoming
982 # Example:
984 # -> { "execute": "migrate-incoming",
985 #      "arguments": { "uri": "tcp::4446" } }
986 # <- { "return": {} }
989 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
992 # @xen-save-devices-state:
994 # Save the state of all devices to file. The RAM and the block devices
995 # of the VM are not saved by this command.
997 # @filename: the file to save the state of the devices to as binary
998 # data. See xen-save-devices-state.txt for a description of the binary
999 # format.
1001 # Returns: Nothing on success
1003 # Since: 1.1
1005 # Example:
1007 # -> { "execute": "xen-save-devices-state",
1008 #      "arguments": { "filename": "/tmp/save" } }
1009 # <- { "return": {} }
1012 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1015 # @xen-set-replication:
1017 # Enable or disable replication.
1019 # @enable: true to enable, false to disable.
1021 # @primary: true for primary or false for secondary.
1023 # @failover: true to do failover, false to stop. but cannot be
1024 #            specified if 'enable' is true. default value is false.
1026 # Returns: nothing.
1028 # Example:
1030 # -> { "execute": "xen-set-replication",
1031 #      "arguments": {"enable": true, "primary": false} }
1032 # <- { "return": {} }
1034 # Since: 2.9
1036 { 'command': 'xen-set-replication',
1037   'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
1040 # @ReplicationStatus:
1042 # The result format for 'query-xen-replication-status'.
1044 # @error: true if an error happened, false if replication is normal.
1046 # @desc: the human readable error description string, when
1047 #        @error is 'true'.
1049 # Since: 2.9
1051 { 'struct': 'ReplicationStatus',
1052   'data': { 'error': 'bool', '*desc': 'str' } }
1055 # @query-xen-replication-status:
1057 # Query replication status while the vm is running.
1059 # Returns: A @ReplicationResult object showing the status.
1061 # Example:
1063 # -> { "execute": "query-xen-replication-status" }
1064 # <- { "return": { "error": false } }
1066 # Since: 2.9
1068 { 'command': 'query-xen-replication-status',
1069   'returns': 'ReplicationStatus' }
1072 # @xen-colo-do-checkpoint:
1074 # Xen uses this command to notify replication to trigger a checkpoint.
1076 # Returns: nothing.
1078 # Example:
1080 # -> { "execute": "xen-colo-do-checkpoint" }
1081 # <- { "return": {} }
1083 # Since: 2.9
1085 { 'command': 'xen-colo-do-checkpoint' }