]> git.proxmox.com Git - mirror_qemu.git/blob - qapi/migration.json
migration: new state "postcopy-recover"
[mirror_qemu.git] / qapi / migration.json
1 # -*- Mode: Python -*-
2 #
3
4 ##
5 # = Migration
6 ##
7
8 { 'include': 'common.json' }
9
10 ##
11 # @MigrationStats:
12 #
13 # Detailed migration status.
14 #
15 # @transferred: amount of bytes already transferred to the target VM
16 #
17 # @remaining: amount of bytes remaining to be transferred to the target VM
18 #
19 # @total: total amount of bytes involved in the migration process
20 #
21 # @duplicate: number of duplicate (zero) pages (since 1.2)
22 #
23 # @skipped: number of skipped zero pages (since 1.5)
24 #
25 # @normal: number of normal pages (since 1.2)
26 #
27 # @normal-bytes: number of normal bytes sent (since 1.2)
28 #
29 # @dirty-pages-rate: number of pages dirtied by second by the
30 # guest (since 1.3)
31 #
32 # @mbps: throughput in megabits/sec. (since 1.6)
33 #
34 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
35 #
36 # @postcopy-requests: The number of page requests received from the destination
37 # (since 2.7)
38 #
39 # @page-size: The number of bytes per page for the various page-based
40 # statistics (since 2.10)
41 #
42 # Since: 0.14.0
43 ##
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' } }
50
51 ##
52 # @XBZRLECacheStats:
53 #
54 # Detailed XBZRLE migration cache statistics
55 #
56 # @cache-size: XBZRLE cache size
57 #
58 # @bytes: amount of bytes already transferred to the target VM
59 #
60 # @pages: amount of pages transferred to the target VM
61 #
62 # @cache-miss: number of cache miss
63 #
64 # @cache-miss-rate: rate of cache miss (since 2.1)
65 #
66 # @overflow: number of overflows
67 #
68 # Since: 1.2
69 ##
70 { 'struct': 'XBZRLECacheStats',
71 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
72 'cache-miss': 'int', 'cache-miss-rate': 'number',
73 'overflow': 'int' } }
74
75 ##
76 # @MigrationStatus:
77 #
78 # An enumeration of migration status.
79 #
80 # @none: no migration has ever happened.
81 #
82 # @setup: migration process has been initiated.
83 #
84 # @cancelling: in the process of cancelling migration.
85 #
86 # @cancelled: cancelling migration is finished.
87 #
88 # @active: in the process of doing migration.
89 #
90 # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
91 #
92 # @postcopy-paused: during postcopy but paused. (since 2.13)
93 #
94 # @postcopy-recover: trying to recover from a paused postcopy. (since 2.13)
95 #
96 # @completed: migration is finished.
97 #
98 # @failed: some error occurred during migration process.
99 #
100 # @colo: VM is in the process of fault tolerance, VM can not get into this
101 # state unless colo capability is enabled for migration. (since 2.8)
102 #
103 # @pre-switchover: Paused before device serialisation. (since 2.11)
104 #
105 # @device: During device serialisation when pause-before-switchover is enabled
106 # (since 2.11)
107 #
108 # Since: 2.3
109 #
110 ##
111 { 'enum': 'MigrationStatus',
112 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
113 'active', 'postcopy-active', 'postcopy-paused',
114 'postcopy-recover', 'completed', 'failed', 'colo',
115 'pre-switchover', 'device' ] }
116
117 ##
118 # @MigrationInfo:
119 #
120 # Information about current migration process.
121 #
122 # @status: @MigrationStatus describing the current migration status.
123 # If this field is not returned, no migration process
124 # has been initiated
125 #
126 # @ram: @MigrationStats containing detailed migration
127 # status, only returned if status is 'active' or
128 # 'completed'(since 1.2)
129 #
130 # @disk: @MigrationStats containing detailed disk migration
131 # status, only returned if status is 'active' and it is a block
132 # migration
133 #
134 # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
135 # migration statistics, only returned if XBZRLE feature is on and
136 # status is 'active' or 'completed' (since 1.2)
137 #
138 # @total-time: total amount of milliseconds since migration started.
139 # If migration has ended, it returns the total migration
140 # time. (since 1.2)
141 #
142 # @downtime: only present when migration finishes correctly
143 # total downtime in milliseconds for the guest.
144 # (since 1.3)
145 #
146 # @expected-downtime: only present while migration is active
147 # expected downtime in milliseconds for the guest in last walk
148 # of the dirty bitmap. (since 1.3)
149 #
150 # @setup-time: amount of setup time in milliseconds _before_ the
151 # iterations begin but _after_ the QMP command is issued. This is designed
152 # to provide an accounting of any activities (such as RDMA pinning) which
153 # may be expensive, but do not actually occur during the iterative
154 # migration rounds themselves. (since 1.6)
155 #
156 # @cpu-throttle-percentage: percentage of time guest cpus are being
157 # throttled during auto-converge. This is only present when auto-converge
158 # has started throttling guest cpus. (Since 2.7)
159 #
160 # @error-desc: the human readable error description string, when
161 # @status is 'failed'. Clients should not attempt to parse the
162 # error strings. (Since 2.7)
163 #
164 # @postcopy-blocktime: total time when all vCPU were blocked during postcopy
165 # live migration (Since 2.13)
166 #
167 # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU (Since 2.13)
168 #
169
170 #
171 # Since: 0.14.0
172 ##
173 { 'struct': 'MigrationInfo',
174 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
175 '*disk': 'MigrationStats',
176 '*xbzrle-cache': 'XBZRLECacheStats',
177 '*total-time': 'int',
178 '*expected-downtime': 'int',
179 '*downtime': 'int',
180 '*setup-time': 'int',
181 '*cpu-throttle-percentage': 'int',
182 '*error-desc': 'str',
183 '*postcopy-blocktime' : 'uint32',
184 '*postcopy-vcpu-blocktime': ['uint32']} }
185
186 ##
187 # @query-migrate:
188 #
189 # Returns information about current migration process. If migration
190 # is active there will be another json-object with RAM migration
191 # status and if block migration is active another one with block
192 # migration status.
193 #
194 # Returns: @MigrationInfo
195 #
196 # Since: 0.14.0
197 #
198 # Example:
199 #
200 # 1. Before the first migration
201 #
202 # -> { "execute": "query-migrate" }
203 # <- { "return": {} }
204 #
205 # 2. Migration is done and has succeeded
206 #
207 # -> { "execute": "query-migrate" }
208 # <- { "return": {
209 # "status": "completed",
210 # "ram":{
211 # "transferred":123,
212 # "remaining":123,
213 # "total":246,
214 # "total-time":12345,
215 # "setup-time":12345,
216 # "downtime":12345,
217 # "duplicate":123,
218 # "normal":123,
219 # "normal-bytes":123456,
220 # "dirty-sync-count":15
221 # }
222 # }
223 # }
224 #
225 # 3. Migration is done and has failed
226 #
227 # -> { "execute": "query-migrate" }
228 # <- { "return": { "status": "failed" } }
229 #
230 # 4. Migration is being performed and is not a block migration:
231 #
232 # -> { "execute": "query-migrate" }
233 # <- {
234 # "return":{
235 # "status":"active",
236 # "ram":{
237 # "transferred":123,
238 # "remaining":123,
239 # "total":246,
240 # "total-time":12345,
241 # "setup-time":12345,
242 # "expected-downtime":12345,
243 # "duplicate":123,
244 # "normal":123,
245 # "normal-bytes":123456,
246 # "dirty-sync-count":15
247 # }
248 # }
249 # }
250 #
251 # 5. Migration is being performed and is a block migration:
252 #
253 # -> { "execute": "query-migrate" }
254 # <- {
255 # "return":{
256 # "status":"active",
257 # "ram":{
258 # "total":1057024,
259 # "remaining":1053304,
260 # "transferred":3720,
261 # "total-time":12345,
262 # "setup-time":12345,
263 # "expected-downtime":12345,
264 # "duplicate":123,
265 # "normal":123,
266 # "normal-bytes":123456,
267 # "dirty-sync-count":15
268 # },
269 # "disk":{
270 # "total":20971520,
271 # "remaining":20880384,
272 # "transferred":91136
273 # }
274 # }
275 # }
276 #
277 # 6. Migration is being performed and XBZRLE is active:
278 #
279 # -> { "execute": "query-migrate" }
280 # <- {
281 # "return":{
282 # "status":"active",
283 # "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
284 # "ram":{
285 # "total":1057024,
286 # "remaining":1053304,
287 # "transferred":3720,
288 # "total-time":12345,
289 # "setup-time":12345,
290 # "expected-downtime":12345,
291 # "duplicate":10,
292 # "normal":3333,
293 # "normal-bytes":3412992,
294 # "dirty-sync-count":15
295 # },
296 # "xbzrle-cache":{
297 # "cache-size":67108864,
298 # "bytes":20971520,
299 # "pages":2444343,
300 # "cache-miss":2244,
301 # "cache-miss-rate":0.123,
302 # "overflow":34434
303 # }
304 # }
305 # }
306 #
307 ##
308 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
309
310 ##
311 # @MigrationCapability:
312 #
313 # Migration capabilities enumeration
314 #
315 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
316 # This feature allows us to minimize migration traffic for certain work
317 # loads, by sending compressed difference of the pages
318 #
319 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
320 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
321 # Disabled by default. (since 2.0)
322 #
323 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
324 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
325 # source and target VM to support this feature. To enable it is sufficient
326 # to enable the capability on the source VM. The feature is disabled by
327 # default. (since 1.6)
328 #
329 # @compress: Use multiple compression threads to accelerate live migration.
330 # This feature can help to reduce the migration traffic, by sending
331 # compressed pages. Please note that if compress and xbzrle are both
332 # on, compress only takes effect in the ram bulk stage, after that,
333 # it will be disabled and only xbzrle takes effect, this can help to
334 # minimize migration traffic. The feature is disabled by default.
335 # (since 2.4 )
336 #
337 # @events: generate events for each migration state change
338 # (since 2.4 )
339 #
340 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
341 # to speed up convergence of RAM migration. (since 1.6)
342 #
343 # @postcopy-ram: Start executing on the migration target before all of RAM has
344 # been migrated, pulling the remaining pages along as needed. The
345 # capacity must have the same setting on both source and target
346 # or migration will not even start. NOTE: If the migration fails during
347 # postcopy the VM will fail. (since 2.6)
348 #
349 # @x-colo: If enabled, migration will never end, and the state of the VM on the
350 # primary side will be migrated continuously to the VM on secondary
351 # side, this process is called COarse-Grain LOck Stepping (COLO) for
352 # Non-stop Service. (since 2.8)
353 #
354 # @release-ram: if enabled, qemu will free the migrated ram pages on the source
355 # during postcopy-ram migration. (since 2.9)
356 #
357 # @block: If enabled, QEMU will also migrate the contents of all block
358 # devices. Default is disabled. A possible alternative uses
359 # mirror jobs to a builtin NBD server on the destination, which
360 # offers more flexibility.
361 # (Since 2.10)
362 #
363 # @return-path: If enabled, migration will use the return path even
364 # for precopy. (since 2.10)
365 #
366 # @pause-before-switchover: Pause outgoing migration before serialising device
367 # state and before disabling block IO (since 2.11)
368 #
369 # @x-multifd: Use more than one fd for migration (since 2.11)
370 #
371 #
372 # @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
373 # (since 2.12)
374 #
375 # @postcopy-blocktime: Calculate downtime for postcopy live migration
376 # (since 2.13)
377 #
378 # Since: 1.2
379 ##
380 { 'enum': 'MigrationCapability',
381 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
382 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
383 'block', 'return-path', 'pause-before-switchover', 'x-multifd',
384 'dirty-bitmaps', 'postcopy-blocktime' ] }
385
386 ##
387 # @MigrationCapabilityStatus:
388 #
389 # Migration capability information
390 #
391 # @capability: capability enum
392 #
393 # @state: capability state bool
394 #
395 # Since: 1.2
396 ##
397 { 'struct': 'MigrationCapabilityStatus',
398 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
399
400 ##
401 # @migrate-set-capabilities:
402 #
403 # Enable/Disable the following migration capabilities (like xbzrle)
404 #
405 # @capabilities: json array of capability modifications to make
406 #
407 # Since: 1.2
408 #
409 # Example:
410 #
411 # -> { "execute": "migrate-set-capabilities" , "arguments":
412 # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
413 #
414 ##
415 { 'command': 'migrate-set-capabilities',
416 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
417
418 ##
419 # @query-migrate-capabilities:
420 #
421 # Returns information about the current migration capabilities status
422 #
423 # Returns: @MigrationCapabilitiesStatus
424 #
425 # Since: 1.2
426 #
427 # Example:
428 #
429 # -> { "execute": "query-migrate-capabilities" }
430 # <- { "return": [
431 # {"state": false, "capability": "xbzrle"},
432 # {"state": false, "capability": "rdma-pin-all"},
433 # {"state": false, "capability": "auto-converge"},
434 # {"state": false, "capability": "zero-blocks"},
435 # {"state": false, "capability": "compress"},
436 # {"state": true, "capability": "events"},
437 # {"state": false, "capability": "postcopy-ram"},
438 # {"state": false, "capability": "x-colo"}
439 # ]}
440 #
441 ##
442 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
443
444 ##
445 # @MigrationParameter:
446 #
447 # Migration parameters enumeration
448 #
449 # @compress-level: Set the compression level to be used in live migration,
450 # the compression level is an integer between 0 and 9, where 0 means
451 # no compression, 1 means the best compression speed, and 9 means best
452 # compression ratio which will consume more CPU.
453 #
454 # @compress-threads: Set compression thread count to be used in live migration,
455 # the compression thread count is an integer between 1 and 255.
456 #
457 # @decompress-threads: Set decompression thread count to be used in live
458 # migration, the decompression thread count is an integer between 1
459 # and 255. Usually, decompression is at least 4 times as fast as
460 # compression, so set the decompress-threads to the number about 1/4
461 # of compress-threads is adequate.
462 #
463 # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
464 # when migration auto-converge is activated. The
465 # default value is 20. (Since 2.7)
466 #
467 # @cpu-throttle-increment: throttle percentage increase each time
468 # auto-converge detects that migration is not making
469 # progress. The default value is 10. (Since 2.7)
470 #
471 # @tls-creds: ID of the 'tls-creds' object that provides credentials for
472 # establishing a TLS connection over the migration data channel.
473 # On the outgoing side of the migration, the credentials must
474 # be for a 'client' endpoint, while for the incoming side the
475 # credentials must be for a 'server' endpoint. Setting this
476 # will enable TLS for all migrations. The default is unset,
477 # resulting in unsecured migration at the QEMU level. (Since 2.7)
478 #
479 # @tls-hostname: hostname of the target host for the migration. This is
480 # required when using x509 based TLS credentials and the
481 # migration URI does not already include a hostname. For
482 # example if using fd: or exec: based migration, the
483 # hostname must be provided so that the server's x509
484 # certificate identity can be validated. (Since 2.7)
485 #
486 # @max-bandwidth: to set maximum speed for migration. maximum speed in
487 # bytes per second. (Since 2.8)
488 #
489 # @downtime-limit: set maximum tolerated downtime for migration. maximum
490 # downtime in milliseconds (Since 2.8)
491 #
492 # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
493 # periodic mode. (Since 2.8)
494 #
495 # @block-incremental: Affects how much storage is migrated when the
496 # block migration capability is enabled. When false, the entire
497 # storage backing chain is migrated into a flattened image at
498 # the destination; when true, only the active qcow2 layer is
499 # migrated and the destination must already have access to the
500 # same backing chain as was used on the source. (since 2.10)
501 #
502 # @x-multifd-channels: Number of channels used to migrate data in
503 # parallel. This is the same number that the
504 # number of sockets used for migration. The
505 # default value is 2 (since 2.11)
506 #
507 # @x-multifd-page-count: Number of pages sent together to a thread.
508 # The default value is 16 (since 2.11)
509 #
510 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
511 # needs to be a multiple of the target page size
512 # and a power of 2
513 # (Since 2.11)
514 #
515 # Since: 2.4
516 ##
517 { 'enum': 'MigrationParameter',
518 'data': ['compress-level', 'compress-threads', 'decompress-threads',
519 'cpu-throttle-initial', 'cpu-throttle-increment',
520 'tls-creds', 'tls-hostname', 'max-bandwidth',
521 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
522 'x-multifd-channels', 'x-multifd-page-count',
523 'xbzrle-cache-size' ] }
524
525 ##
526 # @MigrateSetParameters:
527 #
528 # @compress-level: compression level
529 #
530 # @compress-threads: compression thread count
531 #
532 # @decompress-threads: decompression thread count
533 #
534 # @cpu-throttle-initial: Initial percentage of time guest cpus are
535 # throttled when migration auto-converge is activated.
536 # The default value is 20. (Since 2.7)
537 #
538 # @cpu-throttle-increment: throttle percentage increase each time
539 # auto-converge detects that migration is not making
540 # progress. The default value is 10. (Since 2.7)
541 #
542 # @tls-creds: ID of the 'tls-creds' object that provides credentials
543 # for establishing a TLS connection over the migration data
544 # channel. On the outgoing side of the migration, the credentials
545 # must be for a 'client' endpoint, while for the incoming side the
546 # credentials must be for a 'server' endpoint. Setting this
547 # to a non-empty string enables TLS for all migrations.
548 # An empty string means that QEMU will use plain text mode for
549 # migration, rather than TLS (Since 2.9)
550 # Previously (since 2.7), this was reported by omitting
551 # tls-creds instead.
552 #
553 # @tls-hostname: hostname of the target host for the migration. This
554 # is required when using x509 based TLS credentials and the
555 # migration URI does not already include a hostname. For
556 # example if using fd: or exec: based migration, the
557 # hostname must be provided so that the server's x509
558 # certificate identity can be validated. (Since 2.7)
559 # An empty string means that QEMU will use the hostname
560 # associated with the migration URI, if any. (Since 2.9)
561 # Previously (since 2.7), this was reported by omitting
562 # tls-hostname instead.
563 #
564 # @max-bandwidth: to set maximum speed for migration. maximum speed in
565 # bytes per second. (Since 2.8)
566 #
567 # @downtime-limit: set maximum tolerated downtime for migration. maximum
568 # downtime in milliseconds (Since 2.8)
569 #
570 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
571 #
572 # @block-incremental: Affects how much storage is migrated when the
573 # block migration capability is enabled. When false, the entire
574 # storage backing chain is migrated into a flattened image at
575 # the destination; when true, only the active qcow2 layer is
576 # migrated and the destination must already have access to the
577 # same backing chain as was used on the source. (since 2.10)
578 #
579 # @x-multifd-channels: Number of channels used to migrate data in
580 # parallel. This is the same number that the
581 # number of sockets used for migration. The
582 # default value is 2 (since 2.11)
583 #
584 # @x-multifd-page-count: Number of pages sent together to a thread.
585 # The default value is 16 (since 2.11)
586 #
587 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
588 # needs to be a multiple of the target page size
589 # and a power of 2
590 # (Since 2.11)
591 # Since: 2.4
592 ##
593 # TODO either fuse back into MigrationParameters, or make
594 # MigrationParameters members mandatory
595 { 'struct': 'MigrateSetParameters',
596 'data': { '*compress-level': 'int',
597 '*compress-threads': 'int',
598 '*decompress-threads': 'int',
599 '*cpu-throttle-initial': 'int',
600 '*cpu-throttle-increment': 'int',
601 '*tls-creds': 'StrOrNull',
602 '*tls-hostname': 'StrOrNull',
603 '*max-bandwidth': 'int',
604 '*downtime-limit': 'int',
605 '*x-checkpoint-delay': 'int',
606 '*block-incremental': 'bool',
607 '*x-multifd-channels': 'int',
608 '*x-multifd-page-count': 'int',
609 '*xbzrle-cache-size': 'size' } }
610
611 ##
612 # @migrate-set-parameters:
613 #
614 # Set various migration parameters.
615 #
616 # Since: 2.4
617 #
618 # Example:
619 #
620 # -> { "execute": "migrate-set-parameters" ,
621 # "arguments": { "compress-level": 1 } }
622 #
623 ##
624 { 'command': 'migrate-set-parameters', 'boxed': true,
625 'data': 'MigrateSetParameters' }
626
627 ##
628 # @MigrationParameters:
629 #
630 # The optional members aren't actually optional.
631 #
632 # @compress-level: compression level
633 #
634 # @compress-threads: compression thread count
635 #
636 # @decompress-threads: decompression thread count
637 #
638 # @cpu-throttle-initial: Initial percentage of time guest cpus are
639 # throttled when migration auto-converge is activated.
640 # (Since 2.7)
641 #
642 # @cpu-throttle-increment: throttle percentage increase each time
643 # auto-converge detects that migration is not making
644 # progress. (Since 2.7)
645 #
646 # @tls-creds: ID of the 'tls-creds' object that provides credentials
647 # for establishing a TLS connection over the migration data
648 # channel. On the outgoing side of the migration, the credentials
649 # must be for a 'client' endpoint, while for the incoming side the
650 # credentials must be for a 'server' endpoint.
651 # An empty string means that QEMU will use plain text mode for
652 # migration, rather than TLS (Since 2.7)
653 # Note: 2.8 reports this by omitting tls-creds instead.
654 #
655 # @tls-hostname: hostname of the target host for the migration. This
656 # is required when using x509 based TLS credentials and the
657 # migration URI does not already include a hostname. For
658 # example if using fd: or exec: based migration, the
659 # hostname must be provided so that the server's x509
660 # certificate identity can be validated. (Since 2.7)
661 # An empty string means that QEMU will use the hostname
662 # associated with the migration URI, if any. (Since 2.9)
663 # Note: 2.8 reports this by omitting tls-hostname instead.
664 #
665 # @max-bandwidth: to set maximum speed for migration. maximum speed in
666 # bytes per second. (Since 2.8)
667 #
668 # @downtime-limit: set maximum tolerated downtime for migration. maximum
669 # downtime in milliseconds (Since 2.8)
670 #
671 # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
672 #
673 # @block-incremental: Affects how much storage is migrated when the
674 # block migration capability is enabled. When false, the entire
675 # storage backing chain is migrated into a flattened image at
676 # the destination; when true, only the active qcow2 layer is
677 # migrated and the destination must already have access to the
678 # same backing chain as was used on the source. (since 2.10)
679 #
680 # @x-multifd-channels: Number of channels used to migrate data in
681 # parallel. This is the same number that the
682 # number of sockets used for migration.
683 # The default value is 2 (since 2.11)
684 #
685 # @x-multifd-page-count: Number of pages sent together to a thread.
686 # The default value is 16 (since 2.11)
687 #
688 # @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
689 # needs to be a multiple of the target page size
690 # and a power of 2
691 # (Since 2.11)
692 # Since: 2.4
693 ##
694 { 'struct': 'MigrationParameters',
695 'data': { '*compress-level': 'uint8',
696 '*compress-threads': 'uint8',
697 '*decompress-threads': 'uint8',
698 '*cpu-throttle-initial': 'uint8',
699 '*cpu-throttle-increment': 'uint8',
700 '*tls-creds': 'str',
701 '*tls-hostname': 'str',
702 '*max-bandwidth': 'size',
703 '*downtime-limit': 'uint64',
704 '*x-checkpoint-delay': 'uint32',
705 '*block-incremental': 'bool' ,
706 '*x-multifd-channels': 'uint8',
707 '*x-multifd-page-count': 'uint32',
708 '*xbzrle-cache-size': 'size' } }
709
710 ##
711 # @query-migrate-parameters:
712 #
713 # Returns information about the current migration parameters
714 #
715 # Returns: @MigrationParameters
716 #
717 # Since: 2.4
718 #
719 # Example:
720 #
721 # -> { "execute": "query-migrate-parameters" }
722 # <- { "return": {
723 # "decompress-threads": 2,
724 # "cpu-throttle-increment": 10,
725 # "compress-threads": 8,
726 # "compress-level": 1,
727 # "cpu-throttle-initial": 20,
728 # "max-bandwidth": 33554432,
729 # "downtime-limit": 300
730 # }
731 # }
732 #
733 ##
734 { 'command': 'query-migrate-parameters',
735 'returns': 'MigrationParameters' }
736
737 ##
738 # @client_migrate_info:
739 #
740 # Set migration information for remote display. This makes the server
741 # ask the client to automatically reconnect using the new parameters
742 # once migration finished successfully. Only implemented for SPICE.
743 #
744 # @protocol: must be "spice"
745 # @hostname: migration target hostname
746 # @port: spice tcp port for plaintext channels
747 # @tls-port: spice tcp port for tls-secured channels
748 # @cert-subject: server certificate subject
749 #
750 # Since: 0.14.0
751 #
752 # Example:
753 #
754 # -> { "execute": "client_migrate_info",
755 # "arguments": { "protocol": "spice",
756 # "hostname": "virt42.lab.kraxel.org",
757 # "port": 1234 } }
758 # <- { "return": {} }
759 #
760 ##
761 { 'command': 'client_migrate_info',
762 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
763 '*tls-port': 'int', '*cert-subject': 'str' } }
764
765 ##
766 # @migrate-start-postcopy:
767 #
768 # Followup to a migration command to switch the migration to postcopy mode.
769 # The postcopy-ram capability must be set on both source and destination
770 # before the original migration command.
771 #
772 # Since: 2.5
773 #
774 # Example:
775 #
776 # -> { "execute": "migrate-start-postcopy" }
777 # <- { "return": {} }
778 #
779 ##
780 { 'command': 'migrate-start-postcopy' }
781
782 ##
783 # @MIGRATION:
784 #
785 # Emitted when a migration event happens
786 #
787 # @status: @MigrationStatus describing the current migration status.
788 #
789 # Since: 2.4
790 #
791 # Example:
792 #
793 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
794 # "event": "MIGRATION",
795 # "data": {"status": "completed"} }
796 #
797 ##
798 { 'event': 'MIGRATION',
799 'data': {'status': 'MigrationStatus'}}
800
801 ##
802 # @MIGRATION_PASS:
803 #
804 # Emitted from the source side of a migration at the start of each pass
805 # (when it syncs the dirty bitmap)
806 #
807 # @pass: An incrementing count (starting at 1 on the first pass)
808 #
809 # Since: 2.6
810 #
811 # Example:
812 #
813 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
814 # "event": "MIGRATION_PASS", "data": {"pass": 2} }
815 #
816 ##
817 { 'event': 'MIGRATION_PASS',
818 'data': { 'pass': 'int' } }
819
820 ##
821 # @COLOMessage:
822 #
823 # The message transmission between Primary side and Secondary side.
824 #
825 # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
826 #
827 # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
828 #
829 # @checkpoint-reply: SVM gets PVM's checkpoint request
830 #
831 # @vmstate-send: VM's state will be sent by PVM.
832 #
833 # @vmstate-size: The total size of VMstate.
834 #
835 # @vmstate-received: VM's state has been received by SVM.
836 #
837 # @vmstate-loaded: VM's state has been loaded by SVM.
838 #
839 # Since: 2.8
840 ##
841 { 'enum': 'COLOMessage',
842 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
843 'vmstate-send', 'vmstate-size', 'vmstate-received',
844 'vmstate-loaded' ] }
845
846 ##
847 # @COLOMode:
848 #
849 # The colo mode
850 #
851 # @unknown: unknown mode
852 #
853 # @primary: master side
854 #
855 # @secondary: slave side
856 #
857 # Since: 2.8
858 ##
859 { 'enum': 'COLOMode',
860 'data': [ 'unknown', 'primary', 'secondary'] }
861
862 ##
863 # @FailoverStatus:
864 #
865 # An enumeration of COLO failover status
866 #
867 # @none: no failover has ever happened
868 #
869 # @require: got failover requirement but not handled
870 #
871 # @active: in the process of doing failover
872 #
873 # @completed: finish the process of failover
874 #
875 # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
876 #
877 # Since: 2.8
878 ##
879 { 'enum': 'FailoverStatus',
880 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
881
882 ##
883 # @x-colo-lost-heartbeat:
884 #
885 # Tell qemu that heartbeat is lost, request it to do takeover procedures.
886 # If this command is sent to the PVM, the Primary side will exit COLO mode.
887 # If sent to the Secondary, the Secondary side will run failover work,
888 # then takes over server operation to become the service VM.
889 #
890 # Since: 2.8
891 #
892 # Example:
893 #
894 # -> { "execute": "x-colo-lost-heartbeat" }
895 # <- { "return": {} }
896 #
897 ##
898 { 'command': 'x-colo-lost-heartbeat' }
899
900 ##
901 # @migrate_cancel:
902 #
903 # Cancel the current executing migration process.
904 #
905 # Returns: nothing on success
906 #
907 # Notes: This command succeeds even if there is no migration process running.
908 #
909 # Since: 0.14.0
910 #
911 # Example:
912 #
913 # -> { "execute": "migrate_cancel" }
914 # <- { "return": {} }
915 #
916 ##
917 { 'command': 'migrate_cancel' }
918
919 ##
920 # @migrate-continue:
921 #
922 # Continue migration when it's in a paused state.
923 #
924 # @state: The state the migration is currently expected to be in
925 #
926 # Returns: nothing on success
927 # Since: 2.11
928 # Example:
929 #
930 # -> { "execute": "migrate-continue" , "arguments":
931 # { "state": "pre-switchover" } }
932 # <- { "return": {} }
933 ##
934 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
935
936 ##
937 # @migrate_set_downtime:
938 #
939 # Set maximum tolerated downtime for migration.
940 #
941 # @value: maximum downtime in seconds
942 #
943 # Returns: nothing on success
944 #
945 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
946 #
947 # Since: 0.14.0
948 #
949 # Example:
950 #
951 # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
952 # <- { "return": {} }
953 #
954 ##
955 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
956
957 ##
958 # @migrate_set_speed:
959 #
960 # Set maximum speed for migration.
961 #
962 # @value: maximum speed in bytes per second.
963 #
964 # Returns: nothing on success
965 #
966 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
967 #
968 # Since: 0.14.0
969 #
970 # Example:
971 #
972 # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
973 # <- { "return": {} }
974 #
975 ##
976 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
977
978 ##
979 # @migrate-set-cache-size:
980 #
981 # Set cache size to be used by XBZRLE migration
982 #
983 # @value: cache size in bytes
984 #
985 # The size will be rounded down to the nearest power of 2.
986 # The cache size can be modified before and during ongoing migration
987 #
988 # Returns: nothing on success
989 #
990 # Notes: This command is deprecated in favor of 'migrate-set-parameters'
991 #
992 # Since: 1.2
993 #
994 # Example:
995 #
996 # -> { "execute": "migrate-set-cache-size",
997 # "arguments": { "value": 536870912 } }
998 # <- { "return": {} }
999 #
1000 ##
1001 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1002
1003 ##
1004 # @query-migrate-cache-size:
1005 #
1006 # Query migration XBZRLE cache size
1007 #
1008 # Returns: XBZRLE cache size in bytes
1009 #
1010 # Notes: This command is deprecated in favor of 'query-migrate-parameters'
1011 #
1012 # Since: 1.2
1013 #
1014 # Example:
1015 #
1016 # -> { "execute": "query-migrate-cache-size" }
1017 # <- { "return": 67108864 }
1018 #
1019 ##
1020 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1021
1022 ##
1023 # @migrate:
1024 #
1025 # Migrates the current running guest to another Virtual Machine.
1026 #
1027 # @uri: the Uniform Resource Identifier of the destination VM
1028 #
1029 # @blk: do block migration (full disk copy)
1030 #
1031 # @inc: incremental disk copy migration
1032 #
1033 # @detach: this argument exists only for compatibility reasons and
1034 # is ignored by QEMU
1035 #
1036 # @resume: resume one paused migration, default "off". (since 2.13)
1037 #
1038 # Returns: nothing on success
1039 #
1040 # Since: 0.14.0
1041 #
1042 # Notes:
1043 #
1044 # 1. The 'query-migrate' command should be used to check migration's progress
1045 # and final result (this information is provided by the 'status' member)
1046 #
1047 # 2. All boolean arguments default to false
1048 #
1049 # 3. The user Monitor's "detach" argument is invalid in QMP and should not
1050 # be used
1051 #
1052 # Example:
1053 #
1054 # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1055 # <- { "return": {} }
1056 #
1057 ##
1058 { 'command': 'migrate',
1059 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1060 '*detach': 'bool', '*resume': 'bool' } }
1061
1062 ##
1063 # @migrate-incoming:
1064 #
1065 # Start an incoming migration, the qemu must have been started
1066 # with -incoming defer
1067 #
1068 # @uri: The Uniform Resource Identifier identifying the source or
1069 # address to listen on
1070 #
1071 # Returns: nothing on success
1072 #
1073 # Since: 2.3
1074 #
1075 # Notes:
1076 #
1077 # 1. It's a bad idea to use a string for the uri, but it needs to stay
1078 # compatible with -incoming and the format of the uri is already exposed
1079 # above libvirt.
1080 #
1081 # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1082 # be used.
1083 #
1084 # 3. The uri format is the same as for -incoming
1085 #
1086 # Example:
1087 #
1088 # -> { "execute": "migrate-incoming",
1089 # "arguments": { "uri": "tcp::4446" } }
1090 # <- { "return": {} }
1091 #
1092 ##
1093 { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1094
1095 ##
1096 # @xen-save-devices-state:
1097 #
1098 # Save the state of all devices to file. The RAM and the block devices
1099 # of the VM are not saved by this command.
1100 #
1101 # @filename: the file to save the state of the devices to as binary
1102 # data. See xen-save-devices-state.txt for a description of the binary
1103 # format.
1104 #
1105 # @live: Optional argument to ask QEMU to treat this command as part of a live
1106 # migration. Default to true. (since 2.11)
1107 #
1108 # Returns: Nothing on success
1109 #
1110 # Since: 1.1
1111 #
1112 # Example:
1113 #
1114 # -> { "execute": "xen-save-devices-state",
1115 # "arguments": { "filename": "/tmp/save" } }
1116 # <- { "return": {} }
1117 #
1118 ##
1119 { 'command': 'xen-save-devices-state',
1120 'data': {'filename': 'str', '*live':'bool' } }
1121
1122 ##
1123 # @xen-set-replication:
1124 #
1125 # Enable or disable replication.
1126 #
1127 # @enable: true to enable, false to disable.
1128 #
1129 # @primary: true for primary or false for secondary.
1130 #
1131 # @failover: true to do failover, false to stop. but cannot be
1132 # specified if 'enable' is true. default value is false.
1133 #
1134 # Returns: nothing.
1135 #
1136 # Example:
1137 #
1138 # -> { "execute": "xen-set-replication",
1139 # "arguments": {"enable": true, "primary": false} }
1140 # <- { "return": {} }
1141 #
1142 # Since: 2.9
1143 ##
1144 { 'command': 'xen-set-replication',
1145 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
1146
1147 ##
1148 # @ReplicationStatus:
1149 #
1150 # The result format for 'query-xen-replication-status'.
1151 #
1152 # @error: true if an error happened, false if replication is normal.
1153 #
1154 # @desc: the human readable error description string, when
1155 # @error is 'true'.
1156 #
1157 # Since: 2.9
1158 ##
1159 { 'struct': 'ReplicationStatus',
1160 'data': { 'error': 'bool', '*desc': 'str' } }
1161
1162 ##
1163 # @query-xen-replication-status:
1164 #
1165 # Query replication status while the vm is running.
1166 #
1167 # Returns: A @ReplicationResult object showing the status.
1168 #
1169 # Example:
1170 #
1171 # -> { "execute": "query-xen-replication-status" }
1172 # <- { "return": { "error": false } }
1173 #
1174 # Since: 2.9
1175 ##
1176 { 'command': 'query-xen-replication-status',
1177 'returns': 'ReplicationStatus' }
1178
1179 ##
1180 # @xen-colo-do-checkpoint:
1181 #
1182 # Xen uses this command to notify replication to trigger a checkpoint.
1183 #
1184 # Returns: nothing.
1185 #
1186 # Example:
1187 #
1188 # -> { "execute": "xen-colo-do-checkpoint" }
1189 # <- { "return": {} }
1190 #
1191 # Since: 2.9
1192 ##
1193 { 'command': 'xen-colo-do-checkpoint' }