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

Cannot mount NFS synced folders #54

Closed
axelitus opened this issue Aug 1, 2018 · 7 comments

Comments

@axelitus
Copy link

commented Aug 1, 2018

I cannot seem to get NFS synced folders working. I get the following error:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp 127.0.1.1:/home/axel/.homestead /vagrant

Stdout from the command:

Stderr from the command:

mount.nfs: requested NFS version or transport protocol is not supported

I'm guessing the problem is that instead of the 127.0.1.1 IP address it should be my network IP address. I have also tried doing the following but without luck:

config.vm.synced_folder('192.168.20.14:/home/axel/.homestead', '/vagrant', type: 'nfs')

What am I missing or is it not doable?

Both the ESXi server and my computer are on the same network.

I'm trying to get Laravel Homestead to work through a virtual machine hosted on ESXi server instead of locally.

@axelitus

This comment has been minimized.

Copy link
Author

commented Aug 1, 2018

Running sudo mount 192.168.20.14:/home/axel/.homestead /vagrant from within the virtual machine works, so the NFS share is configured correctly.

I'm wondering though if this is an issue with vmware_esxi provider or directly with Vagrant.

@josenk

This comment has been minimized.

Copy link
Owner

commented Aug 1, 2018

What version of the plugin are you using? I fixed an issue related to this back in 2.0.6...

#20

@axelitus

This comment has been minimized.

Copy link
Author

commented Aug 2, 2018

I have gone through the issues at #20 and I did resolve the problem by commenting out a line in my hosts file.

As it happens ubuntu by default has an entry in the /etc/hosts file which points the hostname to the address 127.0.1.1 like:

127.0.1.1    my_host   my_host@my_domain

So it is a matter of DNS resolution, it resolves to that IP address instead of the network IP address.

I thought I wouldn't need to remove that line as I understand you are filtering out NFS host IP addresses that match 127.0.0.0/8 here. Is there a chance those lines are not working as expected?

@josenk

This comment has been minimized.

Copy link
Owner

commented Aug 2, 2018

Please run this command to get the plugin version number

vagrant plugin list

If it's too old (you must be >2.0.6), try updating to a newer version.

vagrant plugin update

https://github.com/josenk/vagrant-vmware-esxi/wiki/Debugging-the-plugin
If you still have a problem, try enabling the plugin debug output. (add the following to your Vagrantfile)

esxi.debug = 'ip'

@axelitus

This comment has been minimized.

Copy link
Author

commented Aug 2, 2018

Sorry I thought I put the versions I'm running:

Host OS: Ubuntu 18.04.1
Guest OS: Ubuntu 18.04.1 (vagrant box laravel/homestead)
Vagrant version: 2.1.2
vagrant-vmware-esxi version: 2.4.0

@axelitus

This comment has been minimized.

Copy link
Author

commented Aug 2, 2018

I have managed to get it working "manually". I have found another issue. I'm running on a class B network (16 bit mask). The /etc/exports file does not place the entries correctly (because it does not include the mask) so the NFS share cannot be mounted.

What is expected:

"/home/axel/.homestead" 172.16.10.10/16(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3682118623)

What is actually placed in the file:

"/home/axel/.homestead" 172.16.10.10(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=3682118623)

But I think this is really an issue with Vagrant and not with your plugin is it?

@axelitus

This comment has been minimized.

Copy link
Author

commented Aug 14, 2018

I am closing this as it is working now. For reference, I'll leave a link to what I have done to get all of this working: Getting the ball rolling

@axelitus axelitus closed this Aug 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.