4

until today my vagrant setup was working nice and smooth. But something happened and I can't find out what.

All of a sudden when I do vagrant up it hangs on mounting the NFS shared folder.

My guess is that something broke due to some updates on my host. Below are the outputs from vagrant up --debug command and the list with the latest updates from the last 2 days.

Here's the output from vagrant:

==> default: Mounting NFS shared folders...
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
 INFO ssh: SSH is ready!
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute:  (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG guest: Searching for cap: mount_nfs_folder
DEBUG guest: Checking in: ubuntu
DEBUG guest: Checking in: debian
DEBUG guest: Checking in: linux
DEBUG guest: Found cap: mount_nfs_folder in linux
 INFO guest: Execute capability: mount_nfs_folder [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>, "192.168.56.1", {"/home/vagrant"=>{:type=>:nfs, :mount_options=>["nolock,vers=3,udp,noatime,fsc,actimeo=1"], :guestpath=>"/home/vagrant", :hostpath=>"/home/stefan/NetBeansProjects/cargoplanning", :disabled=>false, :map_uid=>1000, :map_gid=>1000, :nfs_udp=>true, :nfs_version=>3, :uuid=>"2352560104", :linux__nfs_options=>["rw", "no_subtree_check", "all_squash", "anonuid=1000", "anongid=1000", "fsid=2352560104"]}}] (ubuntu)
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
 INFO ssh: SSH is ready!
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute:  (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG guest: Searching for cap: shell_expand_guest_path
DEBUG guest: Checking in: ubuntu
DEBUG guest: Checking in: debian
DEBUG guest: Checking in: linux
DEBUG guest: Found cap: shell_expand_guest_path in linux
 INFO guest: Execute capability: shell_expand_guest_path [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>, "/home/vagrant"] (ubuntu)
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: echo; printf /home/vagrant (sudo=false)
DEBUG ssh: Exit status: 0
DEBUG ssh: stdout: 
/home/vagrant
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: mkdir -p /home/vagrant (sudo=true)
DEBUG ssh: stderr: stdin: is not a tty

DEBUG ssh: Exit status: 0
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: mount -o 'nolock,vers=3,udp,noatime,fsc,actimeo=1' 192.168.56.1:'/home/stefan/NetBeansProjects/cargoplanning' /home/vagrant (sudo=true)
DEBUG ssh: stderr: stdin: is not a tty

DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...

List of software updates on 22.10.2015

List of software updates on 21.10.2015

Stev
  • 1,002
  • 10
  • 23

3 Answers3

5

Try either to restart nfs service (sudo systemctl restart nfs-server.service for me in Arch) or to remove Vagrant entries from /etc/exports (they are surrounded with #VAGRANT-BEGIN: ... #VAGRANT-END: comments) and then to restart the service.

zinovyev
  • 1,606
  • 17
  • 29
1

The problem was the udp protocol. I removed udp from VagrantFile config line:

:mount_options => ['nolock,vers=3,udp,noatime,fsc,actimeo=1']

Also, udp is not recommended even if it's faster. https://github.com/mitchellh/vagrant/issues/2304

Stev
  • 1,002
  • 10
  • 23
0

For anyone else still looking around and on 18.04, I found the culprit in my case.

It looks like in my case nfs-server package was missing even though nfs-kernel-server and nfs-common were installed, I installed nfs-server and vagrant up worked without an issue. Vagrant 2.0.3 and Virtualbox build 5.2.18_Ubuntu r123745

DWils
  • 342
  • 1
  • 4
  • 16