Add 2013 KVM Forum talk.
[libguestfs-talks.git] / 2013-kvm-forum / notes.txt
1 Audience:
2  - libvirt developers
3
4 Interested in:
5  - what it is
6  - new developments
7
8 [---- OVERVIEW ----]
9
10 Libguestfs is a C library for accessing and creating
11 disk images.  It has been in development for four and a half
12 years, is very mature, and is used in many large projects
13 such as: virt-v2v, OpenStack, 
14
15 Like libvirt, the C API is long term stable so a program
16 written against the API four years ago will still work today.
17
18 There are bindings in lots of programming languages.
19 Here is an example of a Python program using the API to create a
20 partitioned disk image with some content from a tar file.
21
22 Show create.py
23
24 Run create.py
25
26 virt-filesystems -a disk.img --all --long -h
27
28 virt-df -a disk.img -h
29
30 guestfish --ro -a disk.img -m /dev/sda1 find /
31
32
33
34
35
36
37 [---- TOOLS ----]
38
39
40 We have a lot of tools associated with libguestfs:
41
42 virt-<TAB>
43
44 Pick a few.
45
46 Today I want to just mention virt-builder which is a tool
47 for rapidly and safely customizing templates of virtual
48 machines.
49
50 virt-builder -l
51
52 virt-builder fedora-19 \
53   --hostname f19.example.com \
54   --firstboot-install nmap \
55   --edit '/etc/yum.conf: s/gpgcheck=1/gpgcheck=0/'
56
57
58 [---- LIBVIRT INTEGRATION ---]
59
60 How libguestfs uses libvirt:
61
62 Behind the scenes we create a captive appliance.  Since Fedora 18 &
63 RHEL 7, we use libvirt to manage the appliance and sVirt to protect
64 the host from rogue filesystems.
65
66
67 Our use of libvirt APIs is very simple:
68  - virConnect*
69  - "lifecycle APIs" like virDomainCreateXML
70  - libvirt XML
71  - hotplugging APIs
72  - capabilities
73
74 What we DON'T care about:
75
76  - live migration
77  - stable guest ABI
78  - storage APIs
79  - snapshots
80  - NUMA
81
82 Bugs in libvirt:
83
84  - Tracker: 910269
85  - <cpu mode="host-model"> (WORKAROUND)
86  - qemu: could not load kernel ... Permission denied
87  - libvirt doesn't label backing sockets, eg. qcow2 using NBD backing
88  - could not destroy libvirt domain: Requested operation is not valid: domain is not running
89  - libvirt chown's <kernel> file to root, but doesn't restore ownership
90  - XML error: No PCI buses available (FIXED)
91  - This QEMU doesn't support virtio scsi controller (qemu bug: FIXED)
92    (example of non-obvious error message)
93  - TMPDIR / environment variable handling is broken (WORKAROUND)
94
95 Missing features in libvirt:
96
97  - labelling backing sockets
98  - no way to specify net= parameter to qemu
99  - unnamed guests
100
101 Things we don't like:
102
103  - error messages are confusing, real information is hidden
104  - logging/debugging is hard
105  - fragile
106  - regressions
107  - essentially impossible to use libvirt/sVirt on anything except Fedora/RHEL
108
109 Things we like:
110
111  - sVirt
112  - having someone else deal with qemu
113  - hotplugging