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

Simplify private network overrides #781

Conversation

johnpbloch
Copy link
Contributor

This is ostensibly an improvement for hyperv providers, but carries extra benefits for all providers.

Hyper-V does not know how to make private networks, so the extra IP address configured by VVV is not needed (and when used with vagrant ghost, results in duplicate hosts entries that point to a dud address). This unsets the private network for the hyperv provider.

Additionally, this makes it much easier and more forwards-compatible to modify the VM ip address. Currently, if you need to change the vm's network (e.g. because your network is using the 192.168.50.* subnet), you must edit Vagrantfile directly. With an id for the network config, the ip can be overridden in the Customfile in one line:

config.vm.network :private_network, id: "vvv_primary", ip: "10.10.10.10"

This has the benefit of making it trivial to change the IP address from the Customfile without modifying Vagrantfile
@jeremyfelt
Copy link
Member

With an id for the network config, the ip can be overridden in the Customfile in one line:

What! That's crazy talk. I had no idea the id parameter existed. Thanks!

@jeremyfelt jeremyfelt added this to the 1.3.0 milestone Nov 3, 2015
@jeremyfelt jeremyfelt self-assigned this Nov 3, 2015
jeremyfelt added a commit that referenced this pull request Nov 3, 2015
@jeremyfelt jeremyfelt merged commit 53e2dcd into Varying-Vagrant-Vagrants:develop Nov 3, 2015
@johnpbloch
Copy link
Contributor Author

@jeremyfelt I know, right?? I didn't know either until this morning when I was trying to get this working another way! It took me an hour digging through undocumented ruby in the vagrant repo to find that little gem! Proof!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants