aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2009-09-21 22:50:25 +0200
committerChris Lalancette <clalance@redhat.com>2009-09-23 09:47:10 +0200
commit738ee810b42524558fcbfdcbc3b1eb10ddb47997 (patch)
treec337b3d5d51c6a230a668e8d64509c38304b15b1 /tests/Makefile.am
parentIntroduce virStrncpy. (diff)
downloadlibvirt-738ee810b42524558fcbfdcbc3b1eb10ddb47997.tar.gz
libvirt-738ee810b42524558fcbfdcbc3b1eb10ddb47997.tar.bz2
libvirt-738ee810b42524558fcbfdcbc3b1eb10ddb47997.zip
network: add 'bootp' and 'tftp' config
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 the appropriate tags to the dhcp configuration: <network> <name>default</name> <bridge name="virbr%d" /> <forward/> <ip address="192.168.122.1" netmask="255.255.255.0"> <tftp root="/var/lib/tftproot" /> <dhcp> <range start="192.168.122.2" end="192.168.122.254" /> <bootp file="pxeboot.img"/> </dhcp> </ip> </network> When the attributes are present, these are passed to the arguments to dnsmasq: dnsmasq [...] --enable-tftp --tftp-root /srv/tftp --dhcp-boot pxeboot.img ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ from <tftp /> from <bootp /> 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. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> 2009-09-21 Paolo Bonzini <pbonzini@redhat.com> Jeremy Kerr <jk@ozlabs.org> * docs/formatnetwork.html.in: Document new tags. * docs/formatnetwork.html: Regenerate. * docs/schemas/network.rng: Update. * src/network_conf.c (virNetworkDefFree): Free new fields. (virNetworkDHCPRangeDefParseXML): Parse <bootp>. (virNetworkIPParseXML): New, parsing <dhcp> and <tftp>. (virNetworkDefParseXML): Use virNetworkIPParseXML instead of virNetworkDHCPRangeDefParseXML. (virNetworkDefFormat): Pretty print new fields. * src/network_conf.h (struct _virNetworkDef): Add netboot fields. * src/network_driver.c (networkBuildDnsmasqArgv): Add TFTP and BOOTP arguments. * tests/Makefile.am (EXTRA_DIST): Add networkschemadata. * tests/networkschematest: Look in networkschemadata. * tests/networkschemadata/netboot-network.xml: New.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4cc21c9a0..abda4ad79 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -53,6 +53,7 @@ EXTRA_DIST = \
capabilityschematest \
capabilityschemadata \
networkschematest \
+ networkschemadata \
domainschematest \
domainschemadata \
interfaceschemadata \