[libvirt] [PATCH] docs: Emphasize that devices have to be inside the <devices> element

Matthias Bolte matthias.bolte at googlemail.com
Thu Feb 4 15:42:27 UTC 2010


Also cleanup indentation of domain XML examples.
---
 docs/drvxen.html.in       |   12 +-
 docs/formatdomain.html.in |  776 +++++++++++++++++++++++++--------------------
 2 files changed, 430 insertions(+), 358 deletions(-)

diff --git a/docs/drvxen.html.in b/docs/drvxen.html.in
index a6f0e57..4e35afa 100644
--- a/docs/drvxen.html.in
+++ b/docs/drvxen.html.in
@@ -234,9 +234,9 @@ vif = [ "mac=00:16:3e:60:36:ba,bridge=virbr0,script=vif-bridge,vifname=vif5.0" ]
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <features>
-     <pae/>
-     <acpi/>
-     <apic/>
+    <pae/>
+    <acpi/>
+    <apic/>
   </features>
   <clock sync="localtime"/>
   <devices>
@@ -288,9 +288,9 @@ vif = [ "mac=00:16:3e:60:36:ba,bridge=virbr0,script=vif-bridge,vifname=vif5.0" ]
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <features>
-     <pae/>
-     <acpi/>
-     <apic/>
+    <pae/>
+    <acpi/>
+    <apic/>
   </features>
   <clock sync="localtime"/>
   <devices>
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index ce49f7d..083a80a 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -28,11 +28,11 @@
 
     <h3><a name="elementsMetadata">General metadata</a></h3>
 
-    <pre>
-      <domain type='xen' id='3'>
-        <name>fv0</name>
-        <uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
-        ...</pre>
+<pre>
+<domain type='xen' id='3'>
+  <name>fv0</name>
+  <uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
+  ...</pre>
 
     <dl>
       <dt><code>name</code></dt>
@@ -66,14 +66,14 @@
       to obtain/find the boot image.
     </p>
 
-    <pre>
-        ...
-        <os>
-          <type>hvm</type>
-          <loader>/usr/lib/xen/boot/hvmloader</loader>
-          <boot dev='hd'/>
-        </os>
-        ...</pre>
+<pre>
+  ...
+  <os>
+    <type>hvm</type>
+    <loader>/usr/lib/xen/boot/hvmloader</loader>
+    <boot dev='hd'/>
+  </os>
+  ...</pre>
 
     <dl>
       <dt><code>type</code></dt>
@@ -109,11 +109,11 @@
       An example is <code>pygrub</code> with Xen.
     </p>
 
-    <pre>
-        ...
-        <bootloader>/usr/bin/pygrub</bootloader>
-        <bootloader_args>--append single</bootloader_args>
-        ...</pre>
+<pre>
+  ...
+  <bootloader>/usr/bin/pygrub</bootloader>
+  <bootloader_args>--append single</bootloader_args>
+  ...</pre>
 
     <dl>
       <dt><code>bootloader</code></dt>
@@ -139,16 +139,16 @@
       is usually available for both para and full virtualized guests.
     </p>
 
-    <pre>
-        ...
-        <os>
-          <type>hvm</type>
-          <loader>/usr/lib/xen/boot/hvmloader</loader>
-          <kernel>/root/f8-i386-vmlinuz</kernel>
-          <initrd>/root/f8-i386-initrd</initrd>
-          <cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
-        </os>
-        ...</pre>
+<pre>
+  ...
+  <os>
+    <type>hvm</type>
+    <loader>/usr/lib/xen/boot/hvmloader</loader>
+    <kernel>/root/f8-i386-vmlinuz</kernel>
+    <initrd>/root/f8-i386-initrd</initrd>
+    <cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
+  </os>
+  ...</pre>
 
     <dl>
       <dt><code>type</code></dt>
@@ -172,15 +172,15 @@
 
     <h3><a name="elementsResources">Basic resources</a></h3>
 
-    <pre>
-        ...
-        <memory>524288</memory>
-        <currentMemory>524288</currentMemory>
-        <memoryBacking>
-          <hugepages/>
-        </memoryBacking>
-        <vcpu>1</vcpu>
-        ...</pre>
+<pre>
+  ...
+  <memory>524288</memory>
+  <currentMemory>524288</currentMemory>
+  <memoryBacking>
+    <hugepages/>
+  </memoryBacking>
+  <vcpu>1</vcpu>
+  ...</pre>
 
     <dl>
       <dt><code>memory</code></dt>
@@ -209,14 +209,14 @@
       <span class="since">Since 0.7.5</span>
     </p>
 
-    <pre>
-        ...
-        <cpu match='exact'>
-          <model>core2duo</model>
-          <topology sockets='1' cores='2' threads='1'/>
-          <feature policy='disable' name='lahf_lm'/>
-        </cpu>
-        ...</pre>
+<pre>
+  ...
+  <cpu match='exact'>
+    <model>core2duo</model>
+    <topology sockets='1' cores='2' threads='1'/>
+    <feature policy='disable' name='lahf_lm'/>
+  </cpu>
+  ...</pre>
 
     <p>
       In case no restrictions need to be put on CPU model and its features, a
@@ -224,12 +224,12 @@
       <span class="since">Since 0.7.6</span>
     </p>
 
-    <pre>
-        ...
-        <cpu>
-          <topology sockets='1' cores='2' threads='1'/>
-        </cpu>
-        ...</pre>
+<pre>
+  ...
+  <cpu>
+    <topology sockets='1' cores='2' threads='1'/>
+  </cpu>
+  ...</pre>
 
     <dl>
       <dt><code>cpu</code></dt>
@@ -305,12 +305,12 @@
       re-configured for the first post-install bootup.
     </p>
 
-    <pre>
-        ...
-        <on_poweroff>destroy</on_poweroff>
-        <on_reboot>restart</on_reboot>
-        <on_crash>restart</on_crash>
-        ...</pre>
+<pre>
+  ...
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>restart</on_crash>
+  ...</pre>
 
     <dl>
       <dt><code>on_poweroff</code></dt>
@@ -350,14 +350,14 @@
       toggled on/off.
     </p>
 
-    <pre>
-        ...
-        <features>
-          <pae/>
-          <acpi/>
-          <apic/>
-        </features>
-        ...</pre>
+<pre>
+  ...
+  <features>
+    <pae/>
+    <acpi/>
+    <apic/>
+  </features>
+  ...</pre>
 
     <p>
       All features are listed within the <code>features</code>
@@ -386,10 +386,10 @@
       it to be in so called 'localtime'.
     </p>
 
-    <pre>
-        ...
-        <clock offset="localtime"/>
-        ...</pre>
+<pre>
+  ...
+  <clock offset="localtime"/>
+  ...</pre>
 
     <dl>
       <dt><code>clock</code></dt>
@@ -408,11 +408,12 @@
       <span class="since">Since 0.1.3</span>
     </p>
 
-    <pre>
-        ...
-        <devices>
-          <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
-          ...</pre>
+<pre>
+  ...
+  <devices>
+    <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
+  </devices>
+  ...</pre>
 
     <dl>
       <dt><code>emulator</code></dt>
@@ -433,18 +434,20 @@
       element.
     </p>
 
-    <pre>
-          ...
-          <disk type='file'>
-            <driver name="tap" type="aio" cache="default">
-            <source file='/var/lib/xen/images/fv0'/>
-            <target dev='hda' bus='ide'/>
-            <encryption type='...'>
-              ...
-            </encryption>
-            <shareable/>
-          </disk>
-          ...</pre>
+<pre>
+  ...
+  <devices>
+    <disk type='file'>
+      <driver name="tap" type="aio" cache="default">
+      <source file='/var/lib/xen/images/fv0'/>
+      <target dev='hda' bus='ide'/>
+      <encryption type='...'>
+        ...
+      </encryption>
+      <shareable/>
+    </disk>
+  </devices>
+  ...</pre>
 
     <dl>
       <dt><code>disk</code></dt>
@@ -500,24 +503,30 @@
       0.4.4 for USB and 0.6.0 for PCI (KVM only)</span>:
     </p>
 
-    <pre>
-          ...
-          <hostdev mode='subsystem' type='usb'>
-            <source>
-              <vendor id='0x1234'/>
-              <product id='0xbeef'/>
-            </source>
-          </hostdev>
-          ...</pre>
+<pre>
+  ...
+  <devices>
+    <hostdev mode='subsystem' type='usb'>
+      <source>
+        <vendor id='0x1234'/>
+        <product id='0xbeef'/>
+      </source>
+    </hostdev>
+  </devices>
+  ...</pre>
+
     <p>or:</p>
-    <pre>
-          ...
-          <hostdev mode='subsystem' type='pci'>
-            <source>
-              <address bus='0x06' slot='0x02' function='0x0'/>
-            </source>
-          </hostdev>
-          ...</pre>
+
+<pre>
+  ...
+  <devices>
+    <hostdev mode='subsystem' type='pci'>
+      <source>
+        <address bus='0x06' slot='0x02' function='0x0'/>
+      </source>
+    </hostdev>
+  </devices>
+  ...</pre>
 
     <dl>
       <dt><code>hostdev</code></dt>
@@ -556,14 +565,16 @@
 
     <h4><a name="elementsNICS">Network interfaces</a></h4>
 
-    <pre>
-          ...
-          <interface type='bridge'>
-            <source bridge='xenbr0'/>
-            <mac address='00:16:3e:5d:c7:9e'/>
-            <script path='vif-bridge'/>
-          </interface>
-          ...</pre>
+<pre>
+  ...
+  <devices>
+    <interface type='bridge'>
+      <source bridge='xenbr0'/>
+      <mac address='00:16:3e:5d:c7:9e'/>
+      <script path='vif-bridge'/>
+    </interface>
+  </devices>
+  ...</pre>
 
     <h5><a name="elementsNICSVirtual">Virtual network</a></h5>
 
@@ -589,18 +600,20 @@
       <a href="#elementsNICSTargetOverride">overriding the target element</a>).
     </p>
 
-    <pre>
-      ...
-      <interface type='network'>
-        <source network='default'/>
-      </interface>
-      ...
-      <interface type='network'>
-        <source network='default'/>
-        <target dev='vnet7'/>
-        <mac address="11:22:33:44:55:66"/>
-      </interface>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <interface type='network'>
+      <source network='default'/>
+    </interface>
+    ...
+    <interface type='network'>
+      <source network='default'/>
+      <target dev='vnet7'/>
+      <mac address="11:22:33:44:55:66"/>
+    </interface>
+  </devices>
+  ...</pre>
 
     <h5><a name="elementsNICSBridge">Bridge to LAN</a></h5>
 
@@ -623,18 +636,20 @@
       full incoming & outgoing net access just like a physical machine.
     </p>
 
-    <pre>
-      ...
-      <interface type='bridge'>
-        <source bridge='br0'/>
-      </interface>
-
-      <interface type='bridge'>
-        <source bridge='br0'/>
-        <target dev='vnet7'/>
-        <mac address="11:22:33:44:55:66"/>
-      </interface>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <interface type='bridge'>
+      <source bridge='br0'/>
+    </interface>
+    ...
+    <interface type='bridge'>
+      <source bridge='br0'/>
+      <target dev='vnet7'/>
+      <mac address="11:22:33:44:55:66"/>
+    </interface>
+  </devices>
+  ...</pre>
 
     <h5><a name="elementsNICSSlirp">Userspace SLIRP stack</a></h5>
 
@@ -647,14 +662,16 @@
       VMs to have outgoing access.
     </p>
 
-    <pre>
-      ...
-      <interface type='user'/>
-      ...
-      <interface type='user'>
-        <mac address="11:22:33:44:55:66"/>
-      </interface>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <interface type='user'/>
+    ...
+    <interface type='user'>
+      <mac address="11:22:33:44:55:66"/>
+    </interface>
+  </devices>
+  ...</pre>
 
 
     <h5><a name="elementsNICSEthernet">Generic ethernet connection</a></h5>
@@ -669,15 +686,17 @@
       overridden.
     </p>
 
-    <pre>
-      ...
-      <interface type='ethernet'/>
-      ...
-      <interface type='ethernet'>
-        <target dev='vnet7'/>
-        <script path='/etc/qemu-ifup-mynet'/>
-      </interface>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <interface type='ethernet'/>
+    ...
+    <interface type='ethernet'>
+      <target dev='vnet7'/>
+      <script path='/etc/qemu-ifup-mynet'/>
+    </interface>
+  </devices>
+  ...</pre>
 
     <h5><a name="elementsNICSMulticast">Multicast tunnel</a></h5>
 
@@ -693,12 +712,14 @@
       multicast address block.
     </p>
 
-    <pre>
-      ...
-      <interface type='mcast'>
-        <source address='230.0.0.1' port='5558'/>
-      </interface>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <interface type='mcast'>
+      <source address='230.0.0.1' port='5558'/>
+    </interface>
+  </devices>
+  ...</pre>
 
     <h5><a name="elementsNICSTCP">TCP tunnel</a></h5>
 
@@ -711,27 +732,31 @@
       network access, one of the VMs should have a 2nd NIC which is connected
       to one of the first 4 network types and do the appropriate routing.</p>
 
-    <pre>
-      ...
-      <interface type='server'>
-        <source address='192.168.0.1' port='5558'/>
-      </interface>
-      ...
-      <interface type='client'>
+<pre>
+  ...
+  <devices>
+    <interface type='server'>
       <source address='192.168.0.1' port='5558'/>
-      </interface>
-      ...</pre>
+    </interface>
+    ...
+    <interface type='client'>
+    <source address='192.168.0.1' port='5558'/>
+    </interface>
+  </devices>
+  ...</pre>
 
     <h5><a name="elementsNICSModel">Setting the NIC model</a></h5>
 
-    <pre>
-      ...
-      <interface type='network'>
-        <source network='default'/>
-        <target dev='vnet1'/>
-        <b><model type='ne2k_pci'/></b>
-      </interface>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <interface type='network'>
+      <source network='default'/>
+      <target dev='vnet1'/>
+      <b><model type='ne2k_pci'/></b>
+    </interface>
+  </devices>
+  ...</pre>
 
     <p>
       For hypervisors which support this, you can set the model of
@@ -757,13 +782,15 @@ qemu-kvm -net nic,model=? /dev/null
 
     <h5><a name="elementsNICSTargetOverride">Overriding the target element</a></h5>
 
-    <pre>
-      ...
-      <interface type='network'>
-        <source network='default'/>
-        <b><target dev='vnet1'/></b>
-      </interface>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <interface type='network'>
+      <source network='default'/>
+      <b><target dev='vnet1'/></b>
+    </interface>
+  </devices>
+  ...</pre>
 
     <p>
         If no target is specified, certain hypervisors will automatically
@@ -783,10 +810,12 @@ qemu-kvm -net nic,model=? /dev/null
       to provide a graphics tablet for absolute cursor movement.
     </p>
 
-    <pre>
-          ...
-          <input type='mouse' bus='usb'/>
-          ...</pre>
+<pre>
+  ...
+  <devices>
+    <input type='mouse' bus='usb'/>
+  </devices>
+  ...</pre>
 
     <dl>
       <dt><code>input</code></dt>
@@ -807,13 +836,15 @@ qemu-kvm -net nic,model=? /dev/null
       admin.
     </p>
 
-    <pre>
-          ...
-          <graphics type='sdl' display=':0.0'/>
-          <graphics type='vnc' port='5904'/>
-          <graphics type='rdp' autoport='yes' multiUser='yes' />
-          <graphics type='desktop' fullscreen='yes'/>
-          ...</pre>
+<pre>
+  ...
+  <devices>
+    <graphics type='sdl' display=':0.0'/>
+    <graphics type='vnc' port='5904'/>
+    <graphics type='rdp' autoport='yes' multiUser='yes' />
+    <graphics type='desktop' fullscreen='yes'/>
+  </devices>
+  ...</pre>
 
     <dl>
       <dt><code>graphics</code></dt>
@@ -867,14 +898,16 @@ qemu-kvm -net nic,model=? /dev/null
       A video device.
     </p>
 
-    <pre>
-      ...
-      <video>
-        <model type='vga' vram='8192' heads='1'>
-          <acceleration accel3d='yes' accel3d='yes'/>
-        </model>
-      </video>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <video>
+      <model type='vga' vram='8192' heads='1'>
+        <acceleration accel3d='yes' accel3d='yes'/>
+      </model>
+    </video>
+  </devices>
+  ...</pre>
 
     <dl>
       <dt><code>video</code></dt>
@@ -907,26 +940,27 @@ qemu-kvm -net nic,model=? /dev/null
       all classed as character devices and so represented using the same syntax.
     </p>
 
-    <pre>
-        ...
-        <parallel type='pty'>
-          <source path='/dev/pts/2'/>
-          <target port='0'/>
-        </parallel>
-        <serial type='pty'>
-          <source path='/dev/pts/3'/>
-          <target port='0'/>
-        </serial>
-        <console type='pty'>
-          <source path='/dev/pts/4'/>
-          <target port='0'/>
-        </console>
-        <channel type='unix'>
-          <source mode='bind' path='/tmp/guestfwd'/>
-          <target type='guestfwd' address='10.0.2.1' port='4600'/>
-        </channel>
-        </devices>
-      </domain></pre>
+<pre>
+  ...
+  <devices>
+    <parallel type='pty'>
+      <source path='/dev/pts/2'/>
+      <target port='0'/>
+    </parallel>
+    <serial type='pty'>
+      <source path='/dev/pts/3'/>
+      <target port='0'/>
+    </serial>
+    <console type='pty'>
+      <source path='/dev/pts/4'/>
+      <target port='0'/>
+    </console>
+    <channel type='unix'>
+      <source mode='bind' path='/tmp/guestfwd'/>
+      <target type='guestfwd' address='10.0.2.1' port='4600'/>
+    </channel>
+  </devices>
+  ...</pre>
 
     <p>
       In each of these directives, the top-level element name (parallel, serial,
@@ -949,13 +983,15 @@ qemu-kvm -net nic,model=? /dev/null
 
     <h6><a name="elementCharParallel">Parallel port</a></h6>
 
-    <pre>
-      ...
-      <parallel type='pty'>
-        <source path='/dev/pts/2'/>
-        <target port='0'/>
-      </parallel>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <parallel type='pty'>
+      <source path='/dev/pts/2'/>
+      <target port='0'/>
+    </parallel>
+  </devices>
+  ...</pre>
 
     <p>
       <code>target</code> can have a <code>port</code> attribute, which
@@ -965,13 +1001,15 @@ qemu-kvm -net nic,model=? /dev/null
 
     <h6><a name="elementCharSerial">Serial port</a></h6>
 
-    <pre>
-      ...
-      <serial type='pty'>
-        <source path='/dev/pts/3'/>
-        <target port='0'/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type='pty'>
+      <source path='/dev/pts/3'/>
+      <target port='0'/>
+    </serial>
+  </devices>
+  ...</pre>
 
     <p>
       <code>target</code> can have a <code>port</code> attribute, which
@@ -987,13 +1025,15 @@ qemu-kvm -net nic,model=? /dev/null
       virtualized guests without a paravirtualized console.
     </p>
 
-    <pre>
-      ...
-      <console type='pty'>
-        <source path='/dev/pts/4'/>
-        <target port='0'/>
-      </console>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <console type='pty'>
+      <source path='/dev/pts/4'/>
+      <target port='0'/>
+    </console>
+  </devices>
+  ...</pre>
 
     <p>
       If the console is presented as a serial port, the <code>target</code>
@@ -1008,13 +1048,15 @@ qemu-kvm -net nic,model=? /dev/null
       guest.
     </p>
 
-    <pre>
-      ...
-      <channel type='unix'>
-        <source mode='bind' path='/tmp/guestfwd'/>
-        <target type='guestfwd' address='10.0.2.1' port='4600'/>
-      </channel>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <channel type='unix'>
+      <source mode='bind' path='/tmp/guestfwd'/>
+      <target type='guestfwd' address='10.0.2.1' port='4600'/>
+    </channel>
+  </devices>
+  ...</pre>
 
     <p>
       This can be implemented in a variety of ways. The specific type of
@@ -1045,12 +1087,14 @@ qemu-kvm -net nic,model=? /dev/null
       into the virtual machine's logfile
     </p>
 
-    <pre>
-      ...
-      <console type='stdio'>
-        <target port='1'>
-      </console>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <console type='stdio'>
+      <target port='1'>
+    </console>
+  </devices>
+  ...</pre>
 
 
     <h6><a name="elementsCharFle">Device logfile</a></h6>
@@ -1060,13 +1104,15 @@ qemu-kvm -net nic,model=? /dev/null
       device is written to the file.
     </p>
 
-    <pre>
-      ...
-      <serial type="file">
-        <source path="/var/log/vm/vm-serial.log"/>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type="file">
+      <source path="/var/log/vm/vm-serial.log"/>
+      <target port="1"/>
+    </serial>
+  </devices>
+  ...</pre>
 
     <h6><a name="elementsCharVC">Virtual console</a></h6>
 
@@ -1076,12 +1122,14 @@ qemu-kvm -net nic,model=? /dev/null
       hotkey sequence such as "ctrl+alt+3"
     </p>
 
-    <pre>
-      ...
-      <serial type='vc'>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type='vc'>
+      <target port="1"/>
+    </serial>
+  </devices>
+  ...</pre>
 
     <h6><a name="elementsCharNull">Null device</a></h6>
 
@@ -1090,12 +1138,14 @@ qemu-kvm -net nic,model=? /dev/null
       provided to the input. All data written is discarded.
     </p>
 
-    <pre>
-      ...
-      <serial type='null'>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type='null'>
+      <target port="1"/>
+    </serial>
+  </devices>
+  ...</pre>
 
     <h6><a name="elementsCharPTY">Pseudo TTY</a></h6>
 
@@ -1105,13 +1155,15 @@ qemu-kvm -net nic,model=? /dev/null
       serial port locally.
     </p>
 
-    <pre>
-      ...
-      <serial type="pty">
-        <source path="/dev/pts/3"/>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type="pty">
+      <source path="/dev/pts/3"/>
+      <target port="1"/>
+    </serial>
+  </devices>
+  ...</pre>
 
     <p>
       NB special case if <console type='pty'>, then the TTY
@@ -1130,13 +1182,15 @@ qemu-kvm -net nic,model=? /dev/null
       port.
     </p>
 
-    <pre>
-      ...
-      <serial type="dev">
-        <source path="/dev/ttyS0"/>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type="dev">
+      <source path="/dev/ttyS0"/>
+      <target port="1"/>
+  </serial>
+  </devices>
+  ...</pre>
 
     <h6><a name="elementsCharPipe">Named pipe</a></h6>
 
@@ -1145,13 +1199,15 @@ qemu-kvm -net nic,model=? /dev/null
       more info.
     </p>
 
-    <pre>
-      ...
-      <serial type="pipe">
-        <source path="/tmp/mypipe"/>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type="pipe">
+      <source path="/tmp/mypipe"/>
+      <target port="1"/>
+    </serial>
+  </devices>
+  ...</pre>
 
     <h6><a name="elementsCharTCP">TCP client/server</a></h6>
 
@@ -1160,46 +1216,52 @@ qemu-kvm -net nic,model=? /dev/null
       remote server.
     </p>
 
-    <pre>
-      ...
-      <serial type="tcp">
-        <source mode="connect" host="0.0.0.0" service="2445"/>
-        <protocol type="raw"/>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type="tcp">
+      <source mode="connect" host="0.0.0.0" service="2445"/>
+      <protocol type="raw"/>
+      <target port="1"/>
+    </serial>
+  </devices>
+   ...</pre>
 
     <p>
       Or as a TCP server waiting for a client connection.
     </p>
 
-    <pre>
-      ...
-      <serial type="tcp">
-        <source mode="bind" host="127.0.0.1" service="2445"/>
-        <protocol type="raw"/>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type="tcp">
+      <source mode="bind" host="127.0.0.1" service="2445"/>
+      <protocol type="raw"/>
+      <target port="1"/>
+    </serial>
+  </devices>
+  ...</pre>
 
     <p>
       Alternatively you can use telnet instead of raw TCP.
     <p>
 
-    <pre>
-      ...
-      <serial type="tcp">
-        <source mode="connect" host="0.0.0.0" service="2445"/>
-        <protocol type="telnet"/>
-        <target port="1"/>
-      </serial>
-      ...
-      <serial type="tcp">
-        <source mode="bind" host="127.0.0.1" service="2445"/>
-        <protocol type="telnet"/>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type="tcp">
+      <source mode="connect" host="0.0.0.0" service="2445"/>
+      <protocol type="telnet"/>
+      <target port="1"/>
+    </serial>
+    ...
+    <serial type="tcp">
+      <source mode="bind" host="127.0.0.1" service="2445"/>
+      <protocol type="telnet"/>
+      <target port="1"/>
+    </serial>
+  </devices>
+  ...</pre>
 
     <h6><a name="elementsCharUDP">UDP network console</a></h6>
 
@@ -1208,14 +1270,16 @@ qemu-kvm -net nic,model=? /dev/null
       sending and receiving packets. This is a lossy service.
     </p>
 
-    <pre>
-      ...
-      <serial type="udp">
-        <source mode="bind" host="0.0.0.0" service="2445"/>
-        <source mode="connect" host="0.0.0.0" service="2445"/>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type="udp">
+      <source mode="bind" host="0.0.0.0" service="2445"/>
+      <source mode="connect" host="0.0.0.0" service="2445"/>
+      <target port="1"/>
+    </serial>
+  </devices>
+  ...</pre>
 
     <h6><a name="elementsCharUNIX">UNIX domain socket client/server</a></h6>
 
@@ -1224,13 +1288,15 @@ qemu-kvm -net nic,model=? /dev/null
       accepting connections from local clients.
     </p>
 
-    <pre>
-      ...
-      <serial type="unix">
-        <source mode="bind" path="/tmp/foo"/>
-        <target port="1"/>
-      </serial>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <serial type="unix">
+      <source mode="bind" path="/tmp/foo"/>
+      <target port="1"/>
+    </serial>
+  </devices>
+  ...</pre>
 
 
     <h4><a name="elementsSound">Sound devices</a></h4>
@@ -1240,10 +1306,12 @@ qemu-kvm -net nic,model=? /dev/null
       <code>sound</code> element. <span class="since">Since 0.4.3</span>
     </p>
 
-    <pre>
-      ...
-      <sound model='es1370'/>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <sound model='es1370'/>
+  </devices>
+  ...</pre>
 
     <dl>
       <dt><code>sound</code></dt>
@@ -1276,15 +1344,19 @@ qemu-kvm -net nic,model=? /dev/null
       libvirt.
     </p>
 
-    <pre>
-      ...
-      <watchdog model='i6300esb'/>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <watchdog model='i6300esb'/>
+  </devices>
+  ...</pre>
 
-    <pre>
-      ...
-      <watchdog model='i6300esb' action='poweroff'/>
-      ...</pre>
+<pre>
+  ...
+  <devices>
+    <watchdog model='i6300esb' action='poweroff'/>
+  </devices>
+</domain></pre>
 
     <dl>
       <dt><code>model</code></dt>
-- 
1.6.3.3




More information about the libvir-list mailing list