1# -*- Mode: Python -*- 2# 3 4## 5# = Migration 6## 7 8{ 'include': 'common.json' } 9 10## 11# @MigrationStats: 12# 13# Detailed migration status. 14# 15# @transferred: amount of bytes already transferred to the target VM 16# 17# @remaining: amount of bytes remaining to be transferred to the target VM 18# 19# @total: total amount of bytes involved in the migration process 20# 21# @duplicate: number of duplicate (zero) pages (since 1.2) 22# 23# @skipped: number of skipped zero pages (since 1.5) 24# 25# @normal: number of normal pages (since 1.2) 26# 27# @normal-bytes: number of normal bytes sent (since 1.2) 28# 29# @dirty-pages-rate: number of pages dirtied by second by the 30# guest (since 1.3) 31# 32# @mbps: throughput in megabits/sec. (since 1.6) 33# 34# @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1) 35# 36# @postcopy-requests: The number of page requests received from the destination 37# (since 2.7) 38# 39# @page-size: The number of bytes per page for the various page-based 40# statistics (since 2.10) 41# 42# @multifd-bytes: The number of bytes sent through multifd (since 3.0) 43# 44# Since: 0.14.0 45## 46{ 'struct': 'MigrationStats', 47 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' , 48 'duplicate': 'int', 'skipped': 'int', 'normal': 'int', 49 'normal-bytes': 'int', 'dirty-pages-rate' : 'int', 50 'mbps' : 'number', 'dirty-sync-count' : 'int', 51 'postcopy-requests' : 'int', 'page-size' : 'int', 52 'multifd-bytes' : 'uint64' } } 53 54## 55# @XBZRLECacheStats: 56# 57# Detailed XBZRLE migration cache statistics 58# 59# @cache-size: XBZRLE cache size 60# 61# @bytes: amount of bytes already transferred to the target VM 62# 63# @pages: amount of pages transferred to the target VM 64# 65# @cache-miss: number of cache miss 66# 67# @cache-miss-rate: rate of cache miss (since 2.1) 68# 69# @overflow: number of overflows 70# 71# Since: 1.2 72## 73{ 'struct': 'XBZRLECacheStats', 74 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int', 75 'cache-miss': 'int', 'cache-miss-rate': 'number', 76 'overflow': 'int' } } 77 78## 79# @MigrationStatus: 80# 81# An enumeration of migration status. 82# 83# @none: no migration has ever happened. 84# 85# @setup: migration process has been initiated. 86# 87# @cancelling: in the process of cancelling migration. 88# 89# @cancelled: cancelling migration is finished. 90# 91# @active: in the process of doing migration. 92# 93# @postcopy-active: like active, but now in postcopy mode. (since 2.5) 94# 95# @postcopy-paused: during postcopy but paused. (since 3.0) 96# 97# @postcopy-recover: trying to recover from a paused postcopy. (since 3.0) 98# 99# @completed: migration is finished. 100# 101# @failed: some error occurred during migration process. 102# 103# @colo: VM is in the process of fault tolerance, VM can not get into this 104# state unless colo capability is enabled for migration. (since 2.8) 105# 106# @pre-switchover: Paused before device serialisation. (since 2.11) 107# 108# @device: During device serialisation when pause-before-switchover is enabled 109# (since 2.11) 110# 111# Since: 2.3 112# 113## 114{ 'enum': 'MigrationStatus', 115 'data': [ 'none', 'setup', 'cancelling', 'cancelled', 116 'active', 'postcopy-active', 'postcopy-paused', 117 'postcopy-recover', 'completed', 'failed', 'colo', 118 'pre-switchover', 'device' ] } 119 120## 121# @MigrationInfo: 122# 123# Information about current migration process. 124# 125# @status: @MigrationStatus describing the current migration status. 126# If this field is not returned, no migration process 127# has been initiated 128# 129# @ram: @MigrationStats containing detailed migration 130# status, only returned if status is 'active' or 131# 'completed'(since 1.2) 132# 133# @disk: @MigrationStats containing detailed disk migration 134# status, only returned if status is 'active' and it is a block 135# migration 136# 137# @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE 138# migration statistics, only returned if XBZRLE feature is on and 139# status is 'active' or 'completed' (since 1.2) 140# 141# @total-time: total amount of milliseconds since migration started. 142# If migration has ended, it returns the total migration 143# time. (since 1.2) 144# 145# @downtime: only present when migration finishes correctly 146# total downtime in milliseconds for the guest. 147# (since 1.3) 148# 149# @expected-downtime: only present while migration is active 150# expected downtime in milliseconds for the guest in last walk 151# of the dirty bitmap. (since 1.3) 152# 153# @setup-time: amount of setup time in milliseconds _before_ the 154# iterations begin but _after_ the QMP command is issued. This is designed 155# to provide an accounting of any activities (such as RDMA pinning) which 156# may be expensive, but do not actually occur during the iterative 157# migration rounds themselves. (since 1.6) 158# 159# @cpu-throttle-percentage: percentage of time guest cpus are being 160# throttled during auto-converge. This is only present when auto-converge 161# has started throttling guest cpus. (Since 2.7) 162# 163# @error-desc: the human readable error description string, when 164# @status is 'failed'. Clients should not attempt to parse the 165# error strings. (Since 2.7) 166# 167# @postcopy-blocktime: total time when all vCPU were blocked during postcopy 168# live migration. This is only present when the postcopy-blocktime 169# migration capability is enabled. (Since 3.0) 170# 171# @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU. This is 172# only present when the postcopy-blocktime migration capability 173# is enabled. (Since 3.0) 174# 175# 176# Since: 0.14.0 177## 178{ 'struct': 'MigrationInfo', 179 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats', 180 '*disk': 'MigrationStats', 181 '*xbzrle-cache': 'XBZRLECacheStats', 182 '*total-time': 'int', 183 '*expected-downtime': 'int', 184 '*downtime': 'int', 185 '*setup-time': 'int', 186 '*cpu-throttle-percentage': 'int', 187 '*error-desc': 'str', 188 '*postcopy-blocktime' : 'uint32', 189 '*postcopy-vcpu-blocktime': ['uint32']} } 190 191## 192# @query-migrate: 193# 194# Returns information about current migration process. If migration 195# is active there will be another json-object with RAM migration 196# status and if block migration is active another one with block 197# migration status. 198# 199# Returns: @MigrationInfo 200# 201# Since: 0.14.0 202# 203# Example: 204# 205# 1. Before the first migration 206# 207# -> { "execute": "query-migrate" } 208# <- { "return": {} } 209# 210# 2. Migration is done and has succeeded 211# 212# -> { "execute": "query-migrate" } 213# <- { "return": { 214# "status": "completed", 215# "ram":{ 216# "transferred":123, 217# "remaining":123, 218# "total":246, 219# "total-time":12345, 220# "setup-time":12345, 221# "downtime":12345, 222# "duplicate":123, 223# "normal":123, 224# "normal-bytes":123456, 225# "dirty-sync-count":15 226# } 227# } 228# } 229# 230# 3. Migration is done and has failed 231# 232# -> { "execute": "query-migrate" } 233# <- { "return": { "status": "failed" } } 234# 235# 4. Migration is being performed and is not a block migration: 236# 237# -> { "execute": "query-migrate" } 238# <- { 239# "return":{ 240# "status":"active", 241# "ram":{ 242# "transferred":123, 243# "remaining":123, 244# "total":246, 245# "total-time":12345, 246# "setup-time":12345, 247# "expected-downtime":12345, 248# "duplicate":123, 249# "normal":123, 250# "normal-bytes":123456, 251# "dirty-sync-count":15 252# } 253# } 254# } 255# 256# 5. Migration is being performed and is a block migration: 257# 258# -> { "execute": "query-migrate" } 259# <- { 260# "return":{ 261# "status":"active", 262# "ram":{ 263# "total":1057024, 264# "remaining":1053304, 265# "transferred":3720, 266# "total-time":12345, 267# "setup-time":12345, 268# "expected-downtime":12345, 269# "duplicate":123, 270# "normal":123, 271# "normal-bytes":123456, 272# "dirty-sync-count":15 273# }, 274# "disk":{ 275# "total":20971520, 276# "remaining":20880384, 277# "transferred":91136 278# } 279# } 280# } 281# 282# 6. Migration is being performed and XBZRLE is active: 283# 284# -> { "execute": "query-migrate" } 285# <- { 286# "return":{ 287# "status":"active", 288# "capabilities" : [ { "capability": "xbzrle", "state" : true } ], 289# "ram":{ 290# "total":1057024, 291# "remaining":1053304, 292# "transferred":3720, 293# "total-time":12345, 294# "setup-time":12345, 295# "expected-downtime":12345, 296# "duplicate":10, 297# "normal":3333, 298# "normal-bytes":3412992, 299# "dirty-sync-count":15 300# }, 301# "xbzrle-cache":{ 302# "cache-size":67108864, 303# "bytes":20971520, 304# "pages":2444343, 305# "cache-miss":2244, 306# "cache-miss-rate":0.123, 307# "overflow":34434 308# } 309# } 310# } 311# 312## 313{ 'command': 'query-migrate', 'returns': 'MigrationInfo' } 314 315## 316# @MigrationCapability: 317# 318# Migration capabilities enumeration 319# 320# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding). 321# This feature allows us to minimize migration traffic for certain work 322# loads, by sending compressed difference of the pages 323# 324# @rdma-pin-all: Controls whether or not the entire VM memory footprint is 325# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage. 326# Disabled by default. (since 2.0) 327# 328# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This 329# essentially saves 1MB of zeroes per block on the wire. Enabling requires 330# source and target VM to support this feature. To enable it is sufficient 331# to enable the capability on the source VM. The feature is disabled by 332# default. (since 1.6) 333# 334# @compress: Use multiple compression threads to accelerate live migration. 335# This feature can help to reduce the migration traffic, by sending 336# compressed pages. Please note that if compress and xbzrle are both 337# on, compress only takes effect in the ram bulk stage, after that, 338# it will be disabled and only xbzrle takes effect, this can help to 339# minimize migration traffic. The feature is disabled by default. 340# (since 2.4 ) 341# 342# @events: generate events for each migration state change 343# (since 2.4 ) 344# 345# @auto-converge: If enabled, QEMU will automatically throttle down the guest 346# to speed up convergence of RAM migration. (since 1.6) 347# 348# @postcopy-ram: Start executing on the migration target before all of RAM has 349# been migrated, pulling the remaining pages along as needed. The 350# capacity must have the same setting on both source and target 351# or migration will not even start. NOTE: If the migration fails during 352# postcopy the VM will fail. (since 2.6) 353# 354# @x-colo: If enabled, migration will never end, and the state of the VM on the 355# primary side will be migrated continuously to the VM on secondary 356# side, this process is called COarse-Grain LOck Stepping (COLO) for 357# Non-stop Service. (since 2.8) 358# 359# @release-ram: if enabled, qemu will free the migrated ram pages on the source 360# during postcopy-ram migration. (since 2.9) 361# 362# @block: If enabled, QEMU will also migrate the contents of all block 363# devices. Default is disabled. A possible alternative uses 364# mirror jobs to a builtin NBD server on the destination, which 365# offers more flexibility. 366# (Since 2.10) 367# 368# @return-path: If enabled, migration will use the return path even 369# for precopy. (since 2.10) 370# 371# @pause-before-switchover: Pause outgoing migration before serialising device 372# state and before disabling block IO (since 2.11) 373# 374# @x-multifd: Use more than one fd for migration (since 2.11) 375# 376# @dirty-bitmaps: If enabled, QEMU will migrate named dirty bitmaps. 377# (since 2.12) 378# 379# @postcopy-blocktime: Calculate downtime for postcopy live migration 380# (since 3.0) 381# 382# @late-block-activate: If enabled, the destination will not activate block 383# devices (and thus take locks) immediately at the end of migration. 384# (since 3.0) 385# 386# Since: 1.2 387## 388{ 'enum': 'MigrationCapability', 389 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', 390 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram', 391 'block', 'return-path', 'pause-before-switchover', 'x-multifd', 392 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate' ] } 393 394## 395# @MigrationCapabilityStatus: 396# 397# Migration capability information 398# 399# @capability: capability enum 400# 401# @state: capability state bool 402# 403# Since: 1.2 404## 405{ 'struct': 'MigrationCapabilityStatus', 406 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } } 407 408## 409# @migrate-set-capabilities: 410# 411# Enable/Disable the following migration capabilities (like xbzrle) 412# 413# @capabilities: json array of capability modifications to make 414# 415# Since: 1.2 416# 417# Example: 418# 419# -> { "execute": "migrate-set-capabilities" , "arguments": 420# { "capabilities": [ { "capability": "xbzrle", "state": true } ] } } 421# 422## 423{ 'command': 'migrate-set-capabilities', 424 'data': { 'capabilities': ['MigrationCapabilityStatus'] } } 425 426## 427# @query-migrate-capabilities: 428# 429# Returns information about the current migration capabilities status 430# 431# Returns: @MigrationCapabilitiesStatus 432# 433# Since: 1.2 434# 435# Example: 436# 437# -> { "execute": "query-migrate-capabilities" } 438# <- { "return": [ 439# {"state": false, "capability": "xbzrle"}, 440# {"state": false, "capability": "rdma-pin-all"}, 441# {"state": false, "capability": "auto-converge"}, 442# {"state": false, "capability": "zero-blocks"}, 443# {"state": false, "capability": "compress"}, 444# {"state": true, "capability": "events"}, 445# {"state": false, "capability": "postcopy-ram"}, 446# {"state": false, "capability": "x-colo"} 447# ]} 448# 449## 450{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']} 451 452## 453# @MigrationParameter: 454# 455# Migration parameters enumeration 456# 457# @compress-level: Set the compression level to be used in live migration, 458# the compression level is an integer between 0 and 9, where 0 means 459# no compression, 1 means the best compression speed, and 9 means best 460# compression ratio which will consume more CPU. 461# 462# @compress-threads: Set compression thread count to be used in live migration, 463# the compression thread count is an integer between 1 and 255. 464# 465# @decompress-threads: Set decompression thread count to be used in live 466# migration, the decompression thread count is an integer between 1 467# and 255. Usually, decompression is at least 4 times as fast as 468# compression, so set the decompress-threads to the number about 1/4 469# of compress-threads is adequate. 470# 471# @cpu-throttle-initial: Initial percentage of time guest cpus are throttled 472# when migration auto-converge is activated. The 473# default value is 20. (Since 2.7) 474# 475# @cpu-throttle-increment: throttle percentage increase each time 476# auto-converge detects that migration is not making 477# progress. The default value is 10. (Since 2.7) 478# 479# @tls-creds: ID of the 'tls-creds' object that provides credentials for 480# establishing a TLS connection over the migration data channel. 481# On the outgoing side of the migration, the credentials must 482# be for a 'client' endpoint, while for the incoming side the 483# credentials must be for a 'server' endpoint. Setting this 484# will enable TLS for all migrations. The default is unset, 485# resulting in unsecured migration at the QEMU level. (Since 2.7) 486# 487# @tls-hostname: hostname of the target host for the migration. This is 488# required when using x509 based TLS credentials and the 489# migration URI does not already include a hostname. For 490# example if using fd: or exec: based migration, the 491# hostname must be provided so that the server's x509 492# certificate identity can be validated. (Since 2.7) 493# 494# @max-bandwidth: to set maximum speed for migration. maximum speed in 495# bytes per second. (Since 2.8) 496# 497# @downtime-limit: set maximum tolerated downtime for migration. maximum 498# downtime in milliseconds (Since 2.8) 499# 500# @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in 501# periodic mode. (Since 2.8) 502# 503# @block-incremental: Affects how much storage is migrated when the 504# block migration capability is enabled. When false, the entire 505# storage backing chain is migrated into a flattened image at 506# the destination; when true, only the active qcow2 layer is 507# migrated and the destination must already have access to the 508# same backing chain as was used on the source. (since 2.10) 509# 510# @x-multifd-channels: Number of channels used to migrate data in 511# parallel. This is the same number that the 512# number of sockets used for migration. The 513# default value is 2 (since 2.11) 514# 515# @x-multifd-page-count: Number of pages sent together to a thread. 516# The default value is 16 (since 2.11) 517# 518# @xbzrle-cache-size: cache size to be used by XBZRLE migration. It 519# needs to be a multiple of the target page size 520# and a power of 2 521# (Since 2.11) 522# 523# @max-postcopy-bandwidth: Background transfer bandwidth during postcopy. 524# Defaults to 0 (unlimited). In bytes per second. 525# (Since 3.0) 526# Since: 2.4 527## 528{ 'enum': 'MigrationParameter', 529 'data': ['compress-level', 'compress-threads', 'decompress-threads', 530 'cpu-throttle-initial', 'cpu-throttle-increment', 531 'tls-creds', 'tls-hostname', 'max-bandwidth', 532 'downtime-limit', 'x-checkpoint-delay', 'block-incremental', 533 'x-multifd-channels', 'x-multifd-page-count', 534 'xbzrle-cache-size', 'max-postcopy-bandwidth' ] } 535 536## 537# @MigrateSetParameters: 538# 539# @compress-level: compression level 540# 541# @compress-threads: compression thread count 542# 543# @decompress-threads: decompression thread count 544# 545# @cpu-throttle-initial: Initial percentage of time guest cpus are 546# throttled when migration auto-converge is activated. 547# The default value is 20. (Since 2.7) 548# 549# @cpu-throttle-increment: throttle percentage increase each time 550# auto-converge detects that migration is not making 551# progress. The default value is 10. (Since 2.7) 552# 553# @tls-creds: ID of the 'tls-creds' object that provides credentials 554# for establishing a TLS connection over the migration data 555# channel. On the outgoing side of the migration, the credentials 556# must be for a 'client' endpoint, while for the incoming side the 557# credentials must be for a 'server' endpoint. Setting this 558# to a non-empty string enables TLS for all migrations. 559# An empty string means that QEMU will use plain text mode for 560# migration, rather than TLS (Since 2.9) 561# Previously (since 2.7), this was reported by omitting 562# tls-creds instead. 563# 564# @tls-hostname: hostname of the target host for the migration. This 565# is required when using x509 based TLS credentials and the 566# migration URI does not already include a hostname. For 567# example if using fd: or exec: based migration, the 568# hostname must be provided so that the server's x509 569# certificate identity can be validated. (Since 2.7) 570# An empty string means that QEMU will use the hostname 571# associated with the migration URI, if any. (Since 2.9) 572# Previously (since 2.7), this was reported by omitting 573# tls-hostname instead. 574# 575# @max-bandwidth: to set maximum speed for migration. maximum speed in 576# bytes per second. (Since 2.8) 577# 578# @downtime-limit: set maximum tolerated downtime for migration. maximum 579# downtime in milliseconds (Since 2.8) 580# 581# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8) 582# 583# @block-incremental: Affects how much storage is migrated when the 584# block migration capability is enabled. When false, the entire 585# storage backing chain is migrated into a flattened image at 586# the destination; when true, only the active qcow2 layer is 587# migrated and the destination must already have access to the 588# same backing chain as was used on the source. (since 2.10) 589# 590# @x-multifd-channels: Number of channels used to migrate data in 591# parallel. This is the same number that the 592# number of sockets used for migration. The 593# default value is 2 (since 2.11) 594# 595# @x-multifd-page-count: Number of pages sent together to a thread. 596# The default value is 16 (since 2.11) 597# 598# @xbzrle-cache-size: cache size to be used by XBZRLE migration. It 599# needs to be a multiple of the target page size 600# and a power of 2 601# (Since 2.11) 602# 603# @max-postcopy-bandwidth: Background transfer bandwidth during postcopy. 604# Defaults to 0 (unlimited). In bytes per second. 605# (Since 3.0) 606# Since: 2.4 607## 608# TODO either fuse back into MigrationParameters, or make 609# MigrationParameters members mandatory 610{ 'struct': 'MigrateSetParameters', 611 'data': { '*compress-level': 'int', 612 '*compress-threads': 'int', 613 '*decompress-threads': 'int', 614 '*cpu-throttle-initial': 'int', 615 '*cpu-throttle-increment': 'int', 616 '*tls-creds': 'StrOrNull', 617 '*tls-hostname': 'StrOrNull', 618 '*max-bandwidth': 'int', 619 '*downtime-limit': 'int', 620 '*x-checkpoint-delay': 'int', 621 '*block-incremental': 'bool', 622 '*x-multifd-channels': 'int', 623 '*x-multifd-page-count': 'int', 624 '*xbzrle-cache-size': 'size', 625 '*max-postcopy-bandwidth': 'size' } } 626 627## 628# @migrate-set-parameters: 629# 630# Set various migration parameters. 631# 632# Since: 2.4 633# 634# Example: 635# 636# -> { "execute": "migrate-set-parameters" , 637# "arguments": { "compress-level": 1 } } 638# 639## 640{ 'command': 'migrate-set-parameters', 'boxed': true, 641 'data': 'MigrateSetParameters' } 642 643## 644# @MigrationParameters: 645# 646# The optional members aren't actually optional. 647# 648# @compress-level: compression level 649# 650# @compress-threads: compression thread count 651# 652# @decompress-threads: decompression thread count 653# 654# @cpu-throttle-initial: Initial percentage of time guest cpus are 655# throttled when migration auto-converge is activated. 656# (Since 2.7) 657# 658# @cpu-throttle-increment: throttle percentage increase each time 659# auto-converge detects that migration is not making 660# progress. (Since 2.7) 661# 662# @tls-creds: ID of the 'tls-creds' object that provides credentials 663# for establishing a TLS connection over the migration data 664# channel. On the outgoing side of the migration, the credentials 665# must be for a 'client' endpoint, while for the incoming side the 666# credentials must be for a 'server' endpoint. 667# An empty string means that QEMU will use plain text mode for 668# migration, rather than TLS (Since 2.7) 669# Note: 2.8 reports this by omitting tls-creds instead. 670# 671# @tls-hostname: hostname of the target host for the migration. This 672# is required when using x509 based TLS credentials and the 673# migration URI does not already include a hostname. For 674# example if using fd: or exec: based migration, the 675# hostname must be provided so that the server's x509 676# certificate identity can be validated. (Since 2.7) 677# An empty string means that QEMU will use the hostname 678# associated with the migration URI, if any. (Since 2.9) 679# Note: 2.8 reports this by omitting tls-hostname instead. 680# 681# @max-bandwidth: to set maximum speed for migration. maximum speed in 682# bytes per second. (Since 2.8) 683# 684# @downtime-limit: set maximum tolerated downtime for migration. maximum 685# downtime in milliseconds (Since 2.8) 686# 687# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8) 688# 689# @block-incremental: Affects how much storage is migrated when the 690# block migration capability is enabled. When false, the entire 691# storage backing chain is migrated into a flattened image at 692# the destination; when true, only the active qcow2 layer is 693# migrated and the destination must already have access to the 694# same backing chain as was used on the source. (since 2.10) 695# 696# @x-multifd-channels: Number of channels used to migrate data in 697# parallel. This is the same number that the 698# number of sockets used for migration. 699# The default value is 2 (since 2.11) 700# 701# @x-multifd-page-count: Number of pages sent together to a thread. 702# The default value is 16 (since 2.11) 703# 704# @xbzrle-cache-size: cache size to be used by XBZRLE migration. It 705# needs to be a multiple of the target page size 706# and a power of 2 707# (Since 2.11) 708# 709# @max-postcopy-bandwidth: Background transfer bandwidth during postcopy. 710# Defaults to 0 (unlimited). In bytes per second. 711# (Since 3.0) 712# Since: 2.4 713## 714{ 'struct': 'MigrationParameters', 715 'data': { '*compress-level': 'uint8', 716 '*compress-threads': 'uint8', 717 '*decompress-threads': 'uint8', 718 '*cpu-throttle-initial': 'uint8', 719 '*cpu-throttle-increment': 'uint8', 720 '*tls-creds': 'str', 721 '*tls-hostname': 'str', 722 '*max-bandwidth': 'size', 723 '*downtime-limit': 'uint64', 724 '*x-checkpoint-delay': 'uint32', 725 '*block-incremental': 'bool' , 726 '*x-multifd-channels': 'uint8', 727 '*x-multifd-page-count': 'uint32', 728 '*xbzrle-cache-size': 'size', 729 '*max-postcopy-bandwidth': 'size' } } 730 731## 732# @query-migrate-parameters: 733# 734# Returns information about the current migration parameters 735# 736# Returns: @MigrationParameters 737# 738# Since: 2.4 739# 740# Example: 741# 742# -> { "execute": "query-migrate-parameters" } 743# <- { "return": { 744# "decompress-threads": 2, 745# "cpu-throttle-increment": 10, 746# "compress-threads": 8, 747# "compress-level": 1, 748# "cpu-throttle-initial": 20, 749# "max-bandwidth": 33554432, 750# "downtime-limit": 300 751# } 752# } 753# 754## 755{ 'command': 'query-migrate-parameters', 756 'returns': 'MigrationParameters' } 757 758## 759# @client_migrate_info: 760# 761# Set migration information for remote display. This makes the server 762# ask the client to automatically reconnect using the new parameters 763# once migration finished successfully. Only implemented for SPICE. 764# 765# @protocol: must be "spice" 766# @hostname: migration target hostname 767# @port: spice tcp port for plaintext channels 768# @tls-port: spice tcp port for tls-secured channels 769# @cert-subject: server certificate subject 770# 771# Since: 0.14.0 772# 773# Example: 774# 775# -> { "execute": "client_migrate_info", 776# "arguments": { "protocol": "spice", 777# "hostname": "virt42.lab.kraxel.org", 778# "port": 1234 } } 779# <- { "return": {} } 780# 781## 782{ 'command': 'client_migrate_info', 783 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int', 784 '*tls-port': 'int', '*cert-subject': 'str' } } 785 786## 787# @migrate-start-postcopy: 788# 789# Followup to a migration command to switch the migration to postcopy mode. 790# The postcopy-ram capability must be set on both source and destination 791# before the original migration command. 792# 793# Since: 2.5 794# 795# Example: 796# 797# -> { "execute": "migrate-start-postcopy" } 798# <- { "return": {} } 799# 800## 801{ 'command': 'migrate-start-postcopy' } 802 803## 804# @MIGRATION: 805# 806# Emitted when a migration event happens 807# 808# @status: @MigrationStatus describing the current migration status. 809# 810# Since: 2.4 811# 812# Example: 813# 814# <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001}, 815# "event": "MIGRATION", 816# "data": {"status": "completed"} } 817# 818## 819{ 'event': 'MIGRATION', 820 'data': {'status': 'MigrationStatus'}} 821 822## 823# @MIGRATION_PASS: 824# 825# Emitted from the source side of a migration at the start of each pass 826# (when it syncs the dirty bitmap) 827# 828# @pass: An incrementing count (starting at 1 on the first pass) 829# 830# Since: 2.6 831# 832# Example: 833# 834# { "timestamp": {"seconds": 1449669631, "microseconds": 239225}, 835# "event": "MIGRATION_PASS", "data": {"pass": 2} } 836# 837## 838{ 'event': 'MIGRATION_PASS', 839 'data': { 'pass': 'int' } } 840 841## 842# @COLOMessage: 843# 844# The message transmission between Primary side and Secondary side. 845# 846# @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing 847# 848# @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing 849# 850# @checkpoint-reply: SVM gets PVM's checkpoint request 851# 852# @vmstate-send: VM's state will be sent by PVM. 853# 854# @vmstate-size: The total size of VMstate. 855# 856# @vmstate-received: VM's state has been received by SVM. 857# 858# @vmstate-loaded: VM's state has been loaded by SVM. 859# 860# Since: 2.8 861## 862{ 'enum': 'COLOMessage', 863 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply', 864 'vmstate-send', 'vmstate-size', 'vmstate-received', 865 'vmstate-loaded' ] } 866 867## 868# @COLOMode: 869# 870# The colo mode 871# 872# @unknown: unknown mode 873# 874# @primary: master side 875# 876# @secondary: slave side 877# 878# Since: 2.8 879## 880{ 'enum': 'COLOMode', 881 'data': [ 'unknown', 'primary', 'secondary'] } 882 883## 884# @FailoverStatus: 885# 886# An enumeration of COLO failover status 887# 888# @none: no failover has ever happened 889# 890# @require: got failover requirement but not handled 891# 892# @active: in the process of doing failover 893# 894# @completed: finish the process of failover 895# 896# @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9) 897# 898# Since: 2.8 899## 900{ 'enum': 'FailoverStatus', 901 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] } 902 903## 904# @x-colo-lost-heartbeat: 905# 906# Tell qemu that heartbeat is lost, request it to do takeover procedures. 907# If this command is sent to the PVM, the Primary side will exit COLO mode. 908# If sent to the Secondary, the Secondary side will run failover work, 909# then takes over server operation to become the service VM. 910# 911# Since: 2.8 912# 913# Example: 914# 915# -> { "execute": "x-colo-lost-heartbeat" } 916# <- { "return": {} } 917# 918## 919{ 'command': 'x-colo-lost-heartbeat' } 920 921## 922# @migrate_cancel: 923# 924# Cancel the current executing migration process. 925# 926# Returns: nothing on success 927# 928# Notes: This command succeeds even if there is no migration process running. 929# 930# Since: 0.14.0 931# 932# Example: 933# 934# -> { "execute": "migrate_cancel" } 935# <- { "return": {} } 936# 937## 938{ 'command': 'migrate_cancel' } 939 940## 941# @migrate-continue: 942# 943# Continue migration when it's in a paused state. 944# 945# @state: The state the migration is currently expected to be in 946# 947# Returns: nothing on success 948# Since: 2.11 949# Example: 950# 951# -> { "execute": "migrate-continue" , "arguments": 952# { "state": "pre-switchover" } } 953# <- { "return": {} } 954## 955{ 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} } 956 957## 958# @migrate_set_downtime: 959# 960# Set maximum tolerated downtime for migration. 961# 962# @value: maximum downtime in seconds 963# 964# Returns: nothing on success 965# 966# Notes: This command is deprecated in favor of 'migrate-set-parameters' 967# 968# Since: 0.14.0 969# 970# Example: 971# 972# -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } } 973# <- { "return": {} } 974# 975## 976{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} } 977 978## 979# @migrate_set_speed: 980# 981# Set maximum speed for migration. 982# 983# @value: maximum speed in bytes per second. 984# 985# Returns: nothing on success 986# 987# Notes: This command is deprecated in favor of 'migrate-set-parameters' 988# 989# Since: 0.14.0 990# 991# Example: 992# 993# -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } 994# <- { "return": {} } 995# 996## 997{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} } 998 999## 1000# @migrate-set-cache-size: 1001# 1002# Set cache size to be used by XBZRLE migration 1003# 1004# @value: cache size in bytes 1005# 1006# The size will be rounded down to the nearest power of 2. 1007# The cache size can be modified before and during ongoing migration 1008# 1009# Returns: nothing on success 1010# 1011# Notes: This command is deprecated in favor of 'migrate-set-parameters' 1012# 1013# Since: 1.2 1014# 1015# Example: 1016# 1017# -> { "execute": "migrate-set-cache-size", 1018# "arguments": { "value": 536870912 } } 1019# <- { "return": {} } 1020# 1021## 1022{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} } 1023 1024## 1025# @query-migrate-cache-size: 1026# 1027# Query migration XBZRLE cache size 1028# 1029# Returns: XBZRLE cache size in bytes 1030# 1031# Notes: This command is deprecated in favor of 'query-migrate-parameters' 1032# 1033# Since: 1.2 1034# 1035# Example: 1036# 1037# -> { "execute": "query-migrate-cache-size" } 1038# <- { "return": 67108864 } 1039# 1040## 1041{ 'command': 'query-migrate-cache-size', 'returns': 'int' } 1042 1043## 1044# @migrate: 1045# 1046# Migrates the current running guest to another Virtual Machine. 1047# 1048# @uri: the Uniform Resource Identifier of the destination VM 1049# 1050# @blk: do block migration (full disk copy) 1051# 1052# @inc: incremental disk copy migration 1053# 1054# @detach: this argument exists only for compatibility reasons and 1055# is ignored by QEMU 1056# 1057# @resume: resume one paused migration, default "off". (since 3.0) 1058# 1059# Returns: nothing on success 1060# 1061# Since: 0.14.0 1062# 1063# Notes: 1064# 1065# 1. The 'query-migrate' command should be used to check migration's progress 1066# and final result (this information is provided by the 'status' member) 1067# 1068# 2. All boolean arguments default to false 1069# 1070# 3. The user Monitor's "detach" argument is invalid in QMP and should not 1071# be used 1072# 1073# Example: 1074# 1075# -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } 1076# <- { "return": {} } 1077# 1078## 1079{ 'command': 'migrate', 1080 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', 1081 '*detach': 'bool', '*resume': 'bool' } } 1082 1083## 1084# @migrate-incoming: 1085# 1086# Start an incoming migration, the qemu must have been started 1087# with -incoming defer 1088# 1089# @uri: The Uniform Resource Identifier identifying the source or 1090# address to listen on 1091# 1092# Returns: nothing on success 1093# 1094# Since: 2.3 1095# 1096# Notes: 1097# 1098# 1. It's a bad idea to use a string for the uri, but it needs to stay 1099# compatible with -incoming and the format of the uri is already exposed 1100# above libvirt. 1101# 1102# 2. QEMU must be started with -incoming defer to allow migrate-incoming to 1103# be used. 1104# 1105# 3. The uri format is the same as for -incoming 1106# 1107# Example: 1108# 1109# -> { "execute": "migrate-incoming", 1110# "arguments": { "uri": "tcp::4446" } } 1111# <- { "return": {} } 1112# 1113## 1114{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } } 1115 1116## 1117# @xen-save-devices-state: 1118# 1119# Save the state of all devices to file. The RAM and the block devices 1120# of the VM are not saved by this command. 1121# 1122# @filename: the file to save the state of the devices to as binary 1123# data. See xen-save-devices-state.txt for a description of the binary 1124# format. 1125# 1126# @live: Optional argument to ask QEMU to treat this command as part of a live 1127# migration. Default to true. (since 2.11) 1128# 1129# Returns: Nothing on success 1130# 1131# Since: 1.1 1132# 1133# Example: 1134# 1135# -> { "execute": "xen-save-devices-state", 1136# "arguments": { "filename": "/tmp/save" } } 1137# <- { "return": {} } 1138# 1139## 1140{ 'command': 'xen-save-devices-state', 1141 'data': {'filename': 'str', '*live':'bool' } } 1142 1143## 1144# @xen-set-replication: 1145# 1146# Enable or disable replication. 1147# 1148# @enable: true to enable, false to disable. 1149# 1150# @primary: true for primary or false for secondary. 1151# 1152# @failover: true to do failover, false to stop. but cannot be 1153# specified if 'enable' is true. default value is false. 1154# 1155# Returns: nothing. 1156# 1157# Example: 1158# 1159# -> { "execute": "xen-set-replication", 1160# "arguments": {"enable": true, "primary": false} } 1161# <- { "return": {} } 1162# 1163# Since: 2.9 1164## 1165{ 'command': 'xen-set-replication', 1166 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } } 1167 1168## 1169# @ReplicationStatus: 1170# 1171# The result format for 'query-xen-replication-status'. 1172# 1173# @error: true if an error happened, false if replication is normal. 1174# 1175# @desc: the human readable error description string, when 1176# @error is 'true'. 1177# 1178# Since: 2.9 1179## 1180{ 'struct': 'ReplicationStatus', 1181 'data': { 'error': 'bool', '*desc': 'str' } } 1182 1183## 1184# @query-xen-replication-status: 1185# 1186# Query replication status while the vm is running. 1187# 1188# Returns: A @ReplicationResult object showing the status. 1189# 1190# Example: 1191# 1192# -> { "execute": "query-xen-replication-status" } 1193# <- { "return": { "error": false } } 1194# 1195# Since: 2.9 1196## 1197{ 'command': 'query-xen-replication-status', 1198 'returns': 'ReplicationStatus' } 1199 1200## 1201# @xen-colo-do-checkpoint: 1202# 1203# Xen uses this command to notify replication to trigger a checkpoint. 1204# 1205# Returns: nothing. 1206# 1207# Example: 1208# 1209# -> { "execute": "xen-colo-do-checkpoint" } 1210# <- { "return": {} } 1211# 1212# Since: 2.9 1213## 1214{ 'command': 'xen-colo-do-checkpoint' } 1215 1216## 1217# @migrate-recover: 1218# 1219# Provide a recovery migration stream URI. 1220# 1221# @uri: the URI to be used for the recovery of migration stream. 1222# 1223# Returns: nothing. 1224# 1225# Example: 1226# 1227# -> { "execute": "migrate-recover", 1228# "arguments": { "uri": "tcp:192.168.1.200:12345" } } 1229# <- { "return": {} } 1230# 1231# Since: 3.0 1232## 1233{ 'command': 'migrate-recover', 'data': { 'uri': 'str' }, 1234 'allow-oob': true } 1235 1236## 1237# @migrate-pause: 1238# 1239# Pause a migration. Currently it only supports postcopy. 1240# 1241# Returns: nothing. 1242# 1243# Example: 1244# 1245# -> { "execute": "migrate-pause" } 1246# <- { "return": {} } 1247# 1248# Since: 3.0 1249## 1250{ 'command': 'migrate-pause', 'allow-oob': true } 1251