Update RELEASE-NOTES file.
[libguestfs.git] / README
1 Libguestfs is tools and a library for accessing and modifying guest
2 disk images.  For more information see the home page:
3
4   http://libguestfs.org/
5
6 For discussion, development, patches, etc. please use the mailing
7 list:
8
9   http://www.redhat.com/mailman/listinfo/libguestfs
10
11
12 Requirements
13 ----------------------------------------------------------------------
14
15 - recent QEMU >= 0.13 with virtio-serial support
16
17 - kernel >= 2.6.34 with virtio-serial support enabled.  virtio-block
18   and virtio-serial support are not required but highly recommended.
19
20 - febootstrap >= 3.0 (recommended >= 3.3)
21      *NB*: febootstrap 2.x WILL NOT WORK
22            febootstrap 3.x is distro-independent, and is required on
23              Debian and other distros too
24
25 - XDR, rpcgen (on Linux these are provided by glibc)
26
27 - pcre (Perl Compatible Regular Expressions C library) (optional)
28
29 - libmagic (the library that corresponds to the 'file' command) (optional)
30
31 - libvirt (optional)
32
33 - libxml2 (optional)
34
35 - libconfig (optional, to parse /etc/libguestfs-tools.conf)
36
37 - Augeas (http://augeas.net/) (optional)
38
39 - gperf
40
41 - squashfs-tools (mksquashfs only)
42
43 - genisoimage (NOT mkisofs any more)
44
45 - hivex >= 1.2.1 (http://libguestfs.org/download)
46
47 - (Optional) Berkeley DB 'db_dump' and 'db_load' utilities
48   (db4-utils or db4.X-util or similar)
49
50 - (Optional) FUSE to build the FUSE module
51
52 - perldoc (pod2man, pod2text, pod2html) to generate the manual pages
53   and other documentation.
54
55 - (Optional) Readline to have nicer command-line editing in guestfish.
56
57 - (Optional) xmllint to validate virt-inspector RELAX NG schema
58
59 - (Optional) OCaml if you want to rebuild the generated files, and
60   also to build the OCaml bindings
61
62 - (Optional) Perl if you want to build the perl bindings
63
64 - (Optional) Python if you want to build the python bindings
65
66 - (Optional) Ruby, rake if you want to build the ruby bindings
67
68 - (Optional) Java, JNI, jpackage-utils if you want to build the java
69 bindings
70
71 - (Optional) GHC if you want to build the Haskell bindings
72
73 - (Optional) Perl Sys::Virt module.
74
75 - (Optional) Perl Win::Hivex module.
76
77 - (Optional) Perl Pod::Usage module.
78
79 - (Optional) Perl Test::More module (from perl Test::Simple).
80
81 - (Optional) Perl String::ShellQuote module.
82
83 - (Optional, but highly recommended) perl-libintl for translating perl code.
84
85 - po4a for translating manpages and POD files.
86   This is optional when compiling from the tarball, but mandatory
87   if you compile from git.
88
89 - (Optional) PHP, phpize if you want to build the PHP bindings
90
91 - (Optional, but highly recommended) getfacl, getfattr
92
93 Running ./configure will check you have all the requirements installed
94 on your machine.
95
96
97 Building
98 ----------------------------------------------------------------------
99
100 Then make the daemon, library and root filesystem:
101
102   ./configure
103   make
104
105 Finally run the tests:
106
107   make check
108
109 If everything works, you can install the library and tools by running
110 this command as root:
111
112   make install
113
114
115 qemu
116 ----------------------------------------------------------------------
117
118 By far the most common problem is with broken or incompatible
119 qemu releases.
120
121 Different versions of qemu have problems booting the appliance for
122 different reasons.  This varies between versions of qemu, and Linux
123 distributions which add their own patches.
124
125 If you find a problem, you could try using your own qemu built from
126 source (qemu is very easy to build from source), with a 'qemu
127 wrapper'.  Qemu wrappers are described in the guestfs(3) manpage.
128
129
130 Note on using KVM
131 ----------------------------------------------------------------------
132
133 By default the configure script will look for qemu-kvm (KVM support).
134 You will need a reasonably recent processor for this to work.  KVM is
135 much faster than using plain Qemu.
136
137 You may also need to enable KVM support for non-root users, by following
138 these instructions:
139
140   http://www.linux-kvm.org/page/FAQ#How_can_I_use_kvm_with_a_non-privileged_user.3F
141
142 On some systems, this will work too:
143
144   chmod o+rw /dev/kvm
145
146 On some systems, the chmod will not survive a reboot, and you will
147 need to make edits to the udev configuration.
148
149
150 vmchannel
151 ----------------------------------------------------------------------
152
153 Previous versions of libguestfs required something called "vmchannel".
154 Vmchannel is a special device given to virtual machines which allows
155 them to communicate in some way with the host, often (but not always)
156 without using a traditional network device.  In reality, there is no
157 one thing called "vmchannel".  This idea has been reimplemented
158 several times under the name vmchannel, and other hypervisors have
159 their own incompatible implementation(s) too.
160
161 In libguestfs <= 1.0.71, we required a specific vmchannel which is
162 properly known as "guestfwd" and has been upstream in qemu since here:
163
164   http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg01042.html
165
166 In libguestfs >= 1.0.71 we don't require any vmchannel implementation,
167 as long as qemu has been compiled with support for SLIRP (user mode
168 networking, or "-net user"), which is almost always the case.
169
170 In libguestfs >= 1.5.4 we switched again to using qemu's virtio-serial
171 and removed all the other vmchannels and the SLIRP channel.
172
173
174 Supermin appliance
175 ----------------------------------------------------------------------
176
177 In libguestfs >= 1.7.19 the supermin appliance is the default and only
178 supported form of appliance.  For more information see febootstrap
179 (http://people.redhat.com/~rjones/febootstrap/).
180
181
182 Mirroring tip
183 ----------------------------------------------------------------------
184
185 On my machines I can usually rebuild the appliance in around 3
186 minutes.  If it takes much longer for you, use a local distro mirror
187 or squid.
188
189 To use squid to cache yum downloads, read this first:
190 https://lists.dulug.duke.edu/pipermail/yum/2006-August/009041.html
191 (In brief, because yum chooses random mirrors each time, squid doesn't
192 work very well with default yum configuration.  To get around this,
193 choose a Fedora mirror which is close to you, set this with
194 './configure --with-mirror=[...]', and then proxy the whole lot
195 through squid by setting http_proxy environment variable).
196
197 You will also need to substantially increase the squid configuration
198 limits:
199 http://fedoraproject.org/wiki/Using_Mock_to_test_package_builds#Using_Squid_to_Speed_Up_Mock_package_downloads
200
201
202 Porting to other Linux distros / non-Linux
203 ----------------------------------------------------------------------
204
205 libguestfs itself should be fairly portable to other Linux
206 distributions.  Non-Linux ports are trickier, but we will accept
207 patches if they aren't too invasive.
208
209 The main porting issues are with the dependencies needed to build the
210 appliance.  You will need to port the febootstrap first
211 (http://people.redhat.com/~rjones/febootstrap/).
212
213
214 Copyright and license information
215 ----------------------------------------------------------------------
216
217 Copyright (C) 2009-2010 Red Hat Inc.
218
219 The library is distributed under the LGPLv2+.  The programs are
220 distributed under the GPLv2+.  Please see the files COPYING and
221 COPYING.LIB for full license information.