Scroll to navigation

Sys::VirtConvert::GuestfsHandle(3) User Contributed Perl Documentation Sys::VirtConvert::GuestfsHandle(3)

NAME

Sys::VirtConvert::GuestfsHandle - Proxy Sys::Guestfs with custom close behaviour

SYNOPSIS

 use Sys::VirtConvert::GuestfsHandle;
 my $g = new Sys::VirtConvert::GuestfsHandle($storage, $transferiso);
 # GuestfsHandle proxies all Sys::Guestfs methods
 print join("\n", $g->list_devices());
 # GuestfsHandle adds 2 new methods
 $g->add_on_close(sub { print "Bye!\n"; });
 $g->close();

DESCRIPTION

Sys::VirtConvert::GuestfsHandle is a proxy to Sys::Guestfs which adds a custom close() method, and the ability to register pre-close callbacks.

METHODS

Create a new object. Open a new Sys::Guestfs handle to proxy, using the disks defined in disks, which is list of disk metadata defined as: [ [ name, path, format ], ... ]. Add transferiso as a read-only drive if it is given. If isrhev is true, the handle will use user and group vdsm:kvm.
Return 1 if the underlying Sys::Guestfs handle is still connected to a running daemon, 0 otherwise.
Register a callback to be called before closing the underlying Sys::Guestfs handle.
Call all registered close callbacks, then close the Sys::Guestfs handle.

COPYRIGHT

Copyright (C) 2010 Red Hat Inc.

LICENSE

Please see the file COPYING.LIB for the full license.

SEE ALSO

virt-v2v(1), <http://libguestfs.org/>.

2013-12-03 perl v5.10.1