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

NFS is broken on Mac OS X 10.8.5 using VirtualBox 4.2.18 and Vagrant 1.3.x #2319

Closed
ricbra opened this Issue Oct 4, 2013 · 19 comments

Comments

Projects
None yet
@ricbra

ricbra commented Oct 4, 2013

I'm experiencing problems when trying to mount a NFS share. I've spent quite a few hours on this issue and I believe mine is different then those already reported in #1093 and #1744.

When booting a VM vagrant just stops without any error after the NFS mounting:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] Setting hostname...
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /home/developer
[default] Exporting NFS shared folders...
Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
[default] Mounting NFS shared folders...

I tried changing the guest OS from CentOS 6 to Debian 7, no difference. On my Ubuntu machine with Vagrant 1.3.4 and VirtualBox 4.2.18 all is working fine.

I finally fixed the issue by downgrading to Vagrant 1.2.7. My colleague is experiencing the same issue on his Mac 10.8.5 so this issue shouldn't be that hard to reproduce.

My debug info: https://gist.github.com/ricbra/6821924

@GeoffreyPlitt

This comment has been minimized.

GeoffreyPlitt commented Oct 24, 2013

+1

4 similar comments
@madjam002

This comment has been minimized.

madjam002 commented Oct 24, 2013

+1

@vpetrovych

This comment has been minimized.

vpetrovych commented Oct 26, 2013

+1

@dylxc

This comment has been minimized.

dylxc commented Oct 28, 2013

+1

@regilero

This comment has been minimized.

regilero commented Oct 29, 2013

+1

@madjam002

This comment has been minimized.

madjam002 commented Nov 12, 2013

Turns out (for me anyway) that Vagrant up on the newer versions doesn't automatically provision, so doing vagrant up will stop at mounting NFS shared folders.
Doing vagrant up followed by vagrant provision seems to work for me :)

@ricbra

This comment has been minimized.

ricbra commented Nov 12, 2013

@madjam002 It does automatically provisioning. I suggest doing a VAGRANT_LOG=INFO vagrant up to see the errors happening which causes it stop.

Strange thing is, NFS is mounted correctly. Something goes wrong with the return value of the mounting or something. This is behaviour is introduced since 1.3.0.

I upgraded to Mavericks now, and had to upgrade to the latest vagrant version. Still suffering this issue on CentOS 6.2. My Debian 7 boxes work fine now.

@madjam002

This comment has been minimized.

madjam002 commented Nov 14, 2013

@ricbra
Here is my log to vagrant up:
https://gist.github.com/madjam002/7464006

Doesn't appear to be showing any errors from mounting the NFS file system...
Are you sure vagrant up is supposed to provision by default now? I tried running vagrant up --provision and then it does appear to provision straight after mounting the NFS file system.

@ricbra

This comment has been minimized.

ricbra commented Nov 14, 2013

@madjam002 You're totally right. From the CHANGELOG:
vagrant up will now only run provisioning by default the first time it is run. Subsequent reload or up will need to explicitly specify the --provision flag to provision. [GH-1776]

However I just discovered NFS is suddenly broken on my Debian 7 guest as well:
https://gist.github.com/ricbra/7464154

@madjam002

This comment has been minimized.

madjam002 commented Nov 14, 2013

@ricbra Ah yeah that doesn't look good. Does that issue get fixed if you downgrade to Vagrant 1.2.7?

@regilero

This comment has been minimized.

regilero commented Nov 14, 2013

@madjam002 , @ricbra check #2310 for provision issue.

@nickdiel

This comment has been minimized.

nickdiel commented Nov 21, 2013

I used this command for fixing conflicted exports 'sudo nfsd checkexports' to fix my issues with NFS

@bitinn

This comment has been minimized.

bitinn commented Dec 2, 2013

+1

i have a similar issue in #2564 with OSX Maverick, vagrant up no longer proceed when mounting share folders, but nfs is not required to trigger it. strange thing is vagrant 1.2.7 with virtualbox 4.2.x works, while vagrant 1.3.5 with virtualbox 4.3.x fails.

@jpayne

This comment has been minimized.

jpayne commented Dec 6, 2013

I'm experiencing the same issue with OS X Mavericks, Vagrant 1.3.5, and the VMware Fusion provider. vagrant up hangs at Mounting NFS shared folders.... So it would seem this issue is not specific to VirtualBox.

@mitchellh

This comment has been minimized.

Member

mitchellh commented May 2, 2014

I understand that this is an intermittent issue for people. Iv'e even seen it myself. I'm still not sure what exactly causes this or how to get a solid reproduction. Or, how to fix it. Because of that, I'm going to close it since it is a rare issue. If someone can shed more light, I'd be happy to fix. Thanks.

Conflicted exports shouldn't be an issue anymore since recent versions of Vagrant detect. that.

@mitchellh mitchellh closed this May 2, 2014

@bartekn

This comment has been minimized.

bartekn commented Aug 6, 2014

For people still trying to overcome problem with Mounting NFS shared folders.... Here's a bunch of tips:

  1. Run VAGRANT_LOG=INFO vagrant up to have more insights about the problem.
  2. Make sure you have nfs-common nfs-kernel-server packages installed on your host.
  3. Make sure you have vagrant-vbguest plugin installed (vagrant plugin install vagrant-vbguest). It will install VM Guest Additions on guest in case they're not already installed.
  4. You can also try to use other box with VM Guest Additions preinstalled. For example, for me, there were problems with ubuntu/trusty64 but ffuenf/ubuntu-14.04-server-amd64 worked like a charm (after I turned off firewall - next point).
  5. Despite the errors you should be able to ssh to your guest vagrant ssh. Try it and try to ping and connect to your host service (you'll get IP when you run vagrant as in 1.). In case you're not able to connect from guest to host probably you have firewall on. Turn it off temporarily to check if it's not a problem.
  6. Try to upgrade (if not helping downgrade) your version of vagrant and VirtualBox.
  7. You can also try to use rsync. It won't be so fast as nfs but probably will work.

Hope it helps someone.

@eddiejaoude

This comment has been minimized.

eddiejaoude commented Jul 4, 2015

Thanks @bartekn , it was the firewall causing the issue on nfs mount

@DanielAron

This comment has been minimized.

DanielAron commented Jul 21, 2015

Same problem here with Vagrant 1.7.2
Turning of the firewall fix it
Thanks @bartekn

@dkinzer

This comment has been minimized.

dkinzer commented Jul 31, 2015

I think I've just run into this myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment