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 synced folders with DHCP private network and guest without capability to configure network #5562

Closed
alh84001 opened this issue Apr 7, 2015 · 2 comments

Comments

@alh84001
Copy link
Contributor

alh84001 commented Apr 7, 2015

I am trying to share a folder from the OSX host to an Android(-x86) guest in Virtualbox. However I have hit a wall with trying to make it a bit more robust with regards to guest IPs. I have VM set up to obtain an IP address from the VirtualBox DHCP server, so I would like to specify the following rules:

config.vm.network :private_network, auto_config: false, type: dhcp
config.vm.synced_folder ".", "/sdcard", type: :nfs, nfs_version: 3, mount_options: ['nolock'], bsd__nfs_options: ['alldirs', "network 172.28.128.0", "mask 255.255.255.0"]

However, when I up, I hit the following error:

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

I tried setting an IP address to private nework:

config.vm.network :private_network, auto_config: false, ip: "172.28.128.3"

However, then this IP address gets passed to the nfs exports template, and in the /etc/exports I get

"/Users/alh/Desktop/rpc_android_test" 172.28.128.3 -alldirs -network 172.28.128.0 -mask 255.255.255.0 -mapall=502:20

With this, I can't access the share even from 172.28.128.3 machine. If I remove the IP address, I can mount a share just fine. Note that if I reload, I then get an exports check error

exports:2: can't specify both network and hosts on same line

I am not above writing an Android guest definition, but this would need to be deployed to all vagrant installations we have. It would be great if we could just drop the IP address for BSD NFS shares if network is specified. Although this is less secure, it is all on a host-only network, and context is a single-user machine, so this does not present a security issue for us.

@mitchellh
Copy link
Contributor

Removing the IP from the exports isn't a wide enough needed a feature to warrant doing it right now given how invasive it would be to every guest. I don't understand the problem here... what makes Android different from any other guest with this? Every other guest works fine with an IP there, why not Android?

@sethvargo
Copy link
Contributor

Hi there,

I am going to close this due to lack of response. Thanks! 😄

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

No branches or pull requests

3 participants