On Fri, Mar 09, 2012 at 01:11:23AM -0800, THO HUYNH wrote:
Do you have any documentation about the implementation of mounting
using guestfish. I want to know how it works inside then write the
script.
Libguestfs live access works slightly differently from ordinary use of
libguestfs, and all the examples only explain the ordinary way.
The main documentation is here:
http://libguestfs.org/guestfs.3.html#api_overview
Once you've decided what language you want to use, you'll need to
follow one of these pages:
http://libguestfs.org/guestfs-perl.3.html
http://libguestfs.org/guestfs-python.3.html
http://libguestfs.org/guestfs-ocaml.3.html
http://libguestfs.org/guestfs-ruby.3.html
http://libguestfs.org/guestfs-java.3.html
Because it's live, you need to add the domain using the 'live' option,
see:
http://libguestfs.org/guestfs.3.html#guestfs_add_domain
To download and upload between handles, you'll need to use two
threads, a pipe between them, and the regular download/upload APIs:
http://libguestfs.org/guestfs.3.html#guestfs_download
http://libguestfs.org/guestfs.3.html#guestfs_upload
http://libguestfs.org/guestfs.3.html#guestfs_tar_out
http://libguestfs.org/guestfs.3.html#guestfs_tar_in
(etc)
I suggest writing some code and reading the many programs in the
source of libguestfs, and if you get stuck, posting specific questions
on the mailing list.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw