-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdomain.xml
More file actions
101 lines (101 loc) · 3.35 KB
/
domain.xml
File metadata and controls
101 lines (101 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" xmlns="" type="{{ domain_type }}">
<resource>
<partition>/machine</partition>
</resource>
<name>{{ name }}</name>
<uuid>{{ instance_uuid }}</uuid>
<currentMemory unit="KiB">{{ memory_size }}</currentMemory>
<on_poweroff>destroy</on_poweroff>
<devices>
<console type="pty" tty="/dev/pts/1">
<alias name="serial0"/>
<target type="serial" port="0"/>
<source path="/dev/pts/1"/>
</console>
<memballoon model="virtio">
<alias name="balloon0"/>
<address function="0x0" type="pci" domain="0x0000" slot="0x04" bus="0x00"/>
</memballoon>
<controller type="pci" index="0" model="pci-root">
<alias name="pci.0"/>
</controller>
<controller type="scsi" index="0" model="virtio-scsi">
<alias name="scsi0"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0"/>
</controller>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
{% for network in networks %}
<interface type="network">
<target dev="{{ network.dev }}"/>
<source network="{{ network.network }}"/>
<mac address="{{ network.mac }}"/>
{% if network.type %}
<model type="{{ network.type }}" />
{% endif %}
</interface>
{% endfor %}
<input type="mouse" bus="ps2"/>
<input type="keyboard" bus="ps2"/>
<serial type="pty">
<alias name="serial0"/>
<target port="0"/>
<source path="/dev/pts/1"/>
</serial>
{% for disk in disks %}
<disk device="disk" type="file">
<target dev="{{ disk.dev }}" bus="{{ disk.bus }}"/>
<source file="{{ disk.file }}"/>
<driver type="{{ disk.type }}"/>
</disk>
{% endfor %}
{% for serial_device in serial_devices %}
<serial type='pty'>
<source path='{{ serial_device.source_path }}'/>
<target port='{{ serial_device.target_port }}'/>
</serial>
{% endfor %}
{% for usb_device in usb_devices %}
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='{{ usb_device.vendor_id }}'/>
<product id='{{ usb_device.product_id }}'/>
</source>
</hostdev>
{% endfor %}
{% for pci_device in pci_devices %}
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='{{ pci_device.bus }}' slot='{{ pci_device.slot }}' function='{{ pci_device.function }}'/>
</source>
</hostdev>
{% endfor %}
{% for tpm_device in tpm_devices %}
<tpm model='tpm-tis'>
<backend type='passthrough'>
<device path='{{ tpm_device.path }}'/>
</backend>
</tpm>
{% endfor %}
</devices>
<on_crash>restart</on_crash>
<on_reboot>restart</on_reboot>
<vcpu placement="static">{% if vcpu is defined %}{{ vcpu }}{% else %}1{% endif %}</vcpu>
<features>
<pae/>
<acpi/>
<apic/>
</features>
<memory unit="KiB">{{ memory_maxsize }}</memory>
<os>
<type machine="pc" arch="x86_64">hvm</type>
<boot dev="hd"/>
</os>
<cpu mode="{{domain_cpu}}" match="exact" check="partial">
<model fallback="allow">qemu64</model>
</cpu>
<clock offset="utc">
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
</clock>
</domain>