initial commit
This commit is contained in:
41
templates/libvirt/domain.xml.tmpl
Normal file
41
templates/libvirt/domain.xml.tmpl
Normal file
@@ -0,0 +1,41 @@
|
||||
<!-- Minimal libvirt domain template rendered by jagacloud -->
|
||||
<domain type='kvm'>
|
||||
<name>{{.Name}}</name>
|
||||
<memory unit='MiB'>{{.MemoryMB}}</memory>
|
||||
<vcpu>{{.CPU}}</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/><apic/><pae/>
|
||||
</features>
|
||||
<cpu mode='host-model'/>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
{{range .Disks}}
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='qemu' type='qcow2'/>
|
||||
<source file='{{.Path}}'/>
|
||||
<target dev='vd{{.Name}}' bus='{{.Bus}}'/>
|
||||
</disk>
|
||||
{{end}}
|
||||
{{if .CloudInitISO}}
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source file='{{.CloudInitISO}}'/>
|
||||
<target dev='sata0' bus='sata'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
{{end}}
|
||||
{{range .NICs}}
|
||||
<interface type='bridge'>
|
||||
<source bridge='{{.Bridge}}'/>
|
||||
<model type='{{.Model}}'/>
|
||||
{{if gt .VLAN 0}}<vlan><tag id='{{.VLAN}}'/></vlan>{{end}}
|
||||
</interface>
|
||||
{{end}}
|
||||
<console type='pty'/>
|
||||
<graphics type='vnc' autoport='yes'/>
|
||||
</devices>
|
||||
</domain>
|
||||
Reference in New Issue
Block a user