Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-150883

libvirt does not expose QEMU's blockdev-mirror target-is-zero parameter

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • rhel-10.0
    • None
    • None
    • None
    • rhel-virt-core-libvirt-1
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat OpenShift Virtualization
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      I was running a storage live migration using block mirroring to a freshly zeroed, sparse destination. QEMU has an optional target-is-zero parameter for blockdev-mirror to handle this, but libvirt does not expose it. Because NFSv4.1 lacks fallocate support, QEMU cannot punch holes and falls back to writing literal zero bytes.

      What is the impact of this issue to you?

      Writing actual zeros destroys the sparseness of the destination file. The volume becomes fully allocated on the dest NFS backend

      Please provide the package NVR for which the bug is seen:

      upstream libvirt in src/qemu/qemu_monitor_json.c:qemuMonitorJSONBlockdevMirror()

      How reproducible is this bug?:

      Always.

      Steps to reproduce

      1. Set up a sparse source and a destination volume on an NFSv4.1 backend.
      2. Start a VM using the source volume.
      3. Trigger storage live migration via block mirroring to the destination.
      4. Observe the destination file loses its sparseness and becomes fully allocated.

      Expected results

      a way to pass the target-is-zero flag to QEMU's blockdev-mirror would be very helpful here. Even if it is optional, we need this alternative to preserve sparseness on storage backends where fallocate is not an option.

      Actual results

              pkrempa@redhat.com Peter Krempa
              rh-ee-nassouli Noam Assouline
              Peter Krempa Peter Krempa
              virt-bugs virt-bugs
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: