Commits

Kaspar Schiess  committed 20e2f42

Current version of the documentation site

  • Participants
  • Parent commits d30ff89

Comments (0)

Files changed (7)

File qemu-toolkit/README.1.html

-<!DOCTYPE html>
-<html>
-<head>
-  <meta http-equiv='content-type' value='text/html;charset=utf8'>
-  <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
-  <title>qemu-toolkit(1) - A toolkit for running qemu on Illumos / OmniOS</title>
-  <style type='text/css' media='all'>
-  /* style: man */
-  body#manpage {margin:0}
-  .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
-  .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
-  .mp h2 {margin:10px 0 0 0}
-  .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
-  .mp h3 {margin:0 0 0 4ex}
-  .mp dt {margin:0;clear:left}
-  .mp dt.flush {float:left;width:8ex}
-  .mp dd {margin:0 0 0 9ex}
-  .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
-  .mp pre {margin-bottom:20px}
-  .mp pre+h2,.mp pre+h3 {margin-top:22px}
-  .mp h2+pre,.mp h3+pre {margin-top:5px}
-  .mp img {display:block;margin:auto}
-  .mp h1.man-title {display:none}
-  .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
-  .mp h2 {font-size:16px;line-height:1.25}
-  .mp h1 {font-size:20px;line-height:2}
-  .mp {text-align:justify;background:#fff}
-  .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
-  .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
-  .mp u {text-decoration:underline}
-  .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
-  .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
-  .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
-  .mp b.man-ref {font-weight:normal;color:#434241}
-  .mp pre {padding:0 4ex}
-  .mp pre code {font-weight:normal;color:#434241}
-  .mp h2+pre,h3+pre {padding-left:0}
-  ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
-  ol.man-decor {width:100%}
-  ol.man-decor li.tl {text-align:left}
-  ol.man-decor li.tc {text-align:center;letter-spacing:4px}
-  ol.man-decor li.tr {text-align:right;float:right}
-  </style>
-  <style type='text/css' media='all'>
-  /* style: toc */
-  .man-navigation {display:block !important;position:fixed;top:0;left:113ex;height:100%;width:100%;padding:48px 0 0 0;border-left:1px solid #dbdbdb;background:#eee}
-  .man-navigation a,.man-navigation a:hover,.man-navigation a:link,.man-navigation a:visited {display:block;margin:0;padding:5px 2px 5px 30px;color:#999;text-decoration:none}
-  .man-navigation a:hover {color:#111;text-decoration:underline}
-  </style>
-</head>
-<!--
-  The following styles are deprecated and will be removed at some point:
-  div#man, div#man ol.man, div#man ol.head, div#man ol.man.
-
-  The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
-  .man-navigation should be used instead.
--->
-<body id='manpage'>
-  <div class='mp' id='man'>
-
-  <div class='man-navigation' style='display:none'>
-    <a href="#NAME">NAME</a>
-    <a href="#SYNOPSIS">SYNOPSIS</a>
-    <a href="#OVERVIEW">OVERVIEW</a>
-    <a href="#DEPLOYMENT-OPTIONS">DEPLOYMENT OPTIONS</a>
-    <a href="#PREREQUISITES">PREREQUISITES</a>
-    <a href="#SEE-ALSO">SEE ALSO</a>
-    <a href="#AUTHORS">AUTHORS</a>
-  </div>
-
-  <ol class='man-decor man-head man head'>
-    <li class='tl'>qemu-toolkit(1)</li>
-    <li class='tc'>qemu-toolkit</li>
-    <li class='tr'>qemu-toolkit(1)</li>
-  </ol>
-
-  <h2 id="NAME">NAME</h2>
-<p class="man-name">
-  <code>qemu-toolkit</code> - <span class="man-whatis">A toolkit for running qemu on Illumos / OmniOS</span>
-</p>
-
-<h2 id="SYNOPSIS">SYNOPSIS</h2>
-
-<p>qemu-toolkit is a small set of scripts to control QEMU kvm virtualised
-machines on a set of illumos hosts. Have a look at 'storadm' and
-'vmadm' - inline help will show you the possibilities.</p>
-
-<h2 id="OVERVIEW">OVERVIEW</h2>
-
-<p>This is the toolkit for running qemu on OmniOS/Illumos. Features:</p>
-
-<ul>
-<li>Run VMs based on local zvols</li>
-<li>Run VMs based on iSCSI targets</li>
-<li>Fully use QEMUs options (through a nifty Ruby DSL)</li>
-<li>Automatic network configuration based on vnics</li>
-<li>Using vnics confined to VLANs</li>
-<li>Secure VNC channel through unix socket</li>
-<li>Access to VM monitor and serial console</li>
-</ul>
-
-
-<p>Here's a sample configuration file:</p>
-
-<pre><code>virtual_machine "vm_name" do
-  # Network configuration: vnic via igb1
-  nic 'eth0', macaddr: '2:8:20:52:a6:7e', via: 'igb1'
-
-  # Disks: via iSCSI iqn
-  iscsi_target 'iqn.2010-01.com.qemu-toolkit:vm_name', "10.0.30.1"
-
-  # 4 SMP CPUs.
-  cpus 4
-end
-</code></pre>
-
-<p>On-disk layout is as follows:</p>
-
-<pre><code>foo                 base zfs dataset
-foo/disk1           first disk, zvol block device
-foo/disk2           second disk, zvol block device
-</code></pre>
-
-<h2 id="DEPLOYMENT-OPTIONS">DEPLOYMENT OPTIONS</h2>
-
-<p>Using this toolkit, you can deploy your virtual machines in one of two ways:</p>
-
-<ul>
-<li>All-local, using zvols</li>
-<li>SAN-style, using iSCSI based block devices mapping to zvols</li>
-</ul>
-
-
-<h3 id="Local-ZVOLs">Local ZVOLs</h3>
-
-<p>In this architectural style, you use both tools (<a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a> and <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a>) on
-the same machine. To create a virtual machine from scratch, you would use the
-following sequence of commands:</p>
-
-<pre><code>$ storadm create pool1/foo 10G
-$ vmadm create foo
-$ vmadm start foo --bootiso=installation-disk.iso
-</code></pre>
-
-<p>This would create a base dataset pool1/foo with one 10G block device as root
-disk. It then creates a file <code>foo.rb</code> below <code>/etc/qemu-toolkit/</code> that defines
-base attributes for the virtual machine. Finally, starting the machine using
-the <code>--bootiso</code> parameter would allow you to install a base system to the virtual
-machine.</p>
-
-<h3 id="SAN-style">SAN-style</h3>
-
-<p>Here you use two machines, one as storage host and one as VM host. The virtual
-machines run on host A, but all storage is provided for by host B. Here's a
-typical sequence of commands to create a virtual machine from scratch in this
-scenario:</p>
-
-<pre><code>B $ storadm create pool1/foo 10G
-B $ storadm export pool1/foo
-
-A $ vmadm create foo
-# Edit foo.rb at this point to include a valid iqn + IP pair for host B
-A $ vmadm start foo --bootiso=installation-disk.iso
-</code></pre>
-
-<p>This assumes that you've got iSCSI set up on both machines. (initiator on A,
-target on B) While this configuration is certainly more complex than the
-all-local one above, it is also more flexible to administer.</p>
-
-<h2 id="PREREQUISITES">PREREQUISITES</h2>
-
-<p>For this to run, you need at least one physical host running
-<a href="http://omnios.omniti.com/">OmniOS</a> or another
-<a href="https://en.wikipedia.org/wiki/Illumos">Illumos</a>-based distro. The host needs
-to support VT/x extensions to be able to run KVM-based virtualisation. Also,
-some basic working knowledge of Illumos is of help.</p>
-
-<h2 id="SEE-ALSO">SEE ALSO</h2>
-
-<p><a class="man-ref" href="qemu-toolkit-overview.7.html">qemu-toolkit-overview<span class="s">(7)</span></a>, <a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a>, <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a></p>
-
-<h2 id="AUTHORS">AUTHORS</h2>
-
-<p>Copyright (c) 2012 Kaspar Schiess. Distribution under a MIT license:</p>
-
-<p>Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:</p>
-
-<p>The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.</p>
-
-<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.</p>
-
-
-  <ol class='man-decor man-foot man foot'>
-    <li class='tl'>Kaspar Schiess, Technology Astronauts GmbH</li>
-    <li class='tc'>November 2012</li>
-    <li class='tr'>qemu-toolkit(1)</li>
-  </ol>
-
-  </div>
-</body>
-</html>

File qemu-toolkit/README.7.html

+<!DOCTYPE html>
+<html>
+<head>
+  <meta http-equiv='content-type' value='text/html;charset=utf8'>
+  <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
+  <title>qemu-toolkit(7) - A toolkit for running qemu on Illumos / OmniOS</title>
+  <style type='text/css' media='all'>
+  /* style: man */
+  body#manpage {margin:0}
+  .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
+  .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
+  .mp h2 {margin:10px 0 0 0}
+  .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
+  .mp h3 {margin:0 0 0 4ex}
+  .mp dt {margin:0;clear:left}
+  .mp dt.flush {float:left;width:8ex}
+  .mp dd {margin:0 0 0 9ex}
+  .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
+  .mp pre {margin-bottom:20px}
+  .mp pre+h2,.mp pre+h3 {margin-top:22px}
+  .mp h2+pre,.mp h3+pre {margin-top:5px}
+  .mp img {display:block;margin:auto}
+  .mp h1.man-title {display:none}
+  .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
+  .mp h2 {font-size:16px;line-height:1.25}
+  .mp h1 {font-size:20px;line-height:2}
+  .mp {text-align:justify;background:#fff}
+  .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
+  .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
+  .mp u {text-decoration:underline}
+  .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
+  .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
+  .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
+  .mp b.man-ref {font-weight:normal;color:#434241}
+  .mp pre {padding:0 4ex}
+  .mp pre code {font-weight:normal;color:#434241}
+  .mp h2+pre,h3+pre {padding-left:0}
+  ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
+  ol.man-decor {width:100%}
+  ol.man-decor li.tl {text-align:left}
+  ol.man-decor li.tc {text-align:center;letter-spacing:4px}
+  ol.man-decor li.tr {text-align:right;float:right}
+  </style>
+  <style type='text/css' media='all'>
+  /* style: toc */
+  .man-navigation {display:block !important;position:fixed;top:0;left:113ex;height:100%;width:100%;padding:48px 0 0 0;border-left:1px solid #dbdbdb;background:#eee}
+  .man-navigation a,.man-navigation a:hover,.man-navigation a:link,.man-navigation a:visited {display:block;margin:0;padding:5px 2px 5px 30px;color:#999;text-decoration:none}
+  .man-navigation a:hover {color:#111;text-decoration:underline}
+  </style>
+</head>
+<!--
+  The following styles are deprecated and will be removed at some point:
+  div#man, div#man ol.man, div#man ol.head, div#man ol.man.
+
+  The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
+  .man-navigation should be used instead.
+-->
+<body id='manpage'>
+  <div class='mp' id='man'>
+
+  <div class='man-navigation' style='display:none'>
+    <a href="#NAME">NAME</a>
+    <a href="#SYNOPSIS">SYNOPSIS</a>
+    <a href="#INSTALLATION">INSTALLATION</a>
+    <a href="#CONTRIBUTE">CONTRIBUTE</a>
+    <a href="#SEE-ALSO">SEE ALSO</a>
+    <a href="#AUTHORS">AUTHORS</a>
+    <a href="#COPYRIGHT">COPYRIGHT</a>
+  </div>
+
+  <ol class='man-decor man-head man head'>
+    <li class='tl'>qemu-toolkit(7)</li>
+    <li class='tc'>qemu-toolkit</li>
+    <li class='tr'>qemu-toolkit(7)</li>
+  </ol>
+
+  <h2 id="NAME">NAME</h2>
+<p class="man-name">
+  <code>qemu-toolkit</code> - <span class="man-whatis">A toolkit for running qemu on Illumos / OmniOS</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p>qemu-toolkit is a small set of scripts to control QEMU kvm virtualised
+machines on a set of illumos hosts. Have a look at 'storadm' and
+'vmadm' - inline help will show you the possibilities.</p>
+
+<h2 id="INSTALLATION">INSTALLATION</h2>
+
+<p>qemu-toolkit is a Ruby gem. This means you can install it with one simple
+command:</p>
+
+<pre><code>gem install qemu-toolkit
+</code></pre>
+
+<p>For full installation instructions, please see <a class="man-ref" href="qemu-toolkit-install.7.html">qemu-toolkit-install<span class="s">(7)</span></a>.</p>
+
+<h2 id="CONTRIBUTE">CONTRIBUTE</h2>
+
+<p>This project is hosted on
+<a href="https://bitbucket.org/kschiess/qemu-toolkit/src">bitbucket</a>. An issue tracker
+is available at
+<a href="https://bitbucket.org/kschiess/qemu-toolkit/issues">bitbucket</a>.</p>
+
+<p>We value all contributions, provided they</p>
+
+<ul>
+<li>are tested and have a clear rationale</li>
+<li>are generally useful</li>
+<li>come as a clean changeset (pull request or email patch)</li>
+</ul>
+
+
+<p>Discussion regarding this project via 'qemutoolkit' mailing list. Subscribe by
+sending any kind of message to this
+<a href="mailto:qemutoolkit@librelist.com">address</a>.</p>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p><a class="man-ref" href="qemu-toolkit-overview.7.html">qemu-toolkit-overview<span class="s">(7)</span></a>, <a class="man-ref" href="qemu-toolkit-install.7.html">qemu-toolkit-install<span class="s">(7)</span></a>,
+<a class="man-ref" href="qemu-toolkit-configuration.7.html">qemu-toolkit-configuration<span class="s">(7)</span></a>, <a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a>, <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a>, <a class="man-ref" href="README.7.html">README<span class="s">(7)</span></a></p>
+
+<h2 id="AUTHORS">AUTHORS</h2>
+
+<p>Copyright (c) 2012 Kaspar Schiess.</p>
+
+<h2 id="COPYRIGHT">COPYRIGHT</h2>
+
+<p>This tool is under a MIT license. Please see the LICENSE file in the original
+source.</p>
+
+
+  <ol class='man-decor man-foot man foot'>
+    <li class='tl'></li>
+    <li class='tc'>November 2012</li>
+    <li class='tr'>qemu-toolkit(7)</li>
+  </ol>
+
+  </div>
+</body>
+</html>

File qemu-toolkit/qemu-toolkit-configuration.7.html

+<!DOCTYPE html>
+<html>
+<head>
+  <meta http-equiv='content-type' value='text/html;charset=utf8'>
+  <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
+  <title>qemu-toolkit-configuration(7) - configuration for qemu-toolkit</title>
+  <style type='text/css' media='all'>
+  /* style: man */
+  body#manpage {margin:0}
+  .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
+  .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
+  .mp h2 {margin:10px 0 0 0}
+  .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
+  .mp h3 {margin:0 0 0 4ex}
+  .mp dt {margin:0;clear:left}
+  .mp dt.flush {float:left;width:8ex}
+  .mp dd {margin:0 0 0 9ex}
+  .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
+  .mp pre {margin-bottom:20px}
+  .mp pre+h2,.mp pre+h3 {margin-top:22px}
+  .mp h2+pre,.mp h3+pre {margin-top:5px}
+  .mp img {display:block;margin:auto}
+  .mp h1.man-title {display:none}
+  .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
+  .mp h2 {font-size:16px;line-height:1.25}
+  .mp h1 {font-size:20px;line-height:2}
+  .mp {text-align:justify;background:#fff}
+  .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
+  .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
+  .mp u {text-decoration:underline}
+  .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
+  .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
+  .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
+  .mp b.man-ref {font-weight:normal;color:#434241}
+  .mp pre {padding:0 4ex}
+  .mp pre code {font-weight:normal;color:#434241}
+  .mp h2+pre,h3+pre {padding-left:0}
+  ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
+  ol.man-decor {width:100%}
+  ol.man-decor li.tl {text-align:left}
+  ol.man-decor li.tc {text-align:center;letter-spacing:4px}
+  ol.man-decor li.tr {text-align:right;float:right}
+  </style>
+  <style type='text/css' media='all'>
+  /* style: toc */
+  .man-navigation {display:block !important;position:fixed;top:0;left:113ex;height:100%;width:100%;padding:48px 0 0 0;border-left:1px solid #dbdbdb;background:#eee}
+  .man-navigation a,.man-navigation a:hover,.man-navigation a:link,.man-navigation a:visited {display:block;margin:0;padding:5px 2px 5px 30px;color:#999;text-decoration:none}
+  .man-navigation a:hover {color:#111;text-decoration:underline}
+  </style>
+</head>
+<!--
+  The following styles are deprecated and will be removed at some point:
+  div#man, div#man ol.man, div#man ol.head, div#man ol.man.
+
+  The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
+  .man-navigation should be used instead.
+-->
+<body id='manpage'>
+  <div class='mp' id='man'>
+
+  <div class='man-navigation' style='display:none'>
+    <a href="#NAME">NAME</a>
+    <a href="#SYNTAX">SYNTAX</a>
+    <a href="#SEE-ALSO">SEE ALSO</a>
+  </div>
+
+  <ol class='man-decor man-head man head'>
+    <li class='tl'>qemu-toolkit-configuration(7)</li>
+    <li class='tc'>qemu-toolkit</li>
+    <li class='tr'>qemu-toolkit-configuration(7)</li>
+  </ol>
+
+  <h2 id="NAME">NAME</h2>
+<p class="man-name">
+  <code>qemu-toolkit-configuration</code> - <span class="man-whatis">configuration for qemu-toolkit</span>
+</p>
+
+<h2 id="SYNTAX">SYNTAX</h2>
+
+<p>The tool <code>vmadm</code> reads all files ending in <code>.rb</code> from <code>/etc/qemu-toolkit</code> on
+startup. It expects these Ruby scripts to define virtual machines using the
+syntax defined below.</p>
+
+<h3 id="basic-vm-definition">basic vm definition</h3>
+
+<p>A virtual machine definition is written in a Ruby-DSL and looks like this:</p>
+
+<pre><code>virtual_machine "myvm" do
+  # Options go here! You'd need at least one disk to start.
+end
+</code></pre>
+
+<p>Since the definition is Ruby, nothing stops you from doing more complicated
+things like connecting to a database or generating definitions using method
+calls. Here's an example we've used in the wild:</p>
+
+<pre><code>def lan name, mac
+  virtual_machine(name) do
+    nic 'eth0', macaddr: mac, via: 'lan0'
+  end
+end
+
+# Allows for very short VM definitions:
+lan 'vm1', '1:8:20:52:a6:7e'
+</code></pre>
+
+<h3 id="available-options">available options</h3>
+
+<p>Here's a list of configuration options within the virtual_machine declaration:</p>
+
+<dl>
+<dt>cpus <var>NUMBER</var></dt><dd><p>Configures the number of SMP cpus simulated to the guest system.
+You should not configure more SMP cpus than you have physical CPU cores
+available.</p>
+
+<pre><code># configures 4 SMP cpus
+cpus 4      
+</code></pre></dd>
+<dt>disk <var>DEVICE_PATH</var></dt><dd><p>Add a disk drive to the guest system. <var>DEVICE_PATH</var> should be the
+quoted full path to a block device.</p>
+
+<p>This is a macro that will define a <code>virtio</code>-device and automatically number
+your drives from 0 to N. If you're looking for more immediate control
+over qemu options, use the <code>drive</code>-option.</p>
+
+<pre><code># Use a zvol block device
+disk '/dev/zvol/dsk/pool1/myvm/disk1'
+</code></pre></dd>
+<dt>drive <var>OPTIONS</var></dt><dd><p>Directly add a drive directive to qemu options. If you use this, you'll
+need to provide all key-value pairs for the directive as a Ruby hash. Note
+that if you do not specify 'index', your drive will get the next free disk
+index. (as is the case with <code>disk</code>) For the full list of options, please
+refer to the <a href="http://qemu.weilnetz.de/qemu-doc.html">QEMU documentation</a>.</p>
+
+<pre><code># Manual drive configuration:
+drive if: 'floppy', file: 'floppy.dsk'
+</code></pre></dd>
+<dt>net <var>TYPE</var>, <var>OPTIONS</var></dt><dd><p>Manual network configuration. This gives you full access to QEMU options,
+with the disadvantage of a slightly more complicated set of options.
+Here's what you would need to do to duplicate the convencience macro <code>nic</code>
+below:</p>
+
+<pre><code>net :vnic, vlan: 1, name: 'vm1', ifname: 'vm1', 
+  macaddr: '1:8:20:52:a6:7e'
+net :nic, vlan: 1, name: "vm1", model: "virtio", 
+  macaddr: '1:8:20:52:a6:7e'
+</code></pre></dd>
+<dt>nic <var>NAME</var>, <var>OPTIONS</var></dt><dd><p>Add a virtual network card to the guest. Virtual network cards are made
+to correspond to vnic links on the host system. These vnic links are
+automatically generated for you, all you have to do is to specify a <code>via:</code>
+option here.</p>
+
+<p>The <code>via:</code> option takes either physical links or etherstub switches as
+value.
+You can also specify a VLAN tag, separated by a colon. (ie: e1000g0:4)</p>
+
+<p>nic <code>model:</code> will default to <code>virtio</code>.</p>
+
+<p>NOTE: QEMU/kvm on Illumos will default to providing a single pseudo-nic
+that has a DHCP server attached to it by default. If you do not specify
+a <code>nic</code>, this is what you'll get.</p>
+
+<pre><code># Create eth0 interface with given mac address via 'igb1'.
+nic 'eth0', macaddr: '2:8:20:52:a6:7e', via: 'igb1'
+</code></pre></dd>
+<dt>ram <var>MEGABYTES</var></dt><dd><p>Configures the amount of RAM the guest system sees. Note that the qemu
+on Illumos locks memory down for the guest and never swaps it out. This
+means that you cannot simulate RAM you don't have available. (free)</p>
+
+<pre><code># One gigabyte of RAM should be enough for everyone. (default)
+ram 1024
+</code></pre></dd>
+<dt>vnc <var>PORT</var></dt><dd><p>Enables VNC server on port <var>PORT</var>. Caution: This will listen for
+connections from all networks and allow unauthorized access to the guests
+console. Don't use this in real world deployments. Instead, use <code>vmadm
+console</code> or connect directly to the unix socket using socat.</p>
+
+<pre><code># Make vnc listen on a given port: (5900 + display = tcp/ip port)
+vnc_display 0
+</code></pre></dd>
+<dt>extra_arg <var>ARGUMENT</var></dt><dd><p>Extra argument for QEMU, appended to the QEMU command line on launch. If
+you'd like to do something that you cannot achieve with the above options,
+this is your last resort.</p>
+
+<p>Note that we're interested in extending the DSL for common use cases, so
+you might want to mention your extra_arg usage on the mailing list and
+get proper treatment from qemu-toolkit.</p>
+
+<pre><code># Arguments that are appended to the qemu launch command line: 
+extra_arg '-foo'
+</code></pre></dd>
+</dl>
+
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p><a class="man-ref" href="qemu-toolkit-overview.7.html">qemu-toolkit-overview<span class="s">(7)</span></a>, <a class="man-ref" href="qemu-toolkit-install.7.html">qemu-toolkit-install<span class="s">(7)</span></a>,
+<a class="man-ref" href="qemu-toolkit-configuration.7.html">qemu-toolkit-configuration<span class="s">(7)</span></a>, <a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a>, <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a>, <a class="man-ref" href="README.7.html">README<span class="s">(7)</span></a></p>
+
+
+  <ol class='man-decor man-foot man foot'>
+    <li class='tl'></li>
+    <li class='tc'>November 2012</li>
+    <li class='tr'>qemu-toolkit-configuration(7)</li>
+  </ol>
+
+  </div>
+</body>
+</html>

File qemu-toolkit/qemu-toolkit-install.7.html

+<!DOCTYPE html>
+<html>
+<head>
+  <meta http-equiv='content-type' value='text/html;charset=utf8'>
+  <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
+  <title>qemu-toolkit-install(7) - installations instructions for the qemu-toolkit</title>
+  <style type='text/css' media='all'>
+  /* style: man */
+  body#manpage {margin:0}
+  .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
+  .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
+  .mp h2 {margin:10px 0 0 0}
+  .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
+  .mp h3 {margin:0 0 0 4ex}
+  .mp dt {margin:0;clear:left}
+  .mp dt.flush {float:left;width:8ex}
+  .mp dd {margin:0 0 0 9ex}
+  .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
+  .mp pre {margin-bottom:20px}
+  .mp pre+h2,.mp pre+h3 {margin-top:22px}
+  .mp h2+pre,.mp h3+pre {margin-top:5px}
+  .mp img {display:block;margin:auto}
+  .mp h1.man-title {display:none}
+  .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
+  .mp h2 {font-size:16px;line-height:1.25}
+  .mp h1 {font-size:20px;line-height:2}
+  .mp {text-align:justify;background:#fff}
+  .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
+  .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
+  .mp u {text-decoration:underline}
+  .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
+  .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
+  .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
+  .mp b.man-ref {font-weight:normal;color:#434241}
+  .mp pre {padding:0 4ex}
+  .mp pre code {font-weight:normal;color:#434241}
+  .mp h2+pre,h3+pre {padding-left:0}
+  ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
+  ol.man-decor {width:100%}
+  ol.man-decor li.tl {text-align:left}
+  ol.man-decor li.tc {text-align:center;letter-spacing:4px}
+  ol.man-decor li.tr {text-align:right;float:right}
+  </style>
+  <style type='text/css' media='all'>
+  /* style: toc */
+  .man-navigation {display:block !important;position:fixed;top:0;left:113ex;height:100%;width:100%;padding:48px 0 0 0;border-left:1px solid #dbdbdb;background:#eee}
+  .man-navigation a,.man-navigation a:hover,.man-navigation a:link,.man-navigation a:visited {display:block;margin:0;padding:5px 2px 5px 30px;color:#999;text-decoration:none}
+  .man-navigation a:hover {color:#111;text-decoration:underline}
+  </style>
+</head>
+<!--
+  The following styles are deprecated and will be removed at some point:
+  div#man, div#man ol.man, div#man ol.head, div#man ol.man.
+
+  The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
+  .man-navigation should be used instead.
+-->
+<body id='manpage'>
+  <div class='mp' id='man'>
+
+  <div class='man-navigation' style='display:none'>
+    <a href="#NAME">NAME</a>
+    <a href="#PREREQUISITES">PREREQUISITES</a>
+    <a href="#INSTALLATION">INSTALLATION</a>
+    <a href="#FIRST-STEPS">FIRST STEPS</a>
+    <a href="#SEE-ALSO">SEE ALSO</a>
+  </div>
+
+  <ol class='man-decor man-head man head'>
+    <li class='tl'>qemu-toolkit-install(7)</li>
+    <li class='tc'>qemu-toolkit</li>
+    <li class='tr'>qemu-toolkit-install(7)</li>
+  </ol>
+
+  <h2 id="NAME">NAME</h2>
+<p class="man-name">
+  <code>qemu-toolkit-install</code> - <span class="man-whatis">installations instructions for the qemu-toolkit</span>
+</p>
+
+<h2 id="PREREQUISITES">PREREQUISITES</h2>
+
+<p>For this to run, you need at least one physical host running
+<a href="http://omnios.omniti.com/">OmniOS</a> or another
+<a href="https://en.wikipedia.org/wiki/Illumos">Illumos</a>-based distro. The host needs
+to support VT/x extensions to be able to run KVM-based virtualisation. Also,
+some basic working knowledge of Illumos is of help.</p>
+
+<h2 id="INSTALLATION">INSTALLATION</h2>
+
+<p>These instructions assume that you install on a clean OmniOS machine. If you
+use another distribution, your mileage may vary. If you have first-hand
+experience on other distributions of Illumos, we'd be interested to hear from
+you!</p>
+
+<h3 id="RVM-Ruby">RVM &amp; Ruby</h3>
+
+<p>Install packages needed to build Ruby:</p>
+
+<pre><code>pkg install git autoconf gnu-m4 gnu-make gcc-3 gnu-patch \
+lint system/header header-math gnu-coreutils readline \
+gnu-binutils gnu-tar developer/linker
+</code></pre>
+
+<p>Then make sure that you have <code>/usr/sfw/bin</code> in your PATH and that your
+linker is functional.</p>
+
+<p>Install YAML:</p>
+
+<pre><code>wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
+tar xzvf yaml-0.1.4.tar.gz
+cd yaml-0.1.4
+./configure --prefix=/usr
+make 
+make install
+</code></pre>
+
+<p>Then Ruby (via RVM):</p>
+
+<pre><code>curl -L https://get.rvm.io | bash -s stable --ruby
+</code></pre>
+
+<p>Please see the RVM <a href="https://rvm.io/">website</a> for more information.</p>
+
+<h3 id="-socat-">'socat'</h3>
+
+<p>socat is a tool that connects different types of sockets together. The
+qemu-toolkit toolchain uses it to make VNC and VM monitor available.</p>
+
+<pre><code>wget --no-check-certificate http://bit.ly/TwNMrJ -O socat-1.7.1.3.tar.gz
+tar xzvf socat-1.7.1.3.tar.gz
+cd socat-1.7.1.3
+# PATCH for this to work: cat patch.txt | patch
+./configure
+make
+make install
+</code></pre>
+
+<p>Note that the above installation only succeeds if you patch socat using this
+patch:</p>
+
+<pre><code>--- sysincludes.h.orig  2012-09-03 16:59:09.351904279 +0000
++++ sysincludes.h       2012-09-03 16:59:54.388720160 +0000
+@@ -131,6 +131,8 @@
+ #include &lt;netpacket/packet.h&gt;
+ #endif
+ #if HAVE_NETINET_IF_ETHER_H
++#include &lt;net/if.h&gt;
++#include &lt;netinet/in.h&gt;
+ #include &lt;netinet/if_ether.h&gt;
+ #endif
+ #if HAVE_LINUX_IF_TUN_H
+</code></pre>
+
+<h3 id="iSCSI-target">iSCSI target</h3>
+
+<p>If you want to use the machine as iSCSI target (as a storage provider), you'll
+need to do at least this:</p>
+
+<pre><code>pkg install network/iscsi/target
+svcadm enable -r svc:/network/iscsi/target:default
+</code></pre>
+
+<p>The tools expect a target portal group named <code>frontend</code>. To create it, use
+something like the following command, where <var>IP</var> must be an TCP/IP address
+of the host you're doing this for:</p>
+
+<pre><code>itadm create-tpg frontend IP
+</code></pre>
+
+<h3 id="QEMU-KVM">QEMU / KVM</h3>
+
+<p>For qemu to work properly, you must make sure that you have at least as much
+swap space as you have RAM. Default configuration only gives you 4GB of swap.
+To fix this, do something like the following: (assumes that you've got 30GB of
+RAM)</p>
+
+<pre><code>zfs set volsize=30G rpool/swap
+</code></pre>
+
+<p>Also, perhaps obviously, you will need to load the kvm kernel driver. This is
+accomplished by</p>
+
+<pre><code>add_drv kvm
+</code></pre>
+
+<p>You will want to reboot the machine after these two steps for two reasons:
+Sometimes loading <code>kvm</code> interferes with reboot behaviour, you'll want to know
+that before you continue. And swap resizing takes effect on reboot only.</p>
+
+<h3 id="qemu-toolkit">qemu-toolkit</h3>
+
+<p>Once you've done all this, you're ready to install <code>qemu-toolkit</code>. Simply:</p>
+
+<pre><code>gem install qemu-toolkit
+</code></pre>
+
+<p>You should now have <code>vmadm</code> and <code>storadm</code> in your path.</p>
+
+<h2 id="FIRST-STEPS">FIRST STEPS</h2>
+
+<p>Create a block device for your virtual machine. Assuming you want to create
+it on <var>POOL</var>:</p>
+
+<pre><code>storadm create POOL/myvm 10G
+</code></pre>
+
+<p>This should create a dataset called <var>POOL</var><code>/myvm</code> and a subordinate zvol
+called 'disk1'. Let's connect a virtual machine to that disk:</p>
+
+<pre><code>vmadm create myvm
+</code></pre>
+
+<p>This will create a configuration file called <code>/etc/qemu-toolkit/myvm.rb</code>.
+Feel free to edit this. Once you've customized it to your liking, start the
+virtual machine and boot from an <var>ISO</var> image:</p>
+
+<pre><code>vmadm start myvm --bootiso=ISO
+</code></pre>
+
+<p>If you're interested in configuring your virtual machine (qemu), please see
+<a class="man-ref" href="qemu-toolkit-configuration.7.html">qemu-toolkit-configuration<span class="s">(7)</span></a>.</p>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p><a class="man-ref" href="qemu-toolkit-overview.7.html">qemu-toolkit-overview<span class="s">(7)</span></a>, <a class="man-ref" href="qemu-toolkit-install.7.html">qemu-toolkit-install<span class="s">(7)</span></a>,
+<a class="man-ref" href="qemu-toolkit-configuration.7.html">qemu-toolkit-configuration<span class="s">(7)</span></a>, <a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a>, <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a>, <a class="man-ref" href="README.7.html">README<span class="s">(7)</span></a></p>
+
+
+  <ol class='man-decor man-foot man foot'>
+    <li class='tl'></li>
+    <li class='tc'>November 2012</li>
+    <li class='tr'>qemu-toolkit-install(7)</li>
+  </ol>
+
+  </div>
+</body>
+</html>

File qemu-toolkit/qemu-toolkit-overview.7.html

 <head>
   <meta http-equiv='content-type' value='text/html;charset=utf8'>
   <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
-  <title>qemu-toolkit-overview(7) - Configuration overview for qemu-toolkit</title>
+  <title>qemu-toolkit-overview(7) - architecture and philosophy of qemu-toolkit</title>
   <style type='text/css' media='all'>
   /* style: man */
   body#manpage {margin:0}
 
   <div class='man-navigation' style='display:none'>
     <a href="#NAME">NAME</a>
+    <a href="#OVERVIEW">OVERVIEW</a>
+    <a href="#DEPLOYMENT-OPTIONS">DEPLOYMENT OPTIONS</a>
     <a href="#SEE-ALSO">SEE ALSO</a>
   </div>
 
 
   <h2 id="NAME">NAME</h2>
 <p class="man-name">
-  <code>qemu-toolkit-overview</code> - <span class="man-whatis">Configuration overview for qemu-toolkit</span>
+  <code>qemu-toolkit-overview</code> - <span class="man-whatis">architecture and philosophy of qemu-toolkit</span>
 </p>
 
+<h2 id="OVERVIEW">OVERVIEW</h2>
+
+<p>This is a toolkit for running qemu on OmniOS/Illumos. Features:</p>
+
+<ul>
+<li>VMs based on local zvols</li>
+<li>VMs based on iSCSI targets</li>
+<li>Full access to QEMUs options (through a nifty Ruby DSL)</li>
+<li>Automatic vnic creation, supports VLAN tags</li>
+<li>Secure VNC channel through unix socket</li>
+<li>Access to VM monitor and serial console</li>
+</ul>
+
+
+<p>Here's a sample configuration file:</p>
+
+<pre><code>virtual_machine "vm_name" do
+  # Network configuration: vnic via igb1
+  nic 'eth0', macaddr: '2:8:20:52:a6:7e', via: 'igb1'
+
+  # Disks: via iSCSI iqn
+  iscsi_target 'iqn.2010-01.com.qemu-toolkit:vm_name', "10.0.30.1"
+
+  # 4 SMP CPUs.
+  cpus 4
+end
+</code></pre>
+
+<p>On-disk layout is as follows:</p>
+
+<pre><code>foo                 base zfs dataset
+foo/disk1           first disk, zvol block device
+foo/disk2           second disk, zvol block device
+</code></pre>
+
+<h2 id="DEPLOYMENT-OPTIONS">DEPLOYMENT OPTIONS</h2>
+
+<p>Using this toolkit, you can deploy your virtual machines in one of two ways:</p>
+
+<ul>
+<li>All-local, using zvols</li>
+<li>SAN-style, using iSCSI based block devices mapping to zvols</li>
+</ul>
+
+
+<h3 id="Local-ZVOLs">Local ZVOLs</h3>
+
+<p>In this architectural style, you use both tools (<a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a> and <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a>) on
+the same machine. To create a virtual machine from scratch, you would use the
+following sequence of commands:</p>
+
+<pre><code>$ storadm create pool1/foo 10G
+$ vmadm create foo
+$ vmadm start foo --bootiso=installation-disk.iso
+</code></pre>
+
+<p>This would create a base dataset pool1/foo with one 10G block device as root
+disk. It then creates a file <code>foo.rb</code> below <code>/etc/qemu-toolkit/</code> that defines
+base attributes for the virtual machine. Finally, starting the machine using
+the <code>--bootiso</code> parameter would allow you to install a base system to the virtual
+machine.</p>
+
+<h3 id="SAN-style">SAN-style</h3>
+
+<p>Here you use two machines, one as storage host and one as VM host. The virtual
+machines run on host A, but all storage is provided for by host B. Here's a
+typical sequence of commands to create a virtual machine from scratch in this
+scenario:</p>
+
+<pre><code>Machine B:
+$ storadm create pool1/foo 10G
+$ storadm export pool1/foo
+
+Machine A
+$ vmadm create foo
+# Edit foo.rb at this point to include a valid iqn + IP pair for host B
+$ vmadm start foo --bootiso=installation-disk.iso
+</code></pre>
+
+<p>This assumes that you've got iSCSI set up on both machines. (initiator on A,
+target on B) While this configuration is certainly more complex than the
+all-local one above, it is also more flexible to administer.</p>
+
 <h2 id="SEE-ALSO">SEE ALSO</h2>
 
-<p><a class="man-ref" href="qemu-toolkit-overview.7.html">qemu-toolkit-overview<span class="s">(7)</span></a>, <a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a>, <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a></p>
+<p><a class="man-ref" href="qemu-toolkit-overview.7.html">qemu-toolkit-overview<span class="s">(7)</span></a>, <a class="man-ref" href="qemu-toolkit-install.7.html">qemu-toolkit-install<span class="s">(7)</span></a>,
+<a class="man-ref" href="qemu-toolkit-configuration.7.html">qemu-toolkit-configuration<span class="s">(7)</span></a>, <a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a>, <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a>, <a class="man-ref" href="README.7.html">README<span class="s">(7)</span></a></p>
 
 
   <ol class='man-decor man-foot man foot'>
-    <li class='tl'>Kaspar Schiess, Technology Astronauts GmbH</li>
+    <li class='tl'></li>
     <li class='tc'>November 2012</li>
     <li class='tr'>qemu-toolkit-overview(7)</li>
   </ol>

File qemu-toolkit/storadm.1.html

 <head>
   <meta http-equiv='content-type' value='text/html;charset=utf8'>
   <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
-  <title>storadm(1) - Manages VM storage.</title>
+  <title>storadm(1) - manages virtual machine storage</title>
   <style type='text/css' media='all'>
   /* style: man */
   body#manpage {margin:0}
 
   <div class='man-navigation' style='display:none'>
     <a href="#NAME">NAME</a>
+    <a href="#SYNOPSIS">SYNOPSIS</a>
+    <a href="#DESCRIPTION">DESCRIPTION</a>
+    <a href="#EXAMPLES">EXAMPLES</a>
+    <a href="#BUGS">BUGS</a>
     <a href="#SEE-ALSO">SEE ALSO</a>
+    <a href="#AUTHORS">AUTHORS</a>
+    <a href="#COPYRIGHT">COPYRIGHT</a>
   </div>
 
   <ol class='man-decor man-head man head'>
 
   <h2 id="NAME">NAME</h2>
 <p class="man-name">
-  <code>storadm</code> - <span class="man-whatis">Manages VM storage.</span>
+  <code>storadm</code> - <span class="man-whatis">manages virtual machine storage</span>
 </p>
 
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><code>storadm</code> [-h]<br />
+<code>storadm list</code><br />
+<code>storadm create</code> [-v] <var>name</var><br />
+<code>storadm clone</code> [-v] <var>name</var> <var>template</var> <var>version</var><br />
+<code>storadm export</code> [-v] <var>name</var><br />
+<code>storadm hide</code> [-v] <var>name</var><br /></p>
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>The <code>storadm</code> command allows you to manage virtual machine storage all in
+one place. It creates, clones and destroys storage spaces. And if you want
+to separate storage machines from the hosts that run virtual machines (a SAN
+style setup), you can - <code>storadm</code> provides two subcommands for this setup.</p>
+
+<p>Virtual machine storage is based on ZFS and uses the following dataset
+layout:</p>
+
+<pre><code>vm_name             # base dataset
+vm_name/disk1       # first block device (zvol)
+</code></pre>
+
+<p>These subcommands are defined:</p>
+
+<dl>
+<dt><code>storadm list</code></dt><dd><p>Lists all virtual machine storage spaces on this machine. For all
+storage spaces that have an iSCSI export, it lists the corresponding
+IQN.</p></dd>
+<dt><code>storadm create</code> [-v] <var>name</var></dt><dd><p>Creates a new storage space. <var>name</var> should be a full zfs path to where
+you want to create the storage space, something like <code>pool1/foo</code>.</p>
+
+<dl>
+<dt class="flush"><code>-v</code></dt><dd>Prints all commands as they are executed.</dd>
+</dl>
+</dd>
+<dt><code>storadm clone</code> [-v] <var>name</var> <var>template</var> <var>version</var></dt><dd><p>Clones a new storage space from a template. <var>template</var> refers to a
+storage space that has a recursive snapshot called <var>version</var>.</p>
+
+<dl>
+<dt class="flush"><code>-v</code></dt><dd>Prints all commands as they are executed.</dd>
+</dl>
+</dd>
+<dt><code>storadm export</code> [-v] <var>name</var></dt><dd><p>Creates an iSCSI export for the storage space. All disks of the storage
+space are mapped to LUNs in the iSCSI target.</p>
+
+<dl>
+<dt class="flush"><code>-v</code></dt><dd>Prints all commands as they are executed.</dd>
+</dl>
+</dd>
+<dt><code>storadm hide</code> [-v] <var>name</var></dt><dd><p>Hides a storage space by removing the previously created iSCSI export
+from the system.</p>
+
+<dl>
+<dt class="flush"><code>-v</code></dt><dd>Prints all commands as they are executed.</dd>
+</dl>
+</dd>
+</dl>
+
+
+<h2 id="EXAMPLES">EXAMPLES</h2>
+
+<h3 id="Example-1-Creating-a-storage-space">Example 1 Creating a storage space</h3>
+
+<p>The following command creates an empty virtual machine storage space with one
+disk drive of 10GB.</p>
+
+<pre><code># storadm create pool1/foo 10G
+</code></pre>
+
+<h3 id="Example-2-Listing-all-available-storage-spaces">Example 2 Listing all available storage spaces</h3>
+
+<p>The following command lists all available storage spaces.</p>
+
+<pre><code># storadm list
+pool1/foo     
+</code></pre>
+
+<h3 id="Example-3-Creating-a-base-version-and-cloning-it">Example 3 Creating a base version and cloning it</h3>
+
+<p>The following commands snapshot an existing storage space called
+<code>pool1/template</code> with the version tag <code>0.1.0</code>. A clone is then created based
+on that version of <code>pool1/template</code>.</p>
+
+<pre><code># zfs snapshot -r pool1/template@0.1.0
+# storadm clone my_vm pool1/template 0.1.0
+</code></pre>
+
+<h2 id="BUGS">BUGS</h2>
+
+<p>Only the unknown.</p>
+
 <h2 id="SEE-ALSO">SEE ALSO</h2>
 
-<p><a class="man-ref" href="qemu-toolkit-overview.7.html">qemu-toolkit-overview<span class="s">(7)</span></a>, <a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a>, <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a></p>
+<p><a class="man-ref" href="qemu-toolkit-overview.7.html">qemu-toolkit-overview<span class="s">(7)</span></a>, <a class="man-ref" href="qemu-toolkit-install.7.html">qemu-toolkit-install<span class="s">(7)</span></a>,
+<a class="man-ref" href="qemu-toolkit-configuration.7.html">qemu-toolkit-configuration<span class="s">(7)</span></a>, <a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a>, <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a>, <a class="man-ref" href="README.7.html">README<span class="s">(7)</span></a></p>
+
+<h2 id="AUTHORS">AUTHORS</h2>
+
+<p>Copyright (c) 2012 Kaspar Schiess.</p>
+
+<h2 id="COPYRIGHT">COPYRIGHT</h2>
+
+<p>This tool is under a MIT license. Please see the LICENSE file in the original
+source.</p>
 
 
   <ol class='man-decor man-foot man foot'>
-    <li class='tl'>Kaspar Schiess, Technology Astronauts GmbH</li>
+    <li class='tl'></li>
     <li class='tc'>November 2012</li>
     <li class='tr'>storadm(1)</li>
   </ol>

File qemu-toolkit/vmadm.1.html

 <head>
   <meta http-equiv='content-type' value='text/html;charset=utf8'>
   <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
-  <title>vmadm(1) - Manages VMs.</title>
+  <title>vmadm(1) - manages qemu-toolkit virtual machines</title>
   <style type='text/css' media='all'>
   /* style: man */
   body#manpage {margin:0}
 
   <div class='man-navigation' style='display:none'>
     <a href="#NAME">NAME</a>
+    <a href="#SYNOPSIS">SYNOPSIS</a>
+    <a href="#DESCRIPTION">DESCRIPTION</a>
+    <a href="#EXAMPLES">EXAMPLES</a>
+    <a href="#BUGS">BUGS</a>
     <a href="#SEE-ALSO">SEE ALSO</a>
+    <a href="#AUTHORS">AUTHORS</a>
+    <a href="#COPYRIGHT">COPYRIGHT</a>
   </div>
 
   <ol class='man-decor man-head man head'>
 
   <h2 id="NAME">NAME</h2>
 <p class="man-name">
-  <code>vmadm</code> - <span class="man-whatis">Manages VMs.</span>
+  <code>vmadm</code> - <span class="man-whatis">manages qemu-toolkit virtual machines</span>
 </p>
 
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><code>vmadm</code> [-h]<br />
+<code>vmadm list</code><br />
+<code>vmadm create</code> <var>name</var><br />
+<code>vmadm start</code> [--bootiso <var>iso_file</var>]<var>name</var><br />
+<code>vmadm shutdown</code> <var>name</var><br />
+<code>vmadm kill</code> <var>name</var><br />
+<code>vmadm monitor</code> <var>name</var><br />
+<code>vmadm vnc</code> <var>name</var><br />
+<code>vmadm console</code> <var>name</var><br /></p>
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>The <code>vmadm</code> command manages virtual machines. A virtual machine is defined
+by using the <code>virtual_machine</code> syntax in a file below <code>/etc/qemu-toolkit</code>.
+(see <a class="man-ref" href="qemu-toolkit-configuration.7.html">qemu-toolkit-configuration<span class="s">(7)</span></a>)</p>
+
+<dl>
+<dt><code>vmadm list</code></dt><dd><p>Lists all virtual machines that are defined on this system.</p></dd>
+<dt><code>vmadm create</code> <var>name</var></dt><dd><p>Creates a new virtual machine definition and fills it with sensible default
+values.</p></dd>
+<dt><code>vmadm start</code> <var>name</var></dt><dd><p>Starts a virtual machine using QEMU/KVM.</p>
+
+<dl>
+<dt><code>--bootiso</code> <var>iso_file</var></dt><dd>Boots the virtual machine once from virtual cdrom backed by the iso file
+given. Upon reboot, the machine will use its first disk to boot.</dd>
+</dl>
+</dd>
+<dt><code>vmadm shutdown</code> <var>name</var></dt><dd><p>Sends the virtual machine a system/powerdown event.</p></dd>
+<dt><code>vmadm kill</code> <var>name</var></dt><dd><p>Immediately kills the virtual machine.</p></dd>
+<dt><code>vmadm monitor</code> <var>name</var></dt><dd><p>Enters an interactive monitor mode that controls the virtual machine. The
+machine must be running for this to work. Use Control+D to exit.</p></dd>
+<dt><code>vmadm vnc</code> <var>name</var></dt><dd><p>Connect the terminal to a VNC server that displays the console of the
+virtual machine.</p></dd>
+<dt><code>vmadm console</code> <var>name</var></dt><dd><p>Connects the terminal to the serial console of the virtual machine. Note
+that this must be specially configured for most guest OSes.</p></dd>
+</dl>
+
+
+<h2 id="EXAMPLES">EXAMPLES</h2>
+
+<h3 id="Example-1-Boot-a-virtual-machine">Example 1 Boot a virtual machine</h3>
+
+<p>The following command starts the virtual machine and boots it from its
+first disk.</p>
+
+<pre><code># vmadm start my_vm
+</code></pre>
+
+<h3 id="Example-2-Install-a-virtual-machine-from-ISO">Example 2 Install a virtual machine from ISO</h3>
+
+<p>The following command boots the virtual machine from a virtual cdrom. The
+cdrom is backed by an ISO file called ubuntu.iso.</p>
+
+<pre><code># vmadm start my_vm --bootiso ubuntu.iso
+</code></pre>
+
+<h2 id="BUGS">BUGS</h2>
+
+<p>When using iscsi targets, you have to relaunch the vm twice to get it to
+start up. We have code in place to work around this, but it is not effective.
+Work to fix this is underway.</p>
+
 <h2 id="SEE-ALSO">SEE ALSO</h2>
 
-<p><a class="man-ref" href="qemu-toolkit-overview.7.html">qemu-toolkit-overview<span class="s">(7)</span></a>, <a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a>, <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a></p>
+<p><a class="man-ref" href="qemu-toolkit-overview.7.html">qemu-toolkit-overview<span class="s">(7)</span></a>, <a class="man-ref" href="qemu-toolkit-install.7.html">qemu-toolkit-install<span class="s">(7)</span></a>,
+<a class="man-ref" href="qemu-toolkit-configuration.7.html">qemu-toolkit-configuration<span class="s">(7)</span></a>, <a class="man-ref" href="storadm.1.html">storadm<span class="s">(1)</span></a>, <a class="man-ref" href="vmadm.1.html">vmadm<span class="s">(1)</span></a>, <a class="man-ref" href="README.7.html">README<span class="s">(7)</span></a></p>
+
+<h2 id="AUTHORS">AUTHORS</h2>
+
+<p>Copyright (c) 2012 Kaspar Schiess.</p>
+
+<h2 id="COPYRIGHT">COPYRIGHT</h2>
+
+<p>This tool is under a MIT license. Please see the LICENSE file in the original
+source.</p>
 
 
   <ol class='man-decor man-foot man foot'>
-    <li class='tl'>Kaspar Schiess, Technology Astronauts GmbH</li>
+    <li class='tl'></li>
     <li class='tc'>November 2012</li>
     <li class='tr'>vmadm(1)</li>
   </ol>