1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <h1>Driver capabilities XML format
</h1>
9 <h2><a id=
"elements">Element and attribute overview
</a></h2>
11 <p>As new virtualization engine support gets added to libvirt, and to
12 handle cases like QEMU supporting a variety of emulations, a query
13 interface has been added in
0.2.1 allowing to list the set of supported
14 virtualization capabilities on the host:
</p>
16 <pre>char * virConnectGetCapabilities (virConnectPtr conn);
</pre>
18 <p>The value returned is an XML document listing the virtualization
19 capabilities of the host and virtualization engine to which
20 <code>@conn
</code> is connected. One can test it using
<code>virsh
</code>
21 command line tool command '
<code>capabilities
</code>', it dumps the XML
22 associated to the current connection.
</p>
24 <p>As can be seen in the
<a href=
"#elementExamples">example
</a>, the
25 capabilities XML consists of the
<code>capabilities
</code> element which
26 have exactly one
<code>host
</code> child element to report information on
27 host capabilities, and zero or more
<code>guest
</code> element to express
28 the set of architectures the host can run at the moment.
</p>
31 <h3><a id=
"elementHost">Host capabilities
</a></h3>
33 <p>The
<code><host/
></code> element consists of the following child
36 <dt><code>uuid
</code></dt>
37 <dd>The host UUID.
</dd>
39 <dt><code>cpu
</code></dt>
40 <dd>The host CPU architecture and features.
</dd>
42 <dt><code>power_management
</code></dt>
43 <dd>whether host is capable of memory suspend, disk hibernation, or
46 <dt><code>migration
</code></dt>
47 <dd>This element exposes information on the hypervisor's migration
48 capabilities, like live migration, supported URI transports, and so
51 <dt><code>topology
</code></dt>
52 <dd>This element embodies the host internal topology. Management
53 applications may want to learn this information when orchestrating new
54 guests - e.g. due to reduce inter-NUMA node transfers.
</dd>
56 <dt><code>secmodel
</code></dt>
57 <dd>To find out default security labels for different security models you
58 need to parse this element. In contrast with the former elements, this is
59 repeated for each security model the libvirt daemon currently supports.
64 <h3><a id=
"elementGuest">Guest capabilities
</a></h3>
66 <p>While the
<a href=
"#elementHost">previous section
</a> aims at host
67 capabilities, this one focuses on capabilities available to a guest
68 using a given hypervisor. The
<code><guest/
></code> element will
69 typically wrap up the following elements:
</p>
72 <dt><code>os_type
</code></dt>
73 <dd>This expresses what kind of operating system the hypervisor
74 is able to run. Possible values are:
76 <dt><code>xen
</code></dt>
79 <dt><code>linux
</code></dt>
80 <dd>legacy alias for
<code>xen
</code></dd>
82 <dt><code>xenpvh
</code></dt>
85 <dt><code>hvm
</code></dt>
86 <dd>Unmodified operating system
</dd>
88 <dt><code>exe
</code></dt>
89 <dd>Container based virtualization
</dd>
93 <dt><code>arch
</code></dt>
94 <dd>This element brings some information on supported guest
95 architecture. Possible subelements are:
97 <dt><code>wordsize
</code></dt><dd>Size of CPU word in bits, for example
64.
</dd>
98 <dt><code>emulator
</code></dt><dd>Emulator (device model) path, for
99 use in
<a href=
"formatdomain.html#elementEmulator">emulator
</a>
100 element of domain XML.
</dd>
101 <dt><code>loader
</code></dt><dd>Loader path, for use in
102 <a href=
"formatdomain.html#elementLoader">loader
</a> element of domain
104 <dt><code>machine
</code></dt><dd>Machine type, for use in
105 <a href=
"formatdomain.html#attributeOSTypeMachine">machine
</a>
106 attribute of os/type element in domain XML. For example Xen
107 supports
<code>xenfv
</code> for HVM,
<code>xenpv
</code> for
108 PV, or
<code>xenpvh
</code> for PVH.
</dd>
109 <dt><code>domain
</code></dt><dd>The
<code>type
</code> attribute of
110 this element specifies the type of hypervisor required to run the
111 domain. Use in
<a href=
"formatdomain.html#attributeDomainType">type
</a>
112 attribute of the domain root element.
</dd>
116 <dt><code>features
</code></dt>
117 <dd>This optional element encases possible features that can be used
118 with a guest of described type. Possible subelements are:
120 <dt><code>pae
</code></dt><dd>If present,
32-bit guests can use PAE
121 address space extensions,
<span class=
"since">since
123 <dt><code>nonpae
</code></dt><dd>If present,
32-bit guests can be run
124 without requiring PAE,
<span class=
"since">since
126 <dt><code>ia64_be
</code></dt><dd>If present, IA64 guests can be run in
127 big-endian mode,
<span class=
"since">since
0.4.1</span></dd>
128 <dt><code>acpi
</code></dt><dd>If this element is present,
129 the
<code>default
</code> attribute describes whether the
130 hypervisor exposes ACPI to the guest by default, and
131 the
<code>toggle
</code> attribute describes whether the
132 user can override this
133 default.
<span class=
"since">Since
0.4.1</span></dd>
134 <dt><code>apic
</code></dt><dd>If this element is present,
135 the
<code>default
</code> attribute describes whether the
136 hypervisor exposes APIC to the guest by default, and
137 the
<code>toggle
</code> attribute describes whether the
138 user can override this
139 default.
<span class=
"since">Since
0.4.1</span></dd>
140 <dt><code>cpuselection
</code></dt><dd>If this element is present, the
141 hypervisor supports the
<code><cpu
></code> element
142 within a domain definition for fine-grained control over
143 the CPU presented to the
144 guest.
<span class=
"since">Since
0.7.5</span></dd>
145 <dt><code>deviceboot
</code></dt><dd>If this element is present,
146 the
<code><boot order='...'/
></code> element can
147 be used inside devices, rather than the older boot
148 specification by category.
<span class=
"since">Since
150 <dt><code>disksnapshot
</code></dt><dd>If this element is present,
151 the
<code>default
</code> attribute describes whether
152 external disk snapshots are supported. If absent,
153 external snapshots may still be supported, but it
154 requires attempting the API and checking for an error to
155 find out for sure.
<span class=
"since">Since
161 <h3><a id=
"elementExamples">Examples
</a></h3>
163 <p>For example, in the case of a
64-bit machine with hardware
164 virtualization capabilities enabled in the chip and
165 BIOS you will see:
</p>
167 <pre><capabilities
>
168 <span style=
"color: #E50000"><host
>
170 <arch
>x86_64
</arch
>
174 <model
>core2duo
</model
>
175 <vendor
>Intel
</vendor
>
176 <topology
sockets=
"1" cores=
"2" threads=
"1"/
>
177 <feature
name=
"lahf_lm"/
>
178 <feature name='xtpr'/
>
181 <power_management
>
183 <suspend_disk/
>
184 <suspend_hybrid/
>
185 </power_management
>
188 <!-- xen-
3.0-x86_64 --
>
189 <span style=
"color: #0000E5"><guest
>
190 <os_type
>xen
</os_type
>
191 <arch
name=
"x86_64">
192 <wordsize
>64</wordsize
>
193 <domain
type=
"xen"></domain
>
194 <emulator
>/usr/lib64/xen/bin/qemu-dm
</emulator
>
198 </guest
></span>
200 <!-- hvm-
3.0-x86_32 --
>
201 <span style=
"color: #00B200"><guest
>
202 <os_type
>hvm
</os_type
>
203 <arch
name=
"i686">
204 <wordsize
>32</wordsize
>
205 <domain
type=
"xen"></domain
>
206 <emulator
>/usr/lib/xen/bin/qemu-dm
</emulator
>
207 <machine
>pc
</machine
>
208 <machine
>isapc
</machine
>
209 <loader
>/usr/lib/xen/boot/hvmloader
</loader
>
212 <cpuselection/
>
215 </guest
></span>
217 </capabilities
></pre>