summaryrefslogtreecommitdiffstats
path: root/guestfish-actions.pod
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-08 20:26:35 +0100
committerRichard Jones <rjones@redhat.com>2009-04-08 20:26:35 +0100
commit94050e0344685b6916e21581e618ad3e85795008 (patch)
treeaa86daf806029bded8a9e88b18be34633d403664 /guestfish-actions.pod
parentb5ff6816face6f8c1700d4f1df752c710620ff95 (diff)
downloadlibguestfs-94050e0344685b6916e21581e618ad3e85795008.tar.gz
libguestfs-94050e0344685b6916e21581e618ad3e85795008.tar.xz
libguestfs-94050e0344685b6916e21581e618ad3e85795008.zip
Many non-daemon functions are now auto-generated.
Diffstat (limited to 'guestfish-actions.pod')
-rw-r--r--guestfish-actions.pod106
1 files changed, 106 insertions, 0 deletions
diff --git a/guestfish-actions.pod b/guestfish-actions.pod
index 4ca02fda..d1958edf 100644
--- a/guestfish-actions.pod
+++ b/guestfish-actions.pod
@@ -1,3 +1,28 @@
+=head2 add-cdrom | cdrom
+
+ add-cdrom filename
+
+This function adds a virtual CD-ROM disk image to the guest.
+
+This is equivalent to the qemu parameter C<-cdrom filename>.
+
+=head2 add-drive | add
+
+ add-drive filename
+
+This function adds a virtual machine disk image C<filename> to the
+guest. The first time you call this function, the disk appears as IDE
+disk 0 (C</dev/sda>) in the guest, the second time as C</dev/sdb>, and
+so on.
+
+You don't necessarily need to be root when using libguestfs. However
+you obviously do need sufficient permissions to access the filename
+for whatever operations you want to perform (ie. read access if you
+just want to read the image or write access if you want to modify the
+image).
+
+This is equivalent to the qemu parameter C<-drive file=filename>.
+
=head2 cat
cat path
@@ -9,6 +34,56 @@ Note that this function cannot correctly handle binary files
as end of string). For those you need to use the C<read_file>
function which has a more complex interface.
+=head2 config
+
+ config qemuparam qemuvalue
+
+This can be used to add arbitrary qemu command line parameters
+of the form C<-param value>. Actually it's not quite arbitrary - we
+prevent you from setting some parameters which would interfere with
+parameters that we use.
+
+The first character of C<param> string must be a C<-> (dash).
+
+C<value> can be NULL.
+
+=head2 get-autosync
+
+ get-autosync
+
+Get the autosync flag.
+
+=head2 get-path
+
+ get-path
+
+Return the current search path.
+
+This is always non-NULL. If it wasn't set already, then this will
+return the default path.
+
+=head2 get-verbose
+
+ get-verbose
+
+This returns the verbose messages flag.
+
+=head2 kill-subprocess
+
+ kill-subprocess
+
+This kills the qemu subprocess. You should never need to call this.
+
+=head2 launch | run
+
+ launch
+
+Internally libguestfs is implemented by running a virtual machine
+using L<qemu(1)>.
+
+You should call this after configuring the handle
+(eg. adding drives) but before performing any actions.
+
=head2 list-devices
list-devices
@@ -108,6 +183,37 @@ See also C<pvs_full>.
List all the physical volumes detected. This is the equivalent
of the L<pvs(8)> command. The "full" version includes all fields.
+=head2 set-autosync | autosync
+
+ set-autosync true|false
+
+If C<autosync> is true, this enables autosync. Libguestfs will make a
+best effort attempt to run C<sync> when the handle is closed
+(also if the program exits without closing handles).
+
+=head2 set-path | path
+
+ set-path path
+
+Set the path that libguestfs searches for kernel and initrd.img.
+
+The default is C<$libdir/guestfs> unless overridden by setting
+C<LIBGUESTFS_PATH> environment variable.
+
+The string C<path> is stashed in the libguestfs handle, so the caller
+must make sure it remains valid for the lifetime of the handle.
+
+Setting C<path> to C<NULL> restores the default path.
+
+=head2 set-verbose | verbose
+
+ set-verbose true|false
+
+If C<verbose> is true, this turns on verbose messages (to C<stderr>).
+
+Verbose messages are disabled unless the environment variable
+C<LIBGUESTFS_DEBUG> is defined and set to C<1>.
+
=head2 sync
sync