add network template

Signed-off-by: Christine Dodrill <me@christine.website>
This commit is contained in:
Cadey Ratio 2021-05-30 11:41:04 -04:00
parent 323f1bdf5d
commit 80dcc3d9b5
2 changed files with 19 additions and 4 deletions

View File

@ -45,11 +45,7 @@
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="{{.Seed}}"/>
{{if .SATA}}
<target dev="sdb" bus="sata"/>
{{else}}
<target dev="sda" bus="sata"/>
{{end}}
<readonly/>
</disk>
<controller type="usb" model="qemu-xhci" ports="15"/>

19
templates/network.xml Normal file
View File

@ -0,0 +1,19 @@
<network>
<name>{{.Name}}</name>
<uuid>{{.UUID}}</uuid>
<forward mode="nat">
<nat>
<port start="1024" end="65535"/>
</nat>
</forward>
<bridge name="{{.Iface}}" stp="on" delay="0"/>
<mac address="{{.MACAddress}}"/>
<domain name="{{.SearchDomain}}"/>
<ip address="{{.IPv4Net}}" netmask="{{.IPv4Mask}}">
<dhcp>
<range start="{{.IPv4DHCPStart}}" end="{{.IPv4DHCPEnd}}"/>
</dhcp>
</ip>
<ip family="ipv6" address="{{.IPv6Net}}" prefix="64">
</ip>
</network>