On 06/18/2015 10:05 PM, Boylan, Ross wrote:
I'm struggling with getting this to work smoothly, meaning 1)
from the host system I can resolve the names of the VM's and 2) from the VM's I
can properly resolve the host name (I get 127.0.0.1, presumably because dnsmasq parsed
/etc/hosts on the host).
There was some encouraging discussion of this in 2010
(
http://www.redhat.com/archives/libvir-list/2010-March/msg00005.html) but no resolution I
can see.
This commit (which was included in libvirt 1.2.12) may help you to a
solution:
commit 298fa4858ced29e2c42681635a5a8dcd6da0b231
Author: Josh Stone <jistone(a)redhat.com>
Date: Wed Dec 3 16:01:33 2014 -0800
network: Let domains be restricted to local DNS
This adds a new "localOnly" attribute on the domain element of the
network xml. With this set to "yes", DNS requests under that domain
will only be resolved by libvirt's dnsmasq, never forwarded upstream.
This was how it worked before commit f69a6b987d616, and I found that
functionality useful. For example, I have my host's NetworkManager
dnsmasq configured to forward that domain to libvirt's dnsmasq, so I can
easily resolve guest names from outside. But if libvirt's dnsmasq
doesn't know a name and forwards it to the host, I'd get an endless
forwarding loop. Now I can set localOnly="yes" to prevent the loop.
So it sounds like the proper thing to do is to set the localOnly
attribute and put the libvirt network in a subdomain, then point the
dnsmasq on the host to the libvirt dns for that subdomain.
BTW, the resolvconf machinery (at least on Debian) might provide another line of attack,
for systems that have it.
Thanks.
Ross Boylan
_______________________________________________
libvirt-users mailing list
libvirt-users(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users