-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdomain.xsl
More file actions
69 lines (64 loc) · 2.33 KB
/
Copy pathdomain.xsl
File metadata and controls
69 lines (64 loc) · 2.33 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
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes" />
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*" />
</xsl:copy>
</xsl:template>
<xsl:template match="/domain/features">
<features>
<acpi/>
</features>
<cpu mode='host-passthrough' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
</xsl:template>
<xsl:template match="/domain/os">
{cputune}
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="/domain/devices/disk">
<filesystem type='mount' accessmode='passthrough'>
<source dir='{sharedFSMount}' />
<target dir='kernel-version-testing' />
</filesystem>
<readonly />
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="/domain/devices/interface[@type='network']/mac/@address">
<xsl:attribute name="address">
<xsl:value-of select="'{mac}'" />
</xsl:attribute>
</xsl:template>
<xsl:template match="/domain/memory">
<xsl:copy>
<!-- Required by QEMU in recent versions https://gitlab.com/libvirt/libvirt/-/issues/679 -->
<xsl:attribute name="dumpCore">on</xsl:attribute>
<xsl:apply-templates select="node()|@*" />
</xsl:copy>
</xsl:template>
<xsl:template match="/domain/devices">
<xsl:copy>
<xsl:apply-templates select="node()|@*" />
<xsl:element name ="controller">
<xsl:attribute name="type">usb</xsl:attribute>
<xsl:attribute name="model">
<xsl:value-of select="'none'" />
</xsl:attribute>
</xsl:element>
<xsl:element name="memballoon">
<xsl:attribute name="model">virtio</xsl:attribute>
<xsl:attribute name="autodeflate">on</xsl:attribute>
</xsl:element>
</xsl:copy>
</xsl:template>
<xsl:template match="domain/devices/graphics" />
<xsl:template match="domain/devices/audio" />
<xsl:template match="domain/devices/video" />
</xsl:stylesheet>