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