summaryrefslogtreecommitdiffstats
path: root/perl/lib
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-08 15:02:39 +0100
committerRichard Jones <rjones@redhat.com>2009-04-08 15:02:39 +0100
commit9908e03e922b670437bcd89b6873f9ebc914567e (patch)
tree30d8b8adfb5cfbd864f7e91cf8268a29344366d0 /perl/lib
parent00e309d3608661eaa8c9cc69ba5bf175c612698d (diff)
downloadlibguestfs-9908e03e922b670437bcd89b6873f9ebc914567e.tar.gz
libguestfs-9908e03e922b670437bcd89b6873f9ebc914567e.tar.xz
libguestfs-9908e03e922b670437bcd89b6873f9ebc914567e.zip
Fixed Perl bindings, they now work properly.
Diffstat (limited to 'perl/lib')
-rw-r--r--perl/lib/Sys/Guestfs.pm56
1 files changed, 56 insertions, 0 deletions
diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm
index c0a9b79f..0a8226fe 100644
--- a/perl/lib/Sys/Guestfs.pm
+++ b/perl/lib/Sys/Guestfs.pm
@@ -91,6 +91,62 @@ sub new {
return $self;
}
+=item $h->add_drive ($filename);
+
+=item $h->add_cdrom ($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).
+
+The C<add_cdrom> variation adds a CD-ROM device.
+
+=item $h->config ($param, $value);
+
+=item $h->config ($param);
+
+Use this to add arbitrary parameters to the C<qemu> command line.
+See L<qemu(1)>.
+
+=item $h->launch ();
+
+=item $h->wait_ready ();
+
+Internally libguestfs is implemented by running a virtual machine
+using L<qemu(1)>. These calls are necessary in order to boot the
+virtual machine.
+
+You should call these two functions after configuring the handle
+(eg. adding drives) but before performing any actions.
+
+=item $h->set_path ($path);
+
+=item $path = $h->get_path ();
+
+See the discussion of C<PATH> in the L<guestfs(3)>
+manpage.
+
+=item $h->set_autosync ($autosync);
+
+=item $autosync = $h->get_autosync ();
+
+See the discussion of I<AUTOSYNC> in the L<guestfs(3)>
+manpage.
+
+=item $h->set_verbose ($verbose);
+
+=item $verbose = $h->get_verbose ();
+
+This sets or gets the verbose messages flag. Verbose
+messages are sent to C<stderr>.
+
=item $content = $h->cat (path);
Return the contents of the file named C<path>.