Minor updates to introduction.
[libguestfs-talks.git] / 2015-kvm-forum / NOTES
1 Demo & explanation
2 ----------------------------------------------------------------------
3
4 [0000 - introduction]
5
6 [1000 - demo of running virt-v2v]
7
8 [2000 - what virt-v2v does]
9
10 What's virt-v2v for?  It takes a virtual machine running on another
11 hypervisor and converts it to run on KVM.
12
13 We also have a virt-p2v ISO which does the same, but for physical
14 machines.
15
16 The difficulties involve changing the bootloader or initrd, Windows
17 Critical Device Database, installing virtio drivers, uninstalling
18 VMware tools; and copying the disk contents from the source to the
19 destination efficiently.
20
21 [3000 - p2v screenshot]
22
23 [3001 - p2v screenshot]
24
25
26 Features of qemu & improvements vs old version
27 ----------------------------------------------------------------------
28
29 [4000 - old vs new virt-v2v]
30
31 The previous version of virt-v2v first released in 2009 worked by
32 first copying the whole disk from the source hypervisor and
33 then converting it.  Disks can be very large (terabytes) so
34 the copy phase could take hours.  The conversion only takes
35 a few seconds, but is very sensitive to the exact contents
36 of the guest so of the two steps conversion is the most likely
37 to fail.  We sometimes ended up with unhappy customers who
38 had been waiting for hours only for the last step to fail.
39
40 When I came to improve virt-v2v last year [2014], I saw that
41 we could use features of qemu that were not available before
42 to improve the experience.  It was possible, now, to do the
43 conversion first, and the copying second.  Not only that, but
44 we could make the copying much faster by using new features
45 of qemu to only copy the data that was actually in use by
46 the guest.  Deleted files, and areas of blank disk, didn't
47 need to be copied.
48
49
50 [5000 - overlay on top of network backing disk]
51
52 How does the new virt-v2v work?  First we put an overlay
53 qcow2 on top of the source disk image.  We now have a working
54 curl driver, ssh that I wrote, and nbd.  So we can have
55 the read-only backing file access VMware vCenter, Xen or a
56 physical machine.
57
58
59 [5100 - reads and writes]
60
61 In addition, copy-on-read means that this is very efficient --
62 it only accesses each disk block from the source at most once.
63
64
65 [5200 - fstrim]
66
67 Since the work done by Paolo Bonzini, Kevin Wolf and others,
68 we're now able to 'fstrim' the overlay.  The qcow2 "v3" format
69 overlay stores the zero clusters corresponding to unused and
70 deleted areas in the source disk.
71
72
73 [5300 - copy & convert]
74
75 So when we've finished conversion and start the copy, we never
76 even have to *read* the unused parts of the disk.  We only copy
77 parts of the disk that the guest is actually using.  This can
78 bring down copy times from hours to minutes, massively reducing
79 the time taken to do conversions.
80
81
82 [6000 - summary of new features]
83
84
85
86
87
88 Future
89 ----------------------------------------------------------------------
90
91 [7000 - competing technologies]
92
93 Discussion about competing technologies / implementations.
94
95
96
97
98
99 Summary & questions
100 ----------------------------------------------------------------------
101
102 [9000 - see final slide from 2014 talk]