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

Full commit
<!DOCTYPE html>
  <meta http-equiv='content-type' value='text/html;charset=utf8'>
  <meta name='generator' value='Ronn/v0.7.3 ('>
  <title>qemu-toolkit-overview(7) - architecture and philosophy of 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 {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 {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}, li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px} {width:100%} {text-align:left} {text-align:center;letter-spacing:4px} {text-align:right;float:right}
  <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}
  The following styles are deprecated and will be removed at some point:
  div#man, div#man, div#man ol.head, div#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="#OVERVIEW">OVERVIEW</a>
    <a href="#SEE-ALSO">SEE ALSO</a>

  <ol class='man-decor man-head man head'>
    <li class='tl'>qemu-toolkit-overview(7)</li>
    <li class='tc'>qemu-toolkit</li>
    <li class='tr'>qemu-toolkit-overview(7)</li>

  <h2 id="NAME">NAME</h2>
<p class="man-name">
  <code>qemu-toolkit-overview</code> - <span class="man-whatis">architecture and philosophy of qemu-toolkit</span>


<p>This is a toolkit for running qemu on OmniOS/Illumos. Features:</p>

<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>

<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 '', ""

  # 4 SMP CPUs.
  cpus 4

<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


<p>Using this toolkit, you can deploy your virtual machines in one of two ways:</p>

<li>All-local, using zvols</li>
<li>SAN-style, using iSCSI based block devices mapping to zvols</li>

<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

<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

<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

<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

<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="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-overview(7)</li>