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