Big Sur Update: Vagrant not mounting folders on external drives

mount.nfs: access denied by server while mounting 192.168.50.1:/System/Volumes/Data/Volumes/Storage ....

After updating to Big Sur 11.3 or 11.4, vagrant will no longer mount folders from external drives (or different partitions/volumes). More details can be found here, but I would love to find a work around: https://github.com/hashicorp/vagrant/issues/12330

I’m running into this on Big Sur as well. I think this issue may be related: https://github.com/roots/trellis/issues/1210 (since Trellis nfs-mounts site/ as well as trellis/ subdirectories of your project.

@adleviton did you have any luck finding a solution?

I have a “good enough” solution, similar to what @alexrotaru mentioned on GitHub Second NFS share from OSX fails if the shared folder in on Secondary Volume · Issue #1210 · roots/trellis · GitHub. But here are some more details:

My exports File
At the top of this file, I mount the root of my external drive for each of my virtual machines. Note that I tried to set this up with a IP range to avoid the repetition … documentation for the exports files says it’s possible, but I could not get it to work. Then I remove any mounts inside the Vagrant comment blocks.

"/System/Volumes/Data/Volumes/Storage" -alldirs -mapall=502:20 192.168.50.52
"/System/Volumes/Data/Volumes/Storage" -alldirs -mapall=502:20 192.168.50.39
"/System/Volumes/Data/Volumes/Storage" -alldirs -mapall=502:20 192.168.50.85

etc ...

... vagrant blocks can be removed

To Avoid This Problem Persisting
In Vagrantfile, utilize the nfs_export parameter and set it to false. This will prevent Vagrant from messing the exports file you just manually fixed. To be consistent, I set this variable in vagrant.default.yml (e.g. vagrant_nfs_export: false). Then in my Vagrantfile, I added

nfs_export: vconfig.fetch('vagrant_nfs_export', false)

where applicable (for me, 3 instances: Wordpress, Trellis, and any shared folders … see lines 93, 98, and 107 below).

1 Like

@techieshark I spoke too soon … right now only one of my virtual machines is successfully mounting folders from my external drive. I’m trying to figure out what’s going on …

Don’t forget to run sudo nfsd restart after modifying the exports file!

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.