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