1 Libguestfs is tools and a library for accessing and modifying guest
2 disk images. For more information see the home page:
6 For discussion, development, patches, etc. please use the mailing
9 http://www.redhat.com/mailman/listinfo/libguestfs
13 ----------------------------------------------------------------------
15 - recent QEMU >= 0.13 with virtio-serial support
17 - kernel >= 2.6.34 with virtio-serial support enabled. virtio-block
18 support is not required but comes highly recommended.
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
25 - XDR, rpcgen (on Linux these are provided by glibc)
27 - pcre (Perl Compatible Regular Expressions C library) (optional)
29 - libmagic (the library that corresponds to the 'file' command) (optional)
35 - libconfig (optional, to parse /etc/libguestfs-tools.conf)
37 - Augeas (http://augeas.net/) (optional)
41 - squashfs-tools (mksquashfs only)
43 - genisoimage (NOT mkisofs any more)
45 - hivex >= 1.2.1 (http://libguestfs.org/download)
47 - (Optional) Berkeley DB 'db_dump' and 'db_load' utilities
48 (db4-utils or db4.X-util or similar)
50 - (Optional) FUSE to build the FUSE module
52 - perldoc (pod2man, pod2text, pod2html) to generate the manual pages
53 and other documentation.
55 - (Optional) Readline to have nicer command-line editing in guestfish.
57 - (Optional) xmllint to validate virt-inspector RELAX NG schema
59 - (Optional) OCaml if you want to rebuild the generated files, and
60 also to build the OCaml bindings
62 - (Optional) OCaml PCRE bindings (ocaml-pcre).
64 - (Optional) Perl if you want to build the perl bindings
66 - (Optional) Python if you want to build the python bindings
68 - (Optional) Ruby, rake if you want to build the ruby bindings
70 - (Optional) Java, JNI, jpackage-utils if you want to build the java
73 - (Optional) GHC if you want to build the Haskell bindings
75 - (Optional) Perl Sys::Virt module.
77 - (Optional) Perl Win::Hivex module.
79 - (Optional) Perl Pod::Usage module.
81 - (Optional) Perl Test::More module (from perl Test::Simple).
83 - (Optional) Perl String::ShellQuote module.
85 - (Optional, but highly recommended) perl-libintl for translating perl code.
87 - po4a for translating manpages and POD files.
88 This is optional when compiling from the tarball, but mandatory
89 if you compile from git.
91 - (Optional) PHP, phpize if you want to build the PHP bindings
93 - (Optional, but highly recommended) getfacl, getfattr
95 Running ./configure will check you have all the requirements installed
100 ----------------------------------------------------------------------
102 Then make the daemon, library and root filesystem:
107 Finally run the tests:
111 If everything works, you can install the library and tools by running
112 this command as root:
116 You can run the virt tools without needing to install, using the "run"
117 script in the top directory. This script sets up some environment
118 variables. For example:
120 ./run ./inspector/virt-inspector [usual virt-inspector args ...]
122 If you are already in the inspector/ subdirectory, then the following
123 command will also work:
125 ../run ./virt-inspector [...]
127 You can also make a symlink (note: NOT a hard link) from your $PATH to
131 ln -s ~/libguestfs/run libguestfs-run
133 libguestfs-run ./inspector/virt-inspector [...]
135 You can also run the C programs under valgrind like this:
137 ./run valgrind [valgrind opts...] ./cat/virt-cat [virt-cat opts...]
139 This also works with sudo (eg. if you need root access for libvirt or
140 to access a block device):
142 sudo ./run ./cat/virt-cat -d LinuxGuest /etc/passwd
146 ----------------------------------------------------------------------
148 By far the most common problem is with broken or incompatible
151 Different versions of qemu have problems booting the appliance for
152 different reasons. This varies between versions of qemu, and Linux
153 distributions which add their own patches.
155 If you find a problem, you could try using your own qemu built from
156 source (qemu is very easy to build from source), with a 'qemu
157 wrapper'. Qemu wrappers are described in the guestfs(3) manpage.
161 ----------------------------------------------------------------------
163 By default the configure script will look for qemu-kvm (KVM support).
164 You will need a reasonably recent processor for this to work. KVM is
165 much faster than using plain Qemu.
167 You may also need to enable KVM support for non-root users, by following
170 http://www.linux-kvm.org/page/FAQ#How_can_I_use_kvm_with_a_non-privileged_user.3F
172 On some systems, this will work too:
176 On some systems, the chmod will not survive a reboot, and you will
177 need to make edits to the udev configuration.
181 ----------------------------------------------------------------------
183 Previous versions of libguestfs required something called "vmchannel".
184 Vmchannel is a special device given to virtual machines which allows
185 them to communicate in some way with the host, often (but not always)
186 without using a traditional network device. In reality, there is no
187 one thing called "vmchannel". This idea has been reimplemented
188 several times under the name vmchannel, and other hypervisors have
189 their own incompatible implementation(s) too.
191 In libguestfs <= 1.0.71, we required a specific vmchannel which is
192 properly known as "guestfwd" and has been upstream in qemu since here:
194 http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg01042.html
196 In libguestfs >= 1.0.71 we don't require any vmchannel implementation,
197 as long as qemu has been compiled with support for SLIRP (user mode
198 networking, or "-net user"), which is almost always the case.
200 In libguestfs >= 1.5.4 we switched again to using qemu's virtio-serial
201 and removed all the other vmchannels and the SLIRP channel.
205 ----------------------------------------------------------------------
207 In libguestfs >= 1.7.19 the supermin appliance is the default and only
208 supported form of appliance. For more information see febootstrap
209 (http://people.redhat.com/~rjones/febootstrap/).
213 ----------------------------------------------------------------------
215 On my machines I can usually rebuild the appliance in around 3
216 minutes. If it takes much longer for you, use a local distro mirror
219 To use squid to cache yum downloads, read this first:
220 https://lists.dulug.duke.edu/pipermail/yum/2006-August/009041.html
221 (In brief, because yum chooses random mirrors each time, squid doesn't
222 work very well with default yum configuration. To get around this,
223 choose a Fedora mirror which is close to you, set this with
224 './configure --with-mirror=[...]', and then proxy the whole lot
225 through squid by setting http_proxy environment variable).
227 You will also need to substantially increase the squid configuration
229 http://fedoraproject.org/wiki/Using_Mock_to_test_package_builds#Using_Squid_to_Speed_Up_Mock_package_downloads
232 Porting to other Linux distros / non-Linux
233 ----------------------------------------------------------------------
235 libguestfs itself should be fairly portable to other Linux
236 distributions. Non-Linux ports are trickier, but we will accept
237 patches if they aren't too invasive.
239 The main porting issues are with the dependencies needed to build the
240 appliance. You will need to port the febootstrap first
241 (http://people.redhat.com/~rjones/febootstrap/).
244 Copyright and license information
245 ----------------------------------------------------------------------
247 Copyright (C) 2009-2011 Red Hat Inc.
249 The library is distributed under the LGPLv2+. The programs are
250 distributed under the GPLv2+. Please see the files COPYING and
251 COPYING.LIB for full license information.