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