-
Bug
-
Resolution: Not a Bug
-
Undefined
-
None
-
rhel-9.4
-
None
-
None
-
None
-
rhel-sst-virtualization-storage
-
ssg_virtualization
-
None
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
None
-
-
All
-
None
What were you trying to do that didn't work?
Set discard-no-unref='on' and discard='ignore' for vm disk, qemu should report an error because this combination is invalid.
Please provide the package NVR for which bug is seen:
libvirt-9.5.0-7.el9_3.x86_64
qemu-kvm-8.1.0-3.el9.x86_64
How reproducible:
100%
Steps to reproduce
1. Prepare a vm xml with discard-no-unref='on' and discard='ignore' <disk type="file" device="disk"> <driver name="qemu" type="qcow2" *discard="ignore" discard_no_unref="on"*/> <source file="/var/lib/libvirt/images/RHEL-9.1-x86_64-latest-ovmf.qcow2"/> <target dev="vda" bus="virtio"/> <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/> </disk> 2. Start vm, and check its qemu command line: # virsh start uefi # ps aux|grep qemu-kvm -blockdev {"driver":"file","filename":"/var/lib/libvirt/images/RHEL-9.1-x86_64-latest-ovmf.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-2-format","read-only":false,"*discard":"ignore"*,"driver":"qcow2",*"discard-no-unref":true*,"file":"libvirt-2-storage","backing":null} -device {"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":1}
Expected results
qemu reports an error when trying booting such vm
Actual results
vm can boot successfully