1 <domain type='{{ libvirt_domain_type }}'>
2 <name>{{ item.name }}</name>
3 <memory unit='MiB'>{{ flavors[item.flavor].memory }}</memory>
4 <vcpu>{{ flavors[item.flavor].vcpu }}</vcpu>
6 {{baremetal_vm_xml|default('')}}
9 <type arch='{{ libvirt_arch }}'>hvm</type>
11 <bootmenu enable='no'/>
18 <cpu mode='host-passthrough'/>
20 <on_poweroff>destroy</on_poweroff>
21 <on_reboot>restart</on_reboot>
22 <on_crash>restart</on_crash>
24 <disk type='volume' device='disk'>
25 <driver name='qemu' type='qcow2' cache='unsafe'/>
26 <source pool='{{ libvirt_volume_pool }}' volume='{{ item.name }}.qcow2'/>
27 <target dev='{{ libvirt_diskdev }}' bus='{{ libvirt_diskbus }}'/>
29 {% if libvirt_diskbus == 'scsi' %}
30 <controller type='scsi' model='virtio-scsi' />
32 {% for network in networks %}
33 <interface type='bridge'>
34 <mac address='{{ node_mac_map.get(item.name).get(network.name) }}'/>
35 <source bridge='{{ network.bridge }}'/>
36 <model type='{{ libvirt_nic_model }}'/>
37 {% if network.virtualport_type is defined %}
38 <virtualport type='{{ network.virtualport_type }}'/>
45 {% if enable_vnc_console|bool %}
46 <input type='mouse' bus='ps2'/>
47 <graphics type='vnc' port='-1' autoport='yes'/>
49 <model type='cirrus' vram='9216' heads='1'/>
53 {{baremetal_vm_device_xml|default('')}}