2 <name>{{ inventory_hostname }}</name>
3 <memory unit='KiB'>{{ ocloud_infra_vm_mem_gb * 1048576 }}</memory>
4 <currentMemory unit='KiB'>{{ ocloud_infra_vm_mem_gb * 1048576 }}</currentMemory>
5 <vcpu>{{ ocloud_infra_vm_cpus }}</vcpu>
7 <type arch='x86_64' machine='pc'>hvm</type>
14 <cpu mode='host-model' check='partial'/>
16 <timer name='rtc' tickpolicy='catchup'/>
17 <timer name='pit' tickpolicy='delay'/>
18 <timer name='hpet' present='no'/>
20 <on_poweroff>destroy</on_poweroff>
21 <on_reboot>restart</on_reboot>
22 <on_crash>destroy</on_crash>
24 <suspend-to-mem enabled='no'/>
25 <suspend-to-disk enabled='no'/>
28 <emulator>{{ ocloud_infra_vm_emulator_path }}</emulator>
29 <disk type='file' device='disk'>
30 <driver name='qemu' type='qcow2'/>
31 <source file='{{ ocloud_infra_vm_disk_path }}'/>
32 <target dev='vda' bus='virtio'/>
34 <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
36 <disk type='file' device='cdrom'>
37 <driver name='qemu' type='raw'/>
38 <source file='{{ ocloud_infra_vm_image }}'/>
39 <target dev='hdb' bus='ide'/>
42 <address type='drive' controller='0' bus='0' target='0' unit='1'/>
44 <controller type='usb' index='0' model='ich9-ehci1'>
45 <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
47 <controller type='usb' index='0' model='ich9-uhci1'>
48 <master startport='0'/>
49 <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
51 <controller type='usb' index='0' model='ich9-uhci2'>
52 <master startport='2'/>
53 <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
55 <controller type='usb' index='0' model='ich9-uhci3'>
56 <master startport='4'/>
57 <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
59 <controller type='pci' index='0' model='pci-root'/>
60 <controller type='ide' index='0'>
61 <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
63 <controller type='virtio-serial' index='0'>
64 <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
66 <interface type='network'>
67 {% for ocloud_host in groups['ocloud'] %}
68 {% if ocloud_host == inventory_hostname %}
69 <mac address='{{ ocloud_net_mac_prefix }}:{{ loop.index + 10 }}'/>
72 <source network='{{ ocloud_net_name }}'/>
73 <model type='virtio'/>
74 <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
77 <target type='isa-serial' port='0'>
78 <model name='isa-serial'/>
82 <target type='serial' port='0'/>
84 <input type='tablet' bus='usb'>
85 <address type='usb' bus='0' port='1'/>
87 <input type='mouse' bus='ps2'/>
88 <input type='keyboard' bus='ps2'/>
89 <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'>
90 <listen type='address' address='127.0.0.1'/>
92 <audio id='1' type='none'/>
94 <model type='vga' vram='16384' heads='1' primary='yes'/>
95 <alias name='video0'/>
96 <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
98 <memballoon model='virtio'>
99 <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>