-
Bug
-
Resolution: Done-Errata
-
Undefined
-
rhel-9.5
-
libvirt-10.5.0-1.el9
-
None
-
None
-
rhel-sst-virtualization-storage
-
ssg_virtualization
-
23
-
None
-
Dev ack
-
False
-
-
None
-
None
-
Pass
-
Automated
-
-
10.5.0
-
None
What were you trying to do that didn't work?
Update disk with diskcard_no_unref should fail with a clear error message
Please provide the package NVR for which bug is seen:
libvirt-10.3.0-1.el9.x86_64
qemu-kvm-9.0.0-1.el9.x86_64
How reproducible:
100%
Steps to reproduce
1. Prepare a running guest with the following disk.
- virsh dumpxml rhel --xpath //disk
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"/>
<source file="/var/lib/libvirt/images/rhel.qcow2" index="2"/>
<backingStore/>
<target dev="vda" bus="virtio"/>
<alias name="virtio-disk0"/>
<address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
</disk>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"/>
<source file="/var/lib/libvirt/images/test.qcow2" index="1"/>
<backingStore/>
<target dev="vdb" bus="virtio"/>
<alias name="virtio-disk1"/>
<address type="pci" domain="0x0000" bus="0x08" slot="0x00" function="0x0"/>
</disk>
2. Prepare vdb disk with discard_no_unref attribute. - cat disk.xml
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" discard_no_unref="on"/>
<source file="/var/lib/libvirt/images/test.qcow2"/>
<target dev="vdb" bus="virtio"/>
<alias name="virtio-disk1"/>
<address type="pci" domain="0x0000" bus="0x08" slot="0x00" function="0x0"/>
</disk>
3. Update-device with the above disk xml. - virsh update-device rhel disk.xml
Device updated successfully
4. Check the disk xml but no discard_no_unref attribute. - virsh dumpxml rhel --xpath //disk
......
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"/>
<source file="/var/lib/libvirt/images/test.qcow2" index="1"/>
<backingStore/>
<target dev="vdb" bus="virtio"/>
<alias name="virtio-disk1"/>
<address type="pci" domain="0x0000" bus="0x08" slot="0x00" function="0x0"/>
</disk>
Expected results
Update disk device with discard_no_unref attribute failed, just like discard attribute:
- virsh update-device rhel disk.xml
error: Failed to update device from disk.xml
error: Operation not supported: cannot modify field 'discard_no_unref' of the disk
Actual results
Update disk device with discard_no_unref attribute successfully but it didn't actually work.
- is blocked by
-
RHEL-29642 Rebase libvirt in RHEL-9.5.0
- Closed
- links to
-
RHSA-2024:130953 libvirt bug fix and enhancement update