]> git.proxmox.com Git - mirror_qemu.git/blame - qapi/migration.json
QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX
[mirror_qemu.git] / qapi / migration.json
CommitLineData
48685a8e 1# -*- Mode: Python -*-
f7160f32 2# vim: filetype=python
48685a8e
MA
3#
4
5##
6# = Migration
7##
8
9{ 'include': 'common.json' }
9aca82ba 10{ 'include': 'sockets.json' }
48685a8e
MA
11
12##
13# @MigrationStats:
14#
15# Detailed migration status.
16#
17# @transferred: amount of bytes already transferred to the target VM
18#
19# @remaining: amount of bytes remaining to be transferred to the target VM
20#
21# @total: total amount of bytes involved in the migration process
22#
23# @duplicate: number of duplicate (zero) pages (since 1.2)
24#
25# @skipped: number of skipped zero pages (since 1.5)
26#
27# @normal: number of normal pages (since 1.2)
28#
29# @normal-bytes: number of normal bytes sent (since 1.2)
30#
31# @dirty-pages-rate: number of pages dirtied by second by the
26ec4e53 32# guest (since 1.3)
48685a8e
MA
33#
34# @mbps: throughput in megabits/sec. (since 1.6)
35#
36# @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
37#
38# @postcopy-requests: The number of page requests received from the destination
26ec4e53 39# (since 2.7)
48685a8e
MA
40#
41# @page-size: The number of bytes per page for the various page-based
26ec4e53 42# statistics (since 2.10)
48685a8e 43#
a61c45bd
JQ
44# @multifd-bytes: The number of bytes sent through multifd (since 3.0)
45#
aecbfe9c 46# @pages-per-second: the number of memory pages transferred per second
26ec4e53 47# (Since 4.0)
aecbfe9c 48#
ae680668
DE
49# @precopy-bytes: The number of bytes sent in the pre-copy phase
50# (since 7.0).
51#
52# @downtime-bytes: The number of bytes sent while the guest is paused
53# (since 7.0).
54#
55# @postcopy-bytes: The number of bytes sent during the post-copy phase
56# (since 7.0).
57#
9bc6e893 58# Since: 0.14
48685a8e
MA
59##
60{ 'struct': 'MigrationStats',
61 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
62 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
63 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
64 'mbps' : 'number', 'dirty-sync-count' : 'int',
a61c45bd 65 'postcopy-requests' : 'int', 'page-size' : 'int',
ae680668
DE
66 'multifd-bytes' : 'uint64', 'pages-per-second' : 'uint64',
67 'precopy-bytes' : 'uint64', 'downtime-bytes' : 'uint64',
68 'postcopy-bytes' : 'uint64' } }
48685a8e
MA
69
70##
71# @XBZRLECacheStats:
72#
73# Detailed XBZRLE migration cache statistics
74#
75# @cache-size: XBZRLE cache size
76#
77# @bytes: amount of bytes already transferred to the target VM
78#
79# @pages: amount of pages transferred to the target VM
80#
81# @cache-miss: number of cache miss
82#
83# @cache-miss-rate: rate of cache miss (since 2.1)
84#
e460a4b1
WW
85# @encoding-rate: rate of encoded bytes (since 5.1)
86#
48685a8e
MA
87# @overflow: number of overflows
88#
89# Since: 1.2
90##
91{ 'struct': 'XBZRLECacheStats',
8b9407a0 92 'data': {'cache-size': 'size', 'bytes': 'int', 'pages': 'int',
48685a8e 93 'cache-miss': 'int', 'cache-miss-rate': 'number',
e460a4b1 94 'encoding-rate': 'number', 'overflow': 'int' } }
48685a8e 95
76e03000
XG
96##
97# @CompressionStats:
98#
99# Detailed migration compression statistics
100#
101# @pages: amount of pages compressed and transferred to the target VM
102#
103# @busy: count of times that no free thread was available to compress data
104#
105# @busy-rate: rate of thread busy
106#
107# @compressed-size: amount of bytes after compression
108#
109# @compression-rate: rate of compressed size
110#
111# Since: 3.1
112##
113{ 'struct': 'CompressionStats',
114 'data': {'pages': 'int', 'busy': 'int', 'busy-rate': 'number',
dbb28bc8 115 'compressed-size': 'int', 'compression-rate': 'number' } }
76e03000 116
48685a8e
MA
117##
118# @MigrationStatus:
119#
120# An enumeration of migration status.
121#
122# @none: no migration has ever happened.
123#
124# @setup: migration process has been initiated.
125#
126# @cancelling: in the process of cancelling migration.
127#
128# @cancelled: cancelling migration is finished.
129#
130# @active: in the process of doing migration.
131#
132# @postcopy-active: like active, but now in postcopy mode. (since 2.5)
133#
51f63ec7 134# @postcopy-paused: during postcopy but paused. (since 3.0)
a688d2c1 135#
51f63ec7 136# @postcopy-recover: trying to recover from a paused postcopy. (since 3.0)
135b87b4 137#
48685a8e
MA
138# @completed: migration is finished.
139#
140# @failed: some error occurred during migration process.
141#
142# @colo: VM is in the process of fault tolerance, VM can not get into this
143# state unless colo capability is enabled for migration. (since 2.8)
144#
31e06077
DDAG
145# @pre-switchover: Paused before device serialisation. (since 2.11)
146#
147# @device: During device serialisation when pause-before-switchover is enabled
26ec4e53 148# (since 2.11)
31e06077 149#
c7e0acd5
JF
150# @wait-unplug: wait for device unplug request by guest OS to be completed.
151# (since 4.2)
152#
48685a8e
MA
153# Since: 2.3
154#
155##
156{ 'enum': 'MigrationStatus',
157 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
a688d2c1 158 'active', 'postcopy-active', 'postcopy-paused',
135b87b4 159 'postcopy-recover', 'completed', 'failed', 'colo',
c7e0acd5 160 'pre-switchover', 'device', 'wait-unplug' ] }
3710586c
KW
161##
162# @VfioStats:
163#
164# Detailed VFIO devices migration statistics
165#
166# @transferred: amount of bytes transferred to the target VM by VFIO devices
167#
168# Since: 5.2
169#
170##
171{ 'struct': 'VfioStats',
172 'data': {'transferred': 'int' } }
48685a8e
MA
173
174##
175# @MigrationInfo:
176#
177# Information about current migration process.
178#
179# @status: @MigrationStatus describing the current migration status.
180# If this field is not returned, no migration process
181# has been initiated
182#
183# @ram: @MigrationStats containing detailed migration
184# status, only returned if status is 'active' or
185# 'completed'(since 1.2)
186#
187# @disk: @MigrationStats containing detailed disk migration
188# status, only returned if status is 'active' and it is a block
189# migration
190#
191# @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
192# migration statistics, only returned if XBZRLE feature is on and
193# status is 'active' or 'completed' (since 1.2)
194#
195# @total-time: total amount of milliseconds since migration started.
26ec4e53
PM
196# If migration has ended, it returns the total migration
197# time. (since 1.2)
48685a8e
MA
198#
199# @downtime: only present when migration finishes correctly
26ec4e53
PM
200# total downtime in milliseconds for the guest.
201# (since 1.3)
48685a8e
MA
202#
203# @expected-downtime: only present while migration is active
26ec4e53
PM
204# expected downtime in milliseconds for the guest in last walk
205# of the dirty bitmap. (since 1.3)
48685a8e 206#
a660eed4
PM
207# @setup-time: amount of setup time in milliseconds *before* the
208# iterations begin but *after* the QMP command is issued. This is designed
26ec4e53
PM
209# to provide an accounting of any activities (such as RDMA pinning) which
210# may be expensive, but do not actually occur during the iterative
211# migration rounds themselves. (since 1.6)
48685a8e
MA
212#
213# @cpu-throttle-percentage: percentage of time guest cpus are being
26ec4e53
PM
214# throttled during auto-converge. This is only present when auto-converge
215# has started throttling guest cpus. (Since 2.7)
48685a8e
MA
216#
217# @error-desc: the human readable error description string, when
218# @status is 'failed'. Clients should not attempt to parse the
219# error strings. (Since 2.7)
65ace060
AP
220#
221# @postcopy-blocktime: total time when all vCPU were blocked during postcopy
26ec4e53
PM
222# live migration. This is only present when the postcopy-blocktime
223# migration capability is enabled. (Since 3.0)
65ace060 224#
5e50cae4 225# @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU. This is
26ec4e53
PM
226# only present when the postcopy-blocktime migration capability
227# is enabled. (Since 3.0)
65ace060 228#
76e03000 229# @compression: migration compression statistics, only returned if compression
26ec4e53 230# feature is on and status is 'active' or 'completed' (Since 3.1)
48685a8e 231#
9aca82ba
JQ
232# @socket-address: Only used for tcp, to know what the real port is (Since 4.0)
233#
3710586c
KW
234# @vfio: @VfioStats containing detailed VFIO devices migration statistics,
235# only returned if VFIO device is present, migration is supported by all
236# VFIO devices and status is 'active' or 'completed' (since 5.2)
237#
e11ce6c0
MA
238# @blocked-reasons: A list of reasons an outgoing migration is blocked.
239# Present and non-empty when migration is blocked.
240# (since 6.0)
241#
9bc6e893 242# Since: 0.14
48685a8e
MA
243##
244{ 'struct': 'MigrationInfo',
245 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
246 '*disk': 'MigrationStats',
3710586c 247 '*vfio': 'VfioStats',
48685a8e
MA
248 '*xbzrle-cache': 'XBZRLECacheStats',
249 '*total-time': 'int',
250 '*expected-downtime': 'int',
251 '*downtime': 'int',
252 '*setup-time': 'int',
253 '*cpu-throttle-percentage': 'int',
65ace060 254 '*error-desc': 'str',
3af8554b 255 '*blocked-reasons': ['str'],
65ace060 256 '*postcopy-blocktime' : 'uint32',
76e03000 257 '*postcopy-vcpu-blocktime': ['uint32'],
9aca82ba
JQ
258 '*compression': 'CompressionStats',
259 '*socket-address': ['SocketAddress'] } }
48685a8e
MA
260
261##
262# @query-migrate:
263#
264# Returns information about current migration process. If migration
265# is active there will be another json-object with RAM migration
266# status and if block migration is active another one with block
267# migration status.
268#
269# Returns: @MigrationInfo
270#
9bc6e893 271# Since: 0.14
48685a8e
MA
272#
273# Example:
274#
275# 1. Before the first migration
276#
277# -> { "execute": "query-migrate" }
278# <- { "return": {} }
279#
280# 2. Migration is done and has succeeded
281#
282# -> { "execute": "query-migrate" }
283# <- { "return": {
284# "status": "completed",
be1d2c49 285# "total-time":12345,
286# "setup-time":12345,
287# "downtime":12345,
48685a8e
MA
288# "ram":{
289# "transferred":123,
290# "remaining":123,
291# "total":246,
48685a8e
MA
292# "duplicate":123,
293# "normal":123,
294# "normal-bytes":123456,
295# "dirty-sync-count":15
296# }
297# }
298# }
299#
300# 3. Migration is done and has failed
301#
302# -> { "execute": "query-migrate" }
303# <- { "return": { "status": "failed" } }
304#
305# 4. Migration is being performed and is not a block migration:
306#
307# -> { "execute": "query-migrate" }
308# <- {
309# "return":{
310# "status":"active",
be1d2c49 311# "total-time":12345,
312# "setup-time":12345,
313# "expected-downtime":12345,
48685a8e
MA
314# "ram":{
315# "transferred":123,
316# "remaining":123,
317# "total":246,
48685a8e
MA
318# "duplicate":123,
319# "normal":123,
320# "normal-bytes":123456,
321# "dirty-sync-count":15
322# }
323# }
324# }
325#
326# 5. Migration is being performed and is a block migration:
327#
328# -> { "execute": "query-migrate" }
329# <- {
330# "return":{
331# "status":"active",
be1d2c49 332# "total-time":12345,
333# "setup-time":12345,
334# "expected-downtime":12345,
48685a8e
MA
335# "ram":{
336# "total":1057024,
337# "remaining":1053304,
338# "transferred":3720,
48685a8e
MA
339# "duplicate":123,
340# "normal":123,
341# "normal-bytes":123456,
342# "dirty-sync-count":15
343# },
344# "disk":{
345# "total":20971520,
346# "remaining":20880384,
347# "transferred":91136
348# }
349# }
350# }
351#
352# 6. Migration is being performed and XBZRLE is active:
353#
354# -> { "execute": "query-migrate" }
355# <- {
356# "return":{
357# "status":"active",
be1d2c49 358# "total-time":12345,
359# "setup-time":12345,
360# "expected-downtime":12345,
48685a8e
MA
361# "ram":{
362# "total":1057024,
363# "remaining":1053304,
364# "transferred":3720,
48685a8e
MA
365# "duplicate":10,
366# "normal":3333,
367# "normal-bytes":3412992,
368# "dirty-sync-count":15
369# },
370# "xbzrle-cache":{
371# "cache-size":67108864,
372# "bytes":20971520,
373# "pages":2444343,
374# "cache-miss":2244,
375# "cache-miss-rate":0.123,
e460a4b1 376# "encoding-rate":80.1,
48685a8e
MA
377# "overflow":34434
378# }
379# }
380# }
381#
382##
383{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
384
385##
386# @MigrationCapability:
387#
388# Migration capabilities enumeration
389#
390# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
391# This feature allows us to minimize migration traffic for certain work
392# loads, by sending compressed difference of the pages
393#
394# @rdma-pin-all: Controls whether or not the entire VM memory footprint is
26ec4e53
PM
395# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
396# Disabled by default. (since 2.0)
48685a8e
MA
397#
398# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
26ec4e53
PM
399# essentially saves 1MB of zeroes per block on the wire. Enabling requires
400# source and target VM to support this feature. To enable it is sufficient
401# to enable the capability on the source VM. The feature is disabled by
402# default. (since 1.6)
48685a8e
MA
403#
404# @compress: Use multiple compression threads to accelerate live migration.
26ec4e53
PM
405# This feature can help to reduce the migration traffic, by sending
406# compressed pages. Please note that if compress and xbzrle are both
407# on, compress only takes effect in the ram bulk stage, after that,
408# it will be disabled and only xbzrle takes effect, this can help to
409# minimize migration traffic. The feature is disabled by default.
410# (since 2.4 )
48685a8e
MA
411#
412# @events: generate events for each migration state change
413# (since 2.4 )
414#
415# @auto-converge: If enabled, QEMU will automatically throttle down the guest
26ec4e53 416# to speed up convergence of RAM migration. (since 1.6)
48685a8e
MA
417#
418# @postcopy-ram: Start executing on the migration target before all of RAM has
26ec4e53
PM
419# been migrated, pulling the remaining pages along as needed. The
420# capacity must have the same setting on both source and target
421# or migration will not even start. NOTE: If the migration fails during
422# postcopy the VM will fail. (since 2.6)
48685a8e
MA
423#
424# @x-colo: If enabled, migration will never end, and the state of the VM on the
26ec4e53
PM
425# primary side will be migrated continuously to the VM on secondary
426# side, this process is called COarse-Grain LOck Stepping (COLO) for
427# Non-stop Service. (since 2.8)
48685a8e
MA
428#
429# @release-ram: if enabled, qemu will free the migrated ram pages on the source
26ec4e53 430# during postcopy-ram migration. (since 2.9)
48685a8e
MA
431#
432# @block: If enabled, QEMU will also migrate the contents of all block
26ec4e53
PM
433# devices. Default is disabled. A possible alternative uses
434# mirror jobs to a builtin NBD server on the destination, which
435# offers more flexibility.
436# (Since 2.10)
48685a8e
MA
437#
438# @return-path: If enabled, migration will use the return path even
439# for precopy. (since 2.10)
440#
93fbd031 441# @pause-before-switchover: Pause outgoing migration before serialising device
26ec4e53 442# state and before disabling block IO (since 2.11)
93fbd031 443#
cbfd6c95 444# @multifd: Use more than one fd for migration (since 4.0)
30126bbf 445#
55efc8c2
VSO
446# @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps.
447# (since 2.12)
448#
f22f928e 449# @postcopy-blocktime: Calculate downtime for postcopy live migration
26ec4e53 450# (since 3.0)
f22f928e 451#
0f073f44 452# @late-block-activate: If enabled, the destination will not activate block
26ec4e53
PM
453# devices (and thus take locks) immediately at the end of migration.
454# (since 3.0)
0f073f44 455#
18269069
YK
456# @x-ignore-shared: If enabled, QEMU will not migrate shared memory (since 4.0)
457#
b9d68df6
YK
458# @validate-uuid: Send the UUID of the source to allow the destination
459# to ensure it is the same. (since 4.2)
460#
6e8c25b4
AG
461# @background-snapshot: If enabled, the migration stream will be a snapshot
462# of the VM exactly at the point when the migration
463# procedure starts. The VM RAM is saved with running VM.
464# (since 6.0)
465#
9fb49daa
MA
466# Features:
467# @unstable: Members @x-colo and @x-ignore-shared are experimental.
468#
48685a8e
MA
469# Since: 1.2
470##
471{ 'enum': 'MigrationCapability',
472 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
9fb49daa
MA
473 'compress', 'events', 'postcopy-ram',
474 { 'name': 'x-colo', 'features': [ 'unstable' ] },
475 'release-ram',
cbfd6c95 476 'block', 'return-path', 'pause-before-switchover', 'multifd',
18269069 477 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate',
9fb49daa
MA
478 { 'name': 'x-ignore-shared', 'features': [ 'unstable' ] },
479 'validate-uuid', 'background-snapshot'] }
48685a8e
MA
480
481##
482# @MigrationCapabilityStatus:
483#
484# Migration capability information
485#
486# @capability: capability enum
487#
488# @state: capability state bool
489#
490# Since: 1.2
491##
492{ 'struct': 'MigrationCapabilityStatus',
493 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
494
495##
496# @migrate-set-capabilities:
497#
498# Enable/Disable the following migration capabilities (like xbzrle)
499#
500# @capabilities: json array of capability modifications to make
501#
502# Since: 1.2
503#
504# Example:
505#
506# -> { "execute": "migrate-set-capabilities" , "arguments":
507# { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
508#
509##
510{ 'command': 'migrate-set-capabilities',
511 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
512
513##
514# @query-migrate-capabilities:
515#
516# Returns information about the current migration capabilities status
517#
518# Returns: @MigrationCapabilitiesStatus
519#
520# Since: 1.2
521#
522# Example:
523#
524# -> { "execute": "query-migrate-capabilities" }
525# <- { "return": [
526# {"state": false, "capability": "xbzrle"},
527# {"state": false, "capability": "rdma-pin-all"},
528# {"state": false, "capability": "auto-converge"},
529# {"state": false, "capability": "zero-blocks"},
530# {"state": false, "capability": "compress"},
531# {"state": true, "capability": "events"},
532# {"state": false, "capability": "postcopy-ram"},
533# {"state": false, "capability": "x-colo"}
534# ]}
535#
536##
537{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
538
96eef042
JQ
539##
540# @MultiFDCompression:
541#
542# An enumeration of multifd compression methods.
543#
544# @none: no compression.
7ec2c2b3 545# @zlib: use zlib compression method.
87dc6f5f 546# @zstd: use zstd compression method.
96eef042
JQ
547#
548# Since: 5.0
549#
550##
551{ 'enum': 'MultiFDCompression',
87dc6f5f 552 'data': [ 'none', 'zlib',
8a9f1e1d 553 { 'name': 'zstd', 'if': 'CONFIG_ZSTD' } ] }
96eef042 554
6e9f21a2
PK
555##
556# @BitmapMigrationBitmapAliasTransform:
557#
558# @persistent: If present, the bitmap will be made persistent
559# or transient depending on this parameter.
560#
561# Since: 6.0
562##
563{ 'struct': 'BitmapMigrationBitmapAliasTransform',
564 'data': {
565 '*persistent': 'bool'
566 } }
567
31e4c354
HR
568##
569# @BitmapMigrationBitmapAlias:
570#
571# @name: The name of the bitmap.
572#
573# @alias: An alias name for migration (for example the bitmap name on
574# the opposite site).
575#
6e9f21a2
PK
576# @transform: Allows the modification of the migrated bitmap.
577# (since 6.0)
578#
31e4c354
HR
579# Since: 5.2
580##
581{ 'struct': 'BitmapMigrationBitmapAlias',
582 'data': {
583 'name': 'str',
6e9f21a2
PK
584 'alias': 'str',
585 '*transform': 'BitmapMigrationBitmapAliasTransform'
31e4c354
HR
586 } }
587
588##
589# @BitmapMigrationNodeAlias:
590#
591# Maps a block node name and the bitmaps it has to aliases for dirty
592# bitmap migration.
593#
594# @node-name: A block node name.
595#
596# @alias: An alias block node name for migration (for example the
597# node name on the opposite site).
598#
599# @bitmaps: Mappings for the bitmaps on this node.
600#
601# Since: 5.2
602##
603{ 'struct': 'BitmapMigrationNodeAlias',
604 'data': {
605 'node-name': 'str',
606 'alias': 'str',
607 'bitmaps': [ 'BitmapMigrationBitmapAlias' ]
608 } }
609
48685a8e
MA
610##
611# @MigrationParameter:
612#
613# Migration parameters enumeration
614#
ee3d96ba 615# @announce-initial: Initial delay (in milliseconds) before sending the first
26ec4e53 616# announce (Since 4.0)
ee3d96ba
DDAG
617#
618# @announce-max: Maximum delay (in milliseconds) between packets in the
26ec4e53 619# announcement (Since 4.0)
ee3d96ba
DDAG
620#
621# @announce-rounds: Number of self-announce packets sent after migration
26ec4e53 622# (Since 4.0)
ee3d96ba
DDAG
623#
624# @announce-step: Increase in delay (in milliseconds) between subsequent
26ec4e53 625# packets in the announcement (Since 4.0)
ee3d96ba 626#
48685a8e 627# @compress-level: Set the compression level to be used in live migration,
26ec4e53
PM
628# the compression level is an integer between 0 and 9, where 0 means
629# no compression, 1 means the best compression speed, and 9 means best
630# compression ratio which will consume more CPU.
48685a8e
MA
631#
632# @compress-threads: Set compression thread count to be used in live migration,
26ec4e53 633# the compression thread count is an integer between 1 and 255.
48685a8e 634#
1d58872a
XG
635# @compress-wait-thread: Controls behavior when all compression threads are
636# currently busy. If true (default), wait for a free
637# compression thread to become available; otherwise,
638# send the page uncompressed. (Since 3.1)
639#
48685a8e 640# @decompress-threads: Set decompression thread count to be used in live
26ec4e53
PM
641# migration, the decompression thread count is an integer between 1
642# and 255. Usually, decompression is at least 4 times as fast as
643# compression, so set the decompress-threads to the number about 1/4
644# of compress-threads is adequate.
48685a8e 645#
dc14a470
KZ
646# @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
647# to trigger throttling. It is expressed as percentage.
648# The default value is 50. (Since 5.0)
649#
48685a8e
MA
650# @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
651# when migration auto-converge is activated. The
652# default value is 20. (Since 2.7)
653#
654# @cpu-throttle-increment: throttle percentage increase each time
655# auto-converge detects that migration is not making
656# progress. The default value is 10. (Since 2.7)
657#
cbbf8182
KZ
658# @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
659# At the tail stage of throttling, the Guest is very
660# sensitive to CPU percentage while the @cpu-throttle
661# -increment is excessive usually at tail stage.
662# If this parameter is true, we will compute the ideal
663# CPU percentage used by the Guest, which may exactly make
664# the dirty rate match the dirty rate threshold. Then we
665# will choose a smaller throttle increment between the
666# one specified by @cpu-throttle-increment and the one
667# generated by ideal CPU percentage.
668# Therefore, it is compatible to traditional throttling,
669# meanwhile the throttle increment won't be excessive
670# at tail stage.
671# The default value is false. (Since 5.1)
672#
48685a8e
MA
673# @tls-creds: ID of the 'tls-creds' object that provides credentials for
674# establishing a TLS connection over the migration data channel.
675# On the outgoing side of the migration, the credentials must
676# be for a 'client' endpoint, while for the incoming side the
677# credentials must be for a 'server' endpoint. Setting this
678# will enable TLS for all migrations. The default is unset,
679# resulting in unsecured migration at the QEMU level. (Since 2.7)
680#
681# @tls-hostname: hostname of the target host for the migration. This is
682# required when using x509 based TLS credentials and the
683# migration URI does not already include a hostname. For
684# example if using fd: or exec: based migration, the
685# hostname must be provided so that the server's x509
686# certificate identity can be validated. (Since 2.7)
687#
d2f1d29b
DB
688# @tls-authz: ID of the 'authz' object subclass that provides access control
689# checking of the TLS x509 certificate distinguished name.
690# This object is only resolved at time of use, so can be deleted
691# and recreated on the fly while the migration server is active.
692# If missing, it will default to denying access (Since 4.0)
693#
48685a8e
MA
694# @max-bandwidth: to set maximum speed for migration. maximum speed in
695# bytes per second. (Since 2.8)
696#
697# @downtime-limit: set maximum tolerated downtime for migration. maximum
698# downtime in milliseconds (Since 2.8)
699#
700# @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
26ec4e53 701# periodic mode. (Since 2.8)
48685a8e
MA
702#
703# @block-incremental: Affects how much storage is migrated when the
26ec4e53
PM
704# block migration capability is enabled. When false, the entire
705# storage backing chain is migrated into a flattened image at
706# the destination; when true, only the active qcow2 layer is
707# migrated and the destination must already have access to the
708# same backing chain as was used on the source. (since 2.10)
48685a8e 709#
cbfd6c95
JQ
710# @multifd-channels: Number of channels used to migrate data in
711# parallel. This is the same number that the
712# number of sockets used for migration. The
713# default value is 2 (since 4.0)
4075fb1c 714#
73af8dd8
JQ
715# @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
716# needs to be a multiple of the target page size
717# and a power of 2
718# (Since 2.11)
719#
7e555c6c 720# @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
26ec4e53
PM
721# Defaults to 0 (unlimited). In bytes per second.
722# (Since 3.0)
4cbc9c7f
LQ
723#
724# @max-cpu-throttle: maximum cpu throttle percentage.
725# Defaults to 99. (Since 3.1)
ee3d96ba 726#
96eef042
JQ
727# @multifd-compression: Which compression method to use.
728# Defaults to none. (Since 5.0)
729#
9004db48 730# @multifd-zlib-level: Set the compression level to be used in live
76dd0f84
PM
731# migration, the compression level is an integer between 0
732# and 9, where 0 means no compression, 1 means the best
733# compression speed, and 9 means best compression ratio which
734# will consume more CPU.
735# Defaults to 1. (Since 5.0)
9004db48 736#
6a9ad154 737# @multifd-zstd-level: Set the compression level to be used in live
76dd0f84
PM
738# migration, the compression level is an integer between 0
739# and 20, where 0 means no compression, 1 means the best
740# compression speed, and 20 means best compression ratio which
741# will consume more CPU.
742# Defaults to 1. (Since 5.0)
6a9ad154 743#
31e4c354 744# @block-bitmap-mapping: Maps block nodes and bitmaps on them to
826bd069
PM
745# aliases for the purpose of dirty bitmap migration. Such
746# aliases may for example be the corresponding names on the
747# opposite site.
748# The mapping must be one-to-one, but not necessarily
749# complete: On the source, unmapped bitmaps and all bitmaps
750# on unmapped nodes will be ignored. On the destination,
751# encountering an unmapped alias in the incoming migration
752# stream will result in a report, and all further bitmap
753# migration data will then be discarded.
754# Note that the destination does not know about bitmaps it
755# does not receive, so there is no limitation or requirement
756# regarding the number of bitmaps received, or how they are
757# named, or on which nodes they are placed.
758# By default (when this parameter has never been set), bitmap
759# names are mapped to themselves. Nodes are mapped to their
760# block device name if there is one, and to their node name
761# otherwise. (Since 5.2)
31e4c354 762#
9fb49daa
MA
763# Features:
764# @unstable: Member @x-checkpoint-delay is experimental.
765#
48685a8e
MA
766# Since: 2.4
767##
768{ 'enum': 'MigrationParameter',
ee3d96ba
DDAG
769 'data': ['announce-initial', 'announce-max',
770 'announce-rounds', 'announce-step',
771 'compress-level', 'compress-threads', 'decompress-threads',
dc14a470 772 'compress-wait-thread', 'throttle-trigger-threshold',
48685a8e 773 'cpu-throttle-initial', 'cpu-throttle-increment',
cbbf8182 774 'cpu-throttle-tailslow',
d2f1d29b 775 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth',
9fb49daa
MA
776 'downtime-limit',
777 { 'name': 'x-checkpoint-delay', 'features': [ 'unstable' ] },
778 'block-incremental',
cbfd6c95 779 'multifd-channels',
4cbc9c7f 780 'xbzrle-cache-size', 'max-postcopy-bandwidth',
9004db48 781 'max-cpu-throttle', 'multifd-compression',
31e4c354
HR
782 'multifd-zlib-level' ,'multifd-zstd-level',
783 'block-bitmap-mapping' ] }
48685a8e
MA
784
785##
786# @MigrateSetParameters:
787#
ee3d96ba 788# @announce-initial: Initial delay (in milliseconds) before sending the first
26ec4e53 789# announce (Since 4.0)
ee3d96ba
DDAG
790#
791# @announce-max: Maximum delay (in milliseconds) between packets in the
26ec4e53 792# announcement (Since 4.0)
ee3d96ba
DDAG
793#
794# @announce-rounds: Number of self-announce packets sent after migration
26ec4e53 795# (Since 4.0)
ee3d96ba
DDAG
796#
797# @announce-step: Increase in delay (in milliseconds) between subsequent
26ec4e53 798# packets in the announcement (Since 4.0)
ee3d96ba 799#
48685a8e
MA
800# @compress-level: compression level
801#
802# @compress-threads: compression thread count
803#
1d58872a
XG
804# @compress-wait-thread: Controls behavior when all compression threads are
805# currently busy. If true (default), wait for a free
806# compression thread to become available; otherwise,
807# send the page uncompressed. (Since 3.1)
808#
48685a8e
MA
809# @decompress-threads: decompression thread count
810#
dc14a470
KZ
811# @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
812# to trigger throttling. It is expressed as percentage.
813# The default value is 50. (Since 5.0)
814#
48685a8e
MA
815# @cpu-throttle-initial: Initial percentage of time guest cpus are
816# throttled when migration auto-converge is activated.
817# The default value is 20. (Since 2.7)
818#
819# @cpu-throttle-increment: throttle percentage increase each time
820# auto-converge detects that migration is not making
821# progress. The default value is 10. (Since 2.7)
822#
cbbf8182
KZ
823# @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
824# At the tail stage of throttling, the Guest is very
825# sensitive to CPU percentage while the @cpu-throttle
826# -increment is excessive usually at tail stage.
827# If this parameter is true, we will compute the ideal
828# CPU percentage used by the Guest, which may exactly make
829# the dirty rate match the dirty rate threshold. Then we
830# will choose a smaller throttle increment between the
831# one specified by @cpu-throttle-increment and the one
832# generated by ideal CPU percentage.
833# Therefore, it is compatible to traditional throttling,
834# meanwhile the throttle increment won't be excessive
835# at tail stage.
836# The default value is false. (Since 5.1)
837#
48685a8e
MA
838# @tls-creds: ID of the 'tls-creds' object that provides credentials
839# for establishing a TLS connection over the migration data
840# channel. On the outgoing side of the migration, the credentials
841# must be for a 'client' endpoint, while for the incoming side the
842# credentials must be for a 'server' endpoint. Setting this
843# to a non-empty string enables TLS for all migrations.
844# An empty string means that QEMU will use plain text mode for
845# migration, rather than TLS (Since 2.9)
846# Previously (since 2.7), this was reported by omitting
847# tls-creds instead.
848#
849# @tls-hostname: hostname of the target host for the migration. This
850# is required when using x509 based TLS credentials and the
851# migration URI does not already include a hostname. For
852# example if using fd: or exec: based migration, the
853# hostname must be provided so that the server's x509
854# certificate identity can be validated. (Since 2.7)
855# An empty string means that QEMU will use the hostname
856# associated with the migration URI, if any. (Since 2.9)
857# Previously (since 2.7), this was reported by omitting
858# tls-hostname instead.
859#
860# @max-bandwidth: to set maximum speed for migration. maximum speed in
861# bytes per second. (Since 2.8)
862#
863# @downtime-limit: set maximum tolerated downtime for migration. maximum
864# downtime in milliseconds (Since 2.8)
865#
866# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
867#
868# @block-incremental: Affects how much storage is migrated when the
26ec4e53
PM
869# block migration capability is enabled. When false, the entire
870# storage backing chain is migrated into a flattened image at
871# the destination; when true, only the active qcow2 layer is
872# migrated and the destination must already have access to the
873# same backing chain as was used on the source. (since 2.10)
48685a8e 874#
cbfd6c95
JQ
875# @multifd-channels: Number of channels used to migrate data in
876# parallel. This is the same number that the
877# number of sockets used for migration. The
878# default value is 2 (since 4.0)
4075fb1c 879#
73af8dd8
JQ
880# @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
881# needs to be a multiple of the target page size
882# and a power of 2
883# (Since 2.11)
7e555c6c
DDAG
884#
885# @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
26ec4e53
PM
886# Defaults to 0 (unlimited). In bytes per second.
887# (Since 3.0)
4cbc9c7f
LQ
888#
889# @max-cpu-throttle: maximum cpu throttle percentage.
890# The default value is 99. (Since 3.1)
891#
96eef042
JQ
892# @multifd-compression: Which compression method to use.
893# Defaults to none. (Since 5.0)
894#
9004db48 895# @multifd-zlib-level: Set the compression level to be used in live
76dd0f84
PM
896# migration, the compression level is an integer between 0
897# and 9, where 0 means no compression, 1 means the best
898# compression speed, and 9 means best compression ratio which
899# will consume more CPU.
900# Defaults to 1. (Since 5.0)
9004db48 901#
6a9ad154 902# @multifd-zstd-level: Set the compression level to be used in live
76dd0f84
PM
903# migration, the compression level is an integer between 0
904# and 20, where 0 means no compression, 1 means the best
905# compression speed, and 20 means best compression ratio which
906# will consume more CPU.
907# Defaults to 1. (Since 5.0)
6a9ad154 908#
31e4c354 909# @block-bitmap-mapping: Maps block nodes and bitmaps on them to
826bd069
PM
910# aliases for the purpose of dirty bitmap migration. Such
911# aliases may for example be the corresponding names on the
912# opposite site.
913# The mapping must be one-to-one, but not necessarily
914# complete: On the source, unmapped bitmaps and all bitmaps
915# on unmapped nodes will be ignored. On the destination,
916# encountering an unmapped alias in the incoming migration
917# stream will result in a report, and all further bitmap
918# migration data will then be discarded.
919# Note that the destination does not know about bitmaps it
920# does not receive, so there is no limitation or requirement
921# regarding the number of bitmaps received, or how they are
922# named, or on which nodes they are placed.
923# By default (when this parameter has never been set), bitmap
924# names are mapped to themselves. Nodes are mapped to their
925# block device name if there is one, and to their node name
926# otherwise. (Since 5.2)
31e4c354 927#
9fb49daa
MA
928# Features:
929# @unstable: Member @x-checkpoint-delay is experimental.
930#
48685a8e
MA
931# Since: 2.4
932##
933# TODO either fuse back into MigrationParameters, or make
934# MigrationParameters members mandatory
935{ 'struct': 'MigrateSetParameters',
ee3d96ba
DDAG
936 'data': { '*announce-initial': 'size',
937 '*announce-max': 'size',
938 '*announce-rounds': 'size',
939 '*announce-step': 'size',
ec17de0a
MA
940 '*compress-level': 'uint8',
941 '*compress-threads': 'uint8',
1d58872a 942 '*compress-wait-thread': 'bool',
ec17de0a
MA
943 '*decompress-threads': 'uint8',
944 '*throttle-trigger-threshold': 'uint8',
945 '*cpu-throttle-initial': 'uint8',
946 '*cpu-throttle-increment': 'uint8',
cbbf8182 947 '*cpu-throttle-tailslow': 'bool',
48685a8e
MA
948 '*tls-creds': 'StrOrNull',
949 '*tls-hostname': 'StrOrNull',
d2f1d29b 950 '*tls-authz': 'StrOrNull',
ec17de0a
MA
951 '*max-bandwidth': 'size',
952 '*downtime-limit': 'uint64',
9fb49daa
MA
953 '*x-checkpoint-delay': { 'type': 'uint32',
954 'features': [ 'unstable' ] },
4075fb1c 955 '*block-incremental': 'bool',
ec17de0a 956 '*multifd-channels': 'uint8',
7e555c6c 957 '*xbzrle-cache-size': 'size',
4cbc9c7f 958 '*max-postcopy-bandwidth': 'size',
ec17de0a 959 '*max-cpu-throttle': 'uint8',
9004db48 960 '*multifd-compression': 'MultiFDCompression',
ec17de0a
MA
961 '*multifd-zlib-level': 'uint8',
962 '*multifd-zstd-level': 'uint8',
31e4c354 963 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ] } }
48685a8e
MA
964
965##
966# @migrate-set-parameters:
967#
968# Set various migration parameters.
969#
970# Since: 2.4
971#
972# Example:
973#
974# -> { "execute": "migrate-set-parameters" ,
975# "arguments": { "compress-level": 1 } }
976#
977##
978{ 'command': 'migrate-set-parameters', 'boxed': true,
979 'data': 'MigrateSetParameters' }
980
981##
982# @MigrationParameters:
983#
984# The optional members aren't actually optional.
985#
ee3d96ba 986# @announce-initial: Initial delay (in milliseconds) before sending the
26ec4e53 987# first announce (Since 4.0)
ee3d96ba
DDAG
988#
989# @announce-max: Maximum delay (in milliseconds) between packets in the
26ec4e53 990# announcement (Since 4.0)
ee3d96ba
DDAG
991#
992# @announce-rounds: Number of self-announce packets sent after migration
26ec4e53 993# (Since 4.0)
ee3d96ba
DDAG
994#
995# @announce-step: Increase in delay (in milliseconds) between subsequent
26ec4e53 996# packets in the announcement (Since 4.0)
ee3d96ba 997#
48685a8e
MA
998# @compress-level: compression level
999#
1000# @compress-threads: compression thread count
1001#
1d58872a
XG
1002# @compress-wait-thread: Controls behavior when all compression threads are
1003# currently busy. If true (default), wait for a free
1004# compression thread to become available; otherwise,
1005# send the page uncompressed. (Since 3.1)
1006#
48685a8e
MA
1007# @decompress-threads: decompression thread count
1008#
dc14a470
KZ
1009# @throttle-trigger-threshold: The ratio of bytes_dirty_period and bytes_xfer_period
1010# to trigger throttling. It is expressed as percentage.
1011# The default value is 50. (Since 5.0)
1012#
48685a8e
MA
1013# @cpu-throttle-initial: Initial percentage of time guest cpus are
1014# throttled when migration auto-converge is activated.
1015# (Since 2.7)
1016#
1017# @cpu-throttle-increment: throttle percentage increase each time
1018# auto-converge detects that migration is not making
1019# progress. (Since 2.7)
1020#
cbbf8182
KZ
1021# @cpu-throttle-tailslow: Make CPU throttling slower at tail stage
1022# At the tail stage of throttling, the Guest is very
1023# sensitive to CPU percentage while the @cpu-throttle
1024# -increment is excessive usually at tail stage.
1025# If this parameter is true, we will compute the ideal
1026# CPU percentage used by the Guest, which may exactly make
1027# the dirty rate match the dirty rate threshold. Then we
1028# will choose a smaller throttle increment between the
1029# one specified by @cpu-throttle-increment and the one
1030# generated by ideal CPU percentage.
1031# Therefore, it is compatible to traditional throttling,
1032# meanwhile the throttle increment won't be excessive
1033# at tail stage.
1034# The default value is false. (Since 5.1)
1035#
48685a8e
MA
1036# @tls-creds: ID of the 'tls-creds' object that provides credentials
1037# for establishing a TLS connection over the migration data
1038# channel. On the outgoing side of the migration, the credentials
1039# must be for a 'client' endpoint, while for the incoming side the
1040# credentials must be for a 'server' endpoint.
1041# An empty string means that QEMU will use plain text mode for
1042# migration, rather than TLS (Since 2.7)
1043# Note: 2.8 reports this by omitting tls-creds instead.
1044#
1045# @tls-hostname: hostname of the target host for the migration. This
1046# is required when using x509 based TLS credentials and the
1047# migration URI does not already include a hostname. For
1048# example if using fd: or exec: based migration, the
1049# hostname must be provided so that the server's x509
1050# certificate identity can be validated. (Since 2.7)
1051# An empty string means that QEMU will use the hostname
1052# associated with the migration URI, if any. (Since 2.9)
1053# Note: 2.8 reports this by omitting tls-hostname instead.
1054#
d2f1d29b
DB
1055# @tls-authz: ID of the 'authz' object subclass that provides access control
1056# checking of the TLS x509 certificate distinguished name. (Since
1057# 4.0)
1058#
48685a8e
MA
1059# @max-bandwidth: to set maximum speed for migration. maximum speed in
1060# bytes per second. (Since 2.8)
1061#
1062# @downtime-limit: set maximum tolerated downtime for migration. maximum
1063# downtime in milliseconds (Since 2.8)
1064#
1065# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1066#
1067# @block-incremental: Affects how much storage is migrated when the
26ec4e53
PM
1068# block migration capability is enabled. When false, the entire
1069# storage backing chain is migrated into a flattened image at
1070# the destination; when true, only the active qcow2 layer is
1071# migrated and the destination must already have access to the
1072# same backing chain as was used on the source. (since 2.10)
48685a8e 1073#
cbfd6c95
JQ
1074# @multifd-channels: Number of channels used to migrate data in
1075# parallel. This is the same number that the
1076# number of sockets used for migration.
1077# The default value is 2 (since 4.0)
4075fb1c 1078#
73af8dd8
JQ
1079# @xbzrle-cache-size: cache size to be used by XBZRLE migration. It
1080# needs to be a multiple of the target page size
1081# and a power of 2
1082# (Since 2.11)
7e555c6c
DDAG
1083#
1084# @max-postcopy-bandwidth: Background transfer bandwidth during postcopy.
26ec4e53
PM
1085# Defaults to 0 (unlimited). In bytes per second.
1086# (Since 3.0)
4cbc9c7f
LQ
1087#
1088# @max-cpu-throttle: maximum cpu throttle percentage.
1089# Defaults to 99.
26ec4e53 1090# (Since 3.1)
4cbc9c7f 1091#
96eef042
JQ
1092# @multifd-compression: Which compression method to use.
1093# Defaults to none. (Since 5.0)
1094#
9004db48 1095# @multifd-zlib-level: Set the compression level to be used in live
76dd0f84
PM
1096# migration, the compression level is an integer between 0
1097# and 9, where 0 means no compression, 1 means the best
1098# compression speed, and 9 means best compression ratio which
1099# will consume more CPU.
1100# Defaults to 1. (Since 5.0)
9004db48 1101#
6a9ad154 1102# @multifd-zstd-level: Set the compression level to be used in live
76dd0f84
PM
1103# migration, the compression level is an integer between 0
1104# and 20, where 0 means no compression, 1 means the best
1105# compression speed, and 20 means best compression ratio which
1106# will consume more CPU.
1107# Defaults to 1. (Since 5.0)
6a9ad154 1108#
31e4c354 1109# @block-bitmap-mapping: Maps block nodes and bitmaps on them to
826bd069
PM
1110# aliases for the purpose of dirty bitmap migration. Such
1111# aliases may for example be the corresponding names on the
1112# opposite site.
1113# The mapping must be one-to-one, but not necessarily
1114# complete: On the source, unmapped bitmaps and all bitmaps
1115# on unmapped nodes will be ignored. On the destination,
1116# encountering an unmapped alias in the incoming migration
1117# stream will result in a report, and all further bitmap
1118# migration data will then be discarded.
1119# Note that the destination does not know about bitmaps it
1120# does not receive, so there is no limitation or requirement
1121# regarding the number of bitmaps received, or how they are
1122# named, or on which nodes they are placed.
1123# By default (when this parameter has never been set), bitmap
1124# names are mapped to themselves. Nodes are mapped to their
1125# block device name if there is one, and to their node name
1126# otherwise. (Since 5.2)
31e4c354 1127#
9fb49daa
MA
1128# Features:
1129# @unstable: Member @x-checkpoint-delay is experimental.
1130#
48685a8e
MA
1131# Since: 2.4
1132##
1133{ 'struct': 'MigrationParameters',
ee3d96ba
DDAG
1134 'data': { '*announce-initial': 'size',
1135 '*announce-max': 'size',
1136 '*announce-rounds': 'size',
1137 '*announce-step': 'size',
1138 '*compress-level': 'uint8',
741d4086 1139 '*compress-threads': 'uint8',
1d58872a 1140 '*compress-wait-thread': 'bool',
741d4086 1141 '*decompress-threads': 'uint8',
dc14a470 1142 '*throttle-trigger-threshold': 'uint8',
741d4086
JQ
1143 '*cpu-throttle-initial': 'uint8',
1144 '*cpu-throttle-increment': 'uint8',
cbbf8182 1145 '*cpu-throttle-tailslow': 'bool',
48685a8e
MA
1146 '*tls-creds': 'str',
1147 '*tls-hostname': 'str',
d2f1d29b 1148 '*tls-authz': 'str',
741d4086
JQ
1149 '*max-bandwidth': 'size',
1150 '*downtime-limit': 'uint64',
9fb49daa
MA
1151 '*x-checkpoint-delay': { 'type': 'uint32',
1152 'features': [ 'unstable' ] },
ec17de0a 1153 '*block-incremental': 'bool',
cbfd6c95 1154 '*multifd-channels': 'uint8',
7e555c6c 1155 '*xbzrle-cache-size': 'size',
dbb28bc8 1156 '*max-postcopy-bandwidth': 'size',
96eef042 1157 '*max-cpu-throttle': 'uint8',
9004db48 1158 '*multifd-compression': 'MultiFDCompression',
6a9ad154 1159 '*multifd-zlib-level': 'uint8',
31e4c354
HR
1160 '*multifd-zstd-level': 'uint8',
1161 '*block-bitmap-mapping': [ 'BitmapMigrationNodeAlias' ] } }
48685a8e
MA
1162
1163##
1164# @query-migrate-parameters:
1165#
1166# Returns information about the current migration parameters
1167#
1168# Returns: @MigrationParameters
1169#
1170# Since: 2.4
1171#
1172# Example:
1173#
1174# -> { "execute": "query-migrate-parameters" }
1175# <- { "return": {
1176# "decompress-threads": 2,
1177# "cpu-throttle-increment": 10,
1178# "compress-threads": 8,
1179# "compress-level": 1,
1180# "cpu-throttle-initial": 20,
1181# "max-bandwidth": 33554432,
1182# "downtime-limit": 300
1183# }
1184# }
1185#
1186##
1187{ 'command': 'query-migrate-parameters',
1188 'returns': 'MigrationParameters' }
1189
1190##
1191# @client_migrate_info:
1192#
1193# Set migration information for remote display. This makes the server
1194# ask the client to automatically reconnect using the new parameters
1195# once migration finished successfully. Only implemented for SPICE.
1196#
1197# @protocol: must be "spice"
1198# @hostname: migration target hostname
1199# @port: spice tcp port for plaintext channels
1200# @tls-port: spice tcp port for tls-secured channels
1201# @cert-subject: server certificate subject
1202#
9bc6e893 1203# Since: 0.14
48685a8e
MA
1204#
1205# Example:
1206#
1207# -> { "execute": "client_migrate_info",
1208# "arguments": { "protocol": "spice",
1209# "hostname": "virt42.lab.kraxel.org",
1210# "port": 1234 } }
1211# <- { "return": {} }
1212#
1213##
1214{ 'command': 'client_migrate_info',
1215 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1216 '*tls-port': 'int', '*cert-subject': 'str' } }
1217
1218##
1219# @migrate-start-postcopy:
1220#
1221# Followup to a migration command to switch the migration to postcopy mode.
c2eb7f21
GK
1222# The postcopy-ram capability must be set on both source and destination
1223# before the original migration command.
48685a8e
MA
1224#
1225# Since: 2.5
1226#
1227# Example:
1228#
1229# -> { "execute": "migrate-start-postcopy" }
1230# <- { "return": {} }
1231#
1232##
1233{ 'command': 'migrate-start-postcopy' }
1234
1235##
1236# @MIGRATION:
1237#
1238# Emitted when a migration event happens
1239#
1240# @status: @MigrationStatus describing the current migration status.
1241#
1242# Since: 2.4
1243#
1244# Example:
1245#
1246# <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
1247# "event": "MIGRATION",
1248# "data": {"status": "completed"} }
1249#
1250##
1251{ 'event': 'MIGRATION',
1252 'data': {'status': 'MigrationStatus'}}
1253
1254##
1255# @MIGRATION_PASS:
1256#
1257# Emitted from the source side of a migration at the start of each pass
1258# (when it syncs the dirty bitmap)
1259#
1260# @pass: An incrementing count (starting at 1 on the first pass)
1261#
1262# Since: 2.6
1263#
1264# Example:
1265#
1266# { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
1267# "event": "MIGRATION_PASS", "data": {"pass": 2} }
1268#
1269##
1270{ 'event': 'MIGRATION_PASS',
1271 'data': { 'pass': 'int' } }
1272
1273##
1274# @COLOMessage:
1275#
1276# The message transmission between Primary side and Secondary side.
1277#
1278# @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1279#
1280# @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1281#
1282# @checkpoint-reply: SVM gets PVM's checkpoint request
1283#
1284# @vmstate-send: VM's state will be sent by PVM.
1285#
1286# @vmstate-size: The total size of VMstate.
1287#
1288# @vmstate-received: VM's state has been received by SVM.
1289#
1290# @vmstate-loaded: VM's state has been loaded by SVM.
1291#
1292# Since: 2.8
1293##
1294{ 'enum': 'COLOMessage',
1295 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1296 'vmstate-send', 'vmstate-size', 'vmstate-received',
1297 'vmstate-loaded' ] }
1298
1299##
1300# @COLOMode:
1301#
41b6b779 1302# The COLO current mode.
48685a8e 1303#
41b6b779 1304# @none: COLO is disabled.
48685a8e 1305#
41b6b779 1306# @primary: COLO node in primary side.
48685a8e 1307#
41b6b779 1308# @secondary: COLO node in slave side.
48685a8e
MA
1309#
1310# Since: 2.8
1311##
1312{ 'enum': 'COLOMode',
41b6b779 1313 'data': [ 'none', 'primary', 'secondary'] }
48685a8e
MA
1314
1315##
1316# @FailoverStatus:
1317#
1318# An enumeration of COLO failover status
1319#
1320# @none: no failover has ever happened
1321#
1322# @require: got failover requirement but not handled
1323#
1324# @active: in the process of doing failover
1325#
1326# @completed: finish the process of failover
1327#
1328# @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
1329#
1330# Since: 2.8
1331##
1332{ 'enum': 'FailoverStatus',
1333 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
1334
9ecff6d6
HZ
1335##
1336# @COLO_EXIT:
1337#
1338# Emitted when VM finishes COLO mode due to some errors happening or
1339# at the request of users.
1340#
1341# @mode: report COLO mode when COLO exited.
1342#
1343# @reason: describes the reason for the COLO exit.
1344#
1345# Since: 3.1
1346#
1347# Example:
1348#
1349# <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
1350# "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
1351#
1352##
1353{ 'event': 'COLO_EXIT',
1354 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
1355
1356##
1357# @COLOExitReason:
1358#
3a43ac47 1359# The reason for a COLO exit.
9ecff6d6 1360#
3a43ac47 1361# @none: failover has never happened. This state does not occur
26ec4e53
PM
1362# in the COLO_EXIT event, and is only visible in the result of
1363# query-colo-status.
9ecff6d6 1364#
3a43ac47 1365# @request: COLO exit is due to an external request.
9ecff6d6 1366#
3a43ac47
ZC
1367# @error: COLO exit is due to an internal error.
1368#
1369# @processing: COLO is currently handling a failover (since 4.0).
9ecff6d6
HZ
1370#
1371# Since: 3.1
1372##
1373{ 'enum': 'COLOExitReason',
3a43ac47 1374 'data': [ 'none', 'request', 'error' , 'processing' ] }
9ecff6d6 1375
48685a8e
MA
1376##
1377# @x-colo-lost-heartbeat:
1378#
1379# Tell qemu that heartbeat is lost, request it to do takeover procedures.
1380# If this command is sent to the PVM, the Primary side will exit COLO mode.
1381# If sent to the Secondary, the Secondary side will run failover work,
1382# then takes over server operation to become the service VM.
1383#
9fb49daa
MA
1384# Features:
1385# @unstable: This command is experimental.
1386#
48685a8e
MA
1387# Since: 2.8
1388#
1389# Example:
1390#
1391# -> { "execute": "x-colo-lost-heartbeat" }
1392# <- { "return": {} }
1393#
1394##
9fb49daa
MA
1395{ 'command': 'x-colo-lost-heartbeat',
1396 'features': [ 'unstable' ] }
48685a8e
MA
1397
1398##
1399# @migrate_cancel:
1400#
1401# Cancel the current executing migration process.
1402#
1403# Returns: nothing on success
1404#
1405# Notes: This command succeeds even if there is no migration process running.
1406#
9bc6e893 1407# Since: 0.14
48685a8e
MA
1408#
1409# Example:
1410#
1411# -> { "execute": "migrate_cancel" }
1412# <- { "return": {} }
1413#
1414##
1415{ 'command': 'migrate_cancel' }
1416
89cfc02c
DDAG
1417##
1418# @migrate-continue:
1419#
1420# Continue migration when it's in a paused state.
1421#
1422# @state: The state the migration is currently expected to be in
1423#
1424# Returns: nothing on success
1425# Since: 2.11
1426# Example:
1427#
1428# -> { "execute": "migrate-continue" , "arguments":
1429# { "state": "pre-switchover" } }
1430# <- { "return": {} }
1431##
1432{ 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
1433
48685a8e
MA
1434##
1435# @migrate:
1436#
1437# Migrates the current running guest to another Virtual Machine.
1438#
1439# @uri: the Uniform Resource Identifier of the destination VM
1440#
1441# @blk: do block migration (full disk copy)
1442#
1443# @inc: incremental disk copy migration
1444#
1445# @detach: this argument exists only for compatibility reasons and
1446# is ignored by QEMU
1447#
51f63ec7 1448# @resume: resume one paused migration, default "off". (since 3.0)
7a4da28b 1449#
48685a8e
MA
1450# Returns: nothing on success
1451#
9bc6e893 1452# Since: 0.14
48685a8e
MA
1453#
1454# Notes:
1455#
1456# 1. The 'query-migrate' command should be used to check migration's progress
1457# and final result (this information is provided by the 'status' member)
1458#
1459# 2. All boolean arguments default to false
1460#
1461# 3. The user Monitor's "detach" argument is invalid in QMP and should not
1462# be used
1463#
1464# Example:
1465#
1466# -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
1467# <- { "return": {} }
1468#
1469##
1470{ 'command': 'migrate',
7a4da28b
PX
1471 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool',
1472 '*detach': 'bool', '*resume': 'bool' } }
48685a8e
MA
1473
1474##
1475# @migrate-incoming:
1476#
1477# Start an incoming migration, the qemu must have been started
1478# with -incoming defer
1479#
1480# @uri: The Uniform Resource Identifier identifying the source or
1481# address to listen on
1482#
1483# Returns: nothing on success
1484#
1485# Since: 2.3
1486#
1487# Notes:
1488#
1489# 1. It's a bad idea to use a string for the uri, but it needs to stay
1490# compatible with -incoming and the format of the uri is already exposed
1491# above libvirt.
1492#
1493# 2. QEMU must be started with -incoming defer to allow migrate-incoming to
1494# be used.
1495#
1496# 3. The uri format is the same as for -incoming
1497#
1498# Example:
1499#
1500# -> { "execute": "migrate-incoming",
1501# "arguments": { "uri": "tcp::4446" } }
1502# <- { "return": {} }
1503#
1504##
1505{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
1506
1507##
1508# @xen-save-devices-state:
1509#
1510# Save the state of all devices to file. The RAM and the block devices
1511# of the VM are not saved by this command.
1512#
1513# @filename: the file to save the state of the devices to as binary
26ec4e53
PM
1514# data. See xen-save-devices-state.txt for a description of the binary
1515# format.
48685a8e 1516#
5d6c599f 1517# @live: Optional argument to ask QEMU to treat this command as part of a live
26ec4e53 1518# migration. Default to true. (since 2.11)
5d6c599f 1519#
48685a8e
MA
1520# Returns: Nothing on success
1521#
1522# Since: 1.1
1523#
1524# Example:
1525#
1526# -> { "execute": "xen-save-devices-state",
1527# "arguments": { "filename": "/tmp/save" } }
1528# <- { "return": {} }
1529#
1530##
5d6c599f
AP
1531{ 'command': 'xen-save-devices-state',
1532 'data': {'filename': 'str', '*live':'bool' } }
48685a8e 1533
28af9ba2
PMD
1534##
1535# @xen-set-global-dirty-log:
1536#
1537# Enable or disable the global dirty log mode.
1538#
1539# @enable: true to enable, false to disable.
1540#
1541# Returns: nothing
1542#
1543# Since: 1.3
1544#
1545# Example:
1546#
1547# -> { "execute": "xen-set-global-dirty-log",
1548# "arguments": { "enable": true } }
1549# <- { "return": {} }
1550#
1551##
1552{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1553
1554##
1555# @xen-load-devices-state:
1556#
1557# Load the state of all devices from file. The RAM and the block devices
1558# of the VM are not loaded by this command.
1559#
1560# @filename: the file to load the state of the devices from as binary
1561# data. See xen-save-devices-state.txt for a description of the binary
1562# format.
1563#
1564# Since: 2.7
1565#
1566# Example:
1567#
1568# -> { "execute": "xen-load-devices-state",
1569# "arguments": { "filename": "/tmp/resume" } }
1570# <- { "return": {} }
1571#
1572##
1573{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
1574
48685a8e
MA
1575##
1576# @xen-set-replication:
1577#
1578# Enable or disable replication.
1579#
1580# @enable: true to enable, false to disable.
1581#
1582# @primary: true for primary or false for secondary.
1583#
1584# @failover: true to do failover, false to stop. but cannot be
1585# specified if 'enable' is true. default value is false.
1586#
1587# Returns: nothing.
1588#
1589# Example:
1590#
1591# -> { "execute": "xen-set-replication",
1592# "arguments": {"enable": true, "primary": false} }
1593# <- { "return": {} }
1594#
1595# Since: 2.9
1596##
1597{ 'command': 'xen-set-replication',
335d10cd 1598 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' },
8a9f1e1d 1599 'if': 'CONFIG_REPLICATION' }
48685a8e
MA
1600
1601##
1602# @ReplicationStatus:
1603#
1604# The result format for 'query-xen-replication-status'.
1605#
1606# @error: true if an error happened, false if replication is normal.
1607#
1608# @desc: the human readable error description string, when
1609# @error is 'true'.
1610#
1611# Since: 2.9
1612##
1613{ 'struct': 'ReplicationStatus',
335d10cd 1614 'data': { 'error': 'bool', '*desc': 'str' },
8a9f1e1d 1615 'if': 'CONFIG_REPLICATION' }
48685a8e
MA
1616
1617##
1618# @query-xen-replication-status:
1619#
1620# Query replication status while the vm is running.
1621#
f4347129 1622# Returns: A @ReplicationStatus object showing the status.
48685a8e
MA
1623#
1624# Example:
1625#
1626# -> { "execute": "query-xen-replication-status" }
1627# <- { "return": { "error": false } }
1628#
1629# Since: 2.9
1630##
1631{ 'command': 'query-xen-replication-status',
335d10cd 1632 'returns': 'ReplicationStatus',
8a9f1e1d 1633 'if': 'CONFIG_REPLICATION' }
48685a8e
MA
1634
1635##
1636# @xen-colo-do-checkpoint:
1637#
1638# Xen uses this command to notify replication to trigger a checkpoint.
1639#
1640# Returns: nothing.
1641#
1642# Example:
1643#
1644# -> { "execute": "xen-colo-do-checkpoint" }
1645# <- { "return": {} }
1646#
1647# Since: 2.9
1648##
335d10cd 1649{ 'command': 'xen-colo-do-checkpoint',
8a9f1e1d 1650 'if': 'CONFIG_REPLICATION' }
02affd41 1651
f56c0065
ZC
1652##
1653# @COLOStatus:
1654#
1655# The result format for 'query-colo-status'.
1656#
1657# @mode: COLO running mode. If COLO is running, this field will return
1658# 'primary' or 'secondary'.
1659#
5cc8f9eb 1660# @last-mode: COLO last running mode. If COLO is running, this field
5ed0deca 1661# will return same like mode field, after failover we can
966c0d49 1662# use this field to get last colo mode. (since 4.0)
5ed0deca 1663#
f56c0065
ZC
1664# @reason: describes the reason for the COLO exit.
1665#
ea3b23e5 1666# Since: 3.1
f56c0065
ZC
1667##
1668{ 'struct': 'COLOStatus',
5cc8f9eb 1669 'data': { 'mode': 'COLOMode', 'last-mode': 'COLOMode',
5ed0deca 1670 'reason': 'COLOExitReason' } }
f56c0065
ZC
1671
1672##
1673# @query-colo-status:
1674#
1675# Query COLO status while the vm is running.
1676#
1677# Returns: A @COLOStatus object showing the status.
1678#
1679# Example:
1680#
1681# -> { "execute": "query-colo-status" }
51ec294d 1682# <- { "return": { "mode": "primary", "last-mode": "none", "reason": "request" } }
f56c0065 1683#
ea3b23e5 1684# Since: 3.1
f56c0065
ZC
1685##
1686{ 'command': 'query-colo-status',
1687 'returns': 'COLOStatus' }
1688
02affd41
PX
1689##
1690# @migrate-recover:
1691#
1692# Provide a recovery migration stream URI.
1693#
1694# @uri: the URI to be used for the recovery of migration stream.
1695#
1696# Returns: nothing.
1697#
1698# Example:
1699#
1700# -> { "execute": "migrate-recover",
1701# "arguments": { "uri": "tcp:192.168.1.200:12345" } }
1702# <- { "return": {} }
1703#
51f63ec7 1704# Since: 3.0
02affd41 1705##
b0ddeba2
MAL
1706{ 'command': 'migrate-recover',
1707 'data': { 'uri': 'str' },
02affd41 1708 'allow-oob': true }
bfbf89c2
PX
1709
1710##
1711# @migrate-pause:
1712#
1713# Pause a migration. Currently it only supports postcopy.
1714#
1715# Returns: nothing.
1716#
1717# Example:
1718#
1719# -> { "execute": "migrate-pause" }
1720# <- { "return": {} }
1721#
51f63ec7 1722# Since: 3.0
bfbf89c2
PX
1723##
1724{ 'command': 'migrate-pause', 'allow-oob': true }
d328e6f3
JF
1725
1726##
1727# @UNPLUG_PRIMARY:
1728#
1729# Emitted from source side of a migration when migration state is
1730# WAIT_UNPLUG. Device was unplugged by guest operating system.
1731# Device resources in QEMU are kept on standby to be able to re-plug it in case
1732# of migration failure.
1733#
1734# @device-id: QEMU device id of the unplugged device
1735#
1736# Since: 4.2
1737#
1738# Example:
0df5e9a3
VT
1739# <- { "event": "UNPLUG_PRIMARY",
1740# "data": { "device-id": "hostdev0" },
1741# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
d328e6f3
JF
1742#
1743##
1744{ 'event': 'UNPLUG_PRIMARY',
1745 'data': { 'device-id': 'str' } }
7df3aa30 1746
71864ead
HH
1747##
1748# @DirtyRateVcpu:
1749#
1750# Dirty rate of vcpu.
1751#
1752# @id: vcpu index.
1753#
1754# @dirty-rate: dirty rate.
1755#
f78d4ed7 1756# Since: 6.2
71864ead
HH
1757#
1758##
1759{ 'struct': 'DirtyRateVcpu',
1760 'data': { 'id': 'int', 'dirty-rate': 'int64' } }
1761
7df3aa30
CZ
1762##
1763# @DirtyRateStatus:
1764#
1765# An enumeration of dirtyrate status.
1766#
1767# @unstarted: the dirtyrate thread has not been started.
1768#
1769# @measuring: the dirtyrate thread is measuring.
1770#
1771# @measured: the dirtyrate thread has measured and results are available.
1772#
1773# Since: 5.2
1774#
1775##
1776{ 'enum': 'DirtyRateStatus',
1777 'data': [ 'unstarted', 'measuring', 'measured'] }
4c437254 1778
71864ead
HH
1779##
1780# @DirtyRateMeasureMode:
1781#
1782# An enumeration of mode of measuring dirtyrate.
1783#
1784# @page-sampling: calculate dirtyrate by sampling pages.
1785#
826b8bc8
HH
1786# @dirty-ring: calculate dirtyrate by dirty ring.
1787#
1788# @dirty-bitmap: calculate dirtyrate by dirty bitmap.
71864ead 1789#
f78d4ed7 1790# Since: 6.2
71864ead
HH
1791#
1792##
1793{ 'enum': 'DirtyRateMeasureMode',
826b8bc8 1794 'data': ['page-sampling', 'dirty-ring', 'dirty-bitmap'] }
71864ead 1795
4c437254
CZ
1796##
1797# @DirtyRateInfo:
1798#
1799# Information about current dirty page rate of vm.
1800#
b1a859cf
CZ
1801# @dirty-rate: an estimate of the dirty page rate of the VM in units of
1802# MB/s, present only when estimating the rate has completed.
4c437254
CZ
1803#
1804# @status: status containing dirtyrate query status includes
1805# 'unstarted' or 'measuring' or 'measured'
1806#
1807# @start-time: start time in units of second for calculation
1808#
1809# @calc-time: time in units of second for sample dirty pages
1810#
7afa08cd 1811# @sample-pages: page count per GB for sample dirty pages
adc903a6 1812# the default value is 512 (since 6.1)
7afa08cd 1813#
0e21bf24 1814# @mode: mode containing method of calculate dirtyrate includes
f78d4ed7 1815# 'page-sampling' and 'dirty-ring' (Since 6.2)
0e21bf24
HH
1816#
1817# @vcpu-dirty-rate: dirtyrate for each vcpu if dirty-ring
f78d4ed7 1818# mode specified (Since 6.2)
0e21bf24 1819#
4c437254
CZ
1820# Since: 5.2
1821#
1822##
1823{ 'struct': 'DirtyRateInfo',
b1a859cf 1824 'data': {'*dirty-rate': 'int64',
4c437254
CZ
1825 'status': 'DirtyRateStatus',
1826 'start-time': 'int64',
7afa08cd 1827 'calc-time': 'int64',
0e21bf24
HH
1828 'sample-pages': 'uint64',
1829 'mode': 'DirtyRateMeasureMode',
1830 '*vcpu-dirty-rate': [ 'DirtyRateVcpu' ] } }
4c437254
CZ
1831
1832##
1833# @calc-dirty-rate:
1834#
1835# start calculating dirty page rate for vm
1836#
1837# @calc-time: time in units of second for sample dirty pages
1838#
7afa08cd
HH
1839# @sample-pages: page count per GB for sample dirty pages
1840# the default value is 512 (since 6.1)
1841#
0e21bf24
HH
1842# @mode: mechanism of calculating dirtyrate includes
1843# 'page-sampling' and 'dirty-ring' (Since 6.1)
1844#
4c437254
CZ
1845# Since: 5.2
1846#
1847# Example:
8230f338 1848# {"execute": "calc-dirty-rate", "arguments": {"calc-time": 1,
b1ca5322 1849# 'sample-pages': 512} }
4c437254
CZ
1850#
1851##
7afa08cd 1852{ 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64',
0e21bf24
HH
1853 '*sample-pages': 'int',
1854 '*mode': 'DirtyRateMeasureMode'} }
4c437254
CZ
1855
1856##
1857# @query-dirty-rate:
1858#
1859# query dirty page rate in units of MB/s for vm
1860#
1861# Since: 5.2
1862##
1863{ 'command': 'query-dirty-rate', 'returns': 'DirtyRateInfo' }
0f0d83a4
DB
1864
1865##
1866# @snapshot-save:
1867#
1868# Save a VM snapshot
1869#
1870# @job-id: identifier for the newly created job
1871# @tag: name of the snapshot to create
1872# @vmstate: block device node name to save vmstate to
1873# @devices: list of block device node names to save a snapshot to
1874#
1875# Applications should not assume that the snapshot save is complete
1876# when this command returns. The job commands / events must be used
1877# to determine completion and to fetch details of any errors that arise.
1878#
1879# Note that execution of the guest CPUs may be stopped during the
1880# time it takes to save the snapshot. A future version of QEMU
1881# may ensure CPUs are executing continuously.
1882#
1883# It is strongly recommended that @devices contain all writable
1884# block device nodes if a consistent snapshot is required.
1885#
1886# If @tag already exists, an error will be reported
1887#
1888# Returns: nothing
1889#
1890# Example:
1891#
1892# -> { "execute": "snapshot-save",
b1ca5322 1893# "arguments": {
0f0d83a4
DB
1894# "job-id": "snapsave0",
1895# "tag": "my-snap",
1896# "vmstate": "disk0",
1897# "devices": ["disk0", "disk1"]
1898# }
1899# }
1900# <- { "return": { } }
1901# <- {"event": "JOB_STATUS_CHANGE",
1902# "data": {"status": "created", "id": "snapsave0"}}
1903# <- {"event": "JOB_STATUS_CHANGE",
1904# "data": {"status": "running", "id": "snapsave0"}}
1905# <- {"event": "STOP"}
1906# <- {"event": "RESUME"}
1907# <- {"event": "JOB_STATUS_CHANGE",
1908# "data": {"status": "waiting", "id": "snapsave0"}}
1909# <- {"event": "JOB_STATUS_CHANGE",
1910# "data": {"status": "pending", "id": "snapsave0"}}
1911# <- {"event": "JOB_STATUS_CHANGE",
1912# "data": {"status": "concluded", "id": "snapsave0"}}
1913# -> {"execute": "query-jobs"}
1914# <- {"return": [{"current-progress": 1,
1915# "status": "concluded",
1916# "total-progress": 1,
1917# "type": "snapshot-save",
1918# "id": "snapsave0"}]}
1919#
1920# Since: 6.0
1921##
1922{ 'command': 'snapshot-save',
1923 'data': { 'job-id': 'str',
1924 'tag': 'str',
1925 'vmstate': 'str',
1926 'devices': ['str'] } }
1927
1928##
1929# @snapshot-load:
1930#
1931# Load a VM snapshot
1932#
1933# @job-id: identifier for the newly created job
1934# @tag: name of the snapshot to load.
1935# @vmstate: block device node name to load vmstate from
1936# @devices: list of block device node names to load a snapshot from
1937#
1938# Applications should not assume that the snapshot load is complete
1939# when this command returns. The job commands / events must be used
1940# to determine completion and to fetch details of any errors that arise.
1941#
1942# Note that execution of the guest CPUs will be stopped during the
1943# time it takes to load the snapshot.
1944#
1945# It is strongly recommended that @devices contain all writable
1946# block device nodes that can have changed since the original
1947# @snapshot-save command execution.
1948#
1949# Returns: nothing
1950#
1951# Example:
1952#
1953# -> { "execute": "snapshot-load",
b1ca5322 1954# "arguments": {
0f0d83a4
DB
1955# "job-id": "snapload0",
1956# "tag": "my-snap",
1957# "vmstate": "disk0",
1958# "devices": ["disk0", "disk1"]
1959# }
1960# }
1961# <- { "return": { } }
1962# <- {"event": "JOB_STATUS_CHANGE",
1963# "data": {"status": "created", "id": "snapload0"}}
1964# <- {"event": "JOB_STATUS_CHANGE",
1965# "data": {"status": "running", "id": "snapload0"}}
1966# <- {"event": "STOP"}
1967# <- {"event": "RESUME"}
1968# <- {"event": "JOB_STATUS_CHANGE",
1969# "data": {"status": "waiting", "id": "snapload0"}}
1970# <- {"event": "JOB_STATUS_CHANGE",
1971# "data": {"status": "pending", "id": "snapload0"}}
1972# <- {"event": "JOB_STATUS_CHANGE",
1973# "data": {"status": "concluded", "id": "snapload0"}}
1974# -> {"execute": "query-jobs"}
1975# <- {"return": [{"current-progress": 1,
1976# "status": "concluded",
1977# "total-progress": 1,
1978# "type": "snapshot-load",
1979# "id": "snapload0"}]}
1980#
1981# Since: 6.0
1982##
1983{ 'command': 'snapshot-load',
1984 'data': { 'job-id': 'str',
1985 'tag': 'str',
1986 'vmstate': 'str',
1987 'devices': ['str'] } }
1988
1989##
1990# @snapshot-delete:
1991#
1992# Delete a VM snapshot
1993#
1994# @job-id: identifier for the newly created job
1995# @tag: name of the snapshot to delete.
1996# @devices: list of block device node names to delete a snapshot from
1997#
1998# Applications should not assume that the snapshot delete is complete
1999# when this command returns. The job commands / events must be used
2000# to determine completion and to fetch details of any errors that arise.
2001#
2002# Returns: nothing
2003#
2004# Example:
2005#
2006# -> { "execute": "snapshot-delete",
b1ca5322 2007# "arguments": {
0f0d83a4
DB
2008# "job-id": "snapdelete0",
2009# "tag": "my-snap",
2010# "devices": ["disk0", "disk1"]
2011# }
2012# }
2013# <- { "return": { } }
2014# <- {"event": "JOB_STATUS_CHANGE",
2015# "data": {"status": "created", "id": "snapdelete0"}}
2016# <- {"event": "JOB_STATUS_CHANGE",
2017# "data": {"status": "running", "id": "snapdelete0"}}
2018# <- {"event": "JOB_STATUS_CHANGE",
2019# "data": {"status": "waiting", "id": "snapdelete0"}}
2020# <- {"event": "JOB_STATUS_CHANGE",
2021# "data": {"status": "pending", "id": "snapdelete0"}}
2022# <- {"event": "JOB_STATUS_CHANGE",
2023# "data": {"status": "concluded", "id": "snapdelete0"}}
2024# -> {"execute": "query-jobs"}
2025# <- {"return": [{"current-progress": 1,
2026# "status": "concluded",
2027# "total-progress": 1,
2028# "type": "snapshot-delete",
2029# "id": "snapdelete0"}]}
2030#
2031# Since: 6.0
2032##
2033{ 'command': 'snapshot-delete',
2034 'data': { 'job-id': 'str',
2035 'tag': 'str',
2036 'devices': ['str'] } }