Your Name | 8324a3a | 2017-05-12 10:47:21 +0000 | [diff] [blame] | 1 | <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 }}'/> |
Vasyl Saienko | 7a34153 | 2018-11-02 19:50:44 +0000 | [diff] [blame] | 34 | <model type='e1000'/> |
Your Name | 8324a3a | 2017-05-12 10:47:21 +0000 | [diff] [blame] | 35 | <address type='pci' domain='0x0000' bus='0x01' slot='{{ '0x0' + loop.index|string }}' function='0x0'/> |
| 36 | </interface> |
| 37 | {%- endfor %} |
| 38 | <serial type='file'> |
| 39 | <source path="{{ '/var/log/ironic-bm-logs/' + node.name + '_console.log' }}"/> |
| 40 | <target port='0'/> |
| 41 | </serial> |
| 42 | <serial type='pty'> |
| 43 | <target port='1'/> |
| 44 | </serial> |
| 45 | <input type='mouse' bus='ps2'/> |
| 46 | <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/> |
| 47 | <video> |
| 48 | <model type='cirrus' vram='9216' heads='1'/> |
| 49 | <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> |
| 50 | </video> |
| 51 | <memballoon model='virtio'> |
| 52 | <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> |
| 53 | </memballoon> |
| 54 | </devices> |
| 55 | </domain> |