From 866426a93d267fbbdbeffb28c641abd7f023dff5 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Sat, 22 Oct 2022 18:33:19 +0100 Subject: [PATCH] Make qemu security model none On Mac machines security model none works, while "mapped-xattr" causes symlinks to not work. Update docs/source/markdown/podman-machine-init.1.md [NO NEW TESTS NEEDED] Related: https://github.com/containers/podman/discussions/16102 Co-authored-by: Tom Sweeney Signed-off-by: Sorin Sbarnea Signed-off-by: Daniel J Walsh --- docs/source/markdown/podman-machine-init.1.md | 8 ++++++-- pkg/machine/qemu/machine.go | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/source/markdown/podman-machine-init.1.md b/docs/source/markdown/podman-machine-init.1.md index 7a23faf590..df4ba2f501 100644 --- a/docs/source/markdown/podman-machine-init.1.md +++ b/docs/source/markdown/podman-machine-init.1.md @@ -97,8 +97,12 @@ options are: The 9p security model [determines] https://wiki.qemu.org/Documentation/9psetup#Starting_the_Guest_directly if and how the 9p filesystem translates some filesystem operations before -actual storage on the host. The -default value of *mapped-xattr* specifies that 9p store symlinks and some file +actual storage on the host. + +In order to allow symlinks to work, on MacOS the default security model is + *none*. + +The value of *mapped-xattr* specifies that 9p store symlinks and some file attributes as extended attributes on the host. This is suitable when the host and the guest do not need to interoperate on the shared filesystem, but has caveats for actual shared access; notably, symlinks on the host are not usable diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index d1518366ec..4f25b4d26c 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -305,7 +305,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) (bool, error) { source := paths[0] target := source readonly := false - securityModel := "mapped-xattr" + securityModel := "none" if len(paths) > 1 { target = paths[1] }