Guido Günther wrote:
Package: dnsmasq
Version: 2.45-1
Severity: wishlist
Hi,
libvirtd uses dnsmasq to provide DNS and DHCP to virtual machines on
nated interfaces. It therefore calls dnsmasq for each virtual bridge
with something like like:
dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file --conf-file --listen-address 192.168.122.1 --except-interface lo --dhcp-leasefile=/var/lib/libvirt/dhcp-default.leases --dhcp-range 192.168.122.2,192.168.122.254
In Debian's standard installation this fails with:
dnsmasq: failed to bind listening socket for 192.168.122.1: Address already in
use
since dnsmasq binds the wildcard address. A possible solution is to
pass the options "interface=lo & bind-interfaces" to the "default"
dnsmasq process started via /etc/init.d/dnsmasq [1].
This could be fixed by passing "--conf-dif=/etc/dnsmasq.d/" per default
to dnsmasq. Libvirft could then put the necessary
interface,bind-interface options there (maybe prompting via debconf if
this should be done). Possibly other packages could make use of this
too. Does this sound reasonable?
-- Guido
[1] See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504605
The /etc/init.d/dnsmasq facility looks good, but the stuff added by
libvirt is not.
If libvirt adds
bind-interfaces
interface=lo
then it will stop the system dnsmasq listening on any interface apart
from lo, That's likely to be a nasty surprise. If, on the other hand,
libvirt adds
bind-interfaces
except-interface=<virtual bridge>
and starts its private dnsmasq with
dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file
--conf-file --listen-address 192.168.122.1 --except-interface lo
--dhcp-leasefile=/var/lib/libvirt/dhcp-default.leases --dhcp-range
192.168.122.2,192.168.122.254 --interface=<virtual-bridge>
(adding the --interface part)
then all should still work, but the disruption to a system dnsmasq would
be much less.
If libvirt can manage more than one virtual interface, then step would
need to be taken to add all of them, maybe by having a file for each
interface in /etc/dnsmasq.d called libvirt-<interface name> for each one.
Does that make sense?
Simon.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]