3

In my company we switched to Podman due to docker latest change in policies. My colleagues who use Windows with WSL2 switched seamlessly. Me, who uses MacOs BigSur v.11.6.2 face the following issue:

$ podman machine init -v /Users:/mnt/Users
$ podman machine start

I get the following error

$ Starting machine "podman-machine-default"
$ INFO[0000] waiting for clients...                       
$ INFO[0000] new connection from  to /var/folders/4z/9v__6yld4d7fzmbxm8trl1sh0000gn/T/podman/qemu_podman-machine-default.sock 
$ Waiting for VM ...
$ qemu-system-x86_64: -virtfs local,path=/Users/Dimitrii_Meritsidi/Documents/spbh_exus/git/cdp_airflow_local_environment,mount_tag=vol0,security_model=mapped-xattr: There is no option group 'virtfs'
$ qemu-system-x86_64: -virtfs local,path=/Users/Dimitrii_Meritsidi/Documents/spbh_exus/git/cdp_airflow_local_environment,mount_tag=vol0,security_model=mapped-xattr: virtfs support is disabled

I have read that MacOs Bigsur doesn't support virtfs. What are the possible solutions here? I have found probable workaround with Vmware Fusion, however it is also on paid subscription. The reason I need to use this mounting is because we use docker-compose.yml with volumes for launching local airflow.

Dimitriy
  • 31
  • 1
  • 2
  • According to this [GitHub comment](https://github.com/containers/podman/issues/8016#issuecomment-1025063535), a QEMU version that includes virtfs support is required to get this to work – Erik Sjölund Feb 03 '22 at 21:01
  • Thanks, I have seen that tread and comment.. I tried to follow it but it didn't work. It has a few discrepancies. I guess we have to make for stable qemu with virtfs support or at least unambiguous instruction. – Dimitriy Feb 04 '22 at 09:48

2 Answers2

11

To allow volume mounts on MacOS, podman machine needs to be created with access to the folder from which you are going to attempt to mount sub-folders, so it would have access to it.

Is likely that most MacOS users would only want to mount from within their home directory, so machine should be created like below:

podman machine init --now --cpus=4 --memory=4096 -v $HOME:$HOME

I wrote a guide for podman on macos at https://github.com/ansible/vscode-ansible/wiki/macos which you might find useful.

sorin
  • 161,544
  • 178
  • 535
  • 806
5

try

podman machine init --volume /Users --volume /Volumes
Patrickz
  • 680
  • 7
  • 11