backup: Wire up qemu full pull backup commands over QMP
[libvirt/ericb.git] / docs / formatcaps.html.in
blob2a0aa963bb540d549a7b75aa7ec7fdd14df86bac
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html>
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <body>
5 <h1>Driver capabilities XML format</h1>
7 <ul id="toc"></ul>
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>&lt;host/&gt;</code> element consists of the following child
34 elements:</p>
35 <dl>
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
44 hybrid suspend.</dd>
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
49 on.</dd>
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.
60 </dd>
61 </dl>
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>&lt;guest/&gt;</code> element will
69 typically wrap up the following elements:</p>
71 <dl>
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:
75 <dl>
76 <dt><code>xen</code></dt>
77 <dd>for XEN PV</dd>
79 <dt><code>linux</code></dt>
80 <dd>legacy alias for <code>xen</code></dd>
82 <dt><code>xenpvh</code></dt>
83 <dd>for XEN PVH</dd>
85 <dt><code>hvm</code></dt>
86 <dd>Unmodified operating system</dd>
88 <dt><code>exe</code></dt>
89 <dd>Container based virtualization</dd>
90 </dl>
91 </dd>
93 <dt><code>arch</code></dt>
94 <dd>This element brings some information on supported guest
95 architecture. Possible subelements are:
96 <dl>
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
103 XML.</dd>
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>
113 </dl>
114 </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:
119 <dl>
120 <dt><code>pae</code></dt><dd>If present, 32-bit guests can use PAE
121 address space extensions, <span class="since">since
122 0.4.1</span></dd>
123 <dt><code>nonpae</code></dt><dd>If present, 32-bit guests can be run
124 without requiring PAE, <span class="since">since
125 0.4.1</span></dd>
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>&lt;cpu&gt;</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>&lt;boot order='...'/&gt;</code> element can
147 be used inside devices, rather than the older boot
148 specification by category. <span class="since">Since
149 0.8.8</span></dd>
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
156 1.2.3</span></dd>
157 </dl>
158 </dd>
159 </dl>
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>&lt;capabilities&gt;
168 <span style="color: #E50000">&lt;host&gt;
169 &lt;cpu&gt;
170 &lt;arch&gt;x86_64&lt;/arch&gt;
171 &lt;features&gt;
172 &lt;vmx/&gt;
173 &lt;/features&gt;
174 &lt;model&gt;core2duo&lt;/model&gt;
175 &lt;vendor&gt;Intel&lt;/vendor&gt;
176 &lt;topology sockets="1" cores="2" threads="1"/&gt;
177 &lt;feature name="lahf_lm"/&gt;
178 &lt;feature name='xtpr'/&gt;
180 &lt;/cpu&gt;
181 &lt;power_management&gt;
182 &lt;suspend_mem/&gt;
183 &lt;suspend_disk/&gt;
184 &lt;suspend_hybrid/&gt;
185 &lt;/power_management&gt;
186 &lt;/host&gt;</span>
188 &lt;!-- xen-3.0-x86_64 --&gt;
189 <span style="color: #0000E5">&lt;guest&gt;
190 &lt;os_type&gt;xen&lt;/os_type&gt;
191 &lt;arch name="x86_64"&gt;
192 &lt;wordsize&gt;64&lt;/wordsize&gt;
193 &lt;domain type="xen"&gt;&lt;/domain&gt;
194 &lt;emulator&gt;/usr/lib64/xen/bin/qemu-dm&lt;/emulator&gt;
195 &lt;/arch&gt;
196 &lt;features&gt;
197 &lt;/features&gt;
198 &lt;/guest&gt;</span>
200 &lt;!-- hvm-3.0-x86_32 --&gt;
201 <span style="color: #00B200">&lt;guest&gt;
202 &lt;os_type&gt;hvm&lt;/os_type&gt;
203 &lt;arch name="i686"&gt;
204 &lt;wordsize&gt;32&lt;/wordsize&gt;
205 &lt;domain type="xen"&gt;&lt;/domain&gt;
206 &lt;emulator&gt;/usr/lib/xen/bin/qemu-dm&lt;/emulator&gt;
207 &lt;machine&gt;pc&lt;/machine&gt;
208 &lt;machine&gt;isapc&lt;/machine&gt;
209 &lt;loader&gt;/usr/lib/xen/boot/hvmloader&lt;/loader&gt;
210 &lt;/arch&gt;
211 &lt;features&gt;
212 &lt;cpuselection/&gt;
213 &lt;deviceboot/&gt;
214 &lt;/features&gt;
215 &lt;/guest&gt;</span>
217 &lt;/capabilities&gt;</pre>
218 </body>
219 </html>