[libvirt] libvirt/dnsmasq integration.

Simon Kelley simon at thekelleys.org.uk
Mon Mar 1 22:07:46 UTC 2010


Daniel P. Berrange wrote:

>>> The total set of DNSMASQ args that we currently use are
>>>
>>>   --strict-order
>>>   --bind-interfaces
>>>   --domain DOMAIN-NAME            (optional)
>>>   --pid-file=/var/run/libvirt/network/$NETWORK.pid
>>>   --conf-file=
>>>   --listen-address=IPADDR-OF-BRIDGE
>>>   --except-interface=lo
>>>   --dhcp-range=IPRANGE            (optional, multiple times)
>>>   --dhcp-lease-max=RANGE-SIZE     (optional)
>>>   --dhcp-host=STATIC-HOST-MAPPING (optional)
>>>   --enable-tftp                   (optional)
>>>   --tftp-root=/some/path          (optional)
>>>   --dhcp-boot=PXE-BOOT-SERVER     (optional)
>> OK, the use of TFTP by libvirt is new to me. Looks like I'll have to
>> pull some similar tricks to allow libvirt to enable TFTP on on interface
>> without disturbing things elsewhere.
> 
> We only very recently added the TFTP/boot options so it is probably
> not visible in many Linux distros yet.
> 

> So, if we solve the extra TFTP interface binding issue, we shouldn't 
> need to worry about a formal 'scope', so lets ignore that suggestion
> of mine.
>  


I propose that your dhcp-range should become

dhcp-range=interface:virt0, set:virt0tag, IPRANGE
dhcp-boot=tag:virt0tag,PXE_BOOT_SERVER

That engages the "isolation mode" for DHCP and ensures that the correct
PXE server is supplied to your clients even if a different one is
configured elsewhere. (The "set:" and "tag:" syntax is just new sugar
around the existing and rather confusing tagging code)

TFTP becomes.

enable-tftp=virt0

for a similar isolation mode, and

tftp-root=/some/path,virt0

to have  a root path which overrides one specified elsewhere.

Some preliminary code which implements the facilities required is at

http://www.thekelleys.org.uk/dnsmasq/test-releases/dnsmasq-2.53test12.tar.gz


Cheers,

Simon.




More information about the libvir-list mailing list