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

[libvirt] confusing error message when qcow2 image has empty string in the 'data-file' field.

    • rhel-sst-virtualization-storage
    • ssg_virtualization
    • 3
    • Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

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

      Start guest failed when the guest has network image as the data file

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

      libvirt-10.10.0-1.el10.x86_64
      qemu-kvm-9.1.0-7.el10.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1.Prepare a file image which use the nbd network image as its data file.

      # setenforce 0   (allow qemu to access the socket)
      # mkdir -p /var/run/nbd-server
      # systemd-run qemu-nbd --socket=/var/run/nbd-server/datafile --export-name=datafile --persistent /var/lib/libvirt/images/datastore_nbd
      # chown qemu:qemu /var/run/nbd-server/datafile
      # qemu-img create -f qcow2 -o data_file=nbd+unix:///datafile?socket=/var/run/nbd-server/datafile /var/lib/libvirt/images/datastore_nbd.qcow2 500M  

      2. Prepare the guest with the following disk xml.

      <disk type="file" device="disk">
        <driver name="qemu" type="qcow2"/>
        <source file="/var/lib/libvirt/images/datastore_nbd.qcow2"/>
        <target dev="vdb" bus="virtio"/>
        <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
      </disk>    

      3. Start the guest.
      # virsh start rhel
      error: Failed to start domain 'rhel'
      error: unsupported configuration: storage type 'dir' requires use of storage format 'fat'

      Expected results

      May start successfully or have clear error message, like "should provide the dataStore info for this image".

      Actual results

      Failed like step 3.

              pkrempa@redhat.com Peter Krempa
              rhn-support-meili Meina Li
              Peter Krempa Peter Krempa
              Meina Li Meina Li
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: