42 lines
1.1 KiB
Cheetah
42 lines
1.1 KiB
Cheetah
<!-- 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>
|