Hello everyone,
TL;DR: Is ist possible to provide a secondary DNS (e.g. 8.8.8.8) via
DHCP in addition to the gateway (in my case 10.0.1.1)?
I use libvirt to manage all my qemu-based VMs. I have set up a local
NAT-network which includes all my VMs (and some physical servers
integrated via VPN). Everything works fine, but ocassionally, I have to
restart the network (when I add instances for example). In that case, my
VMs loose their local network connection until I restart them.
However, some instances can not be restarted at will and so a change in
network configuration means they loose their local connectivity.
However, they still have a second network device that has an external
static IP. This IP can still connect and be connected to, so it is
feasible to loose the connection on the local network.
Unfortunately though, libvirt (through dnsmasq's DHCP) broadcasts itself
as the only DNS. This results in name resolution going down. If I add
e.g. 8.8.8.8 to resolv.conf, I can resolve names again (except local
ones, of course). So it would be nice if the DHCP would directly supply
additional DNS servers.
For dnsmasq, I would add to the configuration something like
dhcp-option=6,0.0.0.0,8.8.8.8
However, looking through the archive, I found that you guys prefer to
keep it implementation agnostic and thus you do not provide the option
to set this directly (since this is dnsmasq-only).
So I was wondering if there is any way to achieve this with libvirt? Is
there already an implemented way I could not find? Or is there maybe a
*generic* option to provide some kind of extra-configuration specific to
the implementation? Or is my only solution to make sure the clients
manually add a second DNS by themselves?
Regards,
Florian