[Libvir] Extra options to dnsmasq

Mads Chr. Olesen shiyee at shiyee.dk
Tue Apr 22 19:35:46 UTC 2008


tir, 22 04 2008 kl. 17:50 +0200, skrev PATTE, Mathieu:
> Is there any way I can pass extra options to dnsmasq when starting a
> virtual network? I need that in order to specify static dhcp leases.
> (is there another way to do that?)

Actually, I wrote a patch for doing static hosts some time ago, but I
haven't had the time to clean it up properly.
It should apply cleanly to 0.4.0, but it shouldn't be hard to adopt to
CVS head.

In XML it works by specifying a stanza such as:
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.4" end="192.168.122.254" />
      <statichost mac="00:16:3E:XX:XX:XX" host="XXX"
ip="192.168.122.2" />
      <statichost host="YYY" ip="192.168.122.3" />
    </dhcp>
  </ip>

The patch is attached, please let me know if you have any questions :-)

-- 
Mads Chr. Olesen <shiyee at shiyee.dk>
shiyee.dk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: static-hosts.patch
Type: text/x-patch
Size: 8407 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080422/7e7a9537/attachment-0001.bin>


More information about the libvir-list mailing list