blob: a14d9f6ea301d0742dd3bb8ec6fd07baeb97698e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
<domain type='{{ engine }}'>
<name>{{ name }}</name>
<memory unit='KiB'>{{ memory }}</memory>
<vcpu>{{ cpus }}</vcpu>
<os>
<type arch='{{ arch }}' machine='pc-1.0'>hvm</type>
<boot dev='{{ bootdev }}'/>
{% 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>
<disk type='file' device='disk'>
<driver name='qemu' type='{{ disk_format }}' cache='writeback'/>
<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='vda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
{% else %}
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
{% endif %}
</disk>
<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='ethernet'>
<target dev='{{ "tap-" + name + "i" + n|string }}'/>
<model type='{{ nicdriver }}'/>
<script path='no'/>
<address type='pci' domain='0x0000' bus='0x01' slot='{{ "0x0" + n|string }}' function='0x0'/>
</interface>
{% endfor %}
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
{{ console }}
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</memballoon>
</devices>
</domain>
|