--- /dev/null
+*.d/disk.img
+bindings
+history
--- /dev/null
+<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>
--- /dev/null
+<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><guestfs.h></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>
--- /dev/null
+#!/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 ()
--- /dev/null
+#!/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
--- /dev/null
+<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>
--- /dev/null
+fedora-19.img
--- /dev/null
+#!/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
--- /dev/null
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Libguestfs uses libvirt</h1>
+
--- /dev/null
+<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" />
--- /dev/null
+<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" />
--- /dev/null
+<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>
+
--- /dev/null
+<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>
--- /dev/null
+<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 <kernel> file to root, but doesn't restore ownership
+ (916644)
+<li> libvirt doesn't label backing sockets, eg. qcow2 using NBD backing
+ (1011063)
+</ul>
--- /dev/null
+<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>
--- /dev/null
+<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 & debugging is hard
+<li> regressions
+<li> essentially impossible to use libvirt/sVirt on anything except Fedora/RHEL
+</ul>
--- /dev/null
+<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>
--- /dev/null
+<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>
--- /dev/null
+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'.
--- /dev/null
+# -*- 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
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+# -*- 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 "$@"
+}
--- /dev/null
+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
--- /dev/null
+#!/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
--- /dev/null
+/* 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