libvirt DNS disabled at boot


Recommended Posts

  • 2 years later...

For those coming across this in a Google search (like me), the above pointed me in the right direction and I was able to get this to work by adding the following to my /boot/config/go file:

# Disable DNS on KVM so PiHole container can use port 53
# https://forums.unraid.net/topic/81356-libvirt-dns-disabled-at-boot/
EDITOR='sed -i '"'"'s/<\/network>/  <dns enable="no"\/>\n<\/network>/g'"'"'' virsh net-edit default

 

After rebooting, the above allows me to bind a PiHole Docker container to port 53 (without having to give it its own IP address on my local network). I tried using net-update first, but was getting the error "unrecognized section name 'dns'". This hackery of using sed as the editor for net-edit was the only way I was able to get this to work.

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.