mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
todo: Remove obsolete sections from the TODO file.
This commit is contained in:
174
TODO
174
TODO
@@ -43,46 +43,6 @@ data, at least partially. This would be just another output type so:
|
||||
Note that recent versions of libvirt/virt-install allow guests to be
|
||||
imported, so this is not so useful any more.
|
||||
|
||||
"Standalone/local mode"
|
||||
-----------------------
|
||||
|
||||
Instead of running guestfsd (the daemon) inside qemu, there should be
|
||||
an option to just run guestfsd directly.
|
||||
|
||||
The architecture in this mode would look like:
|
||||
|
||||
+------------------+
|
||||
| main program |
|
||||
|------------------|
|
||||
| libguestfs |
|
||||
+--------^---------+
|
||||
| | reply
|
||||
cmd | |
|
||||
+----v-------------+
|
||||
| guestfsd |
|
||||
+------------------+
|
||||
|
||||
Notes:
|
||||
|
||||
(1) This only makes sense if we are running as root.
|
||||
|
||||
(2) There is no console / kernel messages in this configuration, but
|
||||
we might consider capturing stderr from the daemon.
|
||||
|
||||
(3) guestfs_config and guestfs_add_drive become no-ops.
|
||||
|
||||
Obviously in this configuration, commands are run directly on the
|
||||
local machine's disks. You could just run the commands themselves
|
||||
directly, but libguestfs provides a convenient API and language
|
||||
bindings. Also deals with tricky stuff like parsing the output of the
|
||||
LVM commands. Also we get to leverage other code such as
|
||||
virt-inspector.
|
||||
|
||||
This is mainly useful from live CDs, ie. virt-p2v.
|
||||
|
||||
Should we bother having the daemon at all and just link the guestfsd
|
||||
code directly into libguestfs?
|
||||
|
||||
Ideas for extra commands
|
||||
------------------------
|
||||
|
||||
@@ -99,8 +59,6 @@ Ideas for extra commands
|
||||
e2image
|
||||
e2undo
|
||||
filefrag
|
||||
findfs
|
||||
logsave
|
||||
mklost+found
|
||||
|
||||
SELinux:
|
||||
@@ -120,74 +78,6 @@ Such as:
|
||||
initrd-extract
|
||||
initrd-replace
|
||||
|
||||
Simple editing of configuration files
|
||||
-------------------------------------
|
||||
|
||||
Some easy non-Augeas methods to edit configuration files.
|
||||
I'm thinking:
|
||||
|
||||
replace /etc/file key value
|
||||
|
||||
which would look in /etc/file for any instances of
|
||||
|
||||
key=...
|
||||
key ...
|
||||
key:...
|
||||
|
||||
and replace them with
|
||||
|
||||
key=value
|
||||
key value
|
||||
key:value
|
||||
|
||||
That would solve about 50% of reconfiguration needs, and for the
|
||||
rest you'd use Augeas, 'download'+'upload' or 'edit'.
|
||||
|
||||
RWMJ: I had a go at implementing this, but it's quite error-prone to
|
||||
do this sort of editing inside the C-based daemon code. It's far
|
||||
better to do it with Augeas, or else to use an external language like
|
||||
Perl.
|
||||
|
||||
Quick Perl scripts
|
||||
------------------
|
||||
|
||||
Currently we can't do Perl "one-liners". ie. The current syntax for
|
||||
any short Perl one-liner would be:
|
||||
|
||||
perl -MSys::Guestfs -e '$g = Sys::Guestfs->new(); $g->add_drive ("foo"); $g->launch; $g->mount ("/dev/sda1", "/"); ....'
|
||||
|
||||
You can see we're well beyond a single line just getting to the point
|
||||
of adding drives and mounting.
|
||||
|
||||
First suggestion:
|
||||
|
||||
$h = create ($filename, \"/dev/sda1\" => \"/\");
|
||||
|
||||
$h = create ([$file1, $file2], \"/dev/sda1\" => \"/\");
|
||||
|
||||
To mount read-only, add C<ro =E<gt> 1> like this:
|
||||
|
||||
$h = create ($filename, \"/dev/sda1\" => \"/\", ro => 1);
|
||||
|
||||
which is equivalent to the following sequence of calls:
|
||||
|
||||
$h = Sys::Guestfs->new ();
|
||||
$h->add_drive_ro ($filename);
|
||||
$h->launch ();
|
||||
$h->mount_ro (\"/dev/sda1\", \"/\");
|
||||
|
||||
Command-line form would be:
|
||||
|
||||
perl -MSys::Guestfs=:all -e '$_=create("guest.img", "/dev/sda1" => "/"); $_->cat ("/etc/fstab");'
|
||||
|
||||
That's not brief enough for one-liners, so we could have an extra
|
||||
autogenerated module which creates a Sys::Guestfs handle singleton
|
||||
(the handle is an implicit global variable as in guestfish), eg:
|
||||
|
||||
perl -MSys::Guestfs::One -e 'inspect("guest.img"); cat ("/etc/fstab");'
|
||||
|
||||
How would editing files work?
|
||||
|
||||
virt-rescue pty
|
||||
---------------
|
||||
|
||||
@@ -208,14 +98,6 @@ Windows-based daemon/appliance
|
||||
See discussion on list:
|
||||
https://www.redhat.com/archives/libguestfs/2009-November/msg00165.html
|
||||
|
||||
qemu locking
|
||||
------------
|
||||
|
||||
Add -drive file=...,lock=exclusive and -drive file=...,lock=shared
|
||||
|
||||
Change libguestfs and libvirt to do the right thing, so that multiple
|
||||
instances of qemu cannot stomp on each other.
|
||||
|
||||
virt-disk-explore
|
||||
-----------------
|
||||
|
||||
@@ -256,12 +138,6 @@ http://sourceforge.net/projects/aide/
|
||||
http://osiris.shmoo.com/
|
||||
http://sourceforge.net/projects/tripwire/
|
||||
|
||||
Fix 'file'
|
||||
----------
|
||||
|
||||
https://www.redhat.com/archives/libguestfs/2010-June/msg00053.html
|
||||
https://www.redhat.com/archives/libguestfs/2010-June/msg00079.html
|
||||
|
||||
Freeze/thaw filesystems
|
||||
-----------------------
|
||||
|
||||
@@ -293,13 +169,6 @@ Could we make guestfish interactive if commands are used without params?
|
||||
Image name? disk.img
|
||||
Size of image? 10M
|
||||
|
||||
Common problems
|
||||
---------------
|
||||
|
||||
How can we solve these common user problems?
|
||||
|
||||
[space for common problems here]
|
||||
|
||||
Better support for encrypted devices
|
||||
------------------------------------
|
||||
|
||||
@@ -369,12 +238,6 @@ $EDITOR without any corresponding ability to set them.
|
||||
echo $EDITOR # or %{EDITOR}
|
||||
edit /etc/resolv.conf
|
||||
|
||||
live CD inspection for Windows 7
|
||||
--------------------------------
|
||||
|
||||
Windows 7 install CDs are quite different and pretty impenetrable.
|
||||
There are no obvious files to parse.
|
||||
|
||||
More ntfs tools
|
||||
---------------
|
||||
|
||||
@@ -504,23 +367,6 @@ would be some sort of modified attach method (see link above).
|
||||
The complexity here is that we would no longer have access to
|
||||
stdin/stdout (or we'd have to direct that somewhere else).
|
||||
|
||||
GObject Introspection
|
||||
---------------------
|
||||
|
||||
We periodically get asked to implement gobject-introspection (it's a
|
||||
GNOME thing):
|
||||
|
||||
http://live.gnome.org/GObjectIntrospection
|
||||
|
||||
This would require a separate Gtk C API since the main guestfs handle
|
||||
would have to be encapsulated in a GObject. However the main
|
||||
difficulty is that the annotations supported to define types are not
|
||||
very rich. Notably missing are support for optional arguments
|
||||
(defined but not implemented), support for structs (unless mapped to
|
||||
other objects).
|
||||
|
||||
Also note that the libguestfs API is not "object oriented".
|
||||
|
||||
libosinfo mappings for virt-inspector
|
||||
-------------------------------------
|
||||
|
||||
@@ -615,23 +461,3 @@ TMPDIR should be checked to ensure that we won't run out of space
|
||||
during the conversion, since current behaviour is very bad when this
|
||||
happens (it usually causes virt-sparsify to hang). This requires
|
||||
writing a small C binding to statvfs for OCaml.
|
||||
|
||||
Passing file descriptors using attach-method fd:N
|
||||
-------------------------------------------------
|
||||
|
||||
The idea is that you can pass a file descriptor to the appliance to
|
||||
another process, which can then attach to it by setting
|
||||
'attach-method' to 'fd:N' (where N = file descriptor).
|
||||
|
||||
The process(es) cooperating like this would have to arrange for mutual
|
||||
exclusion on the file descriptor, since the protocol itself does not
|
||||
and cannot support this.
|
||||
|
||||
One issue with this is whether just passing the fd is sufficient, or
|
||||
if other fields in the guestfs_h struct need to be passed too.
|
||||
Another issue is that the parent process still has to handle
|
||||
verbose/debug messages, and has to remain around to regain and kill
|
||||
off the appliance at the end. Thus the parent cannot do much more
|
||||
than wait(2) and at the same time select(2) on g->fd.
|
||||
|
||||
Virt tools would have to have a new --attach-fd=N option.
|
||||
|
||||
Reference in New Issue
Block a user