Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck at "==> default: Mounting NFS shared folders..." #92

Closed
edorgeville opened this issue Jul 31, 2015 · 10 comments
Closed

Stuck at "==> default: Mounting NFS shared folders..." #92

edorgeville opened this issue Jul 31, 2015 · 10 comments

Comments

@edorgeville
Copy link

When I do vagrant up I get stuck on the NFS part :

 ct@inferno ~/W/v/scotch-box  $ vagrant up                                                  master
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'scotch/box'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'scotch/box' is up to date...
==> default: Setting the name of the VM: scotch-box_default_1438367018205_97351
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> default: Mounting NFS shared folders... 

and it gets stuck forever.
I'm running OS X Yosemite 10.10.4.

@edorgeville
Copy link
Author

Letting it run for 15 minutes finally gave this :

==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.Vagrant assumes that this means the command failed!

mount -o 'vers=3,udp' 192.168.33.1:'/Users/ct/Workspaces/vendor/scotch-box' /var/www

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: Connection timed out

@edorgeville
Copy link
Author

As suggested by @jiannelli in #82, using this Vagrantfile works :

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

    config.vm.box = "scotch/box"
    config.vm.network "private_network", ip: "192.168.33.10"
    config.vm.hostname = "scotchbox"
    config.vm.synced_folder ".", "/var/www"

end

But this is only a workaround.

@jiannelli
Copy link
Contributor

It might be that you are doing vagrant up as a regular user and the system prompts you for root password to mount nfs. Check https://docs.vagrantup.com/v2/synced-folders/nfs.html under the title: "Root Privilege Requirement".

@edorgeville
Copy link
Author

It did prompt for my password, which I gave.

@jiannelli
Copy link
Contributor

Try vagrant ssh and enter the command manually. Also try vagrant in debug mode (maybe it gives you a clue). Perhaps if you configure sudo it will work because it shouldn't prompt you for a password anymore.

@whatnickcodes
Copy link
Member

Update your Vagrantfile: #82

@edorgeville
Copy link
Author

Gotcha 👍

@chadfurman
Copy link

chadfurman commented May 27, 2017

I had a similar problem in Ubuntu, Vagrant version 1.9.3, VB version 5.1.22

The problem was that my host's OS has changed the ifconfig to the ip command, and vboxnet0 did not have an ip address.

Solution:

$ sudo ip a add 192.168.33.1/255.255.255.0 dev vboxnet0
$ sudo ip link set vboxnet0 up

There were many other things I tried: starting/stopping the firewall (ufw, iptables, both, neither); adding specific rules to the firewall to allow all traffic to this IP; service start for each of nfs-common, nfs-kernel-server, nfs-server, nfs-client; and clearing out my /etc/exports

It wasn't until I made sure my vboxnet0 had an IP on the host machine that everything worked.

@paullinney
Copy link

paullinney commented Jun 15, 2017

For Ubuntu 17.04+ ensure that ifconfig is installed,
sudo apt install net-tools

Will save you having to run the ip command manually.

@gitressa
Copy link

After updating VirtualBox in Ubuntu 16.04 via the automatic Software updater which runs every morning, I got errors that looks like the ones mentioned here. After trying many things, I tried to run the original install command sudo apt-get install virtualbox nfs-kernel-server and it seemed like some programs had gone missing. After reinstalling them, everything worked again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants