]> Git Repo - qemu.git/blame - qapi/migration.json
migration: Add 'pause-before-switchover' capability
[qemu.git] / qapi / migration.json
CommitLineData
48685a8e
MA
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# @completed: migration is finished.
93#
94# @failed: some error occurred during migration process.
95#
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)
98#
99# Since: 2.3
100#
101##
102{ 'enum': 'MigrationStatus',
103 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
104 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
105
106##
107# @MigrationInfo:
108#
109# Information about current migration process.
110#
111# @status: @MigrationStatus describing the current migration status.
112# If this field is not returned, no migration process
113# has been initiated
114#
115# @ram: @MigrationStats containing detailed migration
116# status, only returned if status is 'active' or
117# 'completed'(since 1.2)
118#
119# @disk: @MigrationStats containing detailed disk migration
120# status, only returned if status is 'active' and it is a block
121# migration
122#
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)
126#
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)
130#
131# @downtime: only present when migration finishes correctly
132# total downtime in milliseconds for the guest.
133# (since 1.3)
134#
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)
138#
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)
144#
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)
148#
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)
152#
153# Since: 0.14.0
154##
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'} }
165
166##
167# @query-migrate:
168#
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.
173#
174# Returns: @MigrationInfo
175#
176# Since: 0.14.0
177#
178# Example:
179#
180# 1. Before the first migration
181#
182# -> { "execute": "query-migrate" }
183# <- { "return": {} }
184#
185# 2. Migration is done and has succeeded
186#
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# }
204#
205# 3. Migration is done and has failed
206#
207# -> { "execute": "query-migrate" }
208# <- { "return": { "status": "failed" } }
209#
210# 4. Migration is being performed and is not a block migration:
211#
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# }
230#
231# 5. Migration is being performed and is a block migration:
232#
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# }
256#
257# 6. Migration is being performed and XBZRLE is active:
258#
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# }
286#
287##
288{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
289
290##
291# @MigrationCapability:
292#
293# Migration capabilities enumeration
294#
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
298#
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)
302#
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)
308#
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 )
316#
317# @events: generate events for each migration state change
318# (since 2.4 )
319#
320# @auto-converge: If enabled, QEMU will automatically throttle down the guest
321# to speed up convergence of RAM migration. (since 1.6)
322#
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)
326#
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)
331#
332# @release-ram: if enabled, qemu will free the migrated ram pages on the source
333# during postcopy-ram migration. (since 2.9)
334#
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)
340#
341# @return-path: If enabled, migration will use the return path even
342# for precopy. (since 2.10)
343#
93fbd031
DDAG
344# @pause-before-switchover: Pause outgoing migration before serialising device
345# state and before disabling block IO (since 2.11)
346#
30126bbf
JQ
347# @x-multifd: Use more than one fd for migration (since 2.11)
348#
48685a8e
MA
349# Since: 1.2
350##
351{ 'enum': 'MigrationCapability',
352 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
353 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
93fbd031 354 'block', 'return-path', 'pause-before-switchover', 'x-multifd' ] }
48685a8e
MA
355
356##
357# @MigrationCapabilityStatus:
358#
359# Migration capability information
360#
361# @capability: capability enum
362#
363# @state: capability state bool
364#
365# Since: 1.2
366##
367{ 'struct': 'MigrationCapabilityStatus',
368 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
369
370##
371# @migrate-set-capabilities:
372#
373# Enable/Disable the following migration capabilities (like xbzrle)
374#
375# @capabilities: json array of capability modifications to make
376#
377# Since: 1.2
378#
379# Example:
380#
381# -> { "execute": "migrate-set-capabilities" , "arguments":
382# { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
383#
384##
385{ 'command': 'migrate-set-capabilities',
386 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
387
388##
389# @query-migrate-capabilities:
390#
391# Returns information about the current migration capabilities status
392#
393# Returns: @MigrationCapabilitiesStatus
394#
395# Since: 1.2
396#
397# Example:
398#
399# -> { "execute": "query-migrate-capabilities" }
400# <- { "return": [
401# {"state": false, "capability": "xbzrle"},
402# {"state": false, "capability": "rdma-pin-all"},
403# {"state": false, "capability": "auto-converge"},
404# {"state": false, "capability": "zero-blocks"},
405# {"state": false, "capability": "compress"},
406# {"state": true, "capability": "events"},
407# {"state": false, "capability": "postcopy-ram"},
408# {"state": false, "capability": "x-colo"}
409# ]}
410#
411##
412{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
413
414##
415# @MigrationParameter:
416#
417# Migration parameters enumeration
418#
419# @compress-level: Set the compression level to be used in live migration,
420# the compression level is an integer between 0 and 9, where 0 means
421# no compression, 1 means the best compression speed, and 9 means best
422# compression ratio which will consume more CPU.
423#
424# @compress-threads: Set compression thread count to be used in live migration,
425# the compression thread count is an integer between 1 and 255.
426#
427# @decompress-threads: Set decompression thread count to be used in live
428# migration, the decompression thread count is an integer between 1
429# and 255. Usually, decompression is at least 4 times as fast as
430# compression, so set the decompress-threads to the number about 1/4
431# of compress-threads is adequate.
432#
433# @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
434# when migration auto-converge is activated. The
435# default value is 20. (Since 2.7)
436#
437# @cpu-throttle-increment: throttle percentage increase each time
438# auto-converge detects that migration is not making
439# progress. The default value is 10. (Since 2.7)
440#
441# @tls-creds: ID of the 'tls-creds' object that provides credentials for
442# establishing a TLS connection over the migration data channel.
443# On the outgoing side of the migration, the credentials must
444# be for a 'client' endpoint, while for the incoming side the
445# credentials must be for a 'server' endpoint. Setting this
446# will enable TLS for all migrations. The default is unset,
447# resulting in unsecured migration at the QEMU level. (Since 2.7)
448#
449# @tls-hostname: hostname of the target host for the migration. This is
450# required when using x509 based TLS credentials and the
451# migration URI does not already include a hostname. For
452# example if using fd: or exec: based migration, the
453# hostname must be provided so that the server's x509
454# certificate identity can be validated. (Since 2.7)
455#
456# @max-bandwidth: to set maximum speed for migration. maximum speed in
457# bytes per second. (Since 2.8)
458#
459# @downtime-limit: set maximum tolerated downtime for migration. maximum
460# downtime in milliseconds (Since 2.8)
461#
462# @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
463# periodic mode. (Since 2.8)
464#
465# @block-incremental: Affects how much storage is migrated when the
466# block migration capability is enabled. When false, the entire
467# storage backing chain is migrated into a flattened image at
468# the destination; when true, only the active qcow2 layer is
469# migrated and the destination must already have access to the
470# same backing chain as was used on the source. (since 2.10)
471#
4075fb1c
JQ
472# @x-multifd-channels: Number of channels used to migrate data in
473# parallel. This is the same number that the
474# number of sockets used for migration. The
475# default value is 2 (since 2.11)
476#
0fb86605
JQ
477# @x-multifd-page-count: Number of pages sent together to a thread
478# The default value is 16 (since 2.11)
479#
48685a8e
MA
480# Since: 2.4
481##
482{ 'enum': 'MigrationParameter',
483 'data': ['compress-level', 'compress-threads', 'decompress-threads',
484 'cpu-throttle-initial', 'cpu-throttle-increment',
485 'tls-creds', 'tls-hostname', 'max-bandwidth',
4075fb1c 486 'downtime-limit', 'x-checkpoint-delay', 'block-incremental',
0fb86605 487 'x-multifd-channels', 'x-multifd-page-count' ] }
48685a8e
MA
488
489##
490# @MigrateSetParameters:
491#
492# @compress-level: compression level
493#
494# @compress-threads: compression thread count
495#
496# @decompress-threads: decompression thread count
497#
498# @cpu-throttle-initial: Initial percentage of time guest cpus are
499# throttled when migration auto-converge is activated.
500# The default value is 20. (Since 2.7)
501#
502# @cpu-throttle-increment: throttle percentage increase each time
503# auto-converge detects that migration is not making
504# progress. The default value is 10. (Since 2.7)
505#
506# @tls-creds: ID of the 'tls-creds' object that provides credentials
507# for establishing a TLS connection over the migration data
508# channel. On the outgoing side of the migration, the credentials
509# must be for a 'client' endpoint, while for the incoming side the
510# credentials must be for a 'server' endpoint. Setting this
511# to a non-empty string enables TLS for all migrations.
512# An empty string means that QEMU will use plain text mode for
513# migration, rather than TLS (Since 2.9)
514# Previously (since 2.7), this was reported by omitting
515# tls-creds instead.
516#
517# @tls-hostname: hostname of the target host for the migration. This
518# is required when using x509 based TLS credentials and the
519# migration URI does not already include a hostname. For
520# example if using fd: or exec: based migration, the
521# hostname must be provided so that the server's x509
522# certificate identity can be validated. (Since 2.7)
523# An empty string means that QEMU will use the hostname
524# associated with the migration URI, if any. (Since 2.9)
525# Previously (since 2.7), this was reported by omitting
526# tls-hostname instead.
527#
528# @max-bandwidth: to set maximum speed for migration. maximum speed in
529# bytes per second. (Since 2.8)
530#
531# @downtime-limit: set maximum tolerated downtime for migration. maximum
532# downtime in milliseconds (Since 2.8)
533#
534# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
535#
536# @block-incremental: Affects how much storage is migrated when the
537# block migration capability is enabled. When false, the entire
538# storage backing chain is migrated into a flattened image at
539# the destination; when true, only the active qcow2 layer is
540# migrated and the destination must already have access to the
541# same backing chain as was used on the source. (since 2.10)
542#
4075fb1c
JQ
543# @x-multifd-channels: Number of channels used to migrate data in
544# parallel. This is the same number that the
545# number of sockets used for migration. The
546# default value is 2 (since 2.11)
547#
0fb86605
JQ
548# @x-multifd-page-count: Number of pages sent together to a thread
549# The default value is 16 (since 2.11)
550#
48685a8e
MA
551# Since: 2.4
552##
553# TODO either fuse back into MigrationParameters, or make
554# MigrationParameters members mandatory
555{ 'struct': 'MigrateSetParameters',
556 'data': { '*compress-level': 'int',
557 '*compress-threads': 'int',
558 '*decompress-threads': 'int',
559 '*cpu-throttle-initial': 'int',
560 '*cpu-throttle-increment': 'int',
561 '*tls-creds': 'StrOrNull',
562 '*tls-hostname': 'StrOrNull',
563 '*max-bandwidth': 'int',
564 '*downtime-limit': 'int',
565 '*x-checkpoint-delay': 'int',
4075fb1c 566 '*block-incremental': 'bool',
0fb86605
JQ
567 '*x-multifd-channels': 'int',
568 '*x-multifd-page-count': 'int' } }
48685a8e
MA
569
570##
571# @migrate-set-parameters:
572#
573# Set various migration parameters.
574#
575# Since: 2.4
576#
577# Example:
578#
579# -> { "execute": "migrate-set-parameters" ,
580# "arguments": { "compress-level": 1 } }
581#
582##
583{ 'command': 'migrate-set-parameters', 'boxed': true,
584 'data': 'MigrateSetParameters' }
585
586##
587# @MigrationParameters:
588#
589# The optional members aren't actually optional.
590#
591# @compress-level: compression level
592#
593# @compress-threads: compression thread count
594#
595# @decompress-threads: decompression thread count
596#
597# @cpu-throttle-initial: Initial percentage of time guest cpus are
598# throttled when migration auto-converge is activated.
599# (Since 2.7)
600#
601# @cpu-throttle-increment: throttle percentage increase each time
602# auto-converge detects that migration is not making
603# progress. (Since 2.7)
604#
605# @tls-creds: ID of the 'tls-creds' object that provides credentials
606# for establishing a TLS connection over the migration data
607# channel. On the outgoing side of the migration, the credentials
608# must be for a 'client' endpoint, while for the incoming side the
609# credentials must be for a 'server' endpoint.
610# An empty string means that QEMU will use plain text mode for
611# migration, rather than TLS (Since 2.7)
612# Note: 2.8 reports this by omitting tls-creds instead.
613#
614# @tls-hostname: hostname of the target host for the migration. This
615# is required when using x509 based TLS credentials and the
616# migration URI does not already include a hostname. For
617# example if using fd: or exec: based migration, the
618# hostname must be provided so that the server's x509
619# certificate identity can be validated. (Since 2.7)
620# An empty string means that QEMU will use the hostname
621# associated with the migration URI, if any. (Since 2.9)
622# Note: 2.8 reports this by omitting tls-hostname instead.
623#
624# @max-bandwidth: to set maximum speed for migration. maximum speed in
625# bytes per second. (Since 2.8)
626#
627# @downtime-limit: set maximum tolerated downtime for migration. maximum
628# downtime in milliseconds (Since 2.8)
629#
630# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
631#
632# @block-incremental: Affects how much storage is migrated when the
633# block migration capability is enabled. When false, the entire
634# storage backing chain is migrated into a flattened image at
635# the destination; when true, only the active qcow2 layer is
636# migrated and the destination must already have access to the
637# same backing chain as was used on the source. (since 2.10)
638#
4075fb1c
JQ
639# @x-multifd-channels: Number of channels used to migrate data in
640# parallel. This is the same number that the
641# number of sockets used for migration.
642# The default value is 2 (since 2.11)
643#
0fb86605
JQ
644# @x-multifd-page-count: Number of pages sent together to a thread
645# The default value is 16 (since 2.11)
646#
48685a8e
MA
647# Since: 2.4
648##
649{ 'struct': 'MigrationParameters',
650 'data': { '*compress-level': 'int',
651 '*compress-threads': 'int',
652 '*decompress-threads': 'int',
653 '*cpu-throttle-initial': 'int',
654 '*cpu-throttle-increment': 'int',
655 '*tls-creds': 'str',
656 '*tls-hostname': 'str',
657 '*max-bandwidth': 'int',
658 '*downtime-limit': 'int',
659 '*x-checkpoint-delay': 'int',
4075fb1c 660 '*block-incremental': 'bool' ,
0fb86605
JQ
661 '*x-multifd-channels': 'int',
662 '*x-multifd-page-count': 'int' } }
48685a8e
MA
663
664##
665# @query-migrate-parameters:
666#
667# Returns information about the current migration parameters
668#
669# Returns: @MigrationParameters
670#
671# Since: 2.4
672#
673# Example:
674#
675# -> { "execute": "query-migrate-parameters" }
676# <- { "return": {
677# "decompress-threads": 2,
678# "cpu-throttle-increment": 10,
679# "compress-threads": 8,
680# "compress-level": 1,
681# "cpu-throttle-initial": 20,
682# "max-bandwidth": 33554432,
683# "downtime-limit": 300
684# }
685# }
686#
687##
688{ 'command': 'query-migrate-parameters',
689 'returns': 'MigrationParameters' }
690
691##
692# @client_migrate_info:
693#
694# Set migration information for remote display. This makes the server
695# ask the client to automatically reconnect using the new parameters
696# once migration finished successfully. Only implemented for SPICE.
697#
698# @protocol: must be "spice"
699# @hostname: migration target hostname
700# @port: spice tcp port for plaintext channels
701# @tls-port: spice tcp port for tls-secured channels
702# @cert-subject: server certificate subject
703#
704# Since: 0.14.0
705#
706# Example:
707#
708# -> { "execute": "client_migrate_info",
709# "arguments": { "protocol": "spice",
710# "hostname": "virt42.lab.kraxel.org",
711# "port": 1234 } }
712# <- { "return": {} }
713#
714##
715{ 'command': 'client_migrate_info',
716 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
717 '*tls-port': 'int', '*cert-subject': 'str' } }
718
719##
720# @migrate-start-postcopy:
721#
722# Followup to a migration command to switch the migration to postcopy mode.
723# The postcopy-ram capability must be set before the original migration
724# command.
725#
726# Since: 2.5
727#
728# Example:
729#
730# -> { "execute": "migrate-start-postcopy" }
731# <- { "return": {} }
732#
733##
734{ 'command': 'migrate-start-postcopy' }
735
736##
737# @MIGRATION:
738#
739# Emitted when a migration event happens
740#
741# @status: @MigrationStatus describing the current migration status.
742#
743# Since: 2.4
744#
745# Example:
746#
747# <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
748# "event": "MIGRATION",
749# "data": {"status": "completed"} }
750#
751##
752{ 'event': 'MIGRATION',
753 'data': {'status': 'MigrationStatus'}}
754
755##
756# @MIGRATION_PASS:
757#
758# Emitted from the source side of a migration at the start of each pass
759# (when it syncs the dirty bitmap)
760#
761# @pass: An incrementing count (starting at 1 on the first pass)
762#
763# Since: 2.6
764#
765# Example:
766#
767# { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
768# "event": "MIGRATION_PASS", "data": {"pass": 2} }
769#
770##
771{ 'event': 'MIGRATION_PASS',
772 'data': { 'pass': 'int' } }
773
774##
775# @COLOMessage:
776#
777# The message transmission between Primary side and Secondary side.
778#
779# @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
780#
781# @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
782#
783# @checkpoint-reply: SVM gets PVM's checkpoint request
784#
785# @vmstate-send: VM's state will be sent by PVM.
786#
787# @vmstate-size: The total size of VMstate.
788#
789# @vmstate-received: VM's state has been received by SVM.
790#
791# @vmstate-loaded: VM's state has been loaded by SVM.
792#
793# Since: 2.8
794##
795{ 'enum': 'COLOMessage',
796 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
797 'vmstate-send', 'vmstate-size', 'vmstate-received',
798 'vmstate-loaded' ] }
799
800##
801# @COLOMode:
802#
803# The colo mode
804#
805# @unknown: unknown mode
806#
807# @primary: master side
808#
809# @secondary: slave side
810#
811# Since: 2.8
812##
813{ 'enum': 'COLOMode',
814 'data': [ 'unknown', 'primary', 'secondary'] }
815
816##
817# @FailoverStatus:
818#
819# An enumeration of COLO failover status
820#
821# @none: no failover has ever happened
822#
823# @require: got failover requirement but not handled
824#
825# @active: in the process of doing failover
826#
827# @completed: finish the process of failover
828#
829# @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
830#
831# Since: 2.8
832##
833{ 'enum': 'FailoverStatus',
834 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
835
836##
837# @x-colo-lost-heartbeat:
838#
839# Tell qemu that heartbeat is lost, request it to do takeover procedures.
840# If this command is sent to the PVM, the Primary side will exit COLO mode.
841# If sent to the Secondary, the Secondary side will run failover work,
842# then takes over server operation to become the service VM.
843#
844# Since: 2.8
845#
846# Example:
847#
848# -> { "execute": "x-colo-lost-heartbeat" }
849# <- { "return": {} }
850#
851##
852{ 'command': 'x-colo-lost-heartbeat' }
853
854##
855# @migrate_cancel:
856#
857# Cancel the current executing migration process.
858#
859# Returns: nothing on success
860#
861# Notes: This command succeeds even if there is no migration process running.
862#
863# Since: 0.14.0
864#
865# Example:
866#
867# -> { "execute": "migrate_cancel" }
868# <- { "return": {} }
869#
870##
871{ 'command': 'migrate_cancel' }
872
873##
874# @migrate_set_downtime:
875#
876# Set maximum tolerated downtime for migration.
877#
878# @value: maximum downtime in seconds
879#
880# Returns: nothing on success
881#
882# Notes: This command is deprecated in favor of 'migrate-set-parameters'
883#
884# Since: 0.14.0
885#
886# Example:
887#
888# -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
889# <- { "return": {} }
890#
891##
892{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
893
894##
895# @migrate_set_speed:
896#
897# Set maximum speed for migration.
898#
899# @value: maximum speed in bytes per second.
900#
901# Returns: nothing on success
902#
903# Notes: This command is deprecated in favor of 'migrate-set-parameters'
904#
905# Since: 0.14.0
906#
907# Example:
908#
909# -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
910# <- { "return": {} }
911#
912##
913{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
914
915##
916# @migrate-set-cache-size:
917#
918# Set cache size to be used by XBZRLE migration
919#
920# @value: cache size in bytes
921#
922# The size will be rounded down to the nearest power of 2.
923# The cache size can be modified before and during ongoing migration
924#
925# Returns: nothing on success
926#
927# Since: 1.2
928#
929# Example:
930#
931# -> { "execute": "migrate-set-cache-size",
932# "arguments": { "value": 536870912 } }
933# <- { "return": {} }
934#
935##
936{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
937
938##
939# @query-migrate-cache-size:
940#
941# Query migration XBZRLE cache size
942#
943# Returns: XBZRLE cache size in bytes
944#
945# Since: 1.2
946#
947# Example:
948#
949# -> { "execute": "query-migrate-cache-size" }
950# <- { "return": 67108864 }
951#
952##
953{ 'command': 'query-migrate-cache-size', 'returns': 'int' }
954
955##
956# @migrate:
957#
958# Migrates the current running guest to another Virtual Machine.
959#
960# @uri: the Uniform Resource Identifier of the destination VM
961#
962# @blk: do block migration (full disk copy)
963#
964# @inc: incremental disk copy migration
965#
966# @detach: this argument exists only for compatibility reasons and
967# is ignored by QEMU
968#
969# Returns: nothing on success
970#
971# Since: 0.14.0
972#
973# Notes:
974#
975# 1. The 'query-migrate' command should be used to check migration's progress
976# and final result (this information is provided by the 'status' member)
977#
978# 2. All boolean arguments default to false
979#
980# 3. The user Monitor's "detach" argument is invalid in QMP and should not
981# be used
982#
983# Example:
984#
985# -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
986# <- { "return": {} }
987#
988##
989{ 'command': 'migrate',
990 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
991
992##
993# @migrate-incoming:
994#
995# Start an incoming migration, the qemu must have been started
996# with -incoming defer
997#
998# @uri: The Uniform Resource Identifier identifying the source or
999# address to listen on
1000#
1001# Returns: nothing on success
1002#
1003# Since: 2.3
1004#
1005# Notes:
1006#
1007# 1. It's a bad idea to use a string for the uri, but it needs to stay
1008# compatible with -incoming and the format of the uri is already exposed
1009# above libvirt.
1010#
1011# 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1012# be used.
1013#
1014# 3. The uri format is the same as for -incoming
1015#
1016# Example:
1017#
1018# -> { "execute": "migrate-incoming",
1019# "arguments": { "uri": "tcp::4446" } }
1020# <- { "return": {} }
1021#
1022##
1023{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1024
1025##
1026# @xen-save-devices-state:
1027#
1028# Save the state of all devices to file. The RAM and the block devices
1029# of the VM are not saved by this command.
1030#
1031# @filename: the file to save the state of the devices to as binary
1032# data. See xen-save-devices-state.txt for a description of the binary
1033# format.
1034#
1035# Returns: Nothing on success
1036#
1037# Since: 1.1
1038#
1039# Example:
1040#
1041# -> { "execute": "xen-save-devices-state",
1042# "arguments": { "filename": "/tmp/save" } }
1043# <- { "return": {} }
1044#
1045##
1046{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1047
1048##
1049# @xen-set-replication:
1050#
1051# Enable or disable replication.
1052#
1053# @enable: true to enable, false to disable.
1054#
1055# @primary: true for primary or false for secondary.
1056#
1057# @failover: true to do failover, false to stop. but cannot be
1058# specified if 'enable' is true. default value is false.
1059#
1060# Returns: nothing.
1061#
1062# Example:
1063#
1064# -> { "execute": "xen-set-replication",
1065# "arguments": {"enable": true, "primary": false} }
1066# <- { "return": {} }
1067#
1068# Since: 2.9
1069##
1070{ 'command': 'xen-set-replication',
1071 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
1072
1073##
1074# @ReplicationStatus:
1075#
1076# The result format for 'query-xen-replication-status'.
1077#
1078# @error: true if an error happened, false if replication is normal.
1079#
1080# @desc: the human readable error description string, when
1081# @error is 'true'.
1082#
1083# Since: 2.9
1084##
1085{ 'struct': 'ReplicationStatus',
1086 'data': { 'error': 'bool', '*desc': 'str' } }
1087
1088##
1089# @query-xen-replication-status:
1090#
1091# Query replication status while the vm is running.
1092#
1093# Returns: A @ReplicationResult object showing the status.
1094#
1095# Example:
1096#
1097# -> { "execute": "query-xen-replication-status" }
1098# <- { "return": { "error": false } }
1099#
1100# Since: 2.9
1101##
1102{ 'command': 'query-xen-replication-status',
1103 'returns': 'ReplicationStatus' }
1104
1105##
1106# @xen-colo-do-checkpoint:
1107#
1108# Xen uses this command to notify replication to trigger a checkpoint.
1109#
1110# Returns: nothing.
1111#
1112# Example:
1113#
1114# -> { "execute": "xen-colo-do-checkpoint" }
1115# <- { "return": {} }
1116#
1117# Since: 2.9
1118##
1119{ 'command': 'xen-colo-do-checkpoint' }
This page took 0.140157 seconds and 4 git commands to generate.