I am using Vagrant 1.1.2 on Mac OS X 10.7.5
I am running into an issue with the default networking setup. The network seems to be configured to use a DHCP server providing IPs from 10.0.2.? network, with the gateway being set to 10.0.2.2
Sadly, in the organization I work for, there actually exists a server at 10.0.2.2, which causes huge network communication delays.
How can I configure Vagrant's VirtualBox to use DHCP server providing IPs from a different network? The documentation at http://www.vagrantup.com/ completely ignores this issue, which unfortunately renders my Vagrant useless.
When I disconnect from the corporate network, Vagrant works as expected. So I am quite sure the issue is in the IP collision.
By default, Vagrant connect will use an IP address that looks available in the 172.16. 0.0/16 space. --ssh - Connects via SSH to an environment shared with vagrant share --ssh .
To configure private or host-only networking in Vagrant with static IP address, open the Vagrantfile, find the following line and uncomment it. Here, 192.168. 121.60 is the IP address of the VM. Replace this with your own IP.
Open a browser and go to https://192.168.0.1 (default) or the IP address you have assigned to the Gateway appliance private user interface. Click Manage Gateway appliance and then click the Private network tab. Select Run DHCP server (recommended) and reconfigure the settings for the private network if necessary.
That's more a VirtualBox issue so should have to get Vagrant to set a VirtualBox option for a different DHCP subnet like so:
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natnet1", "192.168/16"]
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With