Bug 2026812
Summary: | [RFE]Add support for copy-mode=write-blocking for non-shared-storage migration | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Leonardo Bras <leobras> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
libvirt sub component: | Storage | QA Contact: | Han Han <hhan> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | medium | ||
Priority: | medium | CC: | dgilbert, dzheng, fjin, jdenemar, jsuchane, lmen, mdean, meili, pkrempa, virt-maint, xuzhang, zhencliu |
Version: | 9.0 | Keywords: | FutureFeature, RFE, Triaged |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-8.0.0-0rc1.1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-17 12:45:52 UTC | Type: | Feature Request |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | 8.0.0 |
Embargoed: |
Description
Leonardo Bras
2021-11-26 02:08:12 UTC
Implemented upstream as: 0f170de28a docs: migration: Add a paragraph about non-shared storage migration 8841302e3d docs: Convert 'migration' doc to RST f88d0ea2cd qemu: migration: Implement VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES 51d1c08fe9 virDomainMigrate: Introduce VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES flag 21a9be4412 VIR_REQUIRE_FLAG_(GOTO|RET): Add parens around arguments in expansion d43513e383 man: virsh: Separate paragraphs describing distinct flags 89dcf6d461 include: virDomainMigrateFlags: Remove "block alignment" whitespace 8f170cd3c5 qemuDomainBlockCopy: Implement VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES b54c313c33 virDomainBlockCopy: Introduce VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES flag b1fc1dbd1a include: virDomainBlockCopyFlags: Convert to prefix comments 7d773a77ff qemu: monitor: Add support for 'write-blocking' copy mode for blockdev-mirror v7.10.0-134-g0f170de28a Tested on libvirt-v7.10.0-257-g497e6f5fa6 qemu-kvm-6.2.0-0.1.rc4.fc36.x86_64 1. Migrate with --copy-storage-all --copy-storage-synchronous-writes --postcopy --live. PASS 2. Blockcopy with --synchronous-writes --pivot. PASS For a VM with high disk IO load(e.g. running iozone), it can help improve storage migration performance: ➜ ~ time virsh migrate rhel9 qemu+ssh://root@hhan-fedora2/system --copy-storage-all --postcopy --live --verbose Migration: [100 %] virsh migrate rhel9 qemu+ssh://root@hhan-fedora2/system --copy-storage-all 0.22s user 0.47s system 0% cpu 5:41.03 total ➜ ~ time virsh migrate rhel9 qemu+ssh://root@hhan-fedora2/system --copy-storage-all --postcopy --copy-storage-synchronous-writes --live --verbose Migration: [100 %] virsh migrate rhel9 qemu+ssh://root@hhan-fedora2/system --copy-storage-all 0.19s user 0.38s system 0% cpu 4:36.19 total In my testing I've used the following setup: - original disk image on tmpfs or any other super-fast storage - copy destination on slowest storage you can find (spinning disk/USB drive, etc) - virtio/virtio-scsi guest frontend for maximum performance - cache='none' - start intensive writes to the disk from the guest, I've used multiple 'dd' instances, but anything that can do lots of ideally random I/O writes is ideal Without --synchronous-writes the job actually didn't even reach 'ready' state in a few minutes I left it running. With --synchronous writes the guest writes were slower as indicated by the 'dd' instances but the copy job always converged very quickly. The same should work for migration as it in fact does the same thing to copy the disk as virsh-blockcopy, so I've just verified that the 'write-blocking' mode is set properly. Unfortunately I'm not sure how to automate this. Negative case is impossible to automate as it's equivalent to the halting problem. Positive test case with the conditions above could work, but it's not exactly a 100% deterministic test. Tested as comment3 on libvirt-8.0.0-2.el9.x86_64 qemu-kvm-6.2.0-5.el9.x86_64. PASSED Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: libvirt), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:2390 |