On 09/11/2009 06:47 AM, 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.

Since there is only one TFTP server running in the network, it is not possible to specify different roots for different dhcp ranges. I think the schema should be

    <ip address="192.168.122.1" netmask="255.255.255.0">
      <tftp root="/srv/tftp">
      <dhcp>
        <range start="192.168.122.2" end="192.168.122.254" />
        <bootp file="pxeboot.img"/>
      </dhcp>
    </ip>

where in the future the bootp argument could grow a server attribute as mentioned by Jeremy.

Paolo

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to