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

nfs failing on osx #2668

Closed
tj opened this issue Dec 17, 2013 · 4 comments
Closed

nfs failing on osx #2668

tj opened this issue Dec 17, 2013 · 4 comments

Comments

@tj
Copy link

tj commented Dec 17, 2013

Mavericks, Vagrant 1.4.0, VirtualBox 4.2.18

config:

...
  config.vm.network :private_network, ip: "192.168.10.2"
  config.vm.synced_folder "vm/", "/home/vagrant/", nfs: true
  config.vm.synced_folder "provision/", "/home/vagrant/provision/", nfs: true
...
[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.10.1:'/Users/tj/projects/segmentio/vm/vm' /home/vagrant

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount: wrong fs type, bad option, bad superblock on 192.168.10.1:/Users/tj/projects/segmentio/vm/vm,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

syslog:

VBoxDrv: host_vmxoff -> vmx_use_count=0
VBoxDrv: host_vmxon  -> vmx_use_count=1 rc=0
VBoxDrv: host_vmxoff -> vmx_use_count=0
VBoxFltDrv: attached to 'vboxnet3' / 0a 00 27 00 00 03
VBoxDrv: host_vmxon  -> vmx_use_count=1 rc=0
vboxnet3: promiscuous mode enable failed
VBoxNetFlt: Failed to put 'vboxnet3' into promiscuous mode, err=102 (723262184->723262184)
Network delay is not specified! Defaulting to 0x384
Network delay is not specified! Defaulting to 0x384
VBoxNetFlt: was detached from 'vboxnet3' (723262184)
VBoxDrv: host_vmxoff -> vmx_use_count=0
VBoxDrv: host_vmxon  -> vmx_use_count=1 rc=0
VBoxDrv: host_vmxoff -> vmx_use_count=0
VBoxDrv: host_vmxon  -> vmx_use_count=1 rc=0
VBoxDrv: host_vmxoff -> vmx_use_count=0
VBoxDrv: host_vmxon  -> vmx_use_count=1 rc=0
VBoxDrv: host_vmxoff -> vmx_use_count=0
VBoxFltDrv: attached to 'vboxnet3' / 0a 00 27 00 00 03
VBoxDrv: host_vmxon  -> vmx_use_count=1 rc=0
vboxnet3: promiscuous mode enable failed
VBoxNetFlt: Failed to put 'vboxnet3' into promiscuous mode, err=102 (723262184->723262184)
VBoxNetFlt: was detached from 'vboxnet3' (723262184)
VBoxDrv: host_vmxoff -> vmx_use_count=0
hfs: mounted Vagrant on device disk1s1
VBoxDrv: host_vmxon  -> vmx_use_count=1 rc=0
VBoxDrv: host_vmxoff -> vmx_use_count=0
VBoxFltDrv: attached to 'vboxnet3' / 0a 00 27 00 00 03
VBoxDrv: host_vmxon  -> vmx_use_count=1 rc=0
vboxnet3: promiscuous mode enable failed
VBoxNetFlt: Failed to put 'vboxnet3' into promiscuous mode, err=102 (723262184->723262184)

didn't see this exact issue in the tickets, might just be something stupid, any tips are appreciated!

@tmatilai
Copy link
Contributor

@visionmedia as far as I know, Mavericks requires (the latest) VirtualBox 4.3 version. And of course you have to have NFS client installed in the guest.

If the issue persists on VBox 4.3, please reopen and add link to full output of vagrant up --debug.

@tj
Copy link
Author

tj commented Dec 17, 2013

is there a way to trick vagrant into not trying to mount on the first vagrant up? since I need to apt-get install nfs-common portmap first, right now you have to ssh in first after it fails on vagrant up, then provision

@tmatilai
Copy link
Contributor

Maybe something like this:

def first_run?
  # You *could* check e.g. the provisioner sentinel, but maybe env var is enough?
  !!ENV['FIRST_RUN']
end

Vagrant.configure('2') do |config|
  # ...

  config.vm.synced_folder "vm/", "/home/vagrant/", nfs: true, disabled: first_run?
  config.vm.synced_folder "provision/", "/home/vagrant/provision/", nfs: true, disabled: first_run?

  if first_run?
    config.vm.provision :shell, inline: 'apt-get update; apt-get -y install nfs-common portmap'
  else
    # other provisioners etc.
  end
end

And then run:

> FIRST_RUN=1 vagrant up [--provision]
> vagrant provision

IMHO it's anyway better to use a basebox which already has the NFS client installed. You can also package the current box to a basebox.

@tj
Copy link
Author

tj commented Dec 17, 2013

I'll check out both those options! thanks

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants