[libvirt] [PATCH 2/7] kvmtool: Add documents

Osier Yang jyang at redhat.com
Fri Nov 11 11:57:01 UTC 2011


The document is rather rough now, but at least contains an domain
config example of all the current supported XMLs, and tells how to
play with the driver.
---
 docs/drivers.html.in    |    1 +
 docs/drvkvmtool.html.in |   87 +++++++++++++++++++++++++++++++++++++++++++++++
 docs/index.html.in      |    3 ++
 docs/sitemap.html.in    |    4 ++
 src/README              |    3 +-
 5 files changed, 97 insertions(+), 1 deletions(-)
 create mode 100644 docs/drvkvmtool.html.in

diff --git a/docs/drivers.html.in b/docs/drivers.html.in
index 75038fc..249c137 100644
--- a/docs/drivers.html.in
+++ b/docs/drivers.html.in
@@ -29,6 +29,7 @@
       <li><strong><a href="drvvmware.html">VMware Workstation/Player</a></strong></li>
       <li><strong><a href="drvxen.html">Xen</a></strong></li>
       <li><strong><a href="drvhyperv.html">Microsoft Hyper-V</a></strong></li>
+      <li><strong><a href="drvkvmtool.html">Native Linux KVM Tool</a></strong></li>
     </ul>
 
     <h2><a name="stroage">Storage drivers</a></h2>
diff --git a/docs/drvkvmtool.html.in b/docs/drvkvmtool.html.in
new file mode 100644
index 0000000..1b6acdf
--- /dev/null
+++ b/docs/drvkvmtool.html.in
@@ -0,0 +1,87 @@
+<html>
+  <body>
+    <h1>KVM tool driver</h1>
+
+    <ul id="toc"></ul>
+
+    <p>
+      The libvirt KVMTOOL driver manages hypervisor Native Linux KVM Tool,
+      it's implemented by using command line of kvm tool binary.
+    </p>
+
+    <h2><a name="project">Project Links</a></h2>
+
+    <ul>
+      <li>
+        The <a href="git://github.com/penberg/linux-kvm.git">Native Linux KVM Tool</a> Native
+        Linux KVM Tool
+      </li>
+    </ul>
+
+    <h2><a name="uris">Connections to the KVMTOOL driver</a></h2>
+    <p>
+      The libvirt KVMTOOL driver is a multi-instance driver, providing a single
+      system wide privileged driver (the "system" instance), and per-user
+      unprivileged drivers (the "session" instance). The URI driver protocol
+      is "kvmtool". Some example conection URIs for the libvirt driver are:
+    </p>
+
+    <pre>
+      kvmtool:///session                      (local access to per-user instance)
+      kvmtool+unix:///session                 (local access to per-user instance)
+
+      kvmtool:///system                       (local access to system instance)
+      kvmtool+unix:///system                  (local access to system instance)
+    </pre>
+    <p>
+      cgroups controllers "cpuacct", and "memory" are supported currently.
+    </p>
+
+  <h3>Example config</h3>
+
+  <pre>
+<domain type='kvmtool' id='1'>
+  <name>vm</name>
+  <uuid>88bf38f1-b6ab-cfa6-ab53-4b4c0993d894</uuid>
+  <memory>524288</memory>
+  <currentMemory>524288</currentMemory>
+  <vcpu>1</vcpu>
+  <os>
+    <type arch='x86_64'>hvm</type>
+    <kernel>/var/lib/libvirt/images/bzImage</kernel>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>restart</on_crash>
+  <devices>
+    <emulator>/usr/bin/kvmtool</emulator>
+    <disk type='file' device='disk'>
+      <source file='/var/lib/libvirt/images/linux-0.2.img'/>
+      <target dev='vda' bus='virtio'/>
+    </disk>
+    <filesystem type='mount' accessmode='passthrough'>
+      <source dir='/tmp'/>
+      <target dir='/mnt'/>
+    </filesystem>
+    <console type='pty'/>
+      <target type='virtio' port='0'/>
+    </console>
+    <memballoon model='virtio'/>
+  </devices>
+</domain>
+  </pre>
+
+  <p>
+    virsh command examples:
+  </p>
+  <pre>
+    virsh --connect kvmtool:///system define vm.xml
+    virsh --connect kvmtool:///system start vm
+    virsh --connect kvmtool:///system destroy vm
+    virsh --connect kvmtool:///system undefine vm
+    virsh --connect kvmtool:///system console vm
+  </pre>
+  </body>
+</html>
diff --git a/docs/index.html.in b/docs/index.html.in
index c84eb1f..fcb7b1d 100644
--- a/docs/index.html.in
+++ b/docs/index.html.in
@@ -63,6 +63,9 @@
         The <a href="http://libvirt.org/drvhyperv.html">Microsoft Hyper-V</a> hypervisor
       </li>
       <li>
+        The <a href="http://libvirt.org/drvkvmtool.html">Native Linux KVM Tool</a> hypervisor
+      </li>
+      <li>
         Virtual networks using bridging, NAT, VEPA and VN-LINK.
       </li>
       <li>
diff --git a/docs/sitemap.html.in b/docs/sitemap.html.in
index 1de2b20..0816190 100644
--- a/docs/sitemap.html.in
+++ b/docs/sitemap.html.in
@@ -210,6 +210,10 @@
                 <a href="drvhyperv.html">Microsoft Hyper-V</a>
                 <span>Driver for Microsoft Hyper-V</span>
               </li>
+              <li>
+                <a href="drvkvmtool.html">Native Linux KVM Tool</a>
+                <span>Driver for Native Linux KVM Tool</span>
+              </li>
             </ul>
           </li>
           <li>
diff --git a/src/README b/src/README
index 00d11d1..de1720b 100644
--- a/src/README
+++ b/src/README
@@ -27,6 +27,7 @@ Then there are the hypervisor implementations:
 
  * esx/          - VMware ESX and GSX support using vSphere API over SOAP
  * hyperv/       - Microsoft Hyper-V support using WinRM
+ * kvm/          - Native Linux KVM Tool support using CLI
  * lxc/          - Linux Native Containers
  * openvz/       - OpenVZ containers using cli tools
  * phyp/         - IBM Power Hypervisor using CLI tools over SSH
@@ -41,7 +42,7 @@ Then there are the hypervisor implementations:
 
 
 Finally some secondary drivers that are shared for several HVs.
-Currently these are used by LXC, OpenVZ, QEMU, UML and Xen drivers.
+Currently these are used by LXC, OpenVZ, QEMU, UML, KVMTOOL, and Xen drivers.
 The ESX, Hyper-V, Power Hypervisor, Remote, Test & VirtualBox drivers all
 implement the secondary drivers directly
 
-- 
1.7.6




More information about the libvir-list mailing list