qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

qapi-schema: Collect migration stuff in qapi/migration.json

Cc: Juan Quintela <quintela@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1503602048-12268-10-git-send-email-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

+1104 -1093
+1
MAINTAINERS
··· 1498 1498 F: scripts/vmstate-static-checker.py 1499 1499 F: tests/vmstate-static-checker-data/ 1500 1500 F: docs/migration.txt 1501 + F: qapi/migration.json 1501 1502 1502 1503 Seccomp 1503 1504 M: Eduardo Otubo <otubo@redhat.com>
+1
Makefile
··· 413 413 $(SRC_PATH)/qapi/char.json \ 414 414 $(SRC_PATH)/qapi/crypto.json \ 415 415 $(SRC_PATH)/qapi/event.json $(SRC_PATH)/qapi/introspect.json \ 416 + $(SRC_PATH)/qapi/migration.json \ 416 417 $(SRC_PATH)/qapi/net.json \ 417 418 $(SRC_PATH)/qapi/rocker.json \ 418 419 $(SRC_PATH)/qapi/run-state.json \
+1 -1055
qapi-schema.json
··· 87 87 { 'include': 'qapi/net.json' } 88 88 { 'include': 'qapi/rocker.json' } 89 89 { 'include': 'qapi/ui.json' } 90 + { 'include': 'qapi/migration.json' } 90 91 { 'include': 'qapi/event.json' } 91 92 { 'include': 'qapi/trace.json' } 92 93 { 'include': 'qapi/introspect.json' } ··· 115 116 # 116 117 ## 117 118 { 'command': 'qmp_capabilities' } 118 - 119 - ## 120 - # @StrOrNull: 121 - # 122 - # This is a string value or the explicit lack of a string (null 123 - # pointer in C). Intended for cases when 'optional absent' already 124 - # has a different meaning. 125 - # 126 - # @s: the string value 127 - # @n: no string value 128 - # 129 - # Since: 2.10 130 - ## 131 - { 'alternate': 'StrOrNull', 132 - 'data': { 's': 'str', 133 - 'n': 'null' } } 134 119 135 120 ## 136 121 # @LostTickPolicy: ··· 316 301 { 'command': 'query-events', 'returns': ['EventInfo'] } 317 302 318 303 ## 319 - # @MigrationStats: 320 - # 321 - # Detailed migration status. 322 - # 323 - # @transferred: amount of bytes already transferred to the target VM 324 - # 325 - # @remaining: amount of bytes remaining to be transferred to the target VM 326 - # 327 - # @total: total amount of bytes involved in the migration process 328 - # 329 - # @duplicate: number of duplicate (zero) pages (since 1.2) 330 - # 331 - # @skipped: number of skipped zero pages (since 1.5) 332 - # 333 - # @normal: number of normal pages (since 1.2) 334 - # 335 - # @normal-bytes: number of normal bytes sent (since 1.2) 336 - # 337 - # @dirty-pages-rate: number of pages dirtied by second by the 338 - # guest (since 1.3) 339 - # 340 - # @mbps: throughput in megabits/sec. (since 1.6) 341 - # 342 - # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1) 343 - # 344 - # @postcopy-requests: The number of page requests received from the destination 345 - # (since 2.7) 346 - # 347 - # @page-size: The number of bytes per page for the various page-based 348 - # statistics (since 2.10) 349 - # 350 - # Since: 0.14.0 351 - ## 352 - { 'struct': 'MigrationStats', 353 - 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' , 354 - 'duplicate': 'int', 'skipped': 'int', 'normal': 'int', 355 - 'normal-bytes': 'int', 'dirty-pages-rate' : 'int', 356 - 'mbps' : 'number', 'dirty-sync-count' : 'int', 357 - 'postcopy-requests' : 'int', 'page-size' : 'int' } } 358 - 359 - ## 360 - # @XBZRLECacheStats: 361 - # 362 - # Detailed XBZRLE migration cache statistics 363 - # 364 - # @cache-size: XBZRLE cache size 365 - # 366 - # @bytes: amount of bytes already transferred to the target VM 367 - # 368 - # @pages: amount of pages transferred to the target VM 369 - # 370 - # @cache-miss: number of cache miss 371 - # 372 - # @cache-miss-rate: rate of cache miss (since 2.1) 373 - # 374 - # @overflow: number of overflows 375 - # 376 - # Since: 1.2 377 - ## 378 - { 'struct': 'XBZRLECacheStats', 379 - 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int', 380 - 'cache-miss': 'int', 'cache-miss-rate': 'number', 381 - 'overflow': 'int' } } 382 - 383 - ## 384 - # @MigrationStatus: 385 - # 386 - # An enumeration of migration status. 387 - # 388 - # @none: no migration has ever happened. 389 - # 390 - # @setup: migration process has been initiated. 391 - # 392 - # @cancelling: in the process of cancelling migration. 393 - # 394 - # @cancelled: cancelling migration is finished. 395 - # 396 - # @active: in the process of doing migration. 397 - # 398 - # @postcopy-active: like active, but now in postcopy mode. (since 2.5) 399 - # 400 - # @completed: migration is finished. 401 - # 402 - # @failed: some error occurred during migration process. 403 - # 404 - # @colo: VM is in the process of fault tolerance, VM can not get into this 405 - # state unless colo capability is enabled for migration. (since 2.8) 406 - # 407 - # Since: 2.3 408 - # 409 - ## 410 - { 'enum': 'MigrationStatus', 411 - 'data': [ 'none', 'setup', 'cancelling', 'cancelled', 412 - 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] } 413 - 414 - ## 415 - # @MigrationInfo: 416 - # 417 - # Information about current migration process. 418 - # 419 - # @status: @MigrationStatus describing the current migration status. 420 - # If this field is not returned, no migration process 421 - # has been initiated 422 - # 423 - # @ram: @MigrationStats containing detailed migration 424 - # status, only returned if status is 'active' or 425 - # 'completed'(since 1.2) 426 - # 427 - # @disk: @MigrationStats containing detailed disk migration 428 - # status, only returned if status is 'active' and it is a block 429 - # migration 430 - # 431 - # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE 432 - # migration statistics, only returned if XBZRLE feature is on and 433 - # status is 'active' or 'completed' (since 1.2) 434 - # 435 - # @total-time: total amount of milliseconds since migration started. 436 - # If migration has ended, it returns the total migration 437 - # time. (since 1.2) 438 - # 439 - # @downtime: only present when migration finishes correctly 440 - # total downtime in milliseconds for the guest. 441 - # (since 1.3) 442 - # 443 - # @expected-downtime: only present while migration is active 444 - # expected downtime in milliseconds for the guest in last walk 445 - # of the dirty bitmap. (since 1.3) 446 - # 447 - # @setup-time: amount of setup time in milliseconds _before_ the 448 - # iterations begin but _after_ the QMP command is issued. This is designed 449 - # to provide an accounting of any activities (such as RDMA pinning) which 450 - # may be expensive, but do not actually occur during the iterative 451 - # migration rounds themselves. (since 1.6) 452 - # 453 - # @cpu-throttle-percentage: percentage of time guest cpus are being 454 - # throttled during auto-converge. This is only present when auto-converge 455 - # has started throttling guest cpus. (Since 2.7) 456 - # 457 - # @error-desc: the human readable error description string, when 458 - # @status is 'failed'. Clients should not attempt to parse the 459 - # error strings. (Since 2.7) 460 - # 461 - # Since: 0.14.0 462 - ## 463 - { 'struct': 'MigrationInfo', 464 - 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats', 465 - '*disk': 'MigrationStats', 466 - '*xbzrle-cache': 'XBZRLECacheStats', 467 - '*total-time': 'int', 468 - '*expected-downtime': 'int', 469 - '*downtime': 'int', 470 - '*setup-time': 'int', 471 - '*cpu-throttle-percentage': 'int', 472 - '*error-desc': 'str'} } 473 - 474 - ## 475 - # @query-migrate: 476 - # 477 - # Returns information about current migration process. If migration 478 - # is active there will be another json-object with RAM migration 479 - # status and if block migration is active another one with block 480 - # migration status. 481 - # 482 - # Returns: @MigrationInfo 483 - # 484 - # Since: 0.14.0 485 - # 486 - # Example: 487 - # 488 - # 1. Before the first migration 489 - # 490 - # -> { "execute": "query-migrate" } 491 - # <- { "return": {} } 492 - # 493 - # 2. Migration is done and has succeeded 494 - # 495 - # -> { "execute": "query-migrate" } 496 - # <- { "return": { 497 - # "status": "completed", 498 - # "ram":{ 499 - # "transferred":123, 500 - # "remaining":123, 501 - # "total":246, 502 - # "total-time":12345, 503 - # "setup-time":12345, 504 - # "downtime":12345, 505 - # "duplicate":123, 506 - # "normal":123, 507 - # "normal-bytes":123456, 508 - # "dirty-sync-count":15 509 - # } 510 - # } 511 - # } 512 - # 513 - # 3. Migration is done and has failed 514 - # 515 - # -> { "execute": "query-migrate" } 516 - # <- { "return": { "status": "failed" } } 517 - # 518 - # 4. Migration is being performed and is not a block migration: 519 - # 520 - # -> { "execute": "query-migrate" } 521 - # <- { 522 - # "return":{ 523 - # "status":"active", 524 - # "ram":{ 525 - # "transferred":123, 526 - # "remaining":123, 527 - # "total":246, 528 - # "total-time":12345, 529 - # "setup-time":12345, 530 - # "expected-downtime":12345, 531 - # "duplicate":123, 532 - # "normal":123, 533 - # "normal-bytes":123456, 534 - # "dirty-sync-count":15 535 - # } 536 - # } 537 - # } 538 - # 539 - # 5. Migration is being performed and is a block migration: 540 - # 541 - # -> { "execute": "query-migrate" } 542 - # <- { 543 - # "return":{ 544 - # "status":"active", 545 - # "ram":{ 546 - # "total":1057024, 547 - # "remaining":1053304, 548 - # "transferred":3720, 549 - # "total-time":12345, 550 - # "setup-time":12345, 551 - # "expected-downtime":12345, 552 - # "duplicate":123, 553 - # "normal":123, 554 - # "normal-bytes":123456, 555 - # "dirty-sync-count":15 556 - # }, 557 - # "disk":{ 558 - # "total":20971520, 559 - # "remaining":20880384, 560 - # "transferred":91136 561 - # } 562 - # } 563 - # } 564 - # 565 - # 6. Migration is being performed and XBZRLE is active: 566 - # 567 - # -> { "execute": "query-migrate" } 568 - # <- { 569 - # "return":{ 570 - # "status":"active", 571 - # "capabilities" : [ { "capability": "xbzrle", "state" : true } ], 572 - # "ram":{ 573 - # "total":1057024, 574 - # "remaining":1053304, 575 - # "transferred":3720, 576 - # "total-time":12345, 577 - # "setup-time":12345, 578 - # "expected-downtime":12345, 579 - # "duplicate":10, 580 - # "normal":3333, 581 - # "normal-bytes":3412992, 582 - # "dirty-sync-count":15 583 - # }, 584 - # "xbzrle-cache":{ 585 - # "cache-size":67108864, 586 - # "bytes":20971520, 587 - # "pages":2444343, 588 - # "cache-miss":2244, 589 - # "cache-miss-rate":0.123, 590 - # "overflow":34434 591 - # } 592 - # } 593 - # } 594 - # 595 - ## 596 - { 'command': 'query-migrate', 'returns': 'MigrationInfo' } 597 - 598 - ## 599 - # @MigrationCapability: 600 - # 601 - # Migration capabilities enumeration 602 - # 603 - # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding). 604 - # This feature allows us to minimize migration traffic for certain work 605 - # loads, by sending compressed difference of the pages 606 - # 607 - # @rdma-pin-all: Controls whether or not the entire VM memory footprint is 608 - # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage. 609 - # Disabled by default. (since 2.0) 610 - # 611 - # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This 612 - # essentially saves 1MB of zeroes per block on the wire. Enabling requires 613 - # source and target VM to support this feature. To enable it is sufficient 614 - # to enable the capability on the source VM. The feature is disabled by 615 - # default. (since 1.6) 616 - # 617 - # @compress: Use multiple compression threads to accelerate live migration. 618 - # This feature can help to reduce the migration traffic, by sending 619 - # compressed pages. Please note that if compress and xbzrle are both 620 - # on, compress only takes effect in the ram bulk stage, after that, 621 - # it will be disabled and only xbzrle takes effect, this can help to 622 - # minimize migration traffic. The feature is disabled by default. 623 - # (since 2.4 ) 624 - # 625 - # @events: generate events for each migration state change 626 - # (since 2.4 ) 627 - # 628 - # @auto-converge: If enabled, QEMU will automatically throttle down the guest 629 - # to speed up convergence of RAM migration. (since 1.6) 630 - # 631 - # @postcopy-ram: Start executing on the migration target before all of RAM has 632 - # been migrated, pulling the remaining pages along as needed. NOTE: If 633 - # the migration fails during postcopy the VM will fail. (since 2.6) 634 - # 635 - # @x-colo: If enabled, migration will never end, and the state of the VM on the 636 - # primary side will be migrated continuously to the VM on secondary 637 - # side, this process is called COarse-Grain LOck Stepping (COLO) for 638 - # Non-stop Service. (since 2.8) 639 - # 640 - # @release-ram: if enabled, qemu will free the migrated ram pages on the source 641 - # during postcopy-ram migration. (since 2.9) 642 - # 643 - # @block: If enabled, QEMU will also migrate the contents of all block 644 - # devices. Default is disabled. A possible alternative uses 645 - # mirror jobs to a builtin NBD server on the destination, which 646 - # offers more flexibility. 647 - # (Since 2.10) 648 - # 649 - # @return-path: If enabled, migration will use the return path even 650 - # for precopy. (since 2.10) 651 - # 652 - # Since: 1.2 653 - ## 654 - { 'enum': 'MigrationCapability', 655 - 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', 656 - 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram', 657 - 'block', 'return-path' ] } 658 - 659 - ## 660 - # @MigrationCapabilityStatus: 661 - # 662 - # Migration capability information 663 - # 664 - # @capability: capability enum 665 - # 666 - # @state: capability state bool 667 - # 668 - # Since: 1.2 669 - ## 670 - { 'struct': 'MigrationCapabilityStatus', 671 - 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } } 672 - 673 - ## 674 - # @migrate-set-capabilities: 675 - # 676 - # Enable/Disable the following migration capabilities (like xbzrle) 677 - # 678 - # @capabilities: json array of capability modifications to make 679 - # 680 - # Since: 1.2 681 - # 682 - # Example: 683 - # 684 - # -> { "execute": "migrate-set-capabilities" , "arguments": 685 - # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } } 686 - # 687 - ## 688 - { 'command': 'migrate-set-capabilities', 689 - 'data': { 'capabilities': ['MigrationCapabilityStatus'] } } 690 - 691 - ## 692 - # @query-migrate-capabilities: 693 - # 694 - # Returns information about the current migration capabilities status 695 - # 696 - # Returns: @MigrationCapabilitiesStatus 697 - # 698 - # Since: 1.2 699 - # 700 - # Example: 701 - # 702 - # -> { "execute": "query-migrate-capabilities" } 703 - # <- { "return": [ 704 - # {"state": false, "capability": "xbzrle"}, 705 - # {"state": false, "capability": "rdma-pin-all"}, 706 - # {"state": false, "capability": "auto-converge"}, 707 - # {"state": false, "capability": "zero-blocks"}, 708 - # {"state": false, "capability": "compress"}, 709 - # {"state": true, "capability": "events"}, 710 - # {"state": false, "capability": "postcopy-ram"}, 711 - # {"state": false, "capability": "x-colo"} 712 - # ]} 713 - # 714 - ## 715 - { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']} 716 - 717 - ## 718 - # @MigrationParameter: 719 - # 720 - # Migration parameters enumeration 721 - # 722 - # @compress-level: Set the compression level to be used in live migration, 723 - # the compression level is an integer between 0 and 9, where 0 means 724 - # no compression, 1 means the best compression speed, and 9 means best 725 - # compression ratio which will consume more CPU. 726 - # 727 - # @compress-threads: Set compression thread count to be used in live migration, 728 - # the compression thread count is an integer between 1 and 255. 729 - # 730 - # @decompress-threads: Set decompression thread count to be used in live 731 - # migration, the decompression thread count is an integer between 1 732 - # and 255. Usually, decompression is at least 4 times as fast as 733 - # compression, so set the decompress-threads to the number about 1/4 734 - # of compress-threads is adequate. 735 - # 736 - # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled 737 - # when migration auto-converge is activated. The 738 - # default value is 20. (Since 2.7) 739 - # 740 - # @cpu-throttle-increment: throttle percentage increase each time 741 - # auto-converge detects that migration is not making 742 - # progress. The default value is 10. (Since 2.7) 743 - # 744 - # @tls-creds: ID of the 'tls-creds' object that provides credentials for 745 - # establishing a TLS connection over the migration data channel. 746 - # On the outgoing side of the migration, the credentials must 747 - # be for a 'client' endpoint, while for the incoming side the 748 - # credentials must be for a 'server' endpoint. Setting this 749 - # will enable TLS for all migrations. The default is unset, 750 - # resulting in unsecured migration at the QEMU level. (Since 2.7) 751 - # 752 - # @tls-hostname: hostname of the target host for the migration. This is 753 - # required when using x509 based TLS credentials and the 754 - # migration URI does not already include a hostname. For 755 - # example if using fd: or exec: based migration, the 756 - # hostname must be provided so that the server's x509 757 - # certificate identity can be validated. (Since 2.7) 758 - # 759 - # @max-bandwidth: to set maximum speed for migration. maximum speed in 760 - # bytes per second. (Since 2.8) 761 - # 762 - # @downtime-limit: set maximum tolerated downtime for migration. maximum 763 - # downtime in milliseconds (Since 2.8) 764 - # 765 - # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in 766 - # periodic mode. (Since 2.8) 767 - # 768 - # @block-incremental: Affects how much storage is migrated when the 769 - # block migration capability is enabled. When false, the entire 770 - # storage backing chain is migrated into a flattened image at 771 - # the destination; when true, only the active qcow2 layer is 772 - # migrated and the destination must already have access to the 773 - # same backing chain as was used on the source. (since 2.10) 774 - # 775 - # Since: 2.4 776 - ## 777 - { 'enum': 'MigrationParameter', 778 - 'data': ['compress-level', 'compress-threads', 'decompress-threads', 779 - 'cpu-throttle-initial', 'cpu-throttle-increment', 780 - 'tls-creds', 'tls-hostname', 'max-bandwidth', 781 - 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] } 782 - 783 - ## 784 - # @MigrateSetParameters: 785 - # 786 - # @compress-level: compression level 787 - # 788 - # @compress-threads: compression thread count 789 - # 790 - # @decompress-threads: decompression thread count 791 - # 792 - # @cpu-throttle-initial: Initial percentage of time guest cpus are 793 - # throttled when migration auto-converge is activated. 794 - # The default value is 20. (Since 2.7) 795 - # 796 - # @cpu-throttle-increment: throttle percentage increase each time 797 - # auto-converge detects that migration is not making 798 - # progress. The default value is 10. (Since 2.7) 799 - # 800 - # @tls-creds: ID of the 'tls-creds' object that provides credentials 801 - # for establishing a TLS connection over the migration data 802 - # channel. On the outgoing side of the migration, the credentials 803 - # must be for a 'client' endpoint, while for the incoming side the 804 - # credentials must be for a 'server' endpoint. Setting this 805 - # to a non-empty string enables TLS for all migrations. 806 - # An empty string means that QEMU will use plain text mode for 807 - # migration, rather than TLS (Since 2.9) 808 - # Previously (since 2.7), this was reported by omitting 809 - # tls-creds instead. 810 - # 811 - # @tls-hostname: hostname of the target host for the migration. This 812 - # is required when using x509 based TLS credentials and the 813 - # migration URI does not already include a hostname. For 814 - # example if using fd: or exec: based migration, the 815 - # hostname must be provided so that the server's x509 816 - # certificate identity can be validated. (Since 2.7) 817 - # An empty string means that QEMU will use the hostname 818 - # associated with the migration URI, if any. (Since 2.9) 819 - # Previously (since 2.7), this was reported by omitting 820 - # tls-hostname instead. 821 - # 822 - # @max-bandwidth: to set maximum speed for migration. maximum speed in 823 - # bytes per second. (Since 2.8) 824 - # 825 - # @downtime-limit: set maximum tolerated downtime for migration. maximum 826 - # downtime in milliseconds (Since 2.8) 827 - # 828 - # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8) 829 - # 830 - # @block-incremental: Affects how much storage is migrated when the 831 - # block migration capability is enabled. When false, the entire 832 - # storage backing chain is migrated into a flattened image at 833 - # the destination; when true, only the active qcow2 layer is 834 - # migrated and the destination must already have access to the 835 - # same backing chain as was used on the source. (since 2.10) 836 - # 837 - # Since: 2.4 838 - ## 839 - # TODO either fuse back into MigrationParameters, or make 840 - # MigrationParameters members mandatory 841 - { 'struct': 'MigrateSetParameters', 842 - 'data': { '*compress-level': 'int', 843 - '*compress-threads': 'int', 844 - '*decompress-threads': 'int', 845 - '*cpu-throttle-initial': 'int', 846 - '*cpu-throttle-increment': 'int', 847 - '*tls-creds': 'StrOrNull', 848 - '*tls-hostname': 'StrOrNull', 849 - '*max-bandwidth': 'int', 850 - '*downtime-limit': 'int', 851 - '*x-checkpoint-delay': 'int', 852 - '*block-incremental': 'bool' } } 853 - 854 - ## 855 - # @migrate-set-parameters: 856 - # 857 - # Set various migration parameters. 858 - # 859 - # Since: 2.4 860 - # 861 - # Example: 862 - # 863 - # -> { "execute": "migrate-set-parameters" , 864 - # "arguments": { "compress-level": 1 } } 865 - # 866 - ## 867 - { 'command': 'migrate-set-parameters', 'boxed': true, 868 - 'data': 'MigrateSetParameters' } 869 - 870 - ## 871 - # @MigrationParameters: 872 - # 873 - # The optional members aren't actually optional. 874 - # 875 - # @compress-level: compression level 876 - # 877 - # @compress-threads: compression thread count 878 - # 879 - # @decompress-threads: decompression thread count 880 - # 881 - # @cpu-throttle-initial: Initial percentage of time guest cpus are 882 - # throttled when migration auto-converge is activated. 883 - # (Since 2.7) 884 - # 885 - # @cpu-throttle-increment: throttle percentage increase each time 886 - # auto-converge detects that migration is not making 887 - # progress. (Since 2.7) 888 - # 889 - # @tls-creds: ID of the 'tls-creds' object that provides credentials 890 - # for establishing a TLS connection over the migration data 891 - # channel. On the outgoing side of the migration, the credentials 892 - # must be for a 'client' endpoint, while for the incoming side the 893 - # credentials must be for a 'server' endpoint. 894 - # An empty string means that QEMU will use plain text mode for 895 - # migration, rather than TLS (Since 2.7) 896 - # Note: 2.8 reports this by omitting tls-creds instead. 897 - # 898 - # @tls-hostname: hostname of the target host for the migration. This 899 - # is required when using x509 based TLS credentials and the 900 - # migration URI does not already include a hostname. For 901 - # example if using fd: or exec: based migration, the 902 - # hostname must be provided so that the server's x509 903 - # certificate identity can be validated. (Since 2.7) 904 - # An empty string means that QEMU will use the hostname 905 - # associated with the migration URI, if any. (Since 2.9) 906 - # Note: 2.8 reports this by omitting tls-hostname instead. 907 - # 908 - # @max-bandwidth: to set maximum speed for migration. maximum speed in 909 - # bytes per second. (Since 2.8) 910 - # 911 - # @downtime-limit: set maximum tolerated downtime for migration. maximum 912 - # downtime in milliseconds (Since 2.8) 913 - # 914 - # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8) 915 - # 916 - # @block-incremental: Affects how much storage is migrated when the 917 - # block migration capability is enabled. When false, the entire 918 - # storage backing chain is migrated into a flattened image at 919 - # the destination; when true, only the active qcow2 layer is 920 - # migrated and the destination must already have access to the 921 - # same backing chain as was used on the source. (since 2.10) 922 - # 923 - # Since: 2.4 924 - ## 925 - { 'struct': 'MigrationParameters', 926 - 'data': { '*compress-level': 'int', 927 - '*compress-threads': 'int', 928 - '*decompress-threads': 'int', 929 - '*cpu-throttle-initial': 'int', 930 - '*cpu-throttle-increment': 'int', 931 - '*tls-creds': 'str', 932 - '*tls-hostname': 'str', 933 - '*max-bandwidth': 'int', 934 - '*downtime-limit': 'int', 935 - '*x-checkpoint-delay': 'int', 936 - '*block-incremental': 'bool' } } 937 - 938 - ## 939 - # @query-migrate-parameters: 940 - # 941 - # Returns information about the current migration parameters 942 - # 943 - # Returns: @MigrationParameters 944 - # 945 - # Since: 2.4 946 - # 947 - # Example: 948 - # 949 - # -> { "execute": "query-migrate-parameters" } 950 - # <- { "return": { 951 - # "decompress-threads": 2, 952 - # "cpu-throttle-increment": 10, 953 - # "compress-threads": 8, 954 - # "compress-level": 1, 955 - # "cpu-throttle-initial": 20, 956 - # "max-bandwidth": 33554432, 957 - # "downtime-limit": 300 958 - # } 959 - # } 960 - # 961 - ## 962 - { 'command': 'query-migrate-parameters', 963 - 'returns': 'MigrationParameters' } 964 - 965 - ## 966 - # @client_migrate_info: 967 - # 968 - # Set migration information for remote display. This makes the server 969 - # ask the client to automatically reconnect using the new parameters 970 - # once migration finished successfully. Only implemented for SPICE. 971 - # 972 - # @protocol: must be "spice" 973 - # @hostname: migration target hostname 974 - # @port: spice tcp port for plaintext channels 975 - # @tls-port: spice tcp port for tls-secured channels 976 - # @cert-subject: server certificate subject 977 - # 978 - # Since: 0.14.0 979 - # 980 - # Example: 981 - # 982 - # -> { "execute": "client_migrate_info", 983 - # "arguments": { "protocol": "spice", 984 - # "hostname": "virt42.lab.kraxel.org", 985 - # "port": 1234 } } 986 - # <- { "return": {} } 987 - # 988 - ## 989 - { 'command': 'client_migrate_info', 990 - 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int', 991 - '*tls-port': 'int', '*cert-subject': 'str' } } 992 - 993 - ## 994 - # @migrate-start-postcopy: 995 - # 996 - # Followup to a migration command to switch the migration to postcopy mode. 997 - # The postcopy-ram capability must be set before the original migration 998 - # command. 999 - # 1000 - # Since: 2.5 1001 - # 1002 - # Example: 1003 - # 1004 - # -> { "execute": "migrate-start-postcopy" } 1005 - # <- { "return": {} } 1006 - # 1007 - ## 1008 - { 'command': 'migrate-start-postcopy' } 1009 - 1010 - ## 1011 - # @COLOMessage: 1012 - # 1013 - # The message transmission between Primary side and Secondary side. 1014 - # 1015 - # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing 1016 - # 1017 - # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing 1018 - # 1019 - # @checkpoint-reply: SVM gets PVM's checkpoint request 1020 - # 1021 - # @vmstate-send: VM's state will be sent by PVM. 1022 - # 1023 - # @vmstate-size: The total size of VMstate. 1024 - # 1025 - # @vmstate-received: VM's state has been received by SVM. 1026 - # 1027 - # @vmstate-loaded: VM's state has been loaded by SVM. 1028 - # 1029 - # Since: 2.8 1030 - ## 1031 - { 'enum': 'COLOMessage', 1032 - 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply', 1033 - 'vmstate-send', 'vmstate-size', 'vmstate-received', 1034 - 'vmstate-loaded' ] } 1035 - 1036 - ## 1037 - # @COLOMode: 1038 - # 1039 - # The colo mode 1040 - # 1041 - # @unknown: unknown mode 1042 - # 1043 - # @primary: master side 1044 - # 1045 - # @secondary: slave side 1046 - # 1047 - # Since: 2.8 1048 - ## 1049 - { 'enum': 'COLOMode', 1050 - 'data': [ 'unknown', 'primary', 'secondary'] } 1051 - 1052 - ## 1053 - # @FailoverStatus: 1054 - # 1055 - # An enumeration of COLO failover status 1056 - # 1057 - # @none: no failover has ever happened 1058 - # 1059 - # @require: got failover requirement but not handled 1060 - # 1061 - # @active: in the process of doing failover 1062 - # 1063 - # @completed: finish the process of failover 1064 - # 1065 - # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9) 1066 - # 1067 - # Since: 2.8 1068 - ## 1069 - { 'enum': 'FailoverStatus', 1070 - 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] } 1071 - 1072 - ## 1073 - # @x-colo-lost-heartbeat: 1074 - # 1075 - # Tell qemu that heartbeat is lost, request it to do takeover procedures. 1076 - # If this command is sent to the PVM, the Primary side will exit COLO mode. 1077 - # If sent to the Secondary, the Secondary side will run failover work, 1078 - # then takes over server operation to become the service VM. 1079 - # 1080 - # Since: 2.8 1081 - # 1082 - # Example: 1083 - # 1084 - # -> { "execute": "x-colo-lost-heartbeat" } 1085 - # <- { "return": {} } 1086 - # 1087 - ## 1088 - { 'command': 'x-colo-lost-heartbeat' } 1089 - 1090 - ## 1091 304 # @CpuInfoArch: 1092 305 # 1093 306 # An enumeration of cpu types that enable additional information during ··· 2072 1285 'returns': 'str' } 2073 1286 2074 1287 ## 2075 - # @migrate_cancel: 2076 - # 2077 - # Cancel the current executing migration process. 2078 - # 2079 - # Returns: nothing on success 2080 - # 2081 - # Notes: This command succeeds even if there is no migration process running. 2082 - # 2083 - # Since: 0.14.0 2084 - # 2085 - # Example: 2086 - # 2087 - # -> { "execute": "migrate_cancel" } 2088 - # <- { "return": {} } 2089 - # 2090 - ## 2091 - { 'command': 'migrate_cancel' } 2092 - 2093 - ## 2094 - # @migrate_set_downtime: 2095 - # 2096 - # Set maximum tolerated downtime for migration. 2097 - # 2098 - # @value: maximum downtime in seconds 2099 - # 2100 - # Returns: nothing on success 2101 - # 2102 - # Notes: This command is deprecated in favor of 'migrate-set-parameters' 2103 - # 2104 - # Since: 0.14.0 2105 - # 2106 - # Example: 2107 - # 2108 - # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } } 2109 - # <- { "return": {} } 2110 - # 2111 - ## 2112 - { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} } 2113 - 2114 - ## 2115 - # @migrate_set_speed: 2116 - # 2117 - # Set maximum speed for migration. 2118 - # 2119 - # @value: maximum speed in bytes per second. 2120 - # 2121 - # Returns: nothing on success 2122 - # 2123 - # Notes: This command is deprecated in favor of 'migrate-set-parameters' 2124 - # 2125 - # Since: 0.14.0 2126 - # 2127 - # Example: 2128 - # 2129 - # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } 2130 - # <- { "return": {} } 2131 - # 2132 - ## 2133 - { 'command': 'migrate_set_speed', 'data': {'value': 'int'} } 2134 - 2135 - ## 2136 - # @migrate-set-cache-size: 2137 - # 2138 - # Set cache size to be used by XBZRLE migration 2139 - # 2140 - # @value: cache size in bytes 2141 - # 2142 - # The size will be rounded down to the nearest power of 2. 2143 - # The cache size can be modified before and during ongoing migration 2144 - # 2145 - # Returns: nothing on success 2146 - # 2147 - # Since: 1.2 2148 - # 2149 - # Example: 2150 - # 2151 - # -> { "execute": "migrate-set-cache-size", 2152 - # "arguments": { "value": 536870912 } } 2153 - # <- { "return": {} } 2154 - # 2155 - ## 2156 - { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} } 2157 - 2158 - ## 2159 - # @query-migrate-cache-size: 2160 - # 2161 - # Query migration XBZRLE cache size 2162 - # 2163 - # Returns: XBZRLE cache size in bytes 2164 - # 2165 - # Since: 1.2 2166 - # 2167 - # Example: 2168 - # 2169 - # -> { "execute": "query-migrate-cache-size" } 2170 - # <- { "return": 67108864 } 2171 - # 2172 - ## 2173 - { 'command': 'query-migrate-cache-size', 'returns': 'int' } 2174 - 2175 - ## 2176 1288 # @ObjectPropertyInfo: 2177 1289 # 2178 1290 # @name: the name of the property ··· 2376 1488 { 'command': 'device-list-properties', 2377 1489 'data': { 'typename': 'str'}, 2378 1490 'returns': [ 'DevicePropertyInfo' ] } 2379 - 2380 - ## 2381 - # @migrate: 2382 - # 2383 - # Migrates the current running guest to another Virtual Machine. 2384 - # 2385 - # @uri: the Uniform Resource Identifier of the destination VM 2386 - # 2387 - # @blk: do block migration (full disk copy) 2388 - # 2389 - # @inc: incremental disk copy migration 2390 - # 2391 - # @detach: this argument exists only for compatibility reasons and 2392 - # is ignored by QEMU 2393 - # 2394 - # Returns: nothing on success 2395 - # 2396 - # Since: 0.14.0 2397 - # 2398 - # Notes: 2399 - # 2400 - # 1. The 'query-migrate' command should be used to check migration's progress 2401 - # and final result (this information is provided by the 'status' member) 2402 - # 2403 - # 2. All boolean arguments default to false 2404 - # 2405 - # 3. The user Monitor's "detach" argument is invalid in QMP and should not 2406 - # be used 2407 - # 2408 - # Example: 2409 - # 2410 - # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } 2411 - # <- { "return": {} } 2412 - # 2413 - ## 2414 - { 'command': 'migrate', 2415 - 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } } 2416 - 2417 - ## 2418 - # @migrate-incoming: 2419 - # 2420 - # Start an incoming migration, the qemu must have been started 2421 - # with -incoming defer 2422 - # 2423 - # @uri: The Uniform Resource Identifier identifying the source or 2424 - # address to listen on 2425 - # 2426 - # Returns: nothing on success 2427 - # 2428 - # Since: 2.3 2429 - # 2430 - # Notes: 2431 - # 2432 - # 1. It's a bad idea to use a string for the uri, but it needs to stay 2433 - # compatible with -incoming and the format of the uri is already exposed 2434 - # above libvirt. 2435 - # 2436 - # 2. QEMU must be started with -incoming defer to allow migrate-incoming to 2437 - # be used. 2438 - # 2439 - # 3. The uri format is the same as for -incoming 2440 - # 2441 - # Example: 2442 - # 2443 - # -> { "execute": "migrate-incoming", 2444 - # "arguments": { "uri": "tcp::4446" } } 2445 - # <- { "return": {} } 2446 - # 2447 - ## 2448 - { 'command': 'migrate-incoming', 'data': {'uri': 'str' } } 2449 - 2450 - ## 2451 - # @xen-save-devices-state: 2452 - # 2453 - # Save the state of all devices to file. The RAM and the block devices 2454 - # of the VM are not saved by this command. 2455 - # 2456 - # @filename: the file to save the state of the devices to as binary 2457 - # data. See xen-save-devices-state.txt for a description of the binary 2458 - # format. 2459 - # 2460 - # Returns: Nothing on success 2461 - # 2462 - # Since: 1.1 2463 - # 2464 - # Example: 2465 - # 2466 - # -> { "execute": "xen-save-devices-state", 2467 - # "arguments": { "filename": "/tmp/save" } } 2468 - # <- { "return": {} } 2469 - # 2470 - ## 2471 - { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} } 2472 1491 2473 1492 ## 2474 1493 # @xen-set-global-dirty-log: ··· 4035 3054 # 4036 3055 ## 4037 3056 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } 4038 - 4039 - ## 4040 - # @xen-set-replication: 4041 - # 4042 - # Enable or disable replication. 4043 - # 4044 - # @enable: true to enable, false to disable. 4045 - # 4046 - # @primary: true for primary or false for secondary. 4047 - # 4048 - # @failover: true to do failover, false to stop. but cannot be 4049 - # specified if 'enable' is true. default value is false. 4050 - # 4051 - # Returns: nothing. 4052 - # 4053 - # Example: 4054 - # 4055 - # -> { "execute": "xen-set-replication", 4056 - # "arguments": {"enable": true, "primary": false} } 4057 - # <- { "return": {} } 4058 - # 4059 - # Since: 2.9 4060 - ## 4061 - { 'command': 'xen-set-replication', 4062 - 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } } 4063 - 4064 - ## 4065 - # @ReplicationStatus: 4066 - # 4067 - # The result format for 'query-xen-replication-status'. 4068 - # 4069 - # @error: true if an error happened, false if replication is normal. 4070 - # 4071 - # @desc: the human readable error description string, when 4072 - # @error is 'true'. 4073 - # 4074 - # Since: 2.9 4075 - ## 4076 - { 'struct': 'ReplicationStatus', 4077 - 'data': { 'error': 'bool', '*desc': 'str' } } 4078 - 4079 - ## 4080 - # @query-xen-replication-status: 4081 - # 4082 - # Query replication status while the vm is running. 4083 - # 4084 - # Returns: A @ReplicationResult object showing the status. 4085 - # 4086 - # Example: 4087 - # 4088 - # -> { "execute": "query-xen-replication-status" } 4089 - # <- { "return": { "error": false } } 4090 - # 4091 - # Since: 2.9 4092 - ## 4093 - { 'command': 'query-xen-replication-status', 4094 - 'returns': 'ReplicationStatus' } 4095 - 4096 - ## 4097 - # @xen-colo-do-checkpoint: 4098 - # 4099 - # Xen uses this command to notify replication to trigger a checkpoint. 4100 - # 4101 - # Returns: nothing. 4102 - # 4103 - # Example: 4104 - # 4105 - # -> { "execute": "xen-colo-do-checkpoint" } 4106 - # <- { "return": {} } 4107 - # 4108 - # Since: 2.9 4109 - ## 4110 - { 'command': 'xen-colo-do-checkpoint' } 4111 3057 4112 3058 ## 4113 3059 # @GICCapability:
+16
qapi/common.json
··· 173 173 { 'struct': 'String', 174 174 'data': { 175 175 'str': 'str' } } 176 + 177 + ## 178 + # @StrOrNull: 179 + # 180 + # This is a string value or the explicit lack of a string (null 181 + # pointer in C). Intended for cases when 'optional absent' already 182 + # has a different meaning. 183 + # 184 + # @s: the string value 185 + # @n: no string value 186 + # 187 + # Since: 2.10 188 + ## 189 + { 'alternate': 'StrOrNull', 190 + 'data': { 's': 'str', 191 + 'n': 'null' } }
-38
qapi/event.json
··· 51 51 'data': { '*device': 'str', 'path': 'str' } } 52 52 53 53 ## 54 - # @MIGRATION: 55 - # 56 - # Emitted when a migration event happens 57 - # 58 - # @status: @MigrationStatus describing the current migration status. 59 - # 60 - # Since: 2.4 61 - # 62 - # Example: 63 - # 64 - # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001}, 65 - # "event": "MIGRATION", 66 - # "data": {"status": "completed"} } 67 - # 68 - ## 69 - { 'event': 'MIGRATION', 70 - 'data': {'status': 'MigrationStatus'}} 71 - 72 - ## 73 - # @MIGRATION_PASS: 74 - # 75 - # Emitted from the source side of a migration at the start of each pass 76 - # (when it syncs the dirty bitmap) 77 - # 78 - # @pass: An incrementing count (starting at 1 on the first pass) 79 - # 80 - # Since: 2.6 81 - # 82 - # Example: 83 - # 84 - # { "timestamp": {"seconds": 1449669631, "microseconds": 239225}, 85 - # "event": "MIGRATION_PASS", "data": {"pass": 2} } 86 - # 87 - ## 88 - { 'event': 'MIGRATION_PASS', 89 - 'data': { 'pass': 'int' } } 90 - 91 - ## 92 54 # @ACPI_DEVICE_OST: 93 55 # 94 56 # Emitted when guest executes ACPI _OST method.
+1085
qapi/migration.json
··· 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 + # Since: 0.14.0 43 + ## 44 + { 'struct': 'MigrationStats', 45 + 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' , 46 + 'duplicate': 'int', 'skipped': 'int', 'normal': 'int', 47 + 'normal-bytes': 'int', 'dirty-pages-rate' : 'int', 48 + 'mbps' : 'number', 'dirty-sync-count' : 'int', 49 + 'postcopy-requests' : 'int', 'page-size' : 'int' } } 50 + 51 + ## 52 + # @XBZRLECacheStats: 53 + # 54 + # Detailed XBZRLE migration cache statistics 55 + # 56 + # @cache-size: XBZRLE cache size 57 + # 58 + # @bytes: amount of bytes already transferred to the target VM 59 + # 60 + # @pages: amount of pages transferred to the target VM 61 + # 62 + # @cache-miss: number of cache miss 63 + # 64 + # @cache-miss-rate: rate of cache miss (since 2.1) 65 + # 66 + # @overflow: number of overflows 67 + # 68 + # Since: 1.2 69 + ## 70 + { 'struct': 'XBZRLECacheStats', 71 + 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int', 72 + 'cache-miss': 'int', 'cache-miss-rate': 'number', 73 + 'overflow': 'int' } } 74 + 75 + ## 76 + # @MigrationStatus: 77 + # 78 + # An enumeration of migration status. 79 + # 80 + # @none: no migration has ever happened. 81 + # 82 + # @setup: migration process has been initiated. 83 + # 84 + # @cancelling: in the process of cancelling migration. 85 + # 86 + # @cancelled: cancelling migration is finished. 87 + # 88 + # @active: in the process of doing migration. 89 + # 90 + # @postcopy-active: like active, but now in postcopy mode. (since 2.5) 91 + # 92 + # @completed: migration is finished. 93 + # 94 + # @failed: some error occurred during migration process. 95 + # 96 + # @colo: VM is in the process of fault tolerance, VM can not get into this 97 + # state unless colo capability is enabled for migration. (since 2.8) 98 + # 99 + # Since: 2.3 100 + # 101 + ## 102 + { 'enum': 'MigrationStatus', 103 + 'data': [ 'none', 'setup', 'cancelling', 'cancelled', 104 + 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] } 105 + 106 + ## 107 + # @MigrationInfo: 108 + # 109 + # Information about current migration process. 110 + # 111 + # @status: @MigrationStatus describing the current migration status. 112 + # If this field is not returned, no migration process 113 + # has been initiated 114 + # 115 + # @ram: @MigrationStats containing detailed migration 116 + # status, only returned if status is 'active' or 117 + # 'completed'(since 1.2) 118 + # 119 + # @disk: @MigrationStats containing detailed disk migration 120 + # status, only returned if status is 'active' and it is a block 121 + # migration 122 + # 123 + # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE 124 + # migration statistics, only returned if XBZRLE feature is on and 125 + # status is 'active' or 'completed' (since 1.2) 126 + # 127 + # @total-time: total amount of milliseconds since migration started. 128 + # If migration has ended, it returns the total migration 129 + # time. (since 1.2) 130 + # 131 + # @downtime: only present when migration finishes correctly 132 + # total downtime in milliseconds for the guest. 133 + # (since 1.3) 134 + # 135 + # @expected-downtime: only present while migration is active 136 + # expected downtime in milliseconds for the guest in last walk 137 + # of the dirty bitmap. (since 1.3) 138 + # 139 + # @setup-time: amount of setup time in milliseconds _before_ the 140 + # iterations begin but _after_ the QMP command is issued. This is designed 141 + # to provide an accounting of any activities (such as RDMA pinning) which 142 + # may be expensive, but do not actually occur during the iterative 143 + # migration rounds themselves. (since 1.6) 144 + # 145 + # @cpu-throttle-percentage: percentage of time guest cpus are being 146 + # throttled during auto-converge. This is only present when auto-converge 147 + # has started throttling guest cpus. (Since 2.7) 148 + # 149 + # @error-desc: the human readable error description string, when 150 + # @status is 'failed'. Clients should not attempt to parse the 151 + # error strings. (Since 2.7) 152 + # 153 + # Since: 0.14.0 154 + ## 155 + { 'struct': 'MigrationInfo', 156 + 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats', 157 + '*disk': 'MigrationStats', 158 + '*xbzrle-cache': 'XBZRLECacheStats', 159 + '*total-time': 'int', 160 + '*expected-downtime': 'int', 161 + '*downtime': 'int', 162 + '*setup-time': 'int', 163 + '*cpu-throttle-percentage': 'int', 164 + '*error-desc': 'str'} } 165 + 166 + ## 167 + # @query-migrate: 168 + # 169 + # Returns information about current migration process. If migration 170 + # is active there will be another json-object with RAM migration 171 + # status and if block migration is active another one with block 172 + # migration status. 173 + # 174 + # Returns: @MigrationInfo 175 + # 176 + # Since: 0.14.0 177 + # 178 + # Example: 179 + # 180 + # 1. Before the first migration 181 + # 182 + # -> { "execute": "query-migrate" } 183 + # <- { "return": {} } 184 + # 185 + # 2. Migration is done and has succeeded 186 + # 187 + # -> { "execute": "query-migrate" } 188 + # <- { "return": { 189 + # "status": "completed", 190 + # "ram":{ 191 + # "transferred":123, 192 + # "remaining":123, 193 + # "total":246, 194 + # "total-time":12345, 195 + # "setup-time":12345, 196 + # "downtime":12345, 197 + # "duplicate":123, 198 + # "normal":123, 199 + # "normal-bytes":123456, 200 + # "dirty-sync-count":15 201 + # } 202 + # } 203 + # } 204 + # 205 + # 3. Migration is done and has failed 206 + # 207 + # -> { "execute": "query-migrate" } 208 + # <- { "return": { "status": "failed" } } 209 + # 210 + # 4. Migration is being performed and is not a block migration: 211 + # 212 + # -> { "execute": "query-migrate" } 213 + # <- { 214 + # "return":{ 215 + # "status":"active", 216 + # "ram":{ 217 + # "transferred":123, 218 + # "remaining":123, 219 + # "total":246, 220 + # "total-time":12345, 221 + # "setup-time":12345, 222 + # "expected-downtime":12345, 223 + # "duplicate":123, 224 + # "normal":123, 225 + # "normal-bytes":123456, 226 + # "dirty-sync-count":15 227 + # } 228 + # } 229 + # } 230 + # 231 + # 5. Migration is being performed and is a block migration: 232 + # 233 + # -> { "execute": "query-migrate" } 234 + # <- { 235 + # "return":{ 236 + # "status":"active", 237 + # "ram":{ 238 + # "total":1057024, 239 + # "remaining":1053304, 240 + # "transferred":3720, 241 + # "total-time":12345, 242 + # "setup-time":12345, 243 + # "expected-downtime":12345, 244 + # "duplicate":123, 245 + # "normal":123, 246 + # "normal-bytes":123456, 247 + # "dirty-sync-count":15 248 + # }, 249 + # "disk":{ 250 + # "total":20971520, 251 + # "remaining":20880384, 252 + # "transferred":91136 253 + # } 254 + # } 255 + # } 256 + # 257 + # 6. Migration is being performed and XBZRLE is active: 258 + # 259 + # -> { "execute": "query-migrate" } 260 + # <- { 261 + # "return":{ 262 + # "status":"active", 263 + # "capabilities" : [ { "capability": "xbzrle", "state" : true } ], 264 + # "ram":{ 265 + # "total":1057024, 266 + # "remaining":1053304, 267 + # "transferred":3720, 268 + # "total-time":12345, 269 + # "setup-time":12345, 270 + # "expected-downtime":12345, 271 + # "duplicate":10, 272 + # "normal":3333, 273 + # "normal-bytes":3412992, 274 + # "dirty-sync-count":15 275 + # }, 276 + # "xbzrle-cache":{ 277 + # "cache-size":67108864, 278 + # "bytes":20971520, 279 + # "pages":2444343, 280 + # "cache-miss":2244, 281 + # "cache-miss-rate":0.123, 282 + # "overflow":34434 283 + # } 284 + # } 285 + # } 286 + # 287 + ## 288 + { 'command': 'query-migrate', 'returns': 'MigrationInfo' } 289 + 290 + ## 291 + # @MigrationCapability: 292 + # 293 + # Migration capabilities enumeration 294 + # 295 + # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding). 296 + # This feature allows us to minimize migration traffic for certain work 297 + # loads, by sending compressed difference of the pages 298 + # 299 + # @rdma-pin-all: Controls whether or not the entire VM memory footprint is 300 + # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage. 301 + # Disabled by default. (since 2.0) 302 + # 303 + # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This 304 + # essentially saves 1MB of zeroes per block on the wire. Enabling requires 305 + # source and target VM to support this feature. To enable it is sufficient 306 + # to enable the capability on the source VM. The feature is disabled by 307 + # default. (since 1.6) 308 + # 309 + # @compress: Use multiple compression threads to accelerate live migration. 310 + # This feature can help to reduce the migration traffic, by sending 311 + # compressed pages. Please note that if compress and xbzrle are both 312 + # on, compress only takes effect in the ram bulk stage, after that, 313 + # it will be disabled and only xbzrle takes effect, this can help to 314 + # minimize migration traffic. The feature is disabled by default. 315 + # (since 2.4 ) 316 + # 317 + # @events: generate events for each migration state change 318 + # (since 2.4 ) 319 + # 320 + # @auto-converge: If enabled, QEMU will automatically throttle down the guest 321 + # to speed up convergence of RAM migration. (since 1.6) 322 + # 323 + # @postcopy-ram: Start executing on the migration target before all of RAM has 324 + # been migrated, pulling the remaining pages along as needed. NOTE: If 325 + # the migration fails during postcopy the VM will fail. (since 2.6) 326 + # 327 + # @x-colo: If enabled, migration will never end, and the state of the VM on the 328 + # primary side will be migrated continuously to the VM on secondary 329 + # side, this process is called COarse-Grain LOck Stepping (COLO) for 330 + # Non-stop Service. (since 2.8) 331 + # 332 + # @release-ram: if enabled, qemu will free the migrated ram pages on the source 333 + # during postcopy-ram migration. (since 2.9) 334 + # 335 + # @block: If enabled, QEMU will also migrate the contents of all block 336 + # devices. Default is disabled. A possible alternative uses 337 + # mirror jobs to a builtin NBD server on the destination, which 338 + # offers more flexibility. 339 + # (Since 2.10) 340 + # 341 + # @return-path: If enabled, migration will use the return path even 342 + # for precopy. (since 2.10) 343 + # 344 + # Since: 1.2 345 + ## 346 + { 'enum': 'MigrationCapability', 347 + 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', 348 + 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram', 349 + 'block', 'return-path' ] } 350 + 351 + ## 352 + # @MigrationCapabilityStatus: 353 + # 354 + # Migration capability information 355 + # 356 + # @capability: capability enum 357 + # 358 + # @state: capability state bool 359 + # 360 + # Since: 1.2 361 + ## 362 + { 'struct': 'MigrationCapabilityStatus', 363 + 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } } 364 + 365 + ## 366 + # @migrate-set-capabilities: 367 + # 368 + # Enable/Disable the following migration capabilities (like xbzrle) 369 + # 370 + # @capabilities: json array of capability modifications to make 371 + # 372 + # Since: 1.2 373 + # 374 + # Example: 375 + # 376 + # -> { "execute": "migrate-set-capabilities" , "arguments": 377 + # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } } 378 + # 379 + ## 380 + { 'command': 'migrate-set-capabilities', 381 + 'data': { 'capabilities': ['MigrationCapabilityStatus'] } } 382 + 383 + ## 384 + # @query-migrate-capabilities: 385 + # 386 + # Returns information about the current migration capabilities status 387 + # 388 + # Returns: @MigrationCapabilitiesStatus 389 + # 390 + # Since: 1.2 391 + # 392 + # Example: 393 + # 394 + # -> { "execute": "query-migrate-capabilities" } 395 + # <- { "return": [ 396 + # {"state": false, "capability": "xbzrle"}, 397 + # {"state": false, "capability": "rdma-pin-all"}, 398 + # {"state": false, "capability": "auto-converge"}, 399 + # {"state": false, "capability": "zero-blocks"}, 400 + # {"state": false, "capability": "compress"}, 401 + # {"state": true, "capability": "events"}, 402 + # {"state": false, "capability": "postcopy-ram"}, 403 + # {"state": false, "capability": "x-colo"} 404 + # ]} 405 + # 406 + ## 407 + { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']} 408 + 409 + ## 410 + # @MigrationParameter: 411 + # 412 + # Migration parameters enumeration 413 + # 414 + # @compress-level: Set the compression level to be used in live migration, 415 + # the compression level is an integer between 0 and 9, where 0 means 416 + # no compression, 1 means the best compression speed, and 9 means best 417 + # compression ratio which will consume more CPU. 418 + # 419 + # @compress-threads: Set compression thread count to be used in live migration, 420 + # the compression thread count is an integer between 1 and 255. 421 + # 422 + # @decompress-threads: Set decompression thread count to be used in live 423 + # migration, the decompression thread count is an integer between 1 424 + # and 255. Usually, decompression is at least 4 times as fast as 425 + # compression, so set the decompress-threads to the number about 1/4 426 + # of compress-threads is adequate. 427 + # 428 + # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled 429 + # when migration auto-converge is activated. The 430 + # default value is 20. (Since 2.7) 431 + # 432 + # @cpu-throttle-increment: throttle percentage increase each time 433 + # auto-converge detects that migration is not making 434 + # progress. The default value is 10. (Since 2.7) 435 + # 436 + # @tls-creds: ID of the 'tls-creds' object that provides credentials for 437 + # establishing a TLS connection over the migration data channel. 438 + # On the outgoing side of the migration, the credentials must 439 + # be for a 'client' endpoint, while for the incoming side the 440 + # credentials must be for a 'server' endpoint. Setting this 441 + # will enable TLS for all migrations. The default is unset, 442 + # resulting in unsecured migration at the QEMU level. (Since 2.7) 443 + # 444 + # @tls-hostname: hostname of the target host for the migration. This is 445 + # required when using x509 based TLS credentials and the 446 + # migration URI does not already include a hostname. For 447 + # example if using fd: or exec: based migration, the 448 + # hostname must be provided so that the server's x509 449 + # certificate identity can be validated. (Since 2.7) 450 + # 451 + # @max-bandwidth: to set maximum speed for migration. maximum speed in 452 + # bytes per second. (Since 2.8) 453 + # 454 + # @downtime-limit: set maximum tolerated downtime for migration. maximum 455 + # downtime in milliseconds (Since 2.8) 456 + # 457 + # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in 458 + # periodic mode. (Since 2.8) 459 + # 460 + # @block-incremental: Affects how much storage is migrated when the 461 + # block migration capability is enabled. When false, the entire 462 + # storage backing chain is migrated into a flattened image at 463 + # the destination; when true, only the active qcow2 layer is 464 + # migrated and the destination must already have access to the 465 + # same backing chain as was used on the source. (since 2.10) 466 + # 467 + # Since: 2.4 468 + ## 469 + { 'enum': 'MigrationParameter', 470 + 'data': ['compress-level', 'compress-threads', 'decompress-threads', 471 + 'cpu-throttle-initial', 'cpu-throttle-increment', 472 + 'tls-creds', 'tls-hostname', 'max-bandwidth', 473 + 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] } 474 + 475 + ## 476 + # @MigrateSetParameters: 477 + # 478 + # @compress-level: compression level 479 + # 480 + # @compress-threads: compression thread count 481 + # 482 + # @decompress-threads: decompression thread count 483 + # 484 + # @cpu-throttle-initial: Initial percentage of time guest cpus are 485 + # throttled when migration auto-converge is activated. 486 + # The default value is 20. (Since 2.7) 487 + # 488 + # @cpu-throttle-increment: throttle percentage increase each time 489 + # auto-converge detects that migration is not making 490 + # progress. The default value is 10. (Since 2.7) 491 + # 492 + # @tls-creds: ID of the 'tls-creds' object that provides credentials 493 + # for establishing a TLS connection over the migration data 494 + # channel. On the outgoing side of the migration, the credentials 495 + # must be for a 'client' endpoint, while for the incoming side the 496 + # credentials must be for a 'server' endpoint. Setting this 497 + # to a non-empty string enables TLS for all migrations. 498 + # An empty string means that QEMU will use plain text mode for 499 + # migration, rather than TLS (Since 2.9) 500 + # Previously (since 2.7), this was reported by omitting 501 + # tls-creds instead. 502 + # 503 + # @tls-hostname: hostname of the target host for the migration. This 504 + # is required when using x509 based TLS credentials and the 505 + # migration URI does not already include a hostname. For 506 + # example if using fd: or exec: based migration, the 507 + # hostname must be provided so that the server's x509 508 + # certificate identity can be validated. (Since 2.7) 509 + # An empty string means that QEMU will use the hostname 510 + # associated with the migration URI, if any. (Since 2.9) 511 + # Previously (since 2.7), this was reported by omitting 512 + # tls-hostname instead. 513 + # 514 + # @max-bandwidth: to set maximum speed for migration. maximum speed in 515 + # bytes per second. (Since 2.8) 516 + # 517 + # @downtime-limit: set maximum tolerated downtime for migration. maximum 518 + # downtime in milliseconds (Since 2.8) 519 + # 520 + # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8) 521 + # 522 + # @block-incremental: Affects how much storage is migrated when the 523 + # block migration capability is enabled. When false, the entire 524 + # storage backing chain is migrated into a flattened image at 525 + # the destination; when true, only the active qcow2 layer is 526 + # migrated and the destination must already have access to the 527 + # same backing chain as was used on the source. (since 2.10) 528 + # 529 + # Since: 2.4 530 + ## 531 + # TODO either fuse back into MigrationParameters, or make 532 + # MigrationParameters members mandatory 533 + { 'struct': 'MigrateSetParameters', 534 + 'data': { '*compress-level': 'int', 535 + '*compress-threads': 'int', 536 + '*decompress-threads': 'int', 537 + '*cpu-throttle-initial': 'int', 538 + '*cpu-throttle-increment': 'int', 539 + '*tls-creds': 'StrOrNull', 540 + '*tls-hostname': 'StrOrNull', 541 + '*max-bandwidth': 'int', 542 + '*downtime-limit': 'int', 543 + '*x-checkpoint-delay': 'int', 544 + '*block-incremental': 'bool' } } 545 + 546 + ## 547 + # @migrate-set-parameters: 548 + # 549 + # Set various migration parameters. 550 + # 551 + # Since: 2.4 552 + # 553 + # Example: 554 + # 555 + # -> { "execute": "migrate-set-parameters" , 556 + # "arguments": { "compress-level": 1 } } 557 + # 558 + ## 559 + { 'command': 'migrate-set-parameters', 'boxed': true, 560 + 'data': 'MigrateSetParameters' } 561 + 562 + ## 563 + # @MigrationParameters: 564 + # 565 + # The optional members aren't actually optional. 566 + # 567 + # @compress-level: compression level 568 + # 569 + # @compress-threads: compression thread count 570 + # 571 + # @decompress-threads: decompression thread count 572 + # 573 + # @cpu-throttle-initial: Initial percentage of time guest cpus are 574 + # throttled when migration auto-converge is activated. 575 + # (Since 2.7) 576 + # 577 + # @cpu-throttle-increment: throttle percentage increase each time 578 + # auto-converge detects that migration is not making 579 + # progress. (Since 2.7) 580 + # 581 + # @tls-creds: ID of the 'tls-creds' object that provides credentials 582 + # for establishing a TLS connection over the migration data 583 + # channel. On the outgoing side of the migration, the credentials 584 + # must be for a 'client' endpoint, while for the incoming side the 585 + # credentials must be for a 'server' endpoint. 586 + # An empty string means that QEMU will use plain text mode for 587 + # migration, rather than TLS (Since 2.7) 588 + # Note: 2.8 reports this by omitting tls-creds instead. 589 + # 590 + # @tls-hostname: hostname of the target host for the migration. This 591 + # is required when using x509 based TLS credentials and the 592 + # migration URI does not already include a hostname. For 593 + # example if using fd: or exec: based migration, the 594 + # hostname must be provided so that the server's x509 595 + # certificate identity can be validated. (Since 2.7) 596 + # An empty string means that QEMU will use the hostname 597 + # associated with the migration URI, if any. (Since 2.9) 598 + # Note: 2.8 reports this by omitting tls-hostname instead. 599 + # 600 + # @max-bandwidth: to set maximum speed for migration. maximum speed in 601 + # bytes per second. (Since 2.8) 602 + # 603 + # @downtime-limit: set maximum tolerated downtime for migration. maximum 604 + # downtime in milliseconds (Since 2.8) 605 + # 606 + # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8) 607 + # 608 + # @block-incremental: Affects how much storage is migrated when the 609 + # block migration capability is enabled. When false, the entire 610 + # storage backing chain is migrated into a flattened image at 611 + # the destination; when true, only the active qcow2 layer is 612 + # migrated and the destination must already have access to the 613 + # same backing chain as was used on the source. (since 2.10) 614 + # 615 + # Since: 2.4 616 + ## 617 + { 'struct': 'MigrationParameters', 618 + 'data': { '*compress-level': 'int', 619 + '*compress-threads': 'int', 620 + '*decompress-threads': 'int', 621 + '*cpu-throttle-initial': 'int', 622 + '*cpu-throttle-increment': 'int', 623 + '*tls-creds': 'str', 624 + '*tls-hostname': 'str', 625 + '*max-bandwidth': 'int', 626 + '*downtime-limit': 'int', 627 + '*x-checkpoint-delay': 'int', 628 + '*block-incremental': 'bool' } } 629 + 630 + ## 631 + # @query-migrate-parameters: 632 + # 633 + # Returns information about the current migration parameters 634 + # 635 + # Returns: @MigrationParameters 636 + # 637 + # Since: 2.4 638 + # 639 + # Example: 640 + # 641 + # -> { "execute": "query-migrate-parameters" } 642 + # <- { "return": { 643 + # "decompress-threads": 2, 644 + # "cpu-throttle-increment": 10, 645 + # "compress-threads": 8, 646 + # "compress-level": 1, 647 + # "cpu-throttle-initial": 20, 648 + # "max-bandwidth": 33554432, 649 + # "downtime-limit": 300 650 + # } 651 + # } 652 + # 653 + ## 654 + { 'command': 'query-migrate-parameters', 655 + 'returns': 'MigrationParameters' } 656 + 657 + ## 658 + # @client_migrate_info: 659 + # 660 + # Set migration information for remote display. This makes the server 661 + # ask the client to automatically reconnect using the new parameters 662 + # once migration finished successfully. Only implemented for SPICE. 663 + # 664 + # @protocol: must be "spice" 665 + # @hostname: migration target hostname 666 + # @port: spice tcp port for plaintext channels 667 + # @tls-port: spice tcp port for tls-secured channels 668 + # @cert-subject: server certificate subject 669 + # 670 + # Since: 0.14.0 671 + # 672 + # Example: 673 + # 674 + # -> { "execute": "client_migrate_info", 675 + # "arguments": { "protocol": "spice", 676 + # "hostname": "virt42.lab.kraxel.org", 677 + # "port": 1234 } } 678 + # <- { "return": {} } 679 + # 680 + ## 681 + { 'command': 'client_migrate_info', 682 + 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int', 683 + '*tls-port': 'int', '*cert-subject': 'str' } } 684 + 685 + ## 686 + # @migrate-start-postcopy: 687 + # 688 + # Followup to a migration command to switch the migration to postcopy mode. 689 + # The postcopy-ram capability must be set before the original migration 690 + # command. 691 + # 692 + # Since: 2.5 693 + # 694 + # Example: 695 + # 696 + # -> { "execute": "migrate-start-postcopy" } 697 + # <- { "return": {} } 698 + # 699 + ## 700 + { 'command': 'migrate-start-postcopy' } 701 + 702 + ## 703 + # @MIGRATION: 704 + # 705 + # Emitted when a migration event happens 706 + # 707 + # @status: @MigrationStatus describing the current migration status. 708 + # 709 + # Since: 2.4 710 + # 711 + # Example: 712 + # 713 + # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001}, 714 + # "event": "MIGRATION", 715 + # "data": {"status": "completed"} } 716 + # 717 + ## 718 + { 'event': 'MIGRATION', 719 + 'data': {'status': 'MigrationStatus'}} 720 + 721 + ## 722 + # @MIGRATION_PASS: 723 + # 724 + # Emitted from the source side of a migration at the start of each pass 725 + # (when it syncs the dirty bitmap) 726 + # 727 + # @pass: An incrementing count (starting at 1 on the first pass) 728 + # 729 + # Since: 2.6 730 + # 731 + # Example: 732 + # 733 + # { "timestamp": {"seconds": 1449669631, "microseconds": 239225}, 734 + # "event": "MIGRATION_PASS", "data": {"pass": 2} } 735 + # 736 + ## 737 + { 'event': 'MIGRATION_PASS', 738 + 'data': { 'pass': 'int' } } 739 + 740 + ## 741 + # @COLOMessage: 742 + # 743 + # The message transmission between Primary side and Secondary side. 744 + # 745 + # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing 746 + # 747 + # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing 748 + # 749 + # @checkpoint-reply: SVM gets PVM's checkpoint request 750 + # 751 + # @vmstate-send: VM's state will be sent by PVM. 752 + # 753 + # @vmstate-size: The total size of VMstate. 754 + # 755 + # @vmstate-received: VM's state has been received by SVM. 756 + # 757 + # @vmstate-loaded: VM's state has been loaded by SVM. 758 + # 759 + # Since: 2.8 760 + ## 761 + { 'enum': 'COLOMessage', 762 + 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply', 763 + 'vmstate-send', 'vmstate-size', 'vmstate-received', 764 + 'vmstate-loaded' ] } 765 + 766 + ## 767 + # @COLOMode: 768 + # 769 + # The colo mode 770 + # 771 + # @unknown: unknown mode 772 + # 773 + # @primary: master side 774 + # 775 + # @secondary: slave side 776 + # 777 + # Since: 2.8 778 + ## 779 + { 'enum': 'COLOMode', 780 + 'data': [ 'unknown', 'primary', 'secondary'] } 781 + 782 + ## 783 + # @FailoverStatus: 784 + # 785 + # An enumeration of COLO failover status 786 + # 787 + # @none: no failover has ever happened 788 + # 789 + # @require: got failover requirement but not handled 790 + # 791 + # @active: in the process of doing failover 792 + # 793 + # @completed: finish the process of failover 794 + # 795 + # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9) 796 + # 797 + # Since: 2.8 798 + ## 799 + { 'enum': 'FailoverStatus', 800 + 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] } 801 + 802 + ## 803 + # @x-colo-lost-heartbeat: 804 + # 805 + # Tell qemu that heartbeat is lost, request it to do takeover procedures. 806 + # If this command is sent to the PVM, the Primary side will exit COLO mode. 807 + # If sent to the Secondary, the Secondary side will run failover work, 808 + # then takes over server operation to become the service VM. 809 + # 810 + # Since: 2.8 811 + # 812 + # Example: 813 + # 814 + # -> { "execute": "x-colo-lost-heartbeat" } 815 + # <- { "return": {} } 816 + # 817 + ## 818 + { 'command': 'x-colo-lost-heartbeat' } 819 + 820 + ## 821 + # @migrate_cancel: 822 + # 823 + # Cancel the current executing migration process. 824 + # 825 + # Returns: nothing on success 826 + # 827 + # Notes: This command succeeds even if there is no migration process running. 828 + # 829 + # Since: 0.14.0 830 + # 831 + # Example: 832 + # 833 + # -> { "execute": "migrate_cancel" } 834 + # <- { "return": {} } 835 + # 836 + ## 837 + { 'command': 'migrate_cancel' } 838 + 839 + ## 840 + # @migrate_set_downtime: 841 + # 842 + # Set maximum tolerated downtime for migration. 843 + # 844 + # @value: maximum downtime in seconds 845 + # 846 + # Returns: nothing on success 847 + # 848 + # Notes: This command is deprecated in favor of 'migrate-set-parameters' 849 + # 850 + # Since: 0.14.0 851 + # 852 + # Example: 853 + # 854 + # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } } 855 + # <- { "return": {} } 856 + # 857 + ## 858 + { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} } 859 + 860 + ## 861 + # @migrate_set_speed: 862 + # 863 + # Set maximum speed for migration. 864 + # 865 + # @value: maximum speed in bytes per second. 866 + # 867 + # Returns: nothing on success 868 + # 869 + # Notes: This command is deprecated in favor of 'migrate-set-parameters' 870 + # 871 + # Since: 0.14.0 872 + # 873 + # Example: 874 + # 875 + # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } 876 + # <- { "return": {} } 877 + # 878 + ## 879 + { 'command': 'migrate_set_speed', 'data': {'value': 'int'} } 880 + 881 + ## 882 + # @migrate-set-cache-size: 883 + # 884 + # Set cache size to be used by XBZRLE migration 885 + # 886 + # @value: cache size in bytes 887 + # 888 + # The size will be rounded down to the nearest power of 2. 889 + # The cache size can be modified before and during ongoing migration 890 + # 891 + # Returns: nothing on success 892 + # 893 + # Since: 1.2 894 + # 895 + # Example: 896 + # 897 + # -> { "execute": "migrate-set-cache-size", 898 + # "arguments": { "value": 536870912 } } 899 + # <- { "return": {} } 900 + # 901 + ## 902 + { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} } 903 + 904 + ## 905 + # @query-migrate-cache-size: 906 + # 907 + # Query migration XBZRLE cache size 908 + # 909 + # Returns: XBZRLE cache size in bytes 910 + # 911 + # Since: 1.2 912 + # 913 + # Example: 914 + # 915 + # -> { "execute": "query-migrate-cache-size" } 916 + # <- { "return": 67108864 } 917 + # 918 + ## 919 + { 'command': 'query-migrate-cache-size', 'returns': 'int' } 920 + 921 + ## 922 + # @migrate: 923 + # 924 + # Migrates the current running guest to another Virtual Machine. 925 + # 926 + # @uri: the Uniform Resource Identifier of the destination VM 927 + # 928 + # @blk: do block migration (full disk copy) 929 + # 930 + # @inc: incremental disk copy migration 931 + # 932 + # @detach: this argument exists only for compatibility reasons and 933 + # is ignored by QEMU 934 + # 935 + # Returns: nothing on success 936 + # 937 + # Since: 0.14.0 938 + # 939 + # Notes: 940 + # 941 + # 1. The 'query-migrate' command should be used to check migration's progress 942 + # and final result (this information is provided by the 'status' member) 943 + # 944 + # 2. All boolean arguments default to false 945 + # 946 + # 3. The user Monitor's "detach" argument is invalid in QMP and should not 947 + # be used 948 + # 949 + # Example: 950 + # 951 + # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } 952 + # <- { "return": {} } 953 + # 954 + ## 955 + { 'command': 'migrate', 956 + 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } } 957 + 958 + ## 959 + # @migrate-incoming: 960 + # 961 + # Start an incoming migration, the qemu must have been started 962 + # with -incoming defer 963 + # 964 + # @uri: The Uniform Resource Identifier identifying the source or 965 + # address to listen on 966 + # 967 + # Returns: nothing on success 968 + # 969 + # Since: 2.3 970 + # 971 + # Notes: 972 + # 973 + # 1. It's a bad idea to use a string for the uri, but it needs to stay 974 + # compatible with -incoming and the format of the uri is already exposed 975 + # above libvirt. 976 + # 977 + # 2. QEMU must be started with -incoming defer to allow migrate-incoming to 978 + # be used. 979 + # 980 + # 3. The uri format is the same as for -incoming 981 + # 982 + # Example: 983 + # 984 + # -> { "execute": "migrate-incoming", 985 + # "arguments": { "uri": "tcp::4446" } } 986 + # <- { "return": {} } 987 + # 988 + ## 989 + { 'command': 'migrate-incoming', 'data': {'uri': 'str' } } 990 + 991 + ## 992 + # @xen-save-devices-state: 993 + # 994 + # Save the state of all devices to file. The RAM and the block devices 995 + # of the VM are not saved by this command. 996 + # 997 + # @filename: the file to save the state of the devices to as binary 998 + # data. See xen-save-devices-state.txt for a description of the binary 999 + # format. 1000 + # 1001 + # Returns: Nothing on success 1002 + # 1003 + # Since: 1.1 1004 + # 1005 + # Example: 1006 + # 1007 + # -> { "execute": "xen-save-devices-state", 1008 + # "arguments": { "filename": "/tmp/save" } } 1009 + # <- { "return": {} } 1010 + # 1011 + ## 1012 + { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} } 1013 + 1014 + ## 1015 + # @xen-set-replication: 1016 + # 1017 + # Enable or disable replication. 1018 + # 1019 + # @enable: true to enable, false to disable. 1020 + # 1021 + # @primary: true for primary or false for secondary. 1022 + # 1023 + # @failover: true to do failover, false to stop. but cannot be 1024 + # specified if 'enable' is true. default value is false. 1025 + # 1026 + # Returns: nothing. 1027 + # 1028 + # Example: 1029 + # 1030 + # -> { "execute": "xen-set-replication", 1031 + # "arguments": {"enable": true, "primary": false} } 1032 + # <- { "return": {} } 1033 + # 1034 + # Since: 2.9 1035 + ## 1036 + { 'command': 'xen-set-replication', 1037 + 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } } 1038 + 1039 + ## 1040 + # @ReplicationStatus: 1041 + # 1042 + # The result format for 'query-xen-replication-status'. 1043 + # 1044 + # @error: true if an error happened, false if replication is normal. 1045 + # 1046 + # @desc: the human readable error description string, when 1047 + # @error is 'true'. 1048 + # 1049 + # Since: 2.9 1050 + ## 1051 + { 'struct': 'ReplicationStatus', 1052 + 'data': { 'error': 'bool', '*desc': 'str' } } 1053 + 1054 + ## 1055 + # @query-xen-replication-status: 1056 + # 1057 + # Query replication status while the vm is running. 1058 + # 1059 + # Returns: A @ReplicationResult object showing the status. 1060 + # 1061 + # Example: 1062 + # 1063 + # -> { "execute": "query-xen-replication-status" } 1064 + # <- { "return": { "error": false } } 1065 + # 1066 + # Since: 2.9 1067 + ## 1068 + { 'command': 'query-xen-replication-status', 1069 + 'returns': 'ReplicationStatus' } 1070 + 1071 + ## 1072 + # @xen-colo-do-checkpoint: 1073 + # 1074 + # Xen uses this command to notify replication to trigger a checkpoint. 1075 + # 1076 + # Returns: nothing. 1077 + # 1078 + # Example: 1079 + # 1080 + # -> { "execute": "xen-colo-do-checkpoint" } 1081 + # <- { "return": {} } 1082 + # 1083 + # Since: 2.9 1084 + ## 1085 + { 'command': 'xen-colo-do-checkpoint' }