[Dnsmasq-discuss] Chaining instances?

Laine Stump laine at laine.org
Sun Feb 24 19:19:17 GMT 2013


On 02/24/2013 05:09 AM, TJ wrote:
> I wondered if maybe configuring the libvirtd dnsmasq instances to be dhcp proxies for the LAN dnsmasq, and use multiple dhcp-range's with tags might do it?
>
> My brain is a bit fried right now having had to fix several bugs in vmbuilder and libvirt, plus add new functionality to libvirtd to allow its dnsmasq instance to read a conf-file and use a separate log-facility, 

What you're talking about doing sounds *very* useful to have supported
directly in libvirt, but you may want to contact libvirt's upstream
developers (at libvir-list at redhat.com, or on irc.oftc.net in #virt)
prior to expending a lot of effort on libvirt code - in general a
problem may already be solved in a different manner, or somebody else
may already be working on it. Failing that, there may have already been
considerable debate on a particular subject, and a path to a solution
generally agreed on, but with nobody yet working on the code.

Specifically in your case - previous proposals (even a working patch) to
allow libvirtd to directly read a user-constructed dnsmasq conf file
have been rejected (due to the fact that libvirt is then not directly
aware of exactly how dnsmasq is being run, leading to a difficulty in
supporting it when something isn't working correctly). We have accepted
the possibility, in theory, of supplying a "dnsmasq option passthrough"
capability within the xml (similar to the qemu commandline option
passthrough, see http://libvirt.org/drvqemu.html#qemucommand ), however
nobody has implemented this yet.

In the meantime more and more dnsmasq options are being supported
directly in libvirt's *supported* network xml in a (hopefully)
dhcp-server-implementation-agnostic manner. For example, just two days
ago I ACKed and pushed patches from Pieter Hollants which allow setting
any dhcp option from libvirt's network xml (using the new "<option>"
element), and I'm about to send an additional patch to allow forcing a
particular option.

Once you learn the best way to change dnsmasq's config to achieve what
you want, it would be great to have it made into an option in libvirt's
XML. I don't know if turning libvirt's dnsmasq into a proxy would be the
best method (even if there is a reasonable way to get tags properly set
so that guests on libvirt's networks were given IPs from the correct
ranges, this would still leave a large part of the network configuration
outside libvirt's control); I seem to recall someone at some point
explaining how they'd handled such a setup, but unfortunately don't
recall the details (possibly it involved delegating specific DNS
requests back to libvirt's dnsmasq?)



More information about the Dnsmasq-discuss mailing list