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

'Unable to execute QEMU command 'blockdev-del': Block device libvirt-1-storage is in use' is logged when using 'virsh blockcopy' on a disk with 'copy_on_read' enabled

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • libvirt-11.2.0-1.el10
    • Yes
    • Moderate
    • Regression
    • rhel-virt-core-libvirt-2
    • ssg_virtualization
    • 13
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • x86_64
    • 11.2.0
    • None

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

      It reports "internal error: unable to execute QEMU command 'blockdev-del': Block device libvirt-1-storage is in use" in virtqemud.log after executing "virsh blockjob  --pivot" on a VM with copy_on_read enabled.

      Please provide the package NVR for which bug is seen:

      libvirt-10.3.0-2.el9.x86_64
      qemu-kvm-9.0.0-3.el9.x86_64
      kernel-5.14.0-452.el9.x86_64
       

      How reproducible:

      100%

      Steps to reproduce

      1. Define a guest with vhostvdpa disk and shared memory.
      ...
      <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='threads' copy_on_read='on' discard='unmap' detect_zeroes='on'/>
      <source file='/var/lib/libvirt/images/image.raw'/>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      </disk>

      3. Start the vm
      4. Exec virsh blockcopy

      1. cat /tmp/xml_utils_temp_rwbbxhvf.xml
        <disk type="file" device="disk"><target dev="vdb" bus="virtio" /><source file="/var/lib/libvirt/images/target.raw" /><driver name="qemu" type="raw" cache="none" io="threads" copy_on_read="on" discard="unmap" detect_zeroes="on" /></disk>
      2. virsh blockcopy avocado-vt-vm1 vdb --xml /tmp/xml_utils_temp_rwbbxhvf.xml --transient-job --wait --verbose

      5. virsh blockjob avocado-vt-vm1 vdb --pivot

      Expected results

      There is no error during blockcopy

      Actual results

      1. Got errors like below after 'virsh blockjob avocado-vt-vm1 vdb --pivot' in step 5:

      1. virsh blockcopy avocado-vt-vm1 vdb --xml /tmp/disk.xml --transient-job --wait --verbose
        Block Copy: [100.00 %]
        Now in mirroring phase
      2. virsh blockjob avocado-vt-vm1 vdb --pivot
      #  grep -i erro /var/lib/avocado/job-results/job-2024-05-31T10.38-af32774/test-results/1-type_specific.io-github-autotest-libvirt.virtual_disks.vhostvdpa.define_start_multi_vms_with_same_disk.update_arp_rule/libvirtd.log
      2024-06-03 07:39:44.775+0000: 11482: info : qemuMonitorJSONIOProcessLine:210 : QEMU_MONITOR_RECV_REPLY: mon=0x7f55e4043180 reply={"id": "libvirt-457", "error": {"class": "GenericError", "desc": "Block device libvirt-1-format is in use"}}
      2024-06-03 07:39:44.776+0000: 8053: error : qemuMonitorJSONCheckErrorFull:366 : internal error: unable to execute QEMU command 'blockdev-del': Block device libvirt-1-format is in use
      2024-06-03 07:39:44.777+0000: 11482: info : qemuMonitorJSONIOProcessLine:210 : QEMU_MONITOR_RECV_REPLY: mon=0x7f55e4043180 reply={"id": "libvirt-458", "error": {"class": "GenericError", "desc": "Block device libvirt-1-storage is in use"}}
      2024-06-03 07:39:44.778+0000: 8053: error : qemuMonitorJSONCheckErrorFull:366 : internal error: unable to execute QEMU command 'blockdev-del': Block device libvirt-1-storage is in use
      

      Additional info:
      reproduced on RHEL9.4:
      libvirt-10.0.0-6.3.el9_4.x86_64
      qemu-kvm-8.2.0-11.el9_4.2.x86_64
      kernel-5.14.0-427.1.1.el9_4.x86_64

              pkrempa@redhat.com Peter Krempa
              yicui1 Yingshun Cui
              virt-maint virt-maint
              Yalan Zhang Yalan Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated: