Dimitriy
Dimitriy

Reputation: 51

Mounting volumes between host (MacOs BigSur) and podman VM

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.

Upvotes: 5

Views: 9866

Answers (2)

sorin
sorin

Reputation: 170628

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

Upvotes: 13

Patrickz
Patrickz

Reputation: 760

try

podman machine init --volume /Users --volume /Volumes

Upvotes: 5

Related Questions