Start the generated code and code generator.
[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 mount guest filesystems on
17 the host (requires root privs and NFS).
18
19 Libguestfs is a library that can be linked with C and C++ management
20 programs (or management programs written in other languages, if people
21 contribute the language bindings).  You can also use it from shell
22 scripts or the command line.
23
24 Libguestfs was written by Richard W.M. Jones (rjones@redhat.com).
25 For discussion please use the fedora-virt mailing list:
26
27   https://www.redhat.com/mailman/listinfo/fedora-virt
28
29
30 Requirements
31 ----------------------------------------------------------------------
32
33 - recent QEMU with vmchannel support
34
35 - febootstrap >= 1.2
36
37 - XDR, rpcgen
38
39 - (Optional) perldoc to generate the manual pages
40
41 - (Optional) OCaml if you want to modify the code or rebuild certain
42 generated files.
43
44 - (Optional) local Fedora mirror
45
46 Running ./configure will check you have all the requirements installed
47 on your machine.
48
49
50 Building
51 ----------------------------------------------------------------------
52
53 Then make the daemon, library and root filesystem:
54
55   ./configure [--with-mirror=URI]
56   make
57
58 Use the optional --with-mirror parameter to specify the URI of a local
59 Fedora mirror.  See the discussion of the MIRROR parameter in the
60 febootstrap(8) manpage.
61
62 Finally run the tests:
63
64   make check
65
66 If everything works, you can install the library and tools by running
67 these commands as root:
68
69   make install
70
71
72 Notes on cross-architecture support
73 ----------------------------------------------------------------------
74
75 At the moment we basically don't support cross-architecture or
76 32-on-64.  This limits what is possible for some guests.  Filesystem
77 operations and NFS export will work fine, but running commands in
78 guests may not be possible.
79
80 To enable this requires work for cross-architecture and 32-on-64
81 support in febootstrap, fakeroot and fakechroot.
82
83 The daemon/ directory contains its own configure script.  This is so
84 that in future we will be able to cross-compile the daemon.
85
86
87 Mirroring tip
88 ----------------------------------------------------------------------
89
90 Having a local Fedora mirror makes a massive difference to the time it
91 takes to build and rebuild initramfs images.
92
93 Failing that, use squid to cache yum downloads, but read this first:
94 https://lists.dulug.duke.edu/pipermail/yum/2006-August/009041.html
95 (In brief, because yum chooses random mirrors each time, squid doesn't
96 work very well with default yum configuration.  To get around this,
97 choose a Fedora mirror which is close to you, set this with
98 './configure --with-mirror=[...]', and then proxy the whole lot
99 through squid by setting http_proxy environment variable).
100
101
102 Copyright and license information
103 ----------------------------------------------------------------------
104
105 Copyright (C) 2009 Red Hat Inc.
106
107 The library is distributed under the LGPLv2+.  The programs are
108 distributed under the GPLv2+.  Please see the files COPYING and
109 COPYING.LIB for full license information.