Commit | Line | Data |
---|---|---|
4be44748 KS |
1 | <domain type='kvm'> |
2 | <name>{{ vm.name }}</name> | |
3 | {% if 'uuid' in vm %} | |
4 | <uuid>{{ vm.uuid }}</uuid> | |
5 | {% endif %} | |
6 | <memory unit='KiB'>{{ vm.memory }}</memory> | |
7 | <vcpu placement='static'>{{ vm.vcpu }}</vcpu> | |
8 | <os> | |
9 | <type arch='x86_64' machine='pc-q35-4.2'>hvm</type> | |
10 | <bootmenu enable='yes'/> | |
11 | </os> | |
12 | <features> | |
13 | <acpi/> | |
14 | <apic/> | |
15 | <vmport state='off'/> | |
16 | </features> | |
17 | <cpu mode='host-model' check='partial'/> | |
18 | <clock offset='utc'> | |
19 | <timer name='rtc' tickpolicy='catchup'/> | |
20 | <timer name='pit' tickpolicy='delay'/> | |
21 | <timer name='hpet' present='no'/> | |
22 | </clock> | |
23 | <on_poweroff>destroy</on_poweroff> | |
24 | <on_reboot>restart</on_reboot> | |
25 | <on_crash>destroy</on_crash> | |
26 | <pm> | |
27 | <suspend-to-mem enabled='no'/> | |
28 | <suspend-to-disk enabled='no'/> | |
29 | </pm> | |
30 | <devices> | |
31 | <emulator>/usr/bin/qemu-system-x86_64</emulator> | |
32 | <disk type='file' device='cdrom'> | |
33 | <driver name='qemu' type='raw'/> | |
34 | <target dev='sda' bus='sata'/> | |
35 | {% if 'cdrom' in vm %} | |
36 | <source file='{{vm.cdrom}}'/> | |
37 | {% endif %} | |
38 | <readonly/> | |
39 | <address type='drive' controller='0' bus='0' target='0' unit='0'/> | |
40 | <boot order='2'/> | |
41 | </disk> | |
42 | {% if 'disk' in vm %} | |
43 | <disk type='file' device='disk'> | |
44 | <driver name='qemu' type='qcow2' discard='unmap'/> | |
45 | <source file='{{vm.disk}}'/> | |
46 | <target dev='sdb' bus='sata'/> | |
47 | <address type='drive' controller='0' bus='0' target='0' unit='1'/> | |
48 | <boot order='1'/> | |
49 | </disk> | |
50 | {% endif %} | |
51 | <controller type='usb' index='0' model='ich9-ehci1'> | |
52 | <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/> | |
53 | </controller> | |
54 | <controller type='usb' index='0' model='ich9-uhci1'> | |
55 | <master startport='0'/> | |
56 | <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/> | |
57 | </controller> | |
58 | <controller type='usb' index='0' model='ich9-uhci2'> | |
59 | <master startport='2'/> | |
60 | <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/> | |
61 | </controller> | |
62 | <controller type='usb' index='0' model='ich9-uhci3'> | |
63 | <master startport='4'/> | |
64 | <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/> | |
65 | </controller> | |
66 | <controller type='scsi' index='0' model='virtio-scsi'> | |
67 | <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> | |
68 | </controller> | |
69 | <controller type='sata' index='0'> | |
70 | <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> | |
71 | </controller> | |
72 | <controller type='pci' index='0' model='pcie-root'/> | |
73 | <controller type='pci' index='1' model='pcie-root-port'> | |
74 | <model name='pcie-root-port'/> | |
75 | <target chassis='1' port='0x10'/> | |
76 | <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> | |
77 | </controller> | |
78 | <controller type='pci' index='2' model='pcie-root-port'> | |
79 | <model name='pcie-root-port'/> | |
80 | <target chassis='2' port='0x11'/> | |
81 | <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> | |
82 | </controller> | |
83 | <controller type='pci' index='3' model='pcie-root-port'> | |
84 | <model name='pcie-root-port'/> | |
85 | <target chassis='3' port='0x12'/> | |
86 | <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/> | |
87 | </controller> | |
88 | <controller type='pci' index='4' model='pcie-root-port'> | |
89 | <model name='pcie-root-port'/> | |
90 | <target chassis='4' port='0x13'/> | |
91 | <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/> | |
92 | </controller> | |
93 | <controller type='pci' index='5' model='pcie-root-port'> | |
94 | <model name='pcie-root-port'/> | |
95 | <target chassis='5' port='0x14'/> | |
96 | <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/> | |
97 | </controller> | |
98 | <controller type='pci' index='6' model='pcie-root-port'> | |
99 | <model name='pcie-root-port'/> | |
100 | <target chassis='6' port='0x15'/> | |
101 | <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/> | |
102 | </controller> | |
103 | <controller type='virtio-serial' index='0'> | |
104 | <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> | |
105 | </controller> | |
106 | <interface type='bridge'> | |
107 | <mac/> | |
108 | <source bridge='{{vm.net_bridge}}'/> | |
109 | <model type='virtio'/> | |
110 | <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> | |
111 | </interface> | |
112 | <serial type='pty'> | |
113 | <target type='isa-serial' port='0'> | |
114 | <model name='isa-serial'/> | |
115 | </target> | |
116 | </serial> | |
117 | <console type='pty'> | |
118 | <target type='serial' port='0'/> | |
119 | </console> | |
120 | <channel type='unix'> | |
121 | <target type='virtio' name='org.qemu.guest_agent.0'/> | |
122 | <address type='virtio-serial' controller='0' bus='0' port='1'/> | |
123 | </channel> | |
124 | <channel type='spicevmc'> | |
125 | <target type='virtio' name='com.redhat.spice.0'/> | |
126 | <address type='virtio-serial' controller='0' bus='0' port='2'/> | |
127 | </channel> | |
128 | <input type='tablet' bus='usb'> | |
129 | <address type='usb' bus='0' port='1'/> | |
130 | </input> | |
131 | <input type='mouse' bus='ps2'/> | |
132 | <input type='keyboard' bus='ps2'/> | |
133 | <graphics type='spice' autoport='yes'> | |
134 | <listen type='address' address='0.0.0.0'/> | |
135 | </graphics> | |
136 | <audio id='1' type='spice'/> | |
137 | <video> | |
138 | <model type='virtio' heads='1' primary='yes'/> | |
139 | <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> | |
140 | </video> | |
141 | <redirdev bus='usb' type='spicevmc'> | |
142 | <address type='usb' bus='0' port='2'/> | |
143 | </redirdev> | |
144 | <redirdev bus='usb' type='spicevmc'> | |
145 | <address type='usb' bus='0' port='3'/> | |
146 | </redirdev> | |
147 | <memballoon model='virtio'> | |
148 | <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> | |
149 | </memballoon> | |
150 | <rng model='virtio'> | |
151 | <backend model='random'>/dev/urandom</backend> | |
152 | <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> | |
153 | </rng> | |
154 | </devices> | |
155 | </domain> |