Roots Discourse

Tips: MacOS Big Sur mount nfs problem

Hello,

For anyone else running into problems with Trellis on Big Sur here is a setup that finally worked for me. I’ve had so much trouble getting Trellis to work smoothly after an involuntary upgrade to Big Sur.

Most of the time it would just error with a vague mount nfs not supported error.

Still not sure where the exact problem lies. I’ve been trying to find the problem or similar solutions.

Here is what’s working for me (after trying a lot of different combinations of versions):

Make sure FileVault is disabled on the directory your projects are located in. I disabled FileVault entirely.

Make sure you’ve edited /etc/sudoers with the things here https://www.vagrantup.com/docs/synced-folders/nfs

Ansible version 2.9.16
Vagrant version 2.2.7
Virtualbox version 6.1.16

Unfortunately I think you have to re-create the box with vagrant destroy / vagrant up if you downgrade versions. So make sure you do a backup of the data you need before.

I tried that but it didn’t fix my issue. After updating to Big Sur, upon running vagrant up I had the error:

Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter

To get past this error I had to destroy all my machines, uninstall virtualbox, install the latest test version of virtualbox and approved it many, many times (OSX is becoming a giant iphone with the worst parts of windows added in - i will be completing my move to linux here soon). I did csrutil clear in recovery mode too. see this page: https://forums.virtualbox.org/viewtopic.php?t=98763&start=75

Then i got this error:

TASK [composer : Install configured globally-required packages.]
non-zero return code
Changed current directory to /root/.composer
Do not run Composer as root/super user! See https://getcomposer.org/root for
details

  [RuntimeException]
  No composer.json present in the current directory, this may be the cause of
the following exception.

  [InvalidArgumentException]
  Package hirak/prestissimo at version @stable has a PHP requirement
incompatible with your PHP version, PHP extensions and Composer version

This was just an “out of date trellis issue” not a “virtualbox on big sur” issue, so then just had to remove hirak/prestissimo from group_vars/all/main.yml (isn’t needed anymore with composer v2 afaict)

Hey @erit

Yeah I forgot to mention all the security stuff you have to accept in Big Sur. It’s too bad I have been running this setup for many year but with latest Big Sur it’s all got a bit annoying. Hope they can make it smooth again with future updates to Vagrant/Virtual Box.

Never seen the error you got. Glad you solved it this can be a good reference for others.

Btw if you need to run composer version 1 still in your project (I do I can’t update to version 2 because of some dependencies). You can leave the box config as is (with hirak/prestissimo) and edit dev.yml composer task to - { role: composer, tags: [composer], composer_version: '1.10.16', composer_keep_updated: false } or 1.10.19 i think is the latest version when you provision.

If you need to provision a server also edit server.yml with this.

Or if you don’t want to reprovision you can vagrant ssh and sudo composer self-update --1 to switch version quickly.

oh that’s good to know, thanks @stefanlindberg

Very strange I have one box running but going to another project I got the same problem again.

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

mount -o vers=3,udp 172.16.181.1:/System/Volumes/Data/Users/slackday/dev/project/project.test /vagrant-nfs-project.test

Stdout from the command:



Stderr from the command:

mount.nfs: requested NFS version or transport protocol is not supported

Doing sudo nfsd restart on the host solved it this time…