boot2docker-vagrant-box
boot2docker-vagrant-box copied to clipboard
NFS shared folder mounting hangs
Hi,
I tried to create a simple VM using $ vagrant init mitchellh/boot2docker and adding a shared folder, but it hangs during mounting:
$ vagrant up
==> default: Checking if box 'mitchellh/boot2docker' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Starting the VMware VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 192.168.151.147:22
default: SSH username: docker
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Authentication failure. Retrying...
==> default: Machine booted and ready!
==> default: Checking for host entries
==> default: Forwarding ports...
default: -- 2375 => 2375
default: -- 22 => 2200
==> default: Configuring network adapters within the VM...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> default: Mounting NFS shared folders...
The shared folder is defined like this:
config.vm.synced_folder ".", "/vagrant", type: "nfs"
I'm running OS X 10.9.3 with Vagrant 1.6.3.
Any ideas ?
Thanks, M.
:+1:
:+1:
I think this has something to do with vagrantfile.tpl:
# Disable synced folders because guest additions aren't available
config.vm.synced_folder ".", "/vagrant", disabled: true
As I understand it (but I’m new to this!), the guest additions are required for all synced folder types. It’s not clear to me whether adding them should be requested here, or with @boot2docker (it downloads their image).
:+1:
Same issue. FWIW I was able to get NFS synced folders working with this fork - https://vagrantcloud.com/yungsang/boxes/boot2docker
I have a little bit more info to add if it helps. After the mount fails it hangs because it keeps sending SSH keep alives.
...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
...
Here is what Vagrant is presumably choking on.
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: mkdir -p /vagrant (sudo=true)
DEBUG ssh: Exit status: 0
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: mount -o 'vers=3,udp' 192.168.33.1:'/Users/jmreicha/about.me/main' /vagrant (sudo=true)
DEBUG ssh: stderr: mount: RPC: Unable to receive; errno = Connection refused
mount: mounting 192.168.33.1:/Users/jmreicha/about.me/main on /vagrant failed: Bad file descriptor
DEBUG ssh: Exit status: 110
INFO retryable: Retryable exception raised: #<Vagrant::Errors::LinuxNFSMountFailed: 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.33.1:'/Users/jmreicha/about.me/main' /vagrant
Stdout from the command:
Hey,
if you take a look at:
dduportal/boot2docker-vagrant-box and this PR: boot2docker-vagrant-box#5.
You need to start nfs-client before mounting any folder.