3

I'm using libvirt to manage my VMs, but I don't need the dnsmasq DNS server that gets automatically started with the service as it conflicts with my acme-dns setup.

Is there a way to change disable the DNS server completely and use dnsmasq only for DHCP, or at least change the port on which dnsmasq is listening?

Editing /var/lib/libvirt/dnsmasq/default.conf has no point since it just get overridden, but when using sudo virsh net-edit default it's in a completely different format.

TheEdgeOfRage
  • 158
  • 1
  • 6

2 Answers2

6

You can disable DNS for a network with <dns enable="no"/> in the network XML. See the documentation.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
1

No need to disable the dnsmasq service in the Libvirtd. Just tell DNSMASK to listen on needed interfaces:

Edit

/etc/dnsmasq.conf

Uncomment:

bind-interfaces

Restart dnsmasq:

systemctl restart dnsmasq.service

Additional informathion: Libvirtd and dnsmasq

This command may be useful. To check which interfaces used:

netstat -anp | grep :53