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

[libvirt]Fail to hotplug a qcow2 disk image with opened fdgroup by virsh attach-device

    • libvirt-9.10.0-1.el9
    • None
    • Moderate
    • rhel-sst-virtualization-storage
    • ssg_virtualization
    • 17
    • 23
    • 3
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • x86_64
    • 9.10.0
    • None

      Version-Release number of selected component (if applicable):
      libvirt-daemon-9.5.0-7.el9_3.x86_64 
      qemu-kvm-8.0.0-16.el9_3.x86_64
       
       
      How reproducible:
      100%
       
      Steps to Reproduce:
      1. Start a guest 
      2. Create one qcow2 image,and check it selinux label
         a. qemu-img create /var/lib/libvirt/images/device_test_fd -f qcow2 1G -o preallocation=falloc
         b. [root@xx# ls -Z /var/lib/libvirt/images/device_test_fd
             unconfined_u:object_r:virt_image_t:s0 /var/lib/libvirt/images/device_test_fd
       
      3  Create one disk xml() associated with it
       
      <disk type="file" device="disk">
       <target dev="vdb" bus="virtio" />
       <driver name="qemu" type="qcow2" />
       <source file="/var/lib/libvirt/images/device_test_fd" fdgroup="diskfdgroup" />
      </disk>
       
      4. Try to attach the device
       

      virsh "dom-fd-associate avocado-vt-vm1 diskfdgroup 6 ; attach-device avocado-vt-vm1 /root/.libvirt-ci-venv-ci-runtest-gxjHNF/mydisk.xml ;" 6<>/var/lib/libvirt/images/device_test_fd
       
       
      Actual result:
       
      error: Failed to attach device from /root/.libvirt-ci-venv-ci-runtest-gxjHNF/mydisk.xml
      error: internal error: unable to execute QEMU command 'add-fd': No file descriptor supplied via SCM_RIGHTS
       
       
      Expected results:
      attach-device should succeed
       
      Additional info:
      However, attach disk can succeed using attach-disk by below command:
      virsh "dom-fd-associate avocado-vt-vm1 diskfdgroup 6  ; attach-disk avocado-vt-vm1 /var/lib/libvirt/images/device_test_fd vdb;" 6<>/var/lib/libvirt/images/device_test_fd

              pkrempa@redhat.com Peter Krempa
              rhn-support-chwen Chunfu Wen
              Peter Krempa Peter Krempa
              Fangge Jin Fangge Jin
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: