[libvirt] [RFC,PATCH] network: add 'netboot' option to dhcp config

Mark McLoughlin markmc at redhat.com
Fri Sep 11 08:22:09 UTC 2009


On Fri, 2009-09-11 at 14:47 +1000, Jeremy Kerr wrote:
> Currently, libvirtd will start a dnsmasq process for the virtual
> network, but (aside from killing the dnsmasq process and replacing it),
> there's no way to define tftp boot options.
> 
> This change introduces a 'netboot' tag to the dhcp configuration:
> 
>  <network>
>    <name>default</name>
>    <bridge name="virbr%d" />
>    <forward/>
>    <ip address="192.168.122.1" netmask="255.255.255.0">
>      <dhcp>
>        <range start="192.168.122.2" end="192.168.122.254" />
>        <netboot root="/srv/tftp" file="pxeboot.img"/>
>      </dhcp>
>    </ip>
>  </network>
> 
> When root= and file= attributes are present, these are passed to the
> arguments to dnsmasq:
> 
>  dnsmasq [...] --enable-tftp --tftp-root /srv/tftp --dhcp-boot pxeboot.img
> 
> At present, only local tftp servers are supported (ie, dnsmasq runs as
> the tftp server), but we could improve this in future by adding a
> server= attribute.

I very much like this idea - e.g. I'd really like to have this to give
people simple instructions for testing gPXE in next week's Fedora Test
Day.

The argument was made before that it's pointless to use PXE like this
when you can just explicitly configure a kernel/initrd, but that misses
the point that sometimes you do explicitly want to use PXE, even just
for testing purposes.

Patch looks good to me too, ACK

Cheers,
Mark.




More information about the libvir-list mailing list