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

Create file image with rbd data file failed by qemu-img

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

    • No
    • Low
    • 4
    • rhel-virt-storage
    • ssg_virtualization
    • 1
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • virt-storage Sprint 3, virt-storage Sprint 4, virt-storage Sprint 6, Patch Under review backlog
    • None
    • None
    • None

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

      Create file image with rbd data file failed by qemu-img

      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 rbd server with pool/image.
      [rbd server]# docker exec mon rbd ls virtual-disk-ceph-pool
      datastore_rbd.qcow2

      2. Create file image by using the above pool/image as the data file.

      # qemu-img create -f qcow2 -o data_file=rbd:virtual-disk-ceph-pool/datastore_rbd.qcow2@<ceph_mon> /var/lib/libvirt/images/datastore_rbd.qcow2 500M
      Formatting '/var/lib/libvirt/images/datastore_rbd.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=524288000 data_file=rbd:virtual-disk-ceph-pool/datastore_rbd.qcow2@<ceph_mon> lazy_refcounts=off refcount_bits=16
      qemu-img: /var/lib/libvirt/images/datastore_rbd.qcow2: error rbd create: File exists

      # ll /var/lib/libvirt/images/datastore_rbd.qcow2
      ls: cannot access '/var/lib/libvirt/images/datastore_rbd.qcow2': No such file or directory

      3. Delete the pool/image in rbd server and try again.
      [rbd server]# docker exec mon rbd rm virtual-disk-ceph-pool/datastore_rbd.qcow2
      Removing image: 100% complete...done.

      # qemu-img create -f qcow2 -o data_file=rbd:virtual-disk-ceph-pool/datastore_rbd.qcow2@<ceph_mon> /var/lib/libvirt/images/datastore_rbd.qcow2 500M
      Formatting '/var/lib/libvirt/images/datastore_rbd.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=524288000 data_file=rbd:virtual-disk-ceph-pool/datastore_rbd.qcow2@<ceph_mon> lazy_refcounts=off refcount_bits=16
      qemu-img: /var/lib/libvirt/images/datastore_rbd.qcow2: error reading header from test_datafile.img: No such file or directory

      Expected results

      Create successfully.

      Actual results

      Create failed.

      Additional info:
      The nbd/rbd network related data file test scenarios in libvirt are low priority.

              eblake_redhat Eric Blake
              rhn-support-meili Meina Li
              virt-maint virt-maint
              Tingting Mao Tingting Mao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: