-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-10.1
-
No
-
Low
-
1
-
rhel-virt-core-libvirt-2
-
ssg_virtualization
-
3
-
False
-
False
-
-
None
-
Libvirt-1/2 Sprint 2
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
None
What were you trying to do that didn't work?
It acutally does not work even I config readonly parameter in virtiofs xml for externally launched virtiofsd
Please provide the package NVR for which the bug is seen:
libvirt-11.2.0-1.el10.x86_64
How reproducible is this bug?:
100%
Steps to reproduce
1. Prepare a guest with the following xml
<filesystem type="mount"> <driver type="virtiofs" queue="1024"/> <source socket="/vm001-vhost-fs.sock"/> <target dir="mount_tag1"/> <readonly/> <alias name="fs1"/> <address type="pci" domain="0x0000" bus="0x08" slot="0x00" function="0x0"/> </filesystem>
2. Setup the non-readonly virtiofsd process
set virtd_exec_t on the virtiofsd binary: #chcon -t virtd_exec_t /usr/libexec/virtiofsd Create the shared dir: #mkdir -p /var/lib/fs/vm001 run virtiofsd using systemd-run: #systemd-run /usr/libexec/virtiofsd --socket-path=/vm001-vhost-fs.sock -o source=/var/lib/fs/vm001 relabel the created socket #chcon -t svirt_image_t /vm001-vhost-fs.sock Change ownership of the socket file: #chown qemu:qemu /vm001-vhost-fs.sock
3. Start the guest and mount virtiofs
[Guest OS]# mount -t virtiofs mount_tag1 /mnt [Guest OS]# touch 1.dat [Guest OS]# ls 1.dat
Expected results
Should reject to config readonly parameter in virtiofs xml for externally launched virtiofsd. Users besides the one configured virtiofs may get confused about the behavior of readonly in guest xml