mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Support libvirt built-in TFTP server (#1412)
Adds support for libvirt TFTP server, for netboot environments. (vide: https://libvirt.org/formatnetwork.html#elementsAddress)
This commit is contained in:
@@ -859,6 +859,7 @@ starts with `libvirt__` string. Here is a list of those options:
|
|||||||
* `:libvirt__dhcp_bootp_server` - The server that runs the DHCP server. Used
|
* `:libvirt__dhcp_bootp_server` - The server that runs the DHCP server. Used
|
||||||
only when dhcp is enabled.By default is the same host that runs the DHCP
|
only when dhcp is enabled.By default is the same host that runs the DHCP
|
||||||
server.
|
server.
|
||||||
|
* `:libvirt__tftp_root` - Path to the root directory served via TFTP.
|
||||||
* `:libvirt__adapter` - Number specifiyng sequence number of interface.
|
* `:libvirt__adapter` - Number specifiyng sequence number of interface.
|
||||||
* `:libvirt__forward_mode` - Specify one of `veryisolated`, `none`, `open`, `nat`
|
* `:libvirt__forward_mode` - Specify one of `veryisolated`, `none`, `open`, `nat`
|
||||||
or `route` options. This option is used only when creating new network. Mode
|
or `route` options. This option is used only when creating new network. Mode
|
||||||
|
|||||||
@@ -352,6 +352,10 @@ module VagrantPlugins
|
|||||||
@network_dhcp_enabled = false
|
@network_dhcp_enabled = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if @options[:tftp_root]
|
||||||
|
@tftp_root = @options[:tftp_root]
|
||||||
|
end
|
||||||
|
|
||||||
@network_domain_name = @options[:domain_name]
|
@network_domain_name = @options[:domain_name]
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|||||||
@@ -20,6 +20,9 @@
|
|||||||
|
|
||||||
<% if @network_forward_mode != 'veryisolated' %>
|
<% if @network_forward_mode != 'veryisolated' %>
|
||||||
<ip address="<%= @network_address %>" netmask="<%= @network_netmask %>">
|
<ip address="<%= @network_address %>" netmask="<%= @network_netmask %>">
|
||||||
|
<% if @tftp_root %>
|
||||||
|
<tftp root="<%= @tftp_root %>" />
|
||||||
|
<% end %>
|
||||||
<% if @network_dhcp_enabled %>
|
<% if @network_dhcp_enabled %>
|
||||||
<dhcp>
|
<dhcp>
|
||||||
<range start="<%= @network_range_start %>" end="<%= @network_range_stop %>" />
|
<range start="<%= @network_range_start %>" end="<%= @network_range_stop %>" />
|
||||||
|
|||||||
Reference in New Issue
Block a user