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.


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


No need to disable the dnsmasq service in the Libvirtd. Just tell DNSMASK to listen on needed 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.