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