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