1 TODO list for libguestfs
2 ======================================================================
4 This list contains random ideas and musings on features we could add
5 to libguestfs in future.
12 The API needs more test coverage, particularly lesser-used system
15 The big unresolved issue is UID/GID mapping between guest filesystem
16 IDs and the host. It's not easy to automate this because you need
17 extra details about the guest itself in order to get to its
18 UID->username map (eg. /etc/passwd from the guest).
23 BufferIn should turn into <char *, int> and simple strings in other
24 languages that can handle 8 bit clean strings.
26 Limit on transfers would still be 2MB for these types.
27 - then implement write-file properly
29 febootstrap / debootstrap inside appliance
30 ------------------------------------------
32 This was originally proposed as a way to install new operating systems
33 in the appliance. However no one has come up with a workable
39 Complete the Haskell bindings (see discussion on haskell-cafe).
44 Complete the bind tests - must test the return values and error cases.
46 virt-inspector - make libvirt XML
47 ---------------------------------
49 It should be possible to generate libvirt XML from virt-inspector
50 data, at least partially. This would be just another output type so:
52 virt-inspector --libvirt guest.img
54 Note that recent versions of libvirt/virt-install allow guests to be
55 imported, so this is not so useful any more.
57 "Standalone/local mode"
58 -----------------------
60 Instead of running guestfsd (the daemon) inside qemu, there should be
61 an option to just run guestfsd directly.
63 The architecture in this mode would look like:
78 (1) This only makes sense if we are running as root.
80 (2) There is no console / kernel messages in this configuration, but
81 we might consider capturing stderr from the daemon.
83 (3) guestfs_config and guestfs_add_drive become no-ops.
85 Obviously in this configuration, commands are run directly on the
86 local machine's disks. You could just run the commands themselves
87 directly, but libguestfs provides a convenient API and language
88 bindings. Also deals with tricky stuff like parsing the output of the
89 LVM commands. Also we get to leverage other code such as
92 This is mainly useful from live CDs, ie. virt-p2v.
94 Should we bother having the daemon at all and just link the guestfsd
95 code directly into libguestfs?
97 Supermin appliance to febootstrap
98 ---------------------------------
100 Supermin appliance functionality should be moved into febootstrap.
102 Ideas for extra commands
103 ------------------------
105 General glibc / core programs:
133 Other initrd-* commands
134 -----------------------
141 Simple editing of configuration files
142 -------------------------------------
144 Some easy non-Augeas methods to edit configuration files.
147 replace /etc/file key value
149 which would look in /etc/file for any instances of
155 and replace them with
161 That would solve about 50% of reconfiguration needs, and for the
162 rest you'd use Augeas, 'download'+'upload' or 'edit'.
164 RWMJ: I had a go at implementing this, but it's quite error-prone to
165 do this sort of editing inside the C-based daemon code. It's far
166 better to do it with Augeas, or else to use an external language like
172 Currently we can't do Perl "one-liners". ie. The current syntax for
173 any short Perl one-liner would be:
175 perl -MSys::Guestfs -e '$g = Sys::Guestfs->new(); $g->add_drive ("foo"); $g->launch; $g->mount ("/dev/sda1", "/"); ....'
177 You can see we're well beyond a single line just getting to the point
178 of adding drives and mounting.
182 $h = create ($filename, \"/dev/sda1\" => \"/\");
184 $h = create ([$file1, $file2], \"/dev/sda1\" => \"/\");
186 To mount read-only, add C<ro =E<gt> 1> like this:
188 $h = create ($filename, \"/dev/sda1\" => \"/\", ro => 1);
190 which is equivalent to the following sequence of calls:
192 $h = Sys::Guestfs->new ();
193 $h->set_autosync (1);
194 $h->add_drive_ro ($filename);
196 $h->mount_ro (\"/dev/sda1\", \"/\");
198 Command-line form would be:
200 perl -MSys::Guestfs=:all -e '$_=create("guest.img", "/dev/sda1" => "/"); $_->cat ("/etc/fstab");'
202 That's not brief enough for one-liners, so we could have an extra
203 autogenerated module which creates a Sys::Guestfs handle singleton
204 (the handle is an implicit global variable as in guestfish), eg:
206 perl -MSys::Guestfs::One -e 'inspect("guest.img"); cat ("/etc/fstab");'
208 How would editing files work?
214 http://man.linux-ntfs.org/ntfsclone.8.html
219 Equip guestfish with some standard images that it can load
224 Maybe it's better to create these on the fly?
230 http://search.cpan.org/~rgiersig/IO-Tty-1.08/Pty.pm
231 http://www.perlmonks.org/index.pl?node_id=582185
233 Note that pty requires cooperation inside the C code too (there are
234 two sides to a pty, and one has to be handled after the fork).
236 Windows-based daemon/appliance
237 ------------------------------
239 See discussion on list:
240 https://www.redhat.com/archives/libguestfs/2009-November/msg00165.html
245 Add -drive file=...,lock=exclusive and -drive file=...,lock=shared
247 Change libguestfs and libvirt to do the right thing, so that multiple
248 instances of qemu cannot stomp on each other.
253 For multi-level disk images such as live CDs:
254 http://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-cd/
256 It's possible with libguestfs to recursively look for anything that
257 might be a filesystem, mount-{,loop} it and look in those, revealing
258 anything in a disk image.
260 However this won't work easily for VM disk images in the disk image.
261 One would have to download those to the host and launch another
264 List, mount filesystems by UUID and label
265 -----------------------------------------
268 http://www.redhat.com/archives/libguestfs/2009-August/msg00031.html]
270 List filesystems by UUID or label.
272 Mount filesystems by UUID or label. (I'm not really sure if we can do
273 this at the moment but we ought to be able to do it, and perhaps make
274 it easier by having a direct command).
276 Map filesystems to disk blocks
277 ------------------------------
279 Map files/filesystems/(any other object) to the actual disk
286 Integration with host intrusion systems
287 ---------------------------------------
289 Perfect way to monitor VMs from outside the VM. Look for file
290 hashes, log events, login/logout etc.
292 http://www.ossec.net/
293 http://la-samhna.de/samhain/
294 http://sourceforge.net/projects/aide/
295 http://osiris.shmoo.com/
296 http://sourceforge.net/projects/tripwire/
298 -N option should be generated
299 -----------------------------
301 '-N' option should be generated code, and should generate
302 documentation in guestfish(1) manpage.