Hi,
I would like to create a network of 4 VMs, connected through a private network.
node.vm.network :private_network, ip: "10.211.55.10[1-n]"
node.vm.hostname = "vm[1-n]"
for every node did the job. It created a second private nic as expected.
I use the hostmanager plugin to exchange the hostnames in the /etc/hosts.
config.hostmanager.enabled = false
config.hostmanager.manage_host = true
config.hostmanager.include_offline = true
config.hostmanager.ignore_private_ip = false
and
node.vm.provision :hostmanager
Now I can ping the boxes among themselves by hostname, but for some reason I need complete dns.
Two points:
I´m running vagrant on a windows box. (vagrant-dns wouldn´t work)
I don´t wanna have too much dependencies into the host setup in respect to future deployments.
So I remove hostmanager and try to set up a dnsmasq and a proper /etc/hosts on one of the VMs and a proper nameserver setting on the others.
So here I´m stuck. I cannot configure the resolving properly.
So, what I need on the "client" VMs is something like:
iface eth1 inet static
address 10.211.55.102
netmask 255.255.255.0
dns-nameservers 10.211.55.100
in my /etc/networks/interfaces and disabling the nameserver for the first interface. The /etc/resolv.conf should look like:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.211.55.100
search localnet
By default, the first interface in in here at the first position.
Here my questions:
Ist there a way to specify the nameservers for my private networks? For example a parameter witch sets "dns-nameservers" in my /etc/networks/interfaces.
Is there a possibility to disable the nameserver of my first (default!?!) interface? This is the nat/dhcp interface configured by vagrant by default.
Thanks,
Uli