Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
'copy-mode=write-blocking' is a block storage mode introduced in qemu 3.0.0 (commit-id: d06107ade0c).
It's limits guarantees local block storage migration by throttling writes on the source to the rate at which the migration happens.
While it's implemented in qemu, the libvirt code was not done.
It's theoretically simple, and if we have it, then we can stop worrying
about block migration limits (other than NVMe pass through).
Expected results:
Have support for setting this option in libvirt.
Additional info:
More info about this is available in <qemu_src>/qapi/block-core.json:
##
# @MirrorCopyMode:
#
# An enumeration whose values tell the mirror block job when to
# trigger writes to the target.
#
# @background: copy data in background only.
#
# @write-blocking: when data is written to the source, write it
# (synchronously) to the target as well. In
# addition, data is copied in background just like in
# @background mode.
#
# Since: 3.0
##
{ 'enum': 'MirrorCopyMode',
'data': ['background', 'write-blocking'] }
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.
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
Description of problem: 'copy-mode=write-blocking' is a block storage mode introduced in qemu 3.0.0 (commit-id: d06107ade0c). It's limits guarantees local block storage migration by throttling writes on the source to the rate at which the migration happens. While it's implemented in qemu, the libvirt code was not done. It's theoretically simple, and if we have it, then we can stop worrying about block migration limits (other than NVMe pass through). Expected results: Have support for setting this option in libvirt. Additional info: More info about this is available in <qemu_src>/qapi/block-core.json: ## # @MirrorCopyMode: # # An enumeration whose values tell the mirror block job when to # trigger writes to the target. # # @background: copy data in background only. # # @write-blocking: when data is written to the source, write it # (synchronously) to the target as well. In # addition, data is copied in background just like in # @background mode. # # Since: 3.0 ## { 'enum': 'MirrorCopyMode', 'data': ['background', 'write-blocking'] }