X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fguestfs.pod;h=0b3b65447f5682df7d32a7d48d82fb27b0cebd31;hb=6f7c1a9f9d76bdf9f112e12e1508531fb41abfb2;hp=cfd58c979767814f3e2264624fcabf5e2a8edd14;hpb=477eebc83dcd33d00d34398692692dae6af04f22;p=libguestfs.git diff --git a/src/guestfs.pod b/src/guestfs.pod index cfd58c9..0b3b654 100644 --- a/src/guestfs.pod +++ b/src/guestfs.pod @@ -972,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,