[libvirt] [PATCH] docs: fix network XML documentation

Laine Stump laine at laine.org
Fri Oct 14 18:40:50 UTC 2011


A few people have attempted to use the new forwarding modes with older
versions of libvirt. The docs where the modes are described have
always stated the minimum required libvirt version, but the examples
at the end didn't, which I believe is what has caused the confusion.

Similarly, the section on portgroups now has a version tag added at
the beginning.

I also noticed that there was no example of defining a <dns> hostname,
so I added one, as well as making the domain name example more
recognizable (by adding ".com" to the domain).
---
 docs/formatnetwork.html.in |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in
index 99031d0..e06392b 100644
--- a/docs/formatnetwork.html.in
+++ b/docs/formatnetwork.html.in
@@ -58,7 +58,7 @@
     <pre>
         ...
         <bridge name="virbr0" stp="on" delay="5"/>
-        <domain name="example"/>
+        <domain name="example.com"/>
         <forward mode="nat" dev="eth0"/>
         ...</pre>
 
@@ -214,7 +214,7 @@
         As mentioned above, a <code><forward></code> element can
         have multiple <code><interface></code> subelements, each
         one giving the name of a physical interface that can be used
-        for this network<span class="since">Since 0.9.4</span>:
+        for this network <span class="since">Since 0.9.4</span>:
         <pre>
 ...
   <forward mode='passthrough'>
@@ -301,9 +301,11 @@
 ...</pre>
 
     <p>
+      <span class="since">Since 0.9.4</span>
       A portgroup provides a method of easily putting guest
       connections to the network into different classes, with each
-      class potentially having a different level/type of service. Each
+      class potentially having a different level/type of service.
+      <span class="since">Since 0.9.4</span> Each
       network can have multiple portgroup elements (and one of those
       can optionally be designated as the 'default' portgroup for the
       network), and each portgroup has a name, as well as various
@@ -340,8 +342,12 @@
     <pre>
         ...
         <mac address='00:16:3E:5D:C7:9E'/>
+        <domain name="example.com"/>
         <dns>
           <txt name="example" value="example value" />
+          <host ip='192.168.122.2'>
+            <hostname>myhost</hostname>
+            <hostname>myhostalias</hostname>
         </dns>
         <ip address="192.168.122.1" netmask="255.255.255.0">
           <dhcp>
@@ -542,6 +548,7 @@
     <h3><a name="examplesBridge">Using an existing host bridge</a></h3>
 
     <p>
+      <span class="since">Since 0.9.4</span>
       This shows how to use a pre-existing host bridge "br0". The
       guests will effectively be directly connected to the physical
       network (i.e. their IP addresses will all be on the subnet of
@@ -559,6 +566,8 @@
     <h3><a name="examplesDirect">Using a macvtap "direct" connection</a></h3>
 
     <p>
+      <span class="since">Since 0.9.4, QEMU and KVM only, requires
+      Linux kernel 2.6.34 or newer</span>
       This shows how to use macvtap to connect to the physical network
       directly through one of a group of physical devices (without
       using a host bridge device). As with the host bridge network,
-- 
1.7.6.4




More information about the libvir-list mailing list