X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fguestfs.pod;h=0b3b65447f5682df7d32a7d48d82fb27b0cebd31;hb=2b26c7f721fc8ed2e6f64963289981ac286c02aa;hp=73657d083cad9c5b21b82e8c3afb9031d0d76b8a;hpb=1a9b7df8f2092701fdc5a77a4d9edfcaa1a20acf;p=libguestfs.git diff --git a/src/guestfs.pod b/src/guestfs.pod index 73657d0..0b3b654 100644 --- a/src/guestfs.pod +++ b/src/guestfs.pod @@ -262,10 +262,9 @@ L. =head2 DOWNLOADING -Use L to download small, text only files. This call -is limited to files which are less than 2 MB and which cannot contain -any ASCII NUL (C<\0>) characters. However it has a very simple -to use API. +Use L to download small, text only files. This call is +limited to files which are less than 2 MB and which cannot contain any +ASCII NUL (C<\0>) characters. However the API is very simple to use. L can be used to read files which contain arbitrary 8 bit data, since it returns a (pointer, size) pair. @@ -353,13 +352,13 @@ descriptor N. For example, L writes its output to stdout by doing: - guestfs_download (filename, "/dev/stdout"); + guestfs_download (g, filename, "/dev/stdout"); and you can write tar output to a pipe C by doing: char devfd[64]; snprintf (devfd, sizeof devfd, "/dev/fd/%d", fd); - guestfs_tar_out ("/", devfd); + guestfs_tar_out (g, "/", devfd); =head2 LISTING FILES @@ -551,10 +550,11 @@ device (I the underlying encrypted block device). =head2 INSPECTION Libguestfs has APIs for inspecting an unknown disk image to find out -if it contains operating systems. (These APIs used to be in a -separate Perl-only library called L but since -version 1.5.3 the most frequently used part of this library has been -rewritten in C and moved into the core code). +if it contains operating systems, an install CD or a live CD. (These +APIs used to be in a separate Perl-only library called +L but since version 1.5.3 the most frequently +used part of this library has been rewritten in C and moved into the +core code). Add all disks belonging to the unknown virtual machine and call L in the usual way. @@ -609,6 +609,25 @@ again. (L works a little differently from the other calls and does read the disks. See documentation for that function for details). +=head3 INSPECTING INSTALL DISKS + +Libguestfs (since 1.9.4) can detect some install disks, install +CDs, live CDs and more. + +Call L to return the format of the +operating system, which currently can be C (a regular +operating system) or C (some sort of install disk). + +Further information is available about the operating system that can +be installed using the regular inspection APIs like +L, +L etc. + +Some additional information specific to installer disks is also +available from the L, +L and L +calls. + =head2 SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS Libguestfs can mount NTFS partitions. It does this using the @@ -676,9 +695,9 @@ Although we don't want to discourage you from using the C API, we will mention here that the same API is also available in other languages. The API is broadly identical in all supported languages. This means -that the C call C is -C<$g-Emount($path)> in Perl, C in Python, -and C in OCaml. In other words, a +that the C call C is +C<$g-Eadd_drive_ro($file)> in Perl, C in Python, +and C in OCaml. In other words, a straightforward, predictable isomorphism between each language. Error messages are automatically transformed @@ -714,11 +733,11 @@ with libguestfs. =item B -For documentation see L. +See L. =item B -For documentation see L. +See L and L. =item B @@ -729,15 +748,15 @@ The PHP binding only works correctly on 64 bit machines. =item B -For documentation see L. +See L. =item B -For documentation see L. +See L. =item B -For documentation see L. +See L. =back @@ -953,6 +972,63 @@ For example: Note that libguestfs also calls qemu with the -help and -version options in order to determine features. +=head2 ATTACHING TO RUNNING DAEMONS + +I This is B and has a tendency to eat +babies. Use with caution. + +I This section explains how to attach to a running daemon +from a low level perspective. For most users, simply using virt tools +such as L with the I<--live> option will "just work". + +=head3 Using guestfs_set_attach_method + +By calling L you can change how the +library connects to the C daemon in L +(read L for some background). + +The normal attach method is C, where a small appliance is +created containing the daemon, and then the library connects to this. + +Setting attach method to C> (where I is the path of +a Unix domain socket) causes L to connect to an +existing daemon over the Unix domain socket. + +The normal use for this is to connect to a running virtual machine +that contains a C daemon, and send commands so you can read +and write files inside the live virtual machine. + +=head3 Using guestfs_add_domain with live flag + +L provides some help for getting the +correct attach method. If you pass the C option to this +function, then (if the virtual machine is running) it will +examine the libvirt XML looking for a virtio-serial channel +to connect to: + + + ... + + ... + + + + + ... + + + +L extracts C and sets the attach +method to C. + +Some of the libguestfs tools (including guestfish) support a I<--live> +option which is passed through to L thus allowing +you to attach to and modify live virtual machines. + +The virtual machine needs to have been set up beforehand so that it +has the virtio-serial channel and so that guestfsd is running inside +it. + =head2 ABI GUARANTEE We guarantee the libguestfs ABI (binary interface), for public, @@ -2360,7 +2436,9 @@ C API example code. =item C -L, the command-line shell. +L, the command-line shell, and various shell scripts +built on top such as L, L, +L, L. =item C @@ -2381,6 +2459,10 @@ Some "phony" guest images which we test against. L, the virtual machine image inspector. +=item C + +Logo used on the website. The fish is called Arthur by the way. + =item C M4 macros used by autoconf. @@ -2476,12 +2558,13 @@ has the same effect as calling C. =item TMPDIR -Location of temporary directory, defaults to C. +Location of temporary directory, defaults to C except for the +cached supermin appliance which defaults to C. If libguestfs was compiled to use the supermin appliance then the real appliance is cached in this directory, shared between all handles belonging to the same EUID. You can use C<$TMPDIR> to -configure another directory to use in case C is not large +configure another directory to use in case C is not large enough. =back @@ -2495,6 +2578,8 @@ L, L, L, L, +L, +L, L, L, L, @@ -2505,6 +2590,8 @@ L, L, L, L, +L, +L, L, L, L,