[libvirt-users] Changing dnsmasq DNS settings for virtual machines

Johannes Kastl mail at ojkastl.de
Thu Apr 10 17:12:12 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10.04.2014 13:08 Laine Stump wrote:
> On 04/06/2014 08:33 AM, Johannes Kastl wrote:

>> There was a bug in libvirt for quite awhile that caused 
>> locally-unresolved requests for hostnames in the domain given by
>> the network's <domain name='xyzzy'/> element to be dropped rather
>> than forwarded. Is that possibly the cause of your problems?

Maybe...

>> Alternately, since 1.1.3 you can tell dnsmasq to forward to a
>> specific address rather than the one listed in /etc/resolv.conf
>> with the <forwarder> subelement of the <dns> element in the
>> network definition, e.g.:
> 
>> <dns> <forwarder addr='1.2.3.4'/> </dns>

Nice, seems to work.

>> This is documented here:
> 
>> http://www.libvirt.org/formatnetwork.html#elementsAddress

I actually was on that page, but I must have missed that bit...

> Which brings me to the next question: How to set the addn-hosts=
> for the libvirtd-dnsmasq in the xml file?
> 
>> You do that with the <host> subelement of the <dns> element. An
>> example is at the same link as above.

No, thats not it. I do not want to set single hosts, I want to tell
dnsmasq to read an additional hosts-file. In the normal dnsmasq.conf
this is done via addn-hosts=, and that appears in the conf-file for
the network called e.g. WHATEVER:

addn-hosts=/var/lib/libvirt/dnsmasq/WHATEVER.addnhosts

Regards,
Johannes
- -- 
'Are you Death?'
... IT'S THE SCYTHE, ISN'T IT? PEOPLE ALWAYS NOTICE THE SCYTHE.
(Terry Pratchett, The Fifth Elephant)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/

iEYEARECAAYFAlNG0OwACgkQzi3gQ/xETbLqJQCghnq19VVAhUJyhfvzfr+D5JyJ
aDwAnAgUDw+eSXC5rL1O9UL7MWPSemn3
=lSGE
-----END PGP SIGNATURE-----




More information about the libvirt-users mailing list