diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-02 14:25:25 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-06-02 14:25:25 +0100 |
commit | d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e (patch) | |
tree | 48c33472221810fbe42a515b217f82d3da3bd04f /perl | |
parent | bfdc03be234d6d95f18450846433bce4f97e184c (diff) | |
download | libguestfs-d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e.tar.gz libguestfs-d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e.tar.xz libguestfs-d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e.zip |
Generated code for 'add_drive_ro' call.
Diffstat (limited to 'perl')
-rw-r--r-- | perl/Guestfs.xs | 11 | ||||
-rw-r--r-- | perl/lib/Sys/Guestfs.pm | 29 |
2 files changed, 40 insertions, 0 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs index 0f90affd..08b55b81 100644 --- a/perl/Guestfs.xs +++ b/perl/Guestfs.xs @@ -724,6 +724,17 @@ PREINIT: croak ("add_cdrom: %s", guestfs_last_error (g)); void +add_drive_ro (g, filename) + guestfs_h *g; + char *filename; +PREINIT: + int r; + PPCODE: + r = guestfs_add_drive_ro (g, filename); + if (r == -1) + croak ("add_drive_ro: %s", guestfs_last_error (g)); + +void config (g, qemuparam, qemuvalue) guestfs_h *g; char *qemuparam; diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index cba00325..f8e6b774 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -97,6 +97,11 @@ This function adds a virtual CD-ROM disk image to the guest. This is equivalent to the qemu parameter C<-cdrom filename>. +Note that this call checks for the existence of C<filename>. This +stops you from specifying other types of drive which are supported +by qemu such as C<nbd:> and C<http:> URLs. To specify those, use +the general C<$h-E<gt>config> call instead. + =item $h->add_drive ($filename); This function adds a virtual machine disk image C<filename> to the @@ -112,6 +117,30 @@ image). This is equivalent to the qemu parameter C<-drive file=filename>. +Note that this call checks for the existence of C<filename>. This +stops you from specifying other types of drive which are supported +by qemu such as C<nbd:> and C<http:> URLs. To specify those, use +the general C<$h-E<gt>config> call instead. + +=item $h->add_drive_ro ($filename); + +This adds a drive in snapshot mode, making it effectively +read-only. + +Note that writes to the device are allowed, and will be seen for +the duration of the guestfs handle, but they are written +to a temporary file which is discarded as soon as the guestfs +handle is closed. We don't currently have any method to enable +changes to be committed, although qemu can support this. + +This is equivalent to the qemu parameter +C<-drive file=filename,snapshot=on>. + +Note that this call checks for the existence of C<filename>. This +stops you from specifying other types of drive which are supported +by qemu such as C<nbd:> and C<http:> URLs. To specify those, use +the general C<$h-E<gt>config> call instead. + =item $h->aug_close (); Close the current Augeas handle and free up any resources |