From: Richard W.M. Jones Date: Mon, 3 Aug 2015 13:00:55 +0000 (+0100) Subject: Initial KVM Forum 2015 talk. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=ae1778239dc6b8e62e4284af4621b3a1dba9f613;p=libguestfs-talks.git Initial KVM Forum 2015 talk. --- diff --git a/2015-kvm-forum/.gitignore b/2015-kvm-forum/.gitignore new file mode 100644 index 0000000..29d8f51 --- /dev/null +++ b/2015-kvm-forum/.gitignore @@ -0,0 +1,4 @@ +/bindings +/history +/virt-v2v.d/windows-sda +/virt-v2v.d/windows.xml diff --git a/2015-kvm-forum/0000-introduction.html b/2015-kvm-forum/0000-introduction.html new file mode 100644 index 0000000..ab96ea4 --- /dev/null +++ b/2015-kvm-forum/0000-introduction.html @@ -0,0 +1,27 @@ + + + + +
+

+ New qemu technology used in virt-v2v +

+

+ Richard W.M. Jones
+ rjones @ redhat.com +

+

+ virt-v2v converts guests
+ from VMware, Xen, and Hyper-V,
+ OVAs and physical machines,
+ so they run efficiently on KVM
+

+

+ virt-v2v exports to OpenStack, RHEV,
+ libvirt, plain KVM, and local disk
+

+

+ guests supported are: RHEL 3+,
+ Windows XP — 7, Fedora, OpenSUSE
+

+
diff --git a/2015-kvm-forum/1000-virt-v2v.term b/2015-kvm-forum/1000-virt-v2v.term new file mode 100755 index 0000000..01275a4 --- /dev/null +++ b/2015-kvm-forum/1000-virt-v2v.term @@ -0,0 +1,12 @@ +#!/bin/bash - + +source functions + +# History. +remember 'virt-v2v -i disk windows.qcow2 -o local -os .' +remember 'ls -l -h' + +echo "Running virt-v2v" + +cd virt-v2v.d +terminal diff --git a/2015-kvm-forum/2000-what-v2v-does.d/destvm.png b/2015-kvm-forum/2000-what-v2v-does.d/destvm.png new file mode 100644 index 0000000..9a32d8e Binary files /dev/null and b/2015-kvm-forum/2000-what-v2v-does.d/destvm.png differ diff --git a/2015-kvm-forum/2000-what-v2v-does.d/drawing.svg b/2015-kvm-forum/2000-what-v2v-does.d/drawing.svg new file mode 100644 index 0000000..b946d57 --- /dev/null +++ b/2015-kvm-forum/2000-what-v2v-does.d/drawing.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + Source VM/physicalmachine + HP SmartArray ctrlr + Intel X540ethernet + VGA + + + + + Destinationvirtualmachine + virtio-blk + virtio-net + qxl + + + diff --git a/2015-kvm-forum/2000-what-v2v-does.d/srcvm.png b/2015-kvm-forum/2000-what-v2v-does.d/srcvm.png new file mode 100644 index 0000000..721550f Binary files /dev/null and b/2015-kvm-forum/2000-what-v2v-does.d/srcvm.png differ diff --git a/2015-kvm-forum/2000-what-v2v-does.html b/2015-kvm-forum/2000-what-v2v-does.html new file mode 100644 index 0000000..257040b --- /dev/null +++ b/2015-kvm-forum/2000-what-v2v-does.html @@ -0,0 +1,11 @@ + + + + +

What's the difficult bit?

+ + + + diff --git a/2015-kvm-forum/3000-p2v-screenshot.html b/2015-kvm-forum/3000-p2v-screenshot.html new file mode 100644 index 0000000..3c34679 --- /dev/null +++ b/2015-kvm-forum/3000-p2v-screenshot.html @@ -0,0 +1,7 @@ + + + + +

virt-p2v CD/ISO/PXE

+ + diff --git a/2015-kvm-forum/3000-p2v.d/p2v-1.png b/2015-kvm-forum/3000-p2v.d/p2v-1.png new file mode 100644 index 0000000..0830b3d Binary files /dev/null and b/2015-kvm-forum/3000-p2v.d/p2v-1.png differ diff --git a/2015-kvm-forum/3000-p2v.d/p2v-2.png b/2015-kvm-forum/3000-p2v.d/p2v-2.png new file mode 100644 index 0000000..ccda247 Binary files /dev/null and b/2015-kvm-forum/3000-p2v.d/p2v-2.png differ diff --git a/2015-kvm-forum/3001-p2v-screenshot.html b/2015-kvm-forum/3001-p2v-screenshot.html new file mode 100644 index 0000000..18f2c4c --- /dev/null +++ b/2015-kvm-forum/3001-p2v-screenshot.html @@ -0,0 +1,7 @@ + + + + +

virt-p2v CD/ISO/PXE

+ + diff --git a/2015-kvm-forum/4000-old-vs-new.d/old-vs-new.png b/2015-kvm-forum/4000-old-vs-new.d/old-vs-new.png new file mode 100644 index 0000000..90ab1d0 Binary files /dev/null and b/2015-kvm-forum/4000-old-vs-new.d/old-vs-new.png differ diff --git a/2015-kvm-forum/4000-old-vs-new.d/old-vs-new.svg b/2015-kvm-forum/4000-old-vs-new.d/old-vs-new.svg new file mode 100644 index 0000000..9633fc3 --- /dev/null +++ b/2015-kvm-forum/4000-old-vs-new.d/old-vs-new.svg @@ -0,0 +1,2059 @@ + + + + + + + + + + image/svg+xml + + + + + + + + 2009 virt-v2v + 2014 virt-v2v + + copy + convert + convert + copy + + diff --git a/2015-kvm-forum/4000-old-vs-new.html b/2015-kvm-forum/4000-old-vs-new.html new file mode 100644 index 0000000..71dd93b --- /dev/null +++ b/2015-kvm-forum/4000-old-vs-new.html @@ -0,0 +1,11 @@ + + + + +

virt-v2v 2009 vs 2014

+ + + + diff --git a/2015-kvm-forum/5000-overlay-qcow2.html b/2015-kvm-forum/5000-overlay-qcow2.html new file mode 100644 index 0000000..974247b --- /dev/null +++ b/2015-kvm-forum/5000-overlay-qcow2.html @@ -0,0 +1,11 @@ + + + + +

Overlay with network backing disks

+ + + + diff --git a/2015-kvm-forum/5000-overlay.d/overlay-copy.svg b/2015-kvm-forum/5000-overlay.d/overlay-copy.svg new file mode 100644 index 0000000..c35c023 --- /dev/null +++ b/2015-kvm-forum/5000-overlay.d/overlay-copy.svg @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + qemu-img convert overlay.qcow2 destination + + diff --git a/2015-kvm-forum/5000-overlay.d/overlay-fstrim.svg b/2015-kvm-forum/5000-overlay.d/overlay-fstrim.svg new file mode 100644 index 0000000..a931eb8 --- /dev/null +++ b/2015-kvm-forum/5000-overlay.d/overlay-fstrim.svg @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2015-kvm-forum/5000-overlay.d/overlay-qcow2.svg b/2015-kvm-forum/5000-overlay.d/overlay-qcow2.svg new file mode 100644 index 0000000..ceea730 --- /dev/null +++ b/2015-kvm-forum/5000-overlay.d/overlay-qcow2.svg @@ -0,0 +1,3546 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + overlay.qcow2 + -b json:... + https + ssh + nbd + file + VMwarevCenter + Xen + physical(virt-p2v) + localdisk + + diff --git a/2015-kvm-forum/5000-overlay.d/overlay-reads-and-writes.svg b/2015-kvm-forum/5000-overlay.d/overlay-reads-and-writes.svg new file mode 100644 index 0000000..6c1b7e8 --- /dev/null +++ b/2015-kvm-forum/5000-overlay.d/overlay-reads-and-writes.svg @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2015-kvm-forum/5000-overlay.d/overlay.png b/2015-kvm-forum/5000-overlay.d/overlay.png new file mode 100644 index 0000000..fe946cf Binary files /dev/null and b/2015-kvm-forum/5000-overlay.d/overlay.png differ diff --git a/2015-kvm-forum/5100-overlay-reads-and-writes.html b/2015-kvm-forum/5100-overlay-reads-and-writes.html new file mode 100644 index 0000000..1438e05 --- /dev/null +++ b/2015-kvm-forum/5100-overlay-reads-and-writes.html @@ -0,0 +1,11 @@ + + + + +

Caching reads and writes

+ + + + diff --git a/2015-kvm-forum/5200-overlay-fstrim.html b/2015-kvm-forum/5200-overlay-fstrim.html new file mode 100644 index 0000000..f51ac5f --- /dev/null +++ b/2015-kvm-forum/5200-overlay-fstrim.html @@ -0,0 +1,11 @@ + + + + +

fstrim & discard

+ + + + diff --git a/2015-kvm-forum/5300-overlay-copy.html b/2015-kvm-forum/5300-overlay-copy.html new file mode 100644 index 0000000..00014d4 --- /dev/null +++ b/2015-kvm-forum/5300-overlay-copy.html @@ -0,0 +1,11 @@ + + + + +

copy & convert

+ + + + diff --git a/2015-kvm-forum/6000-new-features.html b/2015-kvm-forum/6000-new-features.html new file mode 100644 index 0000000..c75d807 --- /dev/null +++ b/2015-kvm-forum/6000-new-features.html @@ -0,0 +1,48 @@ + + + + +

New features

+ +
+
block/curl +
+Matthew Booth fixed a few bugs affecting modern curl, and now +it works reliably
+Daniel Barboza added timeouts
+I added cookie support +(for VMware vCenter) + +
+ +
block/ssh +
+I added this driver +(for Xen)
+It needs a bit of work still + +
+ +
copy-on-read +
+
+ +
discard & fstrim +
+qemu has had excellent discard support for a few years
+I added support for fstrim to ntfs-3g
+Massively reduces the time taken to copy guests
+ +
+ +
json: paths +
+Less error-prone than ordinary qemu block paths +
+ +
qcow2 v3 +
+Several enhancements, but the most important is support for zero clusters +
+ +
diff --git a/2015-kvm-forum/7000-competing-technology.html b/2015-kvm-forum/7000-competing-technology.html new file mode 100644 index 0000000..e3c2171 --- /dev/null +++ b/2015-kvm-forum/7000-competing-technology.html @@ -0,0 +1,6 @@ + + + + +

Competitors

+ diff --git a/2015-kvm-forum/9000-final.html b/2015-kvm-forum/9000-final.html new file mode 100644 index 0000000..aabf9eb --- /dev/null +++ b/2015-kvm-forum/9000-final.html @@ -0,0 +1,15 @@ + + + + +

virt-v2v & virt-p2v

+ + diff --git a/2015-kvm-forum/NOTES b/2015-kvm-forum/NOTES new file mode 100644 index 0000000..04bde9a --- /dev/null +++ b/2015-kvm-forum/NOTES @@ -0,0 +1,102 @@ +Demo & explanation +---------------------------------------------------------------------- + +[0000 - introduction] + +[1000 - demo of running virt-v2v] + +[2000 - what virt-v2v does] + +What's virt-v2v for? It takes a virtual machine running on another +hypervisor and converts it to run on KVM. + +We also have a virt-p2v ISO which does the same, but for physical +machines. + +The difficulties involve changing the bootloader or initrd, Windows +Critical Device Database, installing virtio drivers, uninstalling +VMware tools; and copying the disk contents from the source to the +destination efficiently. + +[3000 - p2v screenshot] + +[3001 - p2v screenshot] + + +Features of qemu & improvements vs old version +---------------------------------------------------------------------- + +[4000 - old vs new virt-v2v] + +The previous version of virt-v2v first released in 2009 worked by +first copying the whole disk from the source hypervisor and +then converting it. Disks can be very large (terabytes) so +the copy phase could take hours. The conversion only takes +a few seconds, but is very sensitive to the exact contents +of the guest so of the two steps conversion is the most likely +to fail. We sometimes ended up with unhappy customers who +had been waiting for hours only for the last step to fail. + +When I came to improve virt-v2v last year [2014], I saw that +we could use features of qemu that were not available before +to improve the experience. It was possible, now, to do the +conversion first, and the copying second. Not only that, but +we could make the copying much faster by using new features +of qemu to only copy the data that was actually in use by +the guest. Deleted files, and areas of blank disk, didn't +need to be copied. + + +[5000 - overlay on top of network backing disk] + +How does the new virt-v2v work? First we put an overlay +qcow2 on top of the source disk image. We now have a working +curl driver, ssh that I wrote, and nbd. So we can have +the read-only backing file access VMware vCenter, Xen or a +physical machine. + + +[5100 - reads and writes] + +In addition, copy-on-read means that this is very efficient -- +it only accesses each disk block from the source at most once. + + +[5200 - fstrim] + +Since the work done by Paolo Bonzini, Kevin Wolf and others, +we're now able to 'fstrim' the overlay. The qcow2 "v3" format +overlay stores the zero clusters corresponding to unused and +deleted areas in the source disk. + + +[5300 - copy & convert] + +So when we've finished conversion and start the copy, we never +even have to *read* the unused parts of the disk. We only copy +parts of the disk that the guest is actually using. This can +bring down copy times from hours to minutes, massively reducing +the time taken to do conversions. + + +[6000 - summary of new features] + + + + + +Future +---------------------------------------------------------------------- + +[7000 - competing technologies] + +Discussion about competing technologies / implementations. + + + + + +Summary & questions +---------------------------------------------------------------------- + +[9000 - see final slide from 2014 talk] \ No newline at end of file diff --git a/2015-kvm-forum/README b/2015-kvm-forum/README new file mode 100644 index 0000000..e29a915 --- /dev/null +++ b/2015-kvm-forum/README @@ -0,0 +1,11 @@ +This is a presentation given at the KVM Forum 2015 in Seattle, +covering the new technology from qemu that was used when writing +virt-v2v. + +It is essentially a longer version of this blog posting: + +http://rwmj.wordpress.com/2014/08/29/virt-v2v-better-living-through-new-technology/#content + +For more information about virt-v2v, read the manual here: + +http://libguestfs.org/virt-v2v.1.html diff --git a/2015-kvm-forum/bashrc b/2015-kvm-forum/bashrc new file mode 100644 index 0000000..4c6a3c6 --- /dev/null +++ b/2015-kvm-forum/bashrc @@ -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/2015-kvm-forum/code.js b/2015-kvm-forum/code.js new file mode 100644 index 0000000..e69de29 diff --git a/2015-kvm-forum/functions b/2015-kvm-forum/functions new file mode 100644 index 0000000..7baaed0 --- /dev/null +++ b/2015-kvm-forum/functions @@ -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 +# +# 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/2015-kvm-forum/redhat.png b/2015-kvm-forum/redhat.png new file mode 100644 index 0000000..f50076a Binary files /dev/null and b/2015-kvm-forum/redhat.png differ diff --git a/2015-kvm-forum/run b/2015-kvm-forum/run new file mode 100755 index 0000000..e80f070 --- /dev/null +++ b/2015-kvm-forum/run @@ -0,0 +1,22 @@ +#!/bin/bash - +# Run the talk. + +# Avoid GNOME keyring stupidity +export GNOME_KEYRING_CONTROL= +export GNOME_KEYRING_PID= + +# Clean up everything. +find -name '*~' -delete +rm -f virt-v2v.d/windows.xml +rm -f virt-v2v.d/windows-sda + +# No proxy. +unset http_proxy +unset https_proxy +unset ftp_proxy + +# Get everything into the cache. +guestfish -a /dev/null run > /dev/null & + +# Run techtalk. +techtalk-pse diff --git a/2015-kvm-forum/style.css b/2015-kvm-forum/style.css new file mode 100644 index 0000000..e32fc48 --- /dev/null +++ b/2015-kvm-forum/style.css @@ -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: 28pt; /* For max */ + /* font-size: 20pt; */ /* For 1024x768 */ + /* font-family: liberation, helvetica; */ + font-family: helvetica; +} + +body td, body th { /* why?? */ + font-size: 24pt; + padding-bottom: 8px; +} + +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 diff --git a/2015-kvm-forum/virt-v2v.d/windows.qcow2 b/2015-kvm-forum/virt-v2v.d/windows.qcow2 new file mode 100644 index 0000000..0de7a3a Binary files /dev/null and b/2015-kvm-forum/virt-v2v.d/windows.qcow2 differ