Libvirt has one defined network, which uses
dnsmasq as DHCP/DNS server. But this
dnsmasq is a separate instance (config in
/var/lib/libvirt/dnsmasq/default.conf), which creates additional
dnsmasq processes. I've been using for some time now my own global/system instance of
dnsmasq , and I wanted to use it with the libvirt virtual machines. But it looks like it's not an easy task to achieve.
For now I disabled both DNS and DHCP for the default network via removing the following (
virsh net-edit default):
<dhcp> <range start='192.168.122.2' end='192.168.122.254'/> </dhcp>
and adding this:
This of course made libvrt stop creating the additional dnsmasq processes, but what should be added to the system
/etc/dnsmasq.conf config file, so the virtual machines got IP addresses via DHCP and be able to access the web using DNS names?