When starting or reloading a vagrant instance on OSX, I receive this error
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
No host IP was given to the Vagrant core NFS helper. This is
an internal error that should be reported as a bug.
I am on an up-to-date OSX Mountain Lion, Vagrant is in its 1.1.0 version.
Below, the Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision :shell do |s|
s.path = "provisioning/bootstrap.sh"
end
config.vm.network :forwarded_port, guest: 80, host: 8680
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", "1024"]
v.customize ["modifyvm", :id, "--cpus", "2"]
end
config.vm.synced_folder ".", "/vagrant", :nfs => true
end
It appears that NFS exports need an explicitly defined IP.
Adding:
config.vm.network :private_network, ip: "192.168.10.2"
to the Vagrantfile, solves the issue. The only problem is that the virtual machine is now configured with 2 network interfaces: the default one (10.0.x.x), and the private (192.168.10.x).
Is there a way to only have one?
No, NFS networking with VirtualBox requires two. It still seems like you found a bug though in that VirtualBox is not validating this for you. I'm going to fix this.
Fixed
I'm seeing this exact same error on VMWare Fusion. I added nfs => true to the default share and the networking is stock, no customizations. Does Fusion also require a second network interface?
Was able to resolve by determining the 'Private to my Mac' ip range for Fusion and setting a private network as follows:
config.vm.network :private_network, ip: "[static ip in private range]"
I also needed to allow nfs in the app firewall (OS X 10.8): http://www.bresink.com/osx/143439/Docs-en/pgs/Share.html
Want to find out what the "'Private to my Mac' ip range for Fusion" is? Do:
sudo more /Library/Preferences/VMware\ Fusion/networking
vmnet1 hostonly subnet was what was required in my case.
Just saved my day. This should be written somewhere in the doc for the vmware provider
I just hit this with VMWare Fusion too, IMHO this should be something that gets detected by the code and tells the user what config is needed. I'd vote for reopening this or opening a new issue if that makes more sense. Wouldn't want vagrant to be LYING to us about what should be called a bug. :wink:
Yep just hit this in vmware fusion as well.
[default] Configuring network adapters within the VM...
No host IP was given to the Vagrant core NFS helper. This is
an internal error that should be reported as a bug.
Would be nice to have someone look into this given the state of shared folders on linux kernel 3.8+ and vmware fusion..
Just got this error after updating to 1.4.0. Virtual Box VMs worked fine in 1.3.5 and continue to work fine after downgrading. I'm trying to isolate a test case for a new bug report.
@joemaller I've been doing a bunch of work in this area so I'll keep an eye out for your follow up bug report.
I got this same error with 1.4.0 when using coreos-vagrant with this config (as read in coreos-vagrant docs https://github.com/coreos/coreos-vagrant#shared-folder-setup):
config.vm.synced_folder ".", "/home/core/share", id: "core", :nfs => true, :mount_options => ['nolock,vers=3,udp']
After downgrading Vagrant to 1.3.5 everything works.
I'm seeing that problem as well, host is Arch, Vagrantfile is https://github.com/viq/vagrant-obsd-port-worker/blob/master/Vagrantfile
Vagrant debug log: https://gist.github.com/8004625
I was able to resolve this by using rsync instead of nsf:
config.vm.synced_folder "*", "/vagrant", type: "rsync"
I also set a static ip but I'm not sure if that was required.
Just setting the type: 'rsync' without changing any IPs worked for me.
Hi guys,
This fix will do the jobs as well.
config.vm.provider :aws do |aws, override|
override.nfs.functional = false
Hope helps.
Still have this bug here.
config.vm.box = "maier/alpine-3.1.3-x86_64"
config.vm.network = "private_network", type: "dhcp"
...
config.vm.synced_folder ".", "/vagrant", type: "nfs"
I'm popping a bunch of VMs, so dhcp is mandatory ; also i use nfs share because alpine wont provide something else. and yes, i installed the vagrant-alpine plugin :)
Any help appreciated.
Is there any update on this issue?
I have below configuration
vagrant Installed Version: 1.8.1
virtual box => vboxmanage --version 5.0.16r105871
Mac Book Pro OS X EL Capitan Version 10.11.4
Below is the logs:
ABC-MAC30:src usrname $ sudo vagrant reload
Password:
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'mirth/centos-7.1' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: bridged
default: Adapter 3: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: Machine booted and ready!
GuestAdditions 5.0.16 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
No guest IP was given to the Vagrant core NFS helper. This is an
internal error that should be reported as a bug.
If it helps, i only get this error with the Am79C970A nic driver. If i change it to 82543GC or virtio i don't see this issue: host Ubuntu 16, vm centos 6.x
This error still exists with 1.8.5 - after all these years, it would be really great to see some intensity flowing into fixing this error, as this is a _very basic functionality_ that is mandatory for working with virtual machines.
I can not work with a virtual computer that can not use networking features that exist since 20 years or longer and are expected to just work. Please make it a high priority to finally fix this annoyance that makes vagrant practically unusable in many use cases, thank you very much!
I see that hyper-v's synced folders plugin does not support NFS because it does not set env[:nfs_host_ip] and env[:nfs_machine_ip]
It may be self-evident, but proposed workarounds that imply disabling NFS capabilities really aren't useful for people trying to use NFS for the folder sync. For example, yes, override.nfs.functional = false is a satisfying hammer when one wants to use SMB, rsync, or WinRM. It's bloody chainsaw for those who are trying to use NFS because SMB, rsync, and WinRM are all themselves busted for the particular combination of Host, Guest, Vagrant release, and Chef release.
(As a community, we REALLY need some reliable way to sync folders from Hosts to Guests when the host is Unix-ish and the guest is Windows.)
For the provider that I am using, I shouldn't expect success but I should at least expect more informative warnings.
In my case, the vagrant-softlayer plugin has no support for NFS synced folders and only supports rsync synced folders.
Therefore, sure, it is not returning guest and host IP address information to core vagrant.
We might have the warning say, "For machine XYZ, using Provider ABC, no Host (and Guest) IP information has been provided for the NFS sync_folder service. Perhaps this provider doesn't support NFS service?"
I'm currently experiencing this bug in version 1.8.6
Also seeing this issue with latest Vagrant and VirtualBox. Host is OS/X and guest is Centos7.
I get this with this configuration:
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder ".", "/vagrant", type: "nfs"
Do I need to hard code an IP address?
Vagrant 1.8.6
Virtualbox 5.1.8
Same @scottjacobsen with the same versions
Also seeing this issue with Vagrant 1.8.1 and Vagrant 1.9.2, VirtualBox 5.0.32. Host is OS/X 10.95, Darwin Kernel Version 13.4.0:, and guest is Centos 7.3 ( CentOS-7-x86_64-Vagrant-1702_01 )
config.vm.network "private_network", type: "dhcp"
config.cache.synced_folder_opts = {
type: :nfs,
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
Work around
1) ssh to your vagrant box
2) find the private network ip from dhcp ( default: Adapter 2: hostonly )
Ouput from : vagrant up / vagrant reload
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
[vagrant@localhost ~]$ ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
inet 127.0.0.1/8 scope host lo
...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0
...
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
....
inet 172.28.128.3/24 brd 172.28.128.255 scope global dynamic eth1
md5-736501e6bf7c1c4118f61af5890aafbb
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
md5-bc1126372742937d0a0a586492c0f080
macosx:vagrant-centos73 user$ cat /etc/exports
# VAGRANT-BEGIN: 503 d6fe2488-716e-475f-815c-da9b98a413e4
"/Users/user/.vagrant.d/cache/CentOS-7-x86_64-Vagrant-1702_01" 172.28.128.10 -alldirs -mapall=503:20
# VAGRANT-END: 503 d6fe2488-716e-475f-815c-da9b98a413e4
I'm also hitting this problem on a OSX host using VirtualBox with CentOS 7 guest, but only with DHCP networking.
From a quick look through the debug logs, seems like we're dependent on a call to
$ VBoxManage guestproperty get daf5ba1d-ce15-124d-8be9-1a8fcfe370d6 /VirtualBox/GuestInfo/Net/1/V4/IP
**No value set!**
Though there is a dynamic IP:
$ vagrant ssh -c "ip a show dev eth1"
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
inet 172.28.128.5/24 brd 172.28.128.255 scope global dynamic eth1
When I use a static IP the GuestInfo property is still empty, but I'm guessing this is not used if the VM is configured with a static IP.
I have a simple workaround for now (static IP), but it would be nice to be able to use DHCP.
Any news on this issue ?
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Hi guys,
This fix will do the jobs as well.
Hope helps.