Skip to content

virtio-fs: expose read-only shared directories #495

Description

@claude-for-evoskamp

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions