Disable or change port of dnsmasq service in libvirt

The Edge Of Rage asked:

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.

My answer:

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

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.