X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=perl%2Flib%2FSys%2FGuestfs.pm;h=0a8226fea8b7864d9e0c0ab6c0291c4d5231d711;hb=9908e03e922b670437bcd89b6873f9ebc914567e;hp=c0a9b79fa3a79fc9763a7ff1b23de5d18b5cde0a;hpb=1ee6da96efe8340a7d3904a865d80cd59d9d3fde;p=libguestfs.git diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index c0a9b79..0a8226f 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 to the +guest. The first time you call this function, the disk appears as IDE +disk 0 (C) in the guest, the second time as C, 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 variation adds a CD-ROM device. + +=item $h->config ($param, $value); + +=item $h->config ($param); + +Use this to add arbitrary parameters to the C command line. +See L. + +=item $h->launch (); + +=item $h->wait_ready (); + +Internally libguestfs is implemented by running a virtual machine +using L. 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 in the L +manpage. + +=item $h->set_autosync ($autosync); + +=item $autosync = $h->get_autosync (); + +See the discussion of I in the L +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. + =item $content = $h->cat (path); Return the contents of the file named C.