machine/linux: Support virtiofs mounts (retain 9p default)

I'm hitting a bug with 9p when trying to transfer large files.
In RHEL at least 9p isn't supported because it's known to have a
lot of design flaws; virtiofsd is the supported and recommended
way to share files between a host and guest.

Add a new hidden `PODMAN_MACHINE_VIRTFS` environment
variable  that can be set to `virtiofs` to switch to virtiofsd.

Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
Colin Walters
2024-06-05 18:16:54 -04:00
parent 406f130590
commit bf541c6740
9 changed files with 229 additions and 14 deletions

View File

@ -7,6 +7,11 @@ import (
"github.com/containers/podman/v5/pkg/machine/vmconfigs"
)
// NFSSELinuxContext is what is used by NFS mounts, which is allowed
// access by container_t. We need to fix the Fedora selinux policy
// to just allow access to virtiofs_t.
const NFSSELinuxContext = "system_u:object_r:nfs_t:s0"
type Volume interface {
Kind() VolumeKind
}