Add 2013 KVM Forum talk.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 23 Oct 2013 10:30:36 +0000 (11:30 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 24 Oct 2013 10:04:43 +0000 (11:04 +0100)
28 files changed:
2013-kvm-forum/.gitignore [new file with mode: 0644]
2013-kvm-forum/0000-introduction.html [new file with mode: 0644]
2013-kvm-forum/1000-overview.html [new file with mode: 0644]
2013-kvm-forum/1100-overview.d/create.py [new file with mode: 0755]
2013-kvm-forum/1100-overview.d/data.tar.gz [new file with mode: 0644]
2013-kvm-forum/1100-overview.term [new file with mode: 0755]
2013-kvm-forum/2000-tools.html [new file with mode: 0644]
2013-kvm-forum/2100-tools.d/.gitignore [new file with mode: 0644]
2013-kvm-forum/2100-tools.term [new file with mode: 0755]
2013-kvm-forum/4000-libvirt.html [new file with mode: 0644]
2013-kvm-forum/4050-appliance1.html [new file with mode: 0644]
2013-kvm-forum/4100-appliance2.html [new file with mode: 0644]
2013-kvm-forum/4200-libvirt-apis.html [new file with mode: 0644]
2013-kvm-forum/4300-libvirt-dont-care.html [new file with mode: 0644]
2013-kvm-forum/4400-libvirt-bugs.html [new file with mode: 0644]
2013-kvm-forum/4500-libvirt-missing.html [new file with mode: 0644]
2013-kvm-forum/4600-libvirt-dont-like.html [new file with mode: 0644]
2013-kvm-forum/4700-libvirt-like.html [new file with mode: 0644]
2013-kvm-forum/9000-final.html [new file with mode: 0644]
2013-kvm-forum/README [new file with mode: 0644]
2013-kvm-forum/bashrc [new file with mode: 0644]
2013-kvm-forum/code.js [new file with mode: 0644]
2013-kvm-forum/fs-safe.svg [new file with mode: 0644]
2013-kvm-forum/fs-unsafe.svg [new file with mode: 0644]
2013-kvm-forum/functions [new file with mode: 0644]
2013-kvm-forum/notes.txt [new file with mode: 0644]
2013-kvm-forum/run [new file with mode: 0755]
2013-kvm-forum/style.css [new file with mode: 0644]

diff --git a/2013-kvm-forum/.gitignore b/2013-kvm-forum/.gitignore
new file mode 100644 (file)
index 0000000..b3e8227
--- /dev/null
@@ -0,0 +1,3 @@
+*.d/disk.img
+bindings
+history
diff --git a/2013-kvm-forum/0000-introduction.html b/2013-kvm-forum/0000-introduction.html
new file mode 100644 (file)
index 0000000..a1db4bc
--- /dev/null
@@ -0,0 +1,15 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<div id="titlepage">
+<p class="title">
+  libguestfs <br/>
+  <br/>
+  tools for viewing and modifying <br/>
+  virtual machine disk images
+</p>
+<p><author>
+  Richard W.M. Jones <br/>
+  <small>rjones @ redhat.com</small>
+</author></p>
+</div>
diff --git a/2013-kvm-forum/1000-overview.html b/2013-kvm-forum/1000-overview.html
new file mode 100644 (file)
index 0000000..3204ae4
--- /dev/null
@@ -0,0 +1,37 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<style type="text/css">
+pre.example {
+  width: 24em;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+span.func { color: #044; font-weight: bold; }
+span.str  { color: #644; font-style: italic; }
+span.type { color: #a33; font-weight: bold; }
+span.comment { color: green; font-weight: bold; }
+</style>
+
+<h1>Libguestfs is ...</h1>
+
+<pre class="example">
+#include <b>&lt;guestfs.h&gt;</b>
+
+<span class="func">main ()</span> {
+  <span class="type">guestfs_h *</span>g =
+      <span class="func">guestfs_create</span> ();
+  <span class="func">guestfs_add_drive_ro</span> (g,
+          <span class="str">"fedora-19.img"</span>);
+  <span class="func">guestfs_launch</span> (g);
+  <span class="func">guestfs_mount</span> (g,
+          <span class="str">"/dev/fedora/root"</span>);
+  <span class="func">guestfs_download</span> (g,
+          <span class="str">"/etc/fedora-release"</span>,
+          <span class="str">"/dev/stdout"</span>);
+  <span class="func">guestfs_close</span> (g);
+}
+
+<span class="comment">/* link with -lguestfs */</span>
+</pre>
diff --git a/2013-kvm-forum/1100-overview.d/create.py b/2013-kvm-forum/1100-overview.d/create.py
new file mode 100755 (executable)
index 0000000..e68dded
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+import os
+import guestfs
+
+output = "disk.img"
+f = open (output, "w")
+f.truncate (512 * 1024 * 1024)
+f.close ()
+
+g = guestfs.GuestFS ()
+g.add_drive (output)
+g.launch ()
+devices = g.list_devices ()
+g.part_disk (devices[0], "mbr")
+parts = g.list_partitions ()
+g.mkfs ("ext4", parts[0])
+g.mount (parts[0], "/")
+g.tgz_in ("data.tar.gz", "/")
+g.shutdown ()
+g.close ()
diff --git a/2013-kvm-forum/1100-overview.d/data.tar.gz b/2013-kvm-forum/1100-overview.d/data.tar.gz
new file mode 100644 (file)
index 0000000..ed35e76
Binary files /dev/null and b/2013-kvm-forum/1100-overview.d/data.tar.gz differ
diff --git a/2013-kvm-forum/1100-overview.term b/2013-kvm-forum/1100-overview.term
new file mode 100755 (executable)
index 0000000..d7f3490
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash -
+
+source functions
+
+# History.
+remember 'emacs -nw create.py'
+remember './create.py'
+remember 'virt-filesystems -a disk.img --all --long -h'
+remember 'virt-df -a disk.img -h'
+remember 'guestfish --ro -a disk.img -m /dev/sda1'
+
+echo "Example: Create a disk image"
+
+cd 1100-overview.d
+terminal
diff --git a/2013-kvm-forum/2000-tools.html b/2013-kvm-forum/2000-tools.html
new file mode 100644 (file)
index 0000000..6a8751c
--- /dev/null
@@ -0,0 +1,22 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<style type="text/css">
+span.grey { color: #ccc; }
+</style>
+
+<pre>
+$ <b>virt-</b>
+virt-alignment-scan <span class="grey">virt-image</span>            virt-sparsify
+<b>virt-builder</b>        virt-inspector        virt-sysprep
+virt-cat            <span class="grey">virt-install</span>          virt-tar
+<span class="grey">virt-clone</span>          virt-list-filesystems virt-tar-in
+<span class="grey">virt-convert</span>        virt-list-partitions  virt-tar-out
+virt-copy-in        <span class="grey">virt-login-shell      virt-top</span>
+virt-copy-out       virt-ls               <span class="grey">virt-viewer</span>
+virt-df             virt-make-fs          <span class="grey">virt-what</span>
+virt-edit           <span class="grey">virt-pki-validate</span>     virt-win-reg
+virt-filesystems    virt-rescue           <span class="grey">virt-xml-validate</span>
+virt-format         virt-resize            
+<span class="grey">virt-host-validate  virt-sanlock-cleanup</span>
+</pre>
diff --git a/2013-kvm-forum/2100-tools.d/.gitignore b/2013-kvm-forum/2100-tools.d/.gitignore
new file mode 100644 (file)
index 0000000..06e0920
--- /dev/null
@@ -0,0 +1 @@
+fedora-19.img
diff --git a/2013-kvm-forum/2100-tools.term b/2013-kvm-forum/2100-tools.term
new file mode 100755 (executable)
index 0000000..e6a4cda
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -
+
+source functions
+
+# History.
+remember 'virt-builder -l'
+remember "virt-builder fedora-19 --hostname f19.example.com --firstboot-install nmap --edit '/etc/yum.conf: s/gpgcheck=1/gpgcheck=0/'"
+
+echo "Tools: virt-builder"
+
+cd 2100-tools.d
+terminal
diff --git a/2013-kvm-forum/4000-libvirt.html b/2013-kvm-forum/4000-libvirt.html
new file mode 100644 (file)
index 0000000..646fc24
--- /dev/null
@@ -0,0 +1,5 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Libguestfs uses libvirt</h1>
+
diff --git a/2013-kvm-forum/4050-appliance1.html b/2013-kvm-forum/4050-appliance1.html
new file mode 100644 (file)
index 0000000..f42ec76
--- /dev/null
@@ -0,0 +1,14 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<style type="text/css">
+img.center {
+  width: 450px;
+  margin-left: auto;
+  margin-right: auto;
+}
+</style>
+
+<h1>Don't do this ...</h1>
+
+<img class="center" src="fs-unsafe.svg" />
diff --git a/2013-kvm-forum/4100-appliance2.html b/2013-kvm-forum/4100-appliance2.html
new file mode 100644 (file)
index 0000000..b9ad5e7
--- /dev/null
@@ -0,0 +1,14 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<style type="text/css">
+img.center {
+  height: 80%;
+  margin-left: auto;
+  margin-right: auto;
+}
+</style>
+
+<h1>Do do this (with libvirt)</h1>
+
+<img class="center" src="fs-safe.svg" />
diff --git a/2013-kvm-forum/4200-libvirt-apis.html b/2013-kvm-forum/4200-libvirt-apis.html
new file mode 100644 (file)
index 0000000..50f18ab
--- /dev/null
@@ -0,0 +1,13 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>We use ...</h1>
+
+<ul>
+<li> <code>virConnect*</code>
+<li> "lifecycle APIs" like <code>virDomainCreateXML</code>
+<li> libvirt XML
+<li> hotplugging APIs
+<li> capabilities
+</ul>
+
diff --git a/2013-kvm-forum/4300-libvirt-dont-care.html b/2013-kvm-forum/4300-libvirt-dont-care.html
new file mode 100644 (file)
index 0000000..0c5dadc
--- /dev/null
@@ -0,0 +1,24 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>We use ...</h1>
+
+<table width="95%">
+<tr><td valign="top" width="45%">
+<ul>
+<li> <code>virConnect*</code>
+<li> "lifecycle APIs" <br/> like <code>virDomainCreateXML</code>
+<li> libvirt XML
+<li> hotplugging APIs
+<li> capabilities
+</ul>
+</td><td valign="top" width="45%">
+<b>.. but we don't care about:</b>
+<ul>
+<li> live migration
+<li> stable guest ABI
+<li> storage APIs
+<li> snapshots
+<li> NUMA
+</ul>
+</td></tr></table>
diff --git a/2013-kvm-forum/4400-libvirt-bugs.html b/2013-kvm-forum/4400-libvirt-bugs.html
new file mode 100644 (file)
index 0000000..f14f95b
--- /dev/null
@@ -0,0 +1,23 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Libvirt bugs</h1>
+
+Tracker bug: 910269
+
+<ul>
+<li> XML error: No PCI buses available (990258) <b>FIXED</b>
+<li> <q>This QEMU doesn't support virtio scsi controller</q> (998692)
+     <br/> <b>qemu bug: FIXED</b>
+     <i>(example of non-obvious error message)</i>
+</ul>
+<ul>
+<li> qemu: could not load kernel ... Permission denied (921135)
+<li> could not destroy libvirt domain: domain is not running (1020216)
+</ul>
+<ul>
+<li> libvirt chowns &lt;kernel&gt; file to root, but doesn't restore ownership
+  (916644)
+<li> libvirt doesn't label backing sockets, eg. qcow2 using NBD backing
+  (1011063)
+</ul>
diff --git a/2013-kvm-forum/4500-libvirt-missing.html b/2013-kvm-forum/4500-libvirt-missing.html
new file mode 100644 (file)
index 0000000..1d53f81
--- /dev/null
@@ -0,0 +1,11 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Libvirt missing features</h1>
+
+<ul>
+<li> labelling backing sockets
+<li> no way to specify net= parameter to qemu
+<li> anonymous transient guests
+<li> <code>TMPDIR</code> / environment variable handling is broken <b>WORKAROUND</b>
+</ul>
diff --git a/2013-kvm-forum/4600-libvirt-dont-like.html b/2013-kvm-forum/4600-libvirt-dont-like.html
new file mode 100644 (file)
index 0000000..5c1cedf
--- /dev/null
@@ -0,0 +1,17 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Things we don't like about libvirt ...</h1>
+
+<pre>
+1172 src/launch-direct.c
+1910 src/launch-libvirt.c
+ 619 src/launch-uml.c
+</pre>
+
+<ul>
+<li> error messages are confusing, real information is hidden
+<li> logging &amp; debugging is hard
+<li> regressions
+<li> essentially impossible to use libvirt/sVirt on anything except Fedora/RHEL
+</ul>
diff --git a/2013-kvm-forum/4700-libvirt-like.html b/2013-kvm-forum/4700-libvirt-like.html
new file mode 100644 (file)
index 0000000..e0f327f
--- /dev/null
@@ -0,0 +1,12 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>On a positive note ...</h1>
+
+What we like about libvirt:
+
+<ul>
+<li> sVirt
+<li> having someone else deal with qemu
+<li> hotplugging
+</ul>
diff --git a/2013-kvm-forum/9000-final.html b/2013-kvm-forum/9000-final.html
new file mode 100644 (file)
index 0000000..081ca7c
--- /dev/null
@@ -0,0 +1,14 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<div id="titlepage">
+<p class="title">
+  libguestfs <br/>
+  <br/>
+  <a href="http://libguestfs.org">libguestfs.org</a>
+</p>
+<p><author>
+  Richard W.M. Jones <br/>
+  <small>rjones @ redhat.com</small>
+</author></p>
+</div>
diff --git a/2013-kvm-forum/README b/2013-kvm-forum/README
new file mode 100644 (file)
index 0000000..b540975
--- /dev/null
@@ -0,0 +1,11 @@
+This is a talk given at the 2012 KVM Forum in Barcelona.
+
+https://events.linuxfoundation.org/events/kvm-forum
+
+The whole talk is designed to take around 15-20 minutes, with lots of
+time at the end for open discussion.
+
+To run the talk you'll need Tech Talk PSE >= 1.1.0.  If you don't have
+Tech Talk then just open up the HTML slides in a web browser.
+
+To start the talk, use `./run'.
diff --git a/2013-kvm-forum/bashrc b/2013-kvm-forum/bashrc
new file mode 100644 (file)
index 0000000..4c6a3c6
--- /dev/null
@@ -0,0 +1,17 @@
+# -*- shell-script -*-
+
+# Colour ls.
+if [ -f /etc/profile.d/colorls.sh ]; then . /etc/profile.d/colorls.sh; fi
+
+# Fancy prompt colours (see
+# https://wiki.archlinux.org/index.php/Color_Bash_Prompt)
+promptcol='\e[0;32m'      ;# colour for the prompt
+commandcol='\e[1;31m'     ;# colour for the typed command
+outputcol='\e[0m'         ;# colour for command output
+
+export PS1="\n\[$promptcol\]\$ \[$commandcol\]"
+
+trap 'echo -ne "$outputcol"' DEBUG
+
+# Load key bindings (if any).
+bind -f $talkdir/bindings
diff --git a/2013-kvm-forum/code.js b/2013-kvm-forum/code.js
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/2013-kvm-forum/fs-safe.svg b/2013-kvm-forum/fs-safe.svg
new file mode 100644 (file)
index 0000000..e15a275
--- /dev/null
@@ -0,0 +1,286 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="388.67517"
+   height="586.6651"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="fs-safe.svg">
+  <defs
+     id="defs4">
+    <pattern
+       inkscape:collect="always"
+       xlink:href="#Strips1_1"
+       id="pattern5919"
+       patternTransform="matrix(15.306748,19.84208,-29.955282,23.108361,0,0)" />
+    <pattern
+       inkscape:stockid="Stripes 1:1"
+       id="Strips1_1"
+       patternTransform="translate(0,0) scale(10,10)"
+       height="1"
+       width="2"
+       patternUnits="userSpaceOnUse"
+       inkscape:collect="always">
+      <rect
+         id="rect5196"
+         height="2"
+         width="1"
+         y="-0.5"
+         x="0"
+         style="fill:black;stroke:none" />
+    </pattern>
+    <marker
+       inkscape:stockid="Arrow1Send"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Send"
+       style="overflow:visible">
+      <path
+         id="path3794"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
+         transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend"
+       style="overflow:visible">
+      <path
+         id="path3782"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.7"
+     inkscape:cx="135.00956"
+     inkscape:cy="248.57871"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1366"
+     inkscape:window-height="715"
+     inkscape:window-x="0"
+     inkscape:window-y="31"
+     inkscape:window-maximized="1"
+     fit-margin-top="10"
+     fit-margin-left="10"
+     fit-margin-right="10"
+     fit-margin-bottom="10" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-128.51273,364.6314)">
+    <rect
+       style="opacity:0.24596773;fill:url(#pattern5919);fill-opacity:1;stroke:#000000;stroke-width:3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect4445"
+       width="363.65491"
+       height="341.43155"
+       x="140.01273"
+       y="-130.89783"
+       rx="14.285707"
+       ry="15.428576" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect4443"
+       width="270.72086"
+       height="235.36552"
+       x="188.50005"
+       y="-92.512009"
+       rx="14.285707"
+       ry="15.428576" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 215.16249,30.108832 215.82602,1.13271"
+       id="path3753"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <rect
+       style="fill:#f84800;fill-opacity:0.25098039;stroke:#000600;stroke-width:0.80000001;stroke-miterlimit:4;stroke-opacity:0.39814818;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3755"
+       width="206.42857"
+       height="64.285713"
+       x="220.29736"
+       y="33.843636"
+       ry="19" />
+    <text
+       xml:space="preserve"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="242.44022"
+       y="65.272194"
+       id="text3757"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3759"
+         x="242.44022"
+         y="65.272194">kernel</tspan></text>
+    <rect
+       style="fill:#cdf906;fill-opacity:1;stroke:#000600;stroke-width:0.80000001;stroke-miterlimit:4;stroke-opacity:0.39814818;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3761"
+       width="200"
+       height="77.857155"
+       x="224.58307"
+       y="-51.156361"
+       ry="15.428576"
+       rx="14.285707" />
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="345.29736"
+       y="0.98646218"
+       id="text3763"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3765"
+         x="345.29736"
+         y="0.98646218"><tspan
+           style="font-weight:bold"
+           id="tspan3767">☠ </tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="255.29736"
+       y="-3.2992282"
+       id="text3769"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3771"
+         x="255.29736"
+         y="-3.2992282">fs</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Send)"
+       d="m 363.1545,13.843632 0,40"
+       id="path3773"
+       inkscape:connector-curvature="0" />
+    <text
+       xml:space="preserve"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="217.79448"
+       y="132.75198"
+       id="text4447"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan4449"
+         x="217.79448"
+         y="132.75198">qemu</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="167.28685"
+       y="197.40176"
+       id="text4451"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan4453"
+         x="167.28685"
+         y="197.40176">sVirt</tspan></text>
+    <rect
+       style="fill:none;stroke:#000000;stroke-width:3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect4455"
+       width="360.62442"
+       height="178.79701"
+       x="112.12693"
+       y="58.200905"
+       transform="translate(32.936559,-411.3323)"
+       rx="14.285707"
+       ry="15.428576" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 111.11678,161.23646 361.63461,0"
+       id="path4457"
+       inkscape:connector-curvature="0"
+       transform="translate(32.936559,-411.3323)" />
+    <text
+       xml:space="preserve"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="123.23861"
+       y="203.66287"
+       id="text4459"
+       sodipodi:linespacing="125%"
+       transform="translate(32.936559,-411.3323)"><tspan
+         sodipodi:role="line"
+         id="tspan4461"
+         x="123.23861"
+         y="203.66287">libguestfs</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="126.26907"
+       y="109.71868"
+       id="text4463"
+       sodipodi:linespacing="125%"
+       transform="translate(32.936559,-411.3323)"><tspan
+         sodipodi:role="line"
+         id="tspan4465"
+         x="126.26907"
+         y="109.71868">virt-* tool or your</tspan><tspan
+         sodipodi:role="line"
+         x="126.26907"
+         y="144.71869"
+         id="tspan4467">program</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 225.17121,210.39602 c 0,29.29442 37.85714,87.16027 37.85714,116.4547"
+       id="path4469"
+       inkscape:connector-curvature="0"
+       transform="translate(32.936559,-411.3323)"
+       sodipodi:nodetypes="cc" />
+    <rect
+       style="fill:#ff02ff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect4471"
+       width="102.14286"
+       height="25.714277"
+       x="249.36514"
+       y="-87.237823"
+       rx="14.285707"
+       ry="0" />
+    <text
+       xml:space="preserve"
+       style="font-size:20px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="224.28571"
+       y="341.95163"
+       id="text4473"
+       sodipodi:linespacing="125%"
+       transform="translate(32.936559,-411.3323)"><tspan
+         sodipodi:role="line"
+         id="tspan4475"
+         x="224.28571"
+         y="341.95163">guestfsd</tspan></text>
+  </g>
+</svg>
diff --git a/2013-kvm-forum/fs-unsafe.svg b/2013-kvm-forum/fs-unsafe.svg
new file mode 100644 (file)
index 0000000..b295cb7
--- /dev/null
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="236.82602"
+   height="170.08571"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="fs-unsafe.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Send"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Send"
+       style="overflow:visible">
+      <path
+         id="path3794"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
+         transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend"
+       style="overflow:visible">
+      <path
+         id="path3782"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.98994949"
+     inkscape:cx="191.49721"
+     inkscape:cy="110.79168"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1366"
+     inkscape:window-height="715"
+     inkscape:window-x="0"
+     inkscape:window-y="31"
+     inkscape:window-maximized="1"
+     fit-margin-top="10"
+     fit-margin-left="10"
+     fit-margin-right="10"
+     fit-margin-bottom="10" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-32.936559,-162.67648)">
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 43.436559,254.34167 215.826021,1.13271"
+       id="path3753"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cc" />
+    <rect
+       style="fill:#f84800;fill-opacity:0.25098039;stroke:#000600;stroke-width:0.80000001;stroke-miterlimit:4;stroke-opacity:0.39814818;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3755"
+       width="206.42857"
+       height="64.285713"
+       x="48.57143"
+       y="258.07648"
+       ry="19" />
+    <text
+       xml:space="preserve"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="70.714287"
+       y="289.50504"
+       id="text3757"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3759"
+         x="70.714287"
+         y="289.50504">kernel</tspan></text>
+    <rect
+       style="fill:#cdf906;fill-opacity:1;stroke:#000600;stroke-width:0.80000001;stroke-miterlimit:4;stroke-opacity:0.39814818;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3761"
+       width="200"
+       height="77.857155"
+       x="52.857143"
+       y="173.07648"
+       ry="15.428576"
+       rx="14.285707" />
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="173.57143"
+       y="225.2193"
+       id="text3763"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3765"
+         x="173.57143"
+         y="225.2193"><tspan
+           style="font-weight:bold"
+           id="tspan3767">☠ </tspan></tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="83.571434"
+       y="220.93361"
+       id="text3769"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3771"
+         x="83.571434"
+         y="220.93361">fs</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Send)"
+       d="m 191.42857,238.07647 0,40"
+       id="path3773"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
diff --git a/2013-kvm-forum/functions b/2013-kvm-forum/functions
new file mode 100644 (file)
index 0000000..7baaed0
--- /dev/null
@@ -0,0 +1,40 @@
+# -*- shell-script -*-
+# This creates some standard functions.  See also $talkdir/bashrc
+# which runs in the same bash context as the terminal.
+
+# Place any local environment variables and settings in "local".
+if [ -f local ]; then source local; fi
+
+# Environment variables.
+export HISTFILE=$talkdir/history
+export PATH=$talkdir:$PATH
+export EDITOR="emacs -nw"
+
+# remember <command> <args ...>
+#
+# This function does two things: (1) It adds the command and arguments
+# to the shell history, so that commands can be recalled using up
+# arrow or reverse search.  (2) It makes a function key recall the
+# command.  The first command is assigned to F2, the second to F3 and
+# so forth.
+
+rm -f $HISTFILE
+touch $HISTFILE
+rm -f $talkdir/bindings
+touch bindings
+
+fnum=2
+keys=(- OP OQ OR OS '[15~' '[17~' '[18~' '[19~' '[20~' '[21~')
+
+remember ()
+{
+    echo "$@" >> $HISTFILE
+    echo \"\\e${keys[$fnum]}\":\"\\C-k \\C-u"$@"\" >> $talkdir/bindings
+    ((fnum++))
+}
+
+terminal ()
+{
+    chmod -w $HISTFILE
+    /bin/bash --rcfile $talkdir/bashrc "$@"
+}
diff --git a/2013-kvm-forum/notes.txt b/2013-kvm-forum/notes.txt
new file mode 100644 (file)
index 0000000..c09313c
--- /dev/null
@@ -0,0 +1,113 @@
+Audience:
+ - libvirt developers
+
+Interested in:
+ - what it is
+ - new developments
+
+[---- OVERVIEW ----]
+
+Libguestfs is a C library for accessing and creating
+disk images.  It has been in development for four and a half
+years, is very mature, and is used in many large projects
+such as: virt-v2v, OpenStack, 
+
+Like libvirt, the C API is long term stable so a program
+written against the API four years ago will still work today.
+
+There are bindings in lots of programming languages.
+Here is an example of a Python program using the API to create a
+partitioned disk image with some content from a tar file.
+
+Show create.py
+
+Run create.py
+
+virt-filesystems -a disk.img --all --long -h
+
+virt-df -a disk.img -h
+
+guestfish --ro -a disk.img -m /dev/sda1 find /
+
+
+
+
+
+
+[---- TOOLS ----]
+
+
+We have a lot of tools associated with libguestfs:
+
+virt-<TAB>
+
+Pick a few.
+
+Today I want to just mention virt-builder which is a tool
+for rapidly and safely customizing templates of virtual
+machines.
+
+virt-builder -l
+
+virt-builder fedora-19 \
+  --hostname f19.example.com \
+  --firstboot-install nmap \
+  --edit '/etc/yum.conf: s/gpgcheck=1/gpgcheck=0/'
+
+
+[---- LIBVIRT INTEGRATION ---]
+
+How libguestfs uses libvirt:
+
+Behind the scenes we create a captive appliance.  Since Fedora 18 &
+RHEL 7, we use libvirt to manage the appliance and sVirt to protect
+the host from rogue filesystems.
+
+
+Our use of libvirt APIs is very simple:
+ - virConnect*
+ - "lifecycle APIs" like virDomainCreateXML
+ - libvirt XML
+ - hotplugging APIs
+ - capabilities
+
+What we DON'T care about:
+
+ - live migration
+ - stable guest ABI
+ - storage APIs
+ - snapshots
+ - NUMA
+
+Bugs in libvirt:
+
+ - Tracker: 910269
+ - <cpu mode="host-model"> (WORKAROUND)
+ - qemu: could not load kernel ... Permission denied
+ - libvirt doesn't label backing sockets, eg. qcow2 using NBD backing
+ - could not destroy libvirt domain: Requested operation is not valid: domain is not running
+ - libvirt chown's <kernel> file to root, but doesn't restore ownership
+ - XML error: No PCI buses available (FIXED)
+ - This QEMU doesn't support virtio scsi controller (qemu bug: FIXED)
+   (example of non-obvious error message)
+ - TMPDIR / environment variable handling is broken (WORKAROUND)
+
+Missing features in libvirt:
+
+ - labelling backing sockets
+ - no way to specify net= parameter to qemu
+ - unnamed guests
+
+Things we don't like:
+
+ - error messages are confusing, real information is hidden
+ - logging/debugging is hard
+ - fragile
+ - regressions
+ - essentially impossible to use libvirt/sVirt on anything except Fedora/RHEL
+
+Things we like:
+
+ - sVirt
+ - having someone else deal with qemu
+ - hotplugging
diff --git a/2013-kvm-forum/run b/2013-kvm-forum/run
new file mode 100755 (executable)
index 0000000..3e4fb31
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash -
+# Run the talk.
+
+# Avoid GNOME keyring stupidity
+export GNOME_KEYRING_CONTROL=
+export GNOME_KEYRING_PID=
+
+# Clean up everything.
+find -name '*~' -delete
+
+# No proxy.
+unset http_proxy
+unset https_proxy
+unset ftp_proxy
+
+# Run everything using libguestfs.git.
+d=$HOME/d/libguestfs
+export PATH=\
+$d/align:\
+$d/builder:\
+$d/cat:\
+$d/df:\
+$d/edit:\
+$d/fish:\
+$d/format:\
+$d/fuse:\
+$d/rescue:\
+$d/resize:\
+$d/sparsify:\
+$d/sysprep:\
+$d/test-tool:\
+$d/tools:\
+$d/$PATH
+
+# Get everything into the cache.
+$d/run guestfish -a /dev/null run > /dev/null
+
+# Run techtalk.
+$d/run techtalk-pse
diff --git a/2013-kvm-forum/style.css b/2013-kvm-forum/style.css
new file mode 100644 (file)
index 0000000..f11ec9a
--- /dev/null
@@ -0,0 +1,67 @@
+/* Red Hat red is rgb(204,0,0). */
+
+body {
+    background: url(redhat.png) no-repeat;
+    background-position: 98% 0;
+    font-size: 24pt; /* For max */
+    /* font-size: 20pt; */ /* For 1024x768 */
+    /* font-family: liberation, helvetica; */
+    font-family: helvetica;
+}
+
+body td { /* why?? */
+    /*font-size: 28pt;*/
+    font-size: 20pt;
+}
+
+h1 {
+    color: rgb(204,0,0);
+    /*font-size: 48px;*/
+    font-size: 40px;
+    top: 8;
+    left: 0;
+    border-bottom: 2px solid rgb(204,0,0);
+}
+
+b {
+    color: rgb(204,0,0);
+}
+
+div#titlepage {
+    margin-top: 100px;
+    text-align: center;
+}
+
+div#titlepage p.title {
+    color: rgb(204,0,0);
+    font-weight: bold;
+    font-size: 48px;
+}
+
+div#titlepage author {
+    font-size: 36px;
+}
+
+/* Code */
+pre.code {
+    margin-left: 1em;
+    background: #eee;
+}
+
+code {
+    color: rgb(204,0,0);
+}
+
+/* Bullet points */
+li {
+    padding-bottom: 16px;
+}
+
+/* Logo */
+img#fish {
+    position: absolute;
+    top: 128px;
+    right: 32px;
+    width: 200px;
+    /*height: 256px;*/
+}
\ No newline at end of file