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

Ubuntu 14.04: No guest IP was given to the Vagrant core NFS helper #232

Closed
nbenn opened this issue Jun 19, 2014 · 11 comments
Closed

Ubuntu 14.04: No guest IP was given to the Vagrant core NFS helper #232

nbenn opened this issue Jun 19, 2014 · 11 comments

Comments

@nbenn
Copy link

nbenn commented Jun 19, 2014

The box resulting from a ubuntu-14.04-amd64.json run does not properly start up under vagrant, while the box that is referenced in the readme does not suffer from this problem. This is the reason why I'm creating this issue here.

The Vagrant output:

==> default: Box 'opscode/ubuntu-14.04_chef-provisionerless' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Adding box 'opscode/ubuntu-14.04_chef-provisionerless' (v0) for provider: virtualbox
    default: Downloading: file:///.../opscode_ubuntu-14.04_chef-provisionerless.box
==> default: Successfully added box 'opscode/ubuntu-14.04_chef-provisionerless' (v0) for 'virtualbox'!
==> default: Importing base box 'opscode/ubuntu-14.04_chef-provisionerless'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: semester-project
==> 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: 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: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> 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.

My vagrantfile:

# -*- mode: ruby -*-

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.box = "opscode/ubuntu-14.04_chef-provisionerless"
  config.vm.box_url = "file:///.../opscode_ubuntu-14.04_chef-provisionerless.box"

  config.vm.network "private_network", type: "dhcp"

  config.vm.synced_folder "./Code", "/Code", :nfs => true

end

I'm using Vagrant 1.6.3 and Mac OS 10.9.3. Pleas let me know if I can provide any additional information. Also let me know if you think this issue is best added to the Vagrant repo instead of here.

Best,
Nicolas

@juliandunn
Copy link
Contributor

What happens if you turn off the NFS shared folder?

Judging by the

No guest IP was given to the Vagrant core NFS helper. This is an
internal error that should be reported as a bug.

I'm going to assume there's a problem with Vagrant rather than this box, but let's narrow that down.

@nbenn
Copy link
Author

nbenn commented Jun 20, 2014

When I remove :nfs => true, I get

==> 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: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /Code => /Users/nbennett/Downloads/bento-master/Code
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` Code /Code
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` Code /Code

If it helps, the box I created is available here. I tried both VirtualBox 4.3.10 r93013 and 4.3.12 r93733 after reading this. Same result.

Any idea why the prebuilt box works? Shouldn't that one be identical to the one I get when I run packer build -only=virtualbox-iso ubuntu-14.04-amd64.json?

Let me know if I can do anything else to help.

@tknerr
Copy link

tknerr commented Aug 22, 2014

Experiencing the same issue with the chef/ubuntu-14.04-i386 box on vagrantcloud:

D:\Repos\_github\vagrant-managed-servers>vagrant up fake_managed_server
Bringing machine 'fake_managed_server' up with 'virtualbox' provider...
==> fake_managed_server: Importing base box 'chef/ubuntu-14.04-i386'...
==> fake_managed_server: Matching MAC address for NAT networking...
==> fake_managed_server: Checking if box 'chef/ubuntu-14.04-i386' is up to date...
==> fake_managed_server: Setting the name of the VM: vagrant-managed-servers_fake_managed_server_1408742560231_7962
==> fake_managed_server: Clearing any previously set network interfaces...
==> fake_managed_server: Preparing network interfaces based on configuration...
    fake_managed_server: Adapter 1: nat
    fake_managed_server: Adapter 2: hostonly
==> fake_managed_server: Forwarding ports...
    fake_managed_server: 22 => 2222 (adapter 1)
==> fake_managed_server: Booting VM...
==> fake_managed_server: Waiting for machine to boot. This may take a few minutes...
    fake_managed_server: SSH address: 127.0.0.1:2222
    fake_managed_server: SSH username: vagrant
    fake_managed_server: SSH auth method: private key
    fake_managed_server: Warning: Connection timeout. Retrying...
==> fake_managed_server: Machine booted and ready!
==> fake_managed_server: Checking for guest additions in VM...
==> fake_managed_server: Configuring and enabling network interfaces...
==> fake_managed_server: Mounting shared folders...
    fake_managed_server: /vagrant => D:/Repos/_github/vagrant-managed-servers
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

@juliandunn the ubuntu 14.04 box referenced on the readme works, so I guess the vagrantcloud box is out of sync and does not have #235 yet?

@juliandunn
Copy link
Contributor

@tknerr that makes no sense because we only use vagrantcloud to store metadata, not box hosting; the payloads point to the same place as the readme.

@tknerr
Copy link

tknerr commented Aug 22, 2014

@juliandunn yep, you are so right. I was mistakenly testing with the ubuntu-14.04 (64 bit) box url from the readme...

Summing up:

  • vagrantcloud boxes simply point to the S3 URLs listed on the README
  • ubuntu-14.04 prebuilt box works with Vagrant
  • ubuntu-14.04-i386 prebuilt box doesn't

So it seems that the i386 box has not been rebuilt yet since the fix had been merged in #235?

@juliandunn
Copy link
Contributor

@tknerr Possibly. I'll check the timestamps in S3 and rebuild it if necessary.

@juliandunn
Copy link
Contributor

Nope, the boxes were all built at the same time according to the timestamps in S3.

@tknerr
Copy link

tknerr commented Aug 23, 2014

@juliandunn weird. Here is a simple repro:
https://gist.github.com/tknerr/f2d690527369d54da806

On the "broken" i386 box it seems that the guest additions are correctly installed:

vagrant@vagrant:~$ lsmod | grep -i vbox
vboxsf                 42558  0
vboxvideo              12578  0
drm                   243792  1 vboxvideo
vboxguest             219348  2 vboxsf

Modprobe exits with 0 too:

vagrant@vagrant:~$ modprobe vboxsf
vagrant@vagrant:~$

But mounting the shared folders fails with a protocol error:

vagrant@vagrant:~$ sudo mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount: Protocol error

@tknerr
Copy link

tknerr commented Aug 23, 2014

It seems that it is this issue:
hashicorp/vagrant#3341

Actually it's a VirtualBox issue:
https://www.virtualbox.org/ticket/12879

It can be fixed by adding this symlink:

sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

The x64 box works because it has the 4.3.8 VBoxGuestAdditions where the symlink is already present:

vagrant@vagrant:~$ ll /usr/lib/VBoxGuestAdditions
lrwxrwxrwx 1 root root 52 Apr 19 05:24 /usr/lib/VBoxGuestAdditions -> /opt/VBoxGuestAdditions-4.3.8/lib/VBoxGuestAdditions/

@juliandunn
Copy link
Contributor

I've uploaded a new version of the Ubuntu 14.04 boxes for Virtualbox and tested them to see that vboxsf volumes are mounted, so I'm closing this.

@FractalizeR
Copy link

This problem can be originated from Virtual Box Guest Additions version mismatch between host and box. You can try to reinstall them on the box manually or just use vagrant vbguest plugin.

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

4 participants