-
Bug
-
Resolution: Won't Do
-
Undefined
-
None
-
rhel-9.4
-
sst_virtualization_storage
-
ssg_virtualization
-
None
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
None
-
None
What were you trying to do that didn't work?
The <shareable/> will disappear after starting a guest without source file in cdrom disk.
Please provide the package NVR for which bug is seen:
libvirt-9.9.0-1.el9.x86_64
qemu-kvm-8.1.0-4.el9.x86_64
How reproducible:
100%
Steps to reproduce
1. Prepare a guest xml with a shareable file cdrom disk.
# vim rhel.xml ... <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='sda' bus='sata'/> <readonly/> <shareable/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> ...
2. Define the guest.
# virsh define rhel.xml Domain 'rhel' defined from rhel.xml # virsh dumpxml rhel --xpath //disk <disk type="file" device="disk" snapshot="no"> <driver name="qemu" type="qcow2"/> <source file="/var/lib/libvirt/images/rhel.qcow2"/> <target dev="vda" bus="virtio"/> <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/> </disk> <disk type="file" device="cdrom"> <driver name="qemu" type="raw"/> <target dev="sda" bus="sata"/> <readonly/> <shareable/> <address type="drive" controller="0" bus="0" target="0" unit="0"/> </disk>
3. Start the guest.
# virsh start rhel Domain 'rhel' started # virsh dumpxml rhel --xpath //disk <disk type="file" device="disk" snapshot="no"> <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="cdrom"> <driver name="qemu"/> <target dev="sda" bus="sata"/> <readonly/> <alias name="sata0-0-0"/> <address type="drive" controller="0" bus="0" target="0" unit="0"/> </disk>
Expected results
Still include <shareable/> after starting the guest.
Actual results
The <shareable/> is missing after starting the guest. Then if we want to use update-device to add the cdrom file, we can't make it shareable.