50d21455ba2acfca129487fc61892429548c92a6
[libguestfs.git] / README
1 Libguestfs is a library for accessing and modifying guest disk images.
2 Amongst the things this is good for: making batch configuration
3 changes to guests, getting disk used/free statistics (see also:
4 virt-df), migrating between virtualization systems (see also:
5 virt-p2v), performing partial backups, performing partial guest
6 clones, cloning guests and changing registry/UUID/hostname info, and
7 much else besides.
8
9 Libguestfs uses Linux kernel and qemu code, and can access any type of
10 guest filesystem that Linux and qemu can, including but not limited
11 to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
12 schemes, qcow, qcow2, vmdk.
13
14 Libguestfs provides ways to enumerate guest storage (eg. partitions,
15 LVs, what filesystem is in each LV, etc.).  It can also run commands
16 in the context of the guest.  Also you can access filesystems over FTP.
17
18 Libguestfs is a library that can be linked with C and C++ management
19 programs (or management programs written in OCaml, Perl, Python or Ruby).
20 You can also use it from shell scripts or the command line.
21
22 Libguestfs was written by Richard W.M. Jones (rjones@redhat.com).
23 For discussion please use the fedora-virt mailing list:
24
25   https://www.redhat.com/mailman/listinfo/fedora-virt
26
27
28 Requirements
29 ----------------------------------------------------------------------
30
31 - recent QEMU with vmchannel support
32
33 - febootstrap >= 1.5
34
35 - XDR, rpcgen
36
37 - Augeas (http://augeas.net/)
38
39 - perldoc (pod2man, pod2text) to generate the manual pages and
40 other documentation.
41
42 - (Optional) Readline to have nicer command-line editing in guestfish.
43
44 - (Optional) OCaml if you want to rebuild the generated files, and
45 also to build the OCaml bindings
46
47 - (Optional) local Fedora mirror
48
49 - (Optional) Perl if you want to build the perl bindings
50
51 - (Optional) Python if you want to build the python bindings
52
53 - (Optional) Ruby, rake if you want to build the ruby bindings
54
55 Running ./configure will check you have all the requirements installed
56 on your machine.
57
58
59 Building
60 ----------------------------------------------------------------------
61
62 Then make the daemon, library and root filesystem:
63
64   ./configure [--with-mirror=URI]
65   make
66
67 Use the optional --with-mirror parameter to specify the URI of a local
68 Fedora mirror.  See the discussion of the MIRROR parameter in the
69 febootstrap(8) manpage.
70
71 Finally run the tests:
72
73   make check
74
75 If everything works, you can install the library and tools by running
76 these commands as root:
77
78   make install
79
80
81 Notes on cross-architecture support
82 ----------------------------------------------------------------------
83
84 At the moment we basically don't support cross-architecture or
85 32-on-64.  This limits what is possible for some guests.  Filesystem
86 operations and FTP export will work fine, but running commands in
87 guests may not be possible.
88
89 To enable this requires work for cross-architecture and 32-on-64
90 support in febootstrap, fakeroot and fakechroot.
91
92 The daemon/ directory contains its own configure script.  This is so
93 that in future we will be able to cross-compile the daemon.
94
95
96 Mirroring tip
97 ----------------------------------------------------------------------
98
99 Having a local Fedora mirror makes a massive difference to the time it
100 takes to build and rebuild initramfs images.
101
102 Failing that, use squid to cache yum downloads, but read this first:
103 https://lists.dulug.duke.edu/pipermail/yum/2006-August/009041.html
104 (In brief, because yum chooses random mirrors each time, squid doesn't
105 work very well with default yum configuration.  To get around this,
106 choose a Fedora mirror which is close to you, set this with
107 './configure --with-mirror=[...]', and then proxy the whole lot
108 through squid by setting http_proxy environment variable).
109
110 You will also need to substantially increase the squid configuration
111 limits:
112 http://fedoraproject.org/wiki/Using_Mock_to_test_package_builds#Using_Squid_to_Speed_Up_Mock_package_downloads
113
114 IntelligentMirror is another possibility, although I couldn't get it
115 to work for me.
116
117
118 Copyright and license information
119 ----------------------------------------------------------------------
120
121 Copyright (C) 2009 Red Hat Inc.
122
123 The library is distributed under the LGPLv2+.  The programs are
124 distributed under the GPLv2+.  Please see the files COPYING and
125 COPYING.LIB for full license information.