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

[RFE] Allow configuring appropriate driver attributes in target disk xml for blockcopy

    • rhel-sst-virtualization-storage
    • ssg_virtualization
    • 5
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Created attachment 1906493 [details]
      qmp.log

      Description of problem:
      Some driver attributes in target disk xml will be lost after blockcopy

      Version-Release number of selected component (if applicable):
      libvirt-8.5.0-5.el9.x86_64
      qemu-kvm-7.0.0-10.el9.x86_64

      How reproducible:
      100%

      Steps to Reproduce:
      1. Prepare a running guest.

      1. virsh domstate rhel
        running

      2. Prepare a target disk xml with different attributes.

      1. cat target.xml
        <disk type="file" device="disk">
        <driver name="qemu" type="qcow2" cache="writeback" copy_on_read="on" discard="unmap" detect_zeroes="unmap">
        <metadata_cache>
        <max_size unit="bytes">1024</max_size>
        </metadata_cache>
        </driver>
        <source file="/tmp/test.copy"/>
        <target dev="vda" bus="virtio"/>
        <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
        </disk>

      3. Do blockcopy.

      1. virsh blockcopy rhel vda --xml target.xml --transient-job --wait --verbose
        Block Copy: [100 %]
        Now in mirroring phase
      2. virsh blockjob rhel vda --pivot

      4. Check the dumpxml.

      1. virsh dumpxml rhel | xmllint --xpath //disk -
        <disk type="file" device="disk">
        <driver name="qemu" type="qcow2">
        <metadata_cache>
        <max_size unit="bytes">1024</max_size>
        </metadata_cache>
        </driver>
        <source file="/tmp/test.copy" index="2"/>
        <backingStore/>
        <target dev="vda" bus="virtio"/>
        <alias name="virtio-disk0"/>
        <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
        </disk>

      Actual results:
      Only metadata_cache in the disk xml after blockcopy, the others will be lost.

      Expected results:
      The driver attributes will exist after blockcopy.

      Additional info:

              virt-maint virt-maint
              rhn-support-meili Meina Li
              virt-maint virt-maint
              Yalan Zhang Yalan Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: