VZSharedDirectory supports readOnly, but pkg/vf/virtio.go always passes false (vz.NewSharedDirectory(dev.SharedDir, false)), and the virtio-fs device rejects any read-only option (Error: unknown option for virtio-fs devices: readOnly, v0.6.4). Block devices already accept readonly.
Please add a readonly option to --device virtio-fs (and the JSON config) and pass it to NewSharedDirectory. This gives guests a live view of a host directory where writes are refused by the hypervisor, so guest root can't bypass it the way it can a guest-side mount -o ro.
VZSharedDirectorysupportsreadOnly, butpkg/vf/virtio.goalways passesfalse(vz.NewSharedDirectory(dev.SharedDir, false)), and thevirtio-fsdevice rejects any read-only option (Error: unknown option for virtio-fs devices: readOnly, v0.6.4). Block devices already acceptreadonly.Please add a
readonlyoption to--device virtio-fs(and the JSON config) and pass it toNewSharedDirectory. This gives guests a live view of a host directory where writes are refused by the hypervisor, so guest root can't bypass it the way it can a guest-sidemount -o ro.