[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] Standalone guestfs



On Sat, Jun 01, 2013 at 10:05:20PM +0200, Gabriel wrote:
> I was thinking of running some operations on the root filesystem
> by kexec-rebooting into an appliance to get exclusive access.
> I would like to do something like that for my blocks tool
> (which does conversions to LVM and bcache).
> 
> https://github.com/g2p/blocks#readme

So .. yes it appears it would be possible.

You'll want to get familiar with adding new APIs, since almost
certainly the current APIs won't cover everything you need to do.  See
these links:

https://github.com/libguestfs/libguestfs/commit/d66145622550ff4f4ce9a5f8aefcdb6e9ae4c33a
https://github.com/libguestfs/libguestfs/commit/dee1dd64c3cd5e67393dec679040eb02e81c84b0
http://libguestfs.org/guestfs.3.html#extending-libguestfs

Note the Python bindings are generated automatically (as are all the
other bindings).

If the client and server are always going to be on the same machine,
then there's not a lot of reason to use libguestfs, since you can
presumably just run the commands directly (as you appear to do now).
On the other hand if you want to control the daemon remotely, then
libguestfs would give you some flexibility.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]