71 lines
2.4 KiB
XML
71 lines
2.4 KiB
XML
<domain type='{{ engine }}'>
|
|
<name>{{ name }}</name>
|
|
<memory unit='KiB'>{{ memory }}</memory>
|
|
<vcpu>{{ cpus }}</vcpu>
|
|
<os>
|
|
<type arch='{{ arch }}' machine='pc-1.0'>hvm</type>
|
|
{% if bootdev == 'network' and not uefi_loader %}
|
|
<boot dev='{{ bootdev }}'/>
|
|
{% endif %}
|
|
{% if uefi_loader %}
|
|
<loader readonly='yes' type='pflash'>{{ uefi_loader }}</loader>
|
|
{% if uefi_nvram %}
|
|
<nvram>{{ uefi_nvram }}</nvram>
|
|
{% endif %}
|
|
{% endif %}
|
|
<bootmenu enable='no'/>
|
|
<bios useserial='yes'/>
|
|
</os>
|
|
{% if engine == 'kvm' %}
|
|
<cpu mode='host-passthrough'/>
|
|
{% endif %}
|
|
<features>
|
|
<acpi/>
|
|
<apic/>
|
|
<pae/>
|
|
</features>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>restart</on_crash>
|
|
<devices>
|
|
<emulator>{{ emulator }}</emulator>
|
|
{% for (imagefile, letter) in images %}
|
|
<disk type='file' device='disk'>
|
|
<driver name='qemu' type='{{ disk_format }}' cache='unsafe'/>
|
|
<source file='{{ imagefile }}'/>
|
|
<!-- NOTE(lucasagomes): The virtio disk controller apparently does
|
|
not work with UEFI, so let's use IDE. -->
|
|
{% if uefi_loader %}
|
|
<target dev='vd{{ letter }}' bus='ide'/>
|
|
<address type='drive' controller='0' bus='0' target='0' unit='{{ loop.index }}'/>
|
|
{% else %}
|
|
<target dev='vd{{ letter }}' bus='virtio'/>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x0{{ letter }}' function='0x0'/>
|
|
{% endif %}
|
|
</disk>
|
|
{% endfor %}
|
|
<controller type='ide' index='0'>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
|
|
</controller>
|
|
{% for n in range(1, interface_count+1) %}
|
|
<interface type='direct'>
|
|
{% if n == 1 and mac %}
|
|
<mac address='{{ mac }}'/>
|
|
{% endif %}
|
|
<source dev='{{ "tap-" + name + "i" + n|string }}'/>
|
|
<model type='{{ nicdriver }}'/>
|
|
<address type='pci' domain='0x0000' bus='0x01' slot='{{ "0x0" + n|string }}' function='0x0'/>
|
|
{% if uefi_loader and bootdev == 'network' %}
|
|
<boot order='{{ n|string }}'/>
|
|
{% endif %}
|
|
</interface>
|
|
{% endfor %}
|
|
<input type='mouse' bus='ps2'/>
|
|
{{ console }}
|
|
<memballoon model='virtio'>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
|
|
</memballoon>
|
|
</devices>
|
|
</domain>
|