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

XML error: The <source> of <dataStore> can't have another nested <dataStore> or <backingStore> element

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

    • libvirt-11.3.0-1.el10
    • No
    • Low
    • rhel-virt-core-libvirt-1
    • ssg_virtualization
    • 16
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • 11.3.0
    • None

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

      From the example in https://libvirt.org/formatdomain.html#hard-drives-floppy-disks-cdroms we can see that the disk image can have dataStore and backingStore with dataStore. But when we use the full xml, it will have error:
      XML error: The <source> of <dataStore> can't have another nested <dataStore> or <backingStore> element

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

      libvirt-10.10.0-8.el10_0.x86_64
      qemu-kvm-9.1.0-15.el10.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1. Can refer to the steps in https://issues.redhat.com/browse/RHEL-85319 to create the images if necessary.
      2. Edit the guest xml with the following disk xml:

          <disk type='file' device='disk'>
            <driver name='qemu' type='qcow2' cache='none' io='native' discard='unmap'/>
            <source file='/var/lib/libvirt/images/datastore.qcow2'>
             <dataStore type='file'>
              <format type='raw'/>
              <source file='/var/lib/libvirt/images/datastore_2'/>
            </dataStore>
          </source>
          <backingStore type='file'>
            <format type='qcow2'/>
            <source file='/var/lib/libvirt/images/base-with-data-file.qcow'>
              <dataStore type='file'>
                <format type='raw'/>
                <source file='/var/lib/libvirt/images/datastore_1'/>
        </dataStore>
            </source>
          </backingStore>
          <target dev='vdb' bus='virtio'/>
          <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
          </disk>
      

      3. Will get the error:
      # virsh edit avocado-vt-vm1
      error: XML error: The <source> of <dataStore> can't have another nested <dataStore> or <backingStore> element
      Failed. Try again? [y,n,i,f,?]:

      Expected results

      Can edit and start the guest.

      Actual results

      Can't edit guest and start guest failed.

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

                Created:
                Updated: