On 09/15/2009 01:01 AM, Jeremy Kerr wrote:
Hi Paolo,
Since there is only one TFTP server running in the network
IIRC, it's possible to have more than one: the Server-Name (id 66) of the DHCP
response specifies which. However, we probably only ever want to start one
server, so the<tftp> tag should work fine.
Yes, what I meant is that in general the TFTP server started by libvirt
will run on the address provided by /network/ip@address. So libvirt can
only start one TFTP server even though in the future it might support
multiple DHCP ranges.
In this case, some ranges may not support BOOTP and some may, and they
can give different boot files, but all must share a single
dnsmasq-provided TFTP server (using a server attribute would be fine;
but that TFTP server will not be started by libvirt).
This can be seen from the fact that BOOTP is nothing more than a few
options within a DHCP packet (i.e. <dhcp><bootp/></dhcp>), but TFTP
binds on a completely different port and could be a separate process
(hence <tftp> is a sibling of <dhcp>). dnsmasq is special.
, 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>
If you want it to be specific to the range, shouldn't it be within the<range>
tag? Currently the code will only parse one<dhcp> tag.
No, I want it to be specific to the _network_, since it will bind to
/network/ip@address.
One thing that I've tried to keep in mind is that the tftp service may be
provided by a separate machine in the network, so we may need some way in the
future to represent that - maybe no<tftp> tag
That's already implemented by my patch, and can be used with an external
TFTP server, for example started via (x)inetd.
and use server="w.x.y.z" in
the bootp tag. Also, would be cool to have separate files for different hosts,
but that may be thinking too far ahead at this stage :)
Yes. That's something you'd get for free if libvirt supported multiple
DHCP ranges.
Paolo
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list