Vagrant Private Networking IP resolution
I'm trying to setup a few Vagrant VMs (with more being added as required
later) on a private network. I'm using the default VirtualBox provider.
This is my vagrant config:
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision "chef_solo" do |chef|
chef.cookbooks_path = "provision/cookbooks"
chef.add_recipe "apt"
chef.add_recipe "python"
end
config.vm.provision :shell, :path => "provision/python-modules.py"
config.vm.define :server do |server|
server.vm.hostname = "server"
server.vm.network :private_network, ip: '10.0.0.1'
end
config.vm.define :client0 do |client0|
client0.vm.hostname = "client0"
client0.vm.network :private_network, ip: '10.1.0.1'
end
config.vm.define :client1 do |client1|
client1.vm.hostname = "client1"
client1.vm.network :private_network, ip: '10.1.0.2'
end
end
If I ssh into client0 or client1 and try to access the server vm I'm
finding everything seems to resolve to my host computer. How can I get
10.0.0.1:80 to resolve to server as the IP is configured in the
.Vagrantfile?
No comments:
Post a Comment