File: formatcaps.html

package info (click to toggle)
libvirt 5.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 240,844 kB
  • sloc: ansic: 584,521; xml: 176,725; sh: 9,912; python: 4,731; perl: 4,343; makefile: 3,321; ml: 465
file content (312 lines) | stat: -rw-r--r-- 13,629 bytes parent folder | download | duplicates (2)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <!--
        This file is autogenerated from formatcaps.html.in
        Do not edit this file. Changes will be lost.
      -->
  <!--
        This page was generated at Tue Jul 30 02:04:27 UTC 2019.
      -->
  <head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="stylesheet" type="text/css" href="main.css"/>
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/>
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/>
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/>
    <link rel="manifest" href="/manifest.json"/>
    <meta name="theme-color" content="#ffffff"/>
    <title>libvirt: Driver capabilities XML format</title>
    <meta name="description" content="libvirt, virtualization, virtualization API"/>
    <script type="text/javascript" src="js/main.js">
      <!--// forces non-empty element-->
    </script>
  </head>
  <body onload="pageload()">
    <div id="body">
      <div id="content">
        <h1>Driver capabilities XML format</h1>
        <ul>
          <li>
            <a href="#elements">Element and attribute overview</a>
            <ul>
              <li>
                <a href="#elementHost">Host capabilities</a>
              </li>
              <li>
                <a href="#elementGuest">Guest capabilities</a>
              </li>
              <li>
                <a href="#elementExamples">Examples</a>
              </li>
            </ul>
          </li>
        </ul>
        <h2>
          <a id="elements">Element and attribute overview</a>
          <a class="headerlink" href="#elements" title="Permalink to this headline">¶</a>
        </h2>
        <p>As new virtualization engine support gets added to libvirt, and to
    handle cases like QEMU supporting a variety of emulations, a query
    interface has been added in 0.2.1 allowing to list the set of supported
    virtualization capabilities on the host:</p>
        <pre>char * virConnectGetCapabilities (virConnectPtr conn);</pre>
        <p>The value returned is an XML document listing the virtualization
    capabilities of the host and virtualization engine to which
    <code>@conn</code> is connected. One can test it using <code>virsh</code>
    command line tool command '<code>capabilities</code>', it dumps the XML
    associated to the current connection. </p>
        <p>As can be seen in the <a href="#elementExamples">example</a>, the
    capabilities XML consists of the <code>capabilities</code> element which
    have exactly one <code>host</code> child element to report information on
    host capabilities, and zero or more <code>guest</code> element to express
    the set of architectures the host can run at the moment.</p>
        <h3>
          <a id="elementHost">Host capabilities</a>
          <a class="headerlink" href="#elementHost" title="Permalink to this headline">¶</a>
        </h3>
        <p>The <code>&lt;host/&gt;</code> element consists of the following child
    elements:</p>
        <dl>
          <dt>
            <code>uuid</code>
          </dt>
          <dd>The host UUID.</dd>
          <dt>
            <code>cpu</code>
          </dt>
          <dd>The host CPU architecture and features.</dd>
          <dt>
            <code>power_management</code>
          </dt>
          <dd>whether host is capable of memory suspend, disk hibernation, or
      hybrid suspend.</dd>
          <dt>
            <code>migration</code>
          </dt>
          <dd>This element exposes information on the hypervisor's migration
      capabilities, like live migration, supported URI transports, and so
      on.</dd>
          <dt>
            <code>topology</code>
          </dt>
          <dd>This element embodies the host internal topology. Management
      applications may want to learn this information when orchestrating new
      guests - e.g. due to reduce inter-NUMA node transfers.</dd>
          <dt>
            <code>secmodel</code>
          </dt>
          <dd>To find out default security labels for different security models you
      need to parse this element. In contrast with the former elements, this is
      repeated for each security model the libvirt daemon currently supports.
      </dd>
        </dl>
        <h3>
          <a id="elementGuest">Guest capabilities</a>
          <a class="headerlink" href="#elementGuest" title="Permalink to this headline">¶</a>
        </h3>
        <p>While the <a href="#elementHost">previous section</a> aims at host
    capabilities, this one focuses on capabilities available to a guest
    using a given hypervisor. The <code>&lt;guest/&gt;</code> element will
    typically wrap up the following elements:</p>
        <dl>
          <dt>
            <code>os_type</code>
          </dt>
          <dd>This expresses what kind of operating system the hypervisor
        is able to run. Possible values are:
        <dl><dt><code>xen</code></dt><dd>for XEN PV</dd><dt><code>linux</code></dt><dd>legacy alias for <code>xen</code></dd><dt><code>xenpvh</code></dt><dd>for XEN PVH</dd><dt><code>hvm</code></dt><dd>Unmodified operating system</dd><dt><code>exe</code></dt><dd>Container based virtualization</dd></dl>
        </dd>
          <dt>
            <code>arch</code>
          </dt>
          <dd>This element brings some information on supported guest
          architecture. Possible subelements are:
          <dl><dt><code>wordsize</code></dt><dd>Size of CPU word in bits, for example 64.</dd><dt><code>emulator</code></dt><dd>Emulator (device model) path, for
              use in <a href="formatdomain.html#elementEmulator">emulator</a>
              element of domain XML.</dd><dt><code>loader</code></dt><dd>Loader path, for use in
              <a href="formatdomain.html#elementLoader">loader</a> element of domain
              XML.</dd><dt><code>machine</code></dt><dd>Machine type, for use in
              <a href="formatdomain.html#attributeOSTypeMachine">machine</a>
              attribute of os/type element in domain XML. For example Xen
              supports <code>xenfv</code> for HVM, <code>xenpv</code> for
              PV, or <code>xenpvh</code> for PVH.</dd><dt><code>domain</code></dt><dd>The <code>type</code> attribute of
              this element specifies the type of hypervisor required to run the
              domain. Use in <a href="formatdomain.html#attributeDomainType">type</a>
              attribute of the domain root element.</dd></dl>
        </dd>
          <dt>
            <code>features</code>
          </dt>
          <dd>This optional element encases possible features that can be used
          with a guest of described type.  Possible subelements are:
          <dl><dt><code>pae</code></dt><dd>If present, 32-bit guests can use PAE
              address space extensions, <span class="since">since
              0.4.1</span></dd><dt><code>nonpae</code></dt><dd>If present, 32-bit guests can be run
              without requiring PAE, <span class="since">since
              0.4.1</span></dd><dt><code>ia64_be</code></dt><dd>If present, IA64 guests can be run in
              big-endian mode, <span class="since">since 0.4.1</span></dd><dt><code>acpi</code></dt><dd>If this element is present,
              the <code>default</code> attribute describes whether the
              hypervisor exposes ACPI to the guest by default, and
              the <code>toggle</code> attribute describes whether the
              user can override this
              default. <span class="since">Since 0.4.1</span></dd><dt><code>apic</code></dt><dd>If this element is present,
              the <code>default</code> attribute describes whether the
              hypervisor exposes APIC to the guest by default, and
              the <code>toggle</code> attribute describes whether the
              user can override this
              default. <span class="since">Since 0.4.1</span></dd><dt><code>cpuselection</code></dt><dd>If this element is present, the
              hypervisor supports the <code>&lt;cpu&gt;</code> element
              within a domain definition for fine-grained control over
              the CPU presented to the
              guest. <span class="since">Since 0.7.5</span></dd><dt><code>deviceboot</code></dt><dd>If this element is present,
              the <code>&lt;boot order='...'/&gt;</code> element can
              be used inside devices, rather than the older boot
              specification by category. <span class="since">Since
              0.8.8</span></dd><dt><code>disksnapshot</code></dt><dd>If this element is present,
              the <code>default</code> attribute describes whether
              external disk snapshots are supported.  If absent,
              external snapshots may still be supported, but it
              requires attempting the API and checking for an error to
              find out for sure. <span class="since">Since
              1.2.3</span></dd></dl>
        </dd>
        </dl>
        <h3>
          <a id="elementExamples">Examples</a>
          <a class="headerlink" href="#elementExamples" title="Permalink to this headline">¶</a>
        </h3>
        <p>For example, in the case of a 64-bit machine with hardware
    virtualization capabilities enabled in the chip and
    BIOS you will see:</p>
        <pre>&lt;capabilities&gt;
  <span style="color: #E50000">&lt;host&gt;
    &lt;cpu&gt;
      &lt;arch&gt;x86_64&lt;/arch&gt;
      &lt;features&gt;
        &lt;vmx/&gt;
      &lt;/features&gt;
      &lt;model&gt;core2duo&lt;/model&gt;
      &lt;vendor&gt;Intel&lt;/vendor&gt;
      &lt;topology sockets="1" cores="2" threads="1"/&gt;
      &lt;feature name="lahf_lm"/&gt;
      &lt;feature name='xtpr'/&gt;
      ...
    &lt;/cpu&gt;
    &lt;power_management&gt;
      &lt;suspend_mem/&gt;
      &lt;suspend_disk/&gt;
      &lt;suspend_hybrid/&gt;
    &lt;/power_management&gt;
  &lt;/host&gt;</span>

  &lt;!-- xen-3.0-x86_64 --&gt;
  <span style="color: #0000E5">&lt;guest&gt;
    &lt;os_type&gt;xen&lt;/os_type&gt;
    &lt;arch name="x86_64"&gt;
      &lt;wordsize&gt;64&lt;/wordsize&gt;
      &lt;domain type="xen"&gt;&lt;/domain&gt;
      &lt;emulator&gt;/usr/lib64/xen/bin/qemu-dm&lt;/emulator&gt;
    &lt;/arch&gt;
    &lt;features&gt;
    &lt;/features&gt;
  &lt;/guest&gt;</span>

  &lt;!-- hvm-3.0-x86_32 --&gt;
  <span style="color: #00B200">&lt;guest&gt;
    &lt;os_type&gt;hvm&lt;/os_type&gt;
    &lt;arch name="i686"&gt;
      &lt;wordsize&gt;32&lt;/wordsize&gt;
      &lt;domain type="xen"&gt;&lt;/domain&gt;
      &lt;emulator&gt;/usr/lib/xen/bin/qemu-dm&lt;/emulator&gt;
      &lt;machine&gt;pc&lt;/machine&gt;
      &lt;machine&gt;isapc&lt;/machine&gt;
      &lt;loader&gt;/usr/lib/xen/boot/hvmloader&lt;/loader&gt;
    &lt;/arch&gt;
    &lt;features&gt;
      &lt;cpuselection/&gt;
      &lt;deviceboot/&gt;
    &lt;/features&gt;
  &lt;/guest&gt;</span>
  ...
&lt;/capabilities&gt;</pre>
      </div>
    </div>
    <div id="nav">
      <div id="home">
        <a href="index.html">Home</a>
      </div>
      <div id="jumplinks">
        <ul>
          <li>
            <a href="downloads.html">Download</a>
          </li>
          <li>
            <a href="contribute.html">Contribute</a>
          </li>
          <li>
            <a href="docs.html">Docs</a>
          </li>
        </ul>
      </div>
      <div id="search">
        <form id="simplesearch" action="https://www.google.com/search" enctype="application/x-www-form-urlencoded" method="get">
          <div>
            <input id="searchsite" name="sitesearch" type="hidden" value="libvirt.org"/>
            <input id="searchq" name="q" type="text" size="12" value=""/>
            <input name="submit" type="submit" value="Go"/>
          </div>
        </form>
        <div id="advancedsearch">
          <span>
            <input type="radio" name="what" id="whatwebsite" checked="checked" value="website"/>
            <label for="whatwebsite">Website</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatwiki" value="wiki"/>
            <label for="whatwiki">Wiki</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatdevs" value="devs"/>
            <label for="whatdevs">Developers list</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatusers" value="users"/>
            <label for="whatusers">Users list</label>
          </span>
        </div>
      </div>
    </div>
    <div id="footer">
      <div id="contact">
        <h3>Contact</h3>
        <ul>
          <li>
            <a href="contact.html#email">email</a>
          </li>
          <li>
            <a href="contact.html#irc">irc</a>
          </li>
        </ul>
      </div>
      <div id="community">
        <h3>Community</h3>
        <ul>
          <li>
            <a href="https://twitter.com/hashtag/libvirt">twitter</a>
          </li>
          <li>
            <a href="http://stackoverflow.com/questions/tagged/libvirt">stackoverflow</a>
          </li>
          <li>
            <a href="http://serverfault.com/questions/tagged/libvirt">serverfault</a>
          </li>
        </ul>
      </div>
      <div id="conduct">
            Participants in the libvirt project agree to abide by <a href="governance.html#codeofconduct">the project code of conduct</a></div>
      <br class="clear"/>
    </div>
  </body>
</html>