NFS Mounting in trellis on Mac OS Catalina

I just upgraded to Mac OS Catalina and when running

vagrant up

I got the following error when exporting NFS shared folders:

NFS is reporting that your exports file is invalid. Vagrant does
this check before making any changes to the file. Please correct
the issues below and execute "vagrant reload":

exports:2: exported dir/fs mismatch: /Users/jannick/Code/sites/SITENAME/site /System/Volumes/Data
exports:3: exported dir/fs mismatch: /Users/jannick/Code/sites/SITENAME/trellis /System/Volumes/Data

According to this open vagrant issue it is an issue with nfsd/macos.

I found a workaround that worked for me as long as this issue hasn’t been fixed.

  1. Shut down all your running virtual machines.

  2. Remove the affected lines in your /etc/exports file. They are shown in the error message above and look something like that:

    # VAGRANT-BEGIN: 501 13b5d65d-55fe-4d23-80bf-38fb242a79b7
    /Users/jannick/Code/sites/SITENAME/site -alldirs -mapall=501:20
    /Users/jannick/Code/sites/SITENAME/trellis -alldirs -mapall=501:20
    # VAGRANT-END: 501 13b5d65d-55fe-4d23-80bf-38fb242a79b7

  3. Correct two lines in your Vagrantfile:
    Change this line
    config.vm.synced_folder local_site_path(site), nfs_path(name), type: 'nfs'
    to this
    config.vm.synced_folder '/System/Volumes/Data/' + local_site_path(site), nfs_path(name), type: 'nfs'
    and this line
    config.vm.synced_folder ANSIBLE_PATH, '/ansible-nfs', type: 'nfs'
    to this
    config.vm.synced_folder '/System/Volumes/Data/' + ANSIBLE_PATH, '/ansible-nfs', type: 'nfs'

  4. Run vagrant up.

Everything should work out fine.



I upgraded to Mac OS Catalina and am trying to run vagrant up. I have updated my Vagrantfile as suggested in NFS Mounting in trellis on Mac OS Catalina to solve the issues with the NFS mismatch. I now get the following error:

==> default: Cannot create bind mount from '/' to '/srv/www/': Source path '/' doesn't exist
==> default: Cannot create bind mount from '/ansible-nfs' to '/home/vagrant/trellis': Source path '/ansible-nfs' doesn't exist
==> default: Cannot create bind mount from '/home/vagrant/trellis/bin' to '/home/vagrant/trellis/bin': Source path '/home/vagrant/trellis/bin' doesn't exist
==> default: [vagrant-hostmanager:guests] Updating hosts file on active guest virtual machines...
==> default: [vagrant-hostmanager:host] Updating hosts file on your workstation (password may be required)...
==> default: Running provisioner: shell...
    default: Running: inline script
    default: Reading package lists...
    default: Building dependency tree...
    default: Reading state information...
    default: The following additional packages will be installed:
    default:   libssl-dev
    default: Suggested packages:
    default:   libssl-doc
    default: The following packages will be upgraded:
    default:   libssl-dev libssl1.1
    default: 2 upgraded, 0 newly installed, 0 to remove and 104 not upgraded.
    default: Need to get 2,866 kB of archives.
    default: After this operation, 20.5 kB of additional disk space will be used.
    default: Get:1 bionic-updates/main amd64 libssl-dev amd64 1.1.1-1ubuntu2.1~18.04.4 [1,566 kB]
    default: Get:2 bionic-updates/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.4 [1,300 kB]
    default: Preconfiguring packages ...
    default: Fetched 2,866 kB in 1s (4,128 kB/s)
    default: (Reading database ... 
    default: (Reading database ... 5%
    default: (Reading database ... 10%
    default: (Reading database ... 15%
    default: (Reading database ... 20%
    default: (Reading database ... 25%
    default: (Reading database ... 30%
    default: (Reading database ... 35%
    default: (Reading database ... 40%
    default: (Reading database ... 45%
    default: (Reading database ... 50%
    default: (Reading database ... 55%
    default: (Reading database ... 60%
    default: (Reading database ... 65%
    default: (Reading database ... 70%
    default: (Reading database ... 75%
    default: (Reading database ... 80%
    default: (Reading database ... 85%
    default: (Reading database ... 90%
    default: (Reading database ... 95%
    default: (Reading database ... 100%
    default: (Reading database ... 
    default: 42494 files and directories currently installed.)
    default: Preparing to unpack .../libssl-dev_1.1.1-1ubuntu2.1~18.04.4_amd64.deb ...
    default: Unpacking libssl-dev:amd64 (1.1.1-1ubuntu2.1~18.04.4) over (1.1.1-1ubuntu2.1~18.04.2) ...
    default: Preparing to unpack .../libssl1.1_1.1.1-1ubuntu2.1~18.04.4_amd64.deb ...
    default: Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.4) over (1.1.1-1ubuntu2.1~18.04.2) ...
    default: Processing triggers for libc-bin (2.27-3ubuntu1) ...
    default: Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.4) ...
    default: Setting up libssl-dev:amd64 (1.1.1-1ubuntu2.1~18.04.4) ...
    default: Processing triggers for libc-bin (2.27-3ubuntu1) ...
==> default: Running provisioner: ansible_local...
`playbook` does not exist on the guest: /home/vagrant/trellis/dev.yml

Having spent the last few nights trawling the internet I have found no way past it. Can anybody help?



Hi Liam,

is it the first time you run vagrant up?
Are you sure you upgraded your vagrant file exactly as suggested above?

It seems to me like the paths are still wrong because of
Source path '/' doesn't exist


Hi Jannick

Thanks for the help. It was the first time running vagrant up and I did do exactly as you suggested. However, I think the problem was caused by a broken copy of ansible. I uninstalled and reran vagrant up.

I then ran into this problem: Vagrant only syncs folders, no files. I managed to solve by creating a new folder at /Users/me/Development and provisioning the site in the new directory. Seems to be an issue with the new Documents folder.


@janman22 Thank you for this! Your step 3 worked great. Unfortunately it makes the Vagrantfile Catalina-specific, but it’s a functional workaround until Vagrant releases a fix upstream!

This also worked for me (thanks @janman22), but I also had to move the project out of a Documents sub-folder and vagrant destroy and provision before it worked.

1 Like

Thank God! This worked for me!

Thank you!!!

A Github user has made a nice edit to the Vagrantfile, without any breaking change for non-Catalina users:

Vagrant 2.2.6 has been released and includes a fix for this Catalina problem!


Hello -

I am having this problem or one related when trying to vagrant up. I have updated Vagrant to 2.2.6 and I am still getting an access denied error.

I have also destroyed the environment and removed the box to try a clean install of the box hoping it would clear up this problem.

This is the error I am receiving when running vagrant up:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp…/trellis /ansible-nfs

Stdout from the command:

Stderr from the command:

mount.nfs: access denied by server while mounting…/trellis

Any help would be greatly appreciated?

1 Like

Hi there,
I still have the same problem.
MacOs Catalina, latest vagrant 2.2.6, latest VirtualBox.

The only difference is that I’ve an encrypted volume.
Any other ideas?

Thank you guys

I’m getting the same problem as @apompei even after upgrading vagrant, destroying my box, and killing the .vagrant folder. I can’t launch trellis.

Currently having the same issue as @devotoare

The workaround in vagrant 2.2.6 for Catalina does not work when the shared folder is not on the boot volume.

Seems to be a fix around the corner, for 2.6.7 milestone.

A meanwhile fix could be to move Trellis folder to boot volume. I tried it, but:

==> default: Creating bind mounts after synced_folders...
==> default: Cannot create bind mount from '/' to '/srv/www/': Source path '/' doesn't exist
==> default: Cannot create bind mount from '/ansible-nfs' to '/home/vagrant/trellis': Source path '/ansible-nfs' doesn't exist
==> default: Cannot create bind mount from '/home/vagrant/trellis/bin' to '/home/vagrant/trellis/bin': Source path '/home/vagrant/trellis/bin' doesn't exist