blob: b67a9270df301465f117c708ea35908dc18dd014 [file] [log] [blame]
Your Name8324a3a2017-05-12 10:47:21 +00001<domain type='{{ node.engine|default('qemu') }}'>
2 <name>{{ node.name }}</name>
3 <memory unit='KiB'>{{ node.properties.memory_mb * 1024 }}</memory>
4 <vcpu placement='static'>{{ node.properties.cpus }}</vcpu>
5 <os>
6 <type arch='{{ node.properties.cpu_arch|default('x86_64') }}' machine='pc-1.0'>hvm</type>
7 <boot dev='network'/>
8 <bootmenu enable='no'/>
9 <bios useserial='yes'/>
10 </os>
11 <features>
12 <acpi/>
13 <apic/>
14 <pae/>
15 </features>
16 <clock offset='utc'/>
17 <on_poweroff>destroy</on_poweroff>
18 <on_reboot>restart</on_reboot>
19 <on_crash>restart</on_crash>
20 <devices>
21 <disk type='file' device='disk'>
22 <driver name='qemu' type='{{ node.disk_format|default("qcow2") }}' cache='writeback'/>
23 <source file='{{ '/var/lib/libvirt/images/' + node.name + '.' + node.disk_format|default("qcow2") }}'/>
24 <target dev='vda' bus='virtio'/>
25 <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
26 </disk>
27 <controller type='ide' index='0'>
28 <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
29 </controller>
30 {%- for port in node.ports %}
31 <interface type='ethernet'>
32 <mac address='{{ port.address }}'/>
33 <target dev='{{ 'tap-' + node.name + 'i' + loop.index|string }}'/>
34 <model type='virtio'/>
Your Name58db1242017-05-12 12:33:44 +000035 <script path='no'/>
Your Name8324a3a2017-05-12 10:47:21 +000036 <address type='pci' domain='0x0000' bus='0x01' slot='{{ '0x0' + loop.index|string }}' function='0x0'/>
37 </interface>
38 {%- endfor %}
39 <serial type='file'>
40 <source path="{{ '/var/log/ironic-bm-logs/' + node.name + '_console.log' }}"/>
41 <target port='0'/>
42 </serial>
43 <serial type='pty'>
44 <target port='1'/>
45 </serial>
46 <input type='mouse' bus='ps2'/>
47 <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
48 <video>
49 <model type='cirrus' vram='9216' heads='1'/>
50 <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
51 </video>
52 <memballoon model='virtio'>
53 <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
54 </memballoon>
55 </devices>
56</domain>