Add RAID viewer.
[libguestfs-talks.git] / 2011-seminar / README
1 Welcome:
2
3  - good morning to folks in the US, good afternoon or evening everywhere else
4  - welcome to the libguestfs webinar
5  - I am your host, Richard Jones
6
7  - a few administration points to begin with
8  - please save questions to the end
9  - you can also join the IRC channel #libguestfs and post questions
10    at any time
11  - if you're having problems with webex, see:
12    https://rwmj.wordpress.com/2011/11/17/libguestfs-web-seminar-this-friday/
13  - there is a handout with accompanying slides, see my blog
14  - the session is being recorded
15  - after the session, a recording will be made available; keep an eye
16    on my blog
17  - after the session, all the programs, etc will be made available
18
19
20 Part 1: an overview of libguestfs
21 ----------------------------------------------------------------------
22
23 1. Introduction and what it is
24
25 Libguestfs is a set of tools for viewing, editing and creating
26 virtual machine disk images.  That includes:
27
28  - injecting files into disk images
29  - editing files
30  - creating disk images entirely from scratch
31  - resizing them
32  - adding, moving and deleting partitions and logical volumes
33  - examining disk images to find out what operating systems they contain
34    and what applications are installed
35  - rescuing VMs that don't boot
36
37 It is also a library, available from C, C++, Perl, Python, Ruby, Java,
38 OCaml and from shell scripts.
39
40 It is also a FUSE module, that lets you safely mount guest filesystems
41 on the host.
42
43 Libguestfs can access virtually any disk image: We support all known
44 types of Linux filesystem, such as ext2/3/4, XFS, btrfs, GFS2, etc.
45 We support NTFS and FAT for Windows guests.  We also support Mac OS X
46 and BSD filesystems.  We fully support LVM, GPT partition tables.
47 qcow2, VirtualBox VDI.  We have partial support for VMware VMDK.
48 And much more.
49
50 Libguestfs can also access and modify the Windows Registry, read
51 the Windows Event log, change Linux configuration files, and read
52 Linux log files.
53
54
55 2. guestfish example
56
57   - rm /etc/udev/rules.d/70-persistent-net.rules (script - sysprep.sh)
58
59   - make a disk (script - new-disk.sh)   (diagram)
60
61   - interactive on a disk image
62       guestfish --ro -a new-disk.img -i
63       # type some filesystem commands
64       # show inspection data
65
66     a more realistic script would edit /etc/fstab, reset ssh host keys
67     (in RHEL 6.3: see virt-sysprep)
68
69   - show guestmount-ing a disk image
70
71
72 3. python example
73   - get version of firefox installed (for any guest)
74
75   - takes 12 seconds to run
76   - doing a lot of work in those 12 seconds
77   - using the API directly gives you more control
78
79
80 4. virt-df historical
81   - graphs and trends
82
83     (show diagram)
84
85     show cron job
86
87     show data files
88
89     libreoffice builder-rhel6.ods cooking.ods
90
91
92 5. inspection
93   - disk images
94
95   - run virt-filesystems -a on each
96
97   - run virt-inspector on each
98       virt-inspector disk.img | ../highlight | less -r
99
100   - xpath queries : app version
101       virt-inspector disk2.img | \
102          xmlstarlet sel -t -c '//application[name="firefox"]'
103
104   - xpath queries : icon
105       virt-inspector disk2.img | \
106          xmlstarlet sel -t -c 'string(//icon)' | base64 -i -d | display -
107
108
109 6. alignment/resize
110   - show alignment problems in WinXP guest
111
112       virt-alignment-scan -a winxp.img
113
114   - realign and resize it
115
116       rm -f resized.img
117       truncate -s 10G resized.img
118       virt-resize winxp.img resized.img --expand /dev/sda1 --alignment 2048
119
120   - performance discussion  (diagram here)
121   - show new alignment
122
123       virt-alignment-scan -a resized.img
124
125   - show it boots
126
127       qemu-kvm -m 1024 -hda resized.img
128
129   - note this is a RHEL 6.3 feature
130
131
132 Part 2: preview of RHEL 6.3
133 ----------------------------------------------------------------------
134
135 7.
136
137 (show diagram)
138
139 For RHEL 6.0 the focus was on making bug free packages available,
140 but the performance was quite poor.
141
142 For RHEL 6.1 we concentrated on performance and a few features.
143
144 RHEL 6.3 is 6-7 months away
145 but there are already preview packages
146
147    1.7.17 (1.8) -> 1.14 (about 11 months of upstream development)
148
149 Major new features include:
150
151  - new tools (for alignment, sysprep, virt-ls -lR, virt-copy-in/out)
152
153  - further improvements to Windows support, such as being able to use
154    drive letters from most tools
155
156  - major API extensions for copying whole devices, cancelling
157    long-running operations, brtfs, event API
158
159  - improvements to guest inspection: live CDs, logos
160
161  - fully implemented and supported Ruby and Java bindings
162
163  - 40-50 bugs fixed
164
165  - preview packages
166
167
168 8. Questions