-
Notifications
You must be signed in to change notification settings - Fork 8
NFS Mounting issues
If you get the following error when trying to run vagrant up:
mount -o vers=3 192.168.62.1:'/Users/example/Documents/example/example.lamp/example.com' /var/www
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3 192.168.62.1:'/Users/example/Documents/example/example.lamp/example.com' /var/www
...there a number of possible fixes!
- First of all, if this error first occurs, after shutting down or restarting your computer without running
vagrant halt, then you likely have an orphaned VirtualBox or boxes that need to be removed.
Run vagrant destroy to remove the current VM, then open the VirtualBox UI and delete all pubstack VMs and all of their files. This will likely fix your NFS mounting issue.
-
Try turning off your firewall. If that works, then you'll have to find which firewall rule is blocking the NFS connection.
-
You might have conflicting entries in your /etc/exports file. Run
sudo nfsd checkexportsandsudo nfsd restartto resolve this. Also simply making sure nfsd is running is a good step to take as well. -
You might have a damaged /etc/hosts file. Make sure there is a "127.0.0.1 localhost" entry.
-
Finally, it may simply be due to a mismatch in VirtualBox versions on the host and guest machines. The easiest way to resolve this is to install the vagrant-vbguest vagrant plug-in. I found this to be kind of tricky, here were the steps I took:
Peacocks-MacBook-Pro:pubstack peacock$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
An error occurred while installing nokogiri (1.6.5), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.5'` succeeds before bundling.
Peacocks-MacBook-Pro:pubstack peacock$
Peacocks-MacBook-Pro:pubstack peacock$ gem install --install-dir ~/.vagrant.d/gems nokogiri -v '1.6.5'
ERROR: While executing gem ... (Errno::EACCES)
`Permission denied - /Users/peacock/.vagrant.d/gems/gems/nokogiri-1.6.5/.autotest
Peacocks-MacBook-Pro:pubstack peacock$
Peacocks-MacBook-Pro:pubstack peacock$ sudo !!
sudo gem install --install-dir ~/.vagrant.d/gems nokogiri -v '1.6.5'
Password:
Building native extensions. This could take a while...
Successfully installed nokogiri-1.6.5
Parsing documentation for nokogiri-1.6.5
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/nokogiri/nokogiri.bundle, skipping
Installing ri documentation for nokogiri-1.6.5
1 gem installed
Peacocks-MacBook-Pro:pubstack peacock$
Peacocks-MacBook-Pro:pubstack peacock$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vbguest (0.10.0)'!
... then there is also a bug in the VirtualBox Guest Additions installer that doesn't quite complete the installation process. Once you have the correct version of VirtualBox installed on the guest machine, run vagrant ssh and create the following symlink:
vagrant@precise64:~$sudo ln -s /opt/VBoxGuestAdditions-4.3.14/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
That should sync up your host and guest machines' VirtualBox versions.