™.. Sys::Guestfs::Lib - Online Linux Manual PageSection : 3
Updated : 2017-03-23
Source : perl v5.10.1
Note : User Contributed Perl Documentation

NAMESys::Guestfs::Lib − Useful functions for using libguestfs from Perl

SYNOPSIS​ use Sys::Guestfs::Lib qw(open_guest ...); ​ ​ $g = open_guest ($name);

DESCRIPTION\*(C`Sys::Guestfs::Lib\*(C'\fR is an extra library of useful functions for using the libguestfs API from Perl. It also provides tighter integration with libvirt. The basic libguestfs API is not covered by this manpage. Please refer instead to Sys::Guestfs(3) and guestfs(3). The libvirt API is also not covered. For that, see Sys::Virt(3).

DEPRECATION OF SOME FUNCTIONSThis module contains functions and code to perform inspection of guest images. Since libguestfs 1.5.3 this ability has moved into the core ​API (see INSPECTION in guestfs(3)). The inspection functions in this module are deprecated and will not be updated. Each deprecated function is marked in the documentation below.

BASIC FUNCTIONS

open_guest​ $g = open_guest ($name); ​ ​ $g = open_guest ($name, rw => 1, ...); ​ ​ $g = open_guest ($name, address => $uri, ...); ​ ​ $g = open_guest ([$img1, $img2, ...], address => $uri, format => $format, ...); ​ ​ ($g, $conn, $dom, @images) = open_guest ($name); This function opens a libguestfs handle for either the libvirt domain called $name, or the disk image called $name. Any disk images found through libvirt or specified explicitly are attached to the libguestfs handle. The \*(C`Sys::Guestfs\*(C'\fR handle \f(CW$g\fR is returned, or if there was an error it throws an exception. To catch errors, wrap the call in an eval block. The first parameter is either a string referring to a libvirt domain or a disk image, or (if a guest has several disk images) an arrayref ​\*(C`[$img1, $img2, ...]\*(C'\fR. For disk images, if the \f(CW\*(C`format\*(C'\fR parameter is specified then that format is forced. The handle is read-only by default. Use the optional parameter ​\*(C`rw => 1\*(C'\fR to open a read-write handle. However if you open a read-write handle, this function will refuse to use active libvirt domains. The handle is still in the config state when it is returned, so you have to call \*(C`$g\->launch ()\*(C'\fR. The optional \*(C`address\*(C'\fR parameter can be added to specify the libvirt ​URI. The implicit libvirt handle is closed after this function, unless you call the function in \*(C`wantarray\*(C'\fR context, in which case the function returns a tuple of: the open libguestfs handle, the open libvirt handle, and the open libvirt domain handle, and a list of [image,format] pairs. (This is useful if you want to do other things like pulling the XML description of the guest). Note that if this is a straight disk image, then $conn and $dom will be \*(C`undef\*(C'\fR. If the \*(C`Sys::Virt\*(C'\fR module is not available, then libvirt is bypassed, and this function can only open disk images. The optional \*(C`interface\*(C'\fR parameter can be used to open devices with a specified qemu interface. See guestfs_add_drive in Sys::Guestfs for more details.

feature_available​ $bool = feature_available ($g, $feature [, $feature ...]); This function is a useful wrapper around the basic ​\*(C`$g\->available\*(C'\fR call. \*(C`$g\->available\*(C'\fR tests for availability of a list of features and dies with an error if any is not available. This call tests for the list of features and returns true if all are available, or false otherwise. For a list of features you can test for, see AVAILABILITY in guestfs(3).

get_partitionsThis function is deprecated. It will not be updated in future versions of libguestfs. New code should not use this function. Use the core API function list_filesystems in Sys::Guestfs(3) instead.

resolve_windows_path​ $path = resolve_windows_path ($g, $path); ​ ​ $path = resolve_windows_path ($g, "/windows/system"); ​ ==> "/WINDOWS/System" ​ or undef if no path exists This function, which is specific to FAT/NTFS filesystems (ie. Windows guests), lets you look up a case insensitive $path in the filesystem and returns the true, case sensitive path as required by the underlying kernel or NTFS−3g driver. If $path does not exist then this function returns \*(C`undef\*(C'\fR. The $path parameter must begin with \*(C`/\*(C'\fR character and be separated by \*(C`/\*(C'\fR characters. Do not use \f(CW\*(C`\e\*(C'\fR, drive names, etc.

file_architectureDeprecated function. Replace any calls to this function with: ​ $g−>file_architecture ($path);

OPERATING SYSTEM INSPECTION FUNCTIONS

inspect_all_partitionsThis function is deprecated. It will not be updated in future versions of libguestfs. New code should not use this function. Use the core API functions instead, see INSPECTION in guestfs(3).

inspect_partitionThis function is deprecated. It will not be updated in future versions of libguestfs. New code should not use this function. Use the core API functions instead, see INSPECTION in guestfs(3).

inspect_operating_systemsThis function is deprecated. It will not be updated in future versions of libguestfs. New code should not use this function. Use the core API functions instead, see INSPECTION in guestfs(3).

mount_operating_systemThis function is deprecated. It will not be updated in future versions of libguestfs. New code should not use this function. Use the core API functions instead, see INSPECTION in guestfs(3).

inspect_in_detailThis function is deprecated. It will not be updated in future versions of libguestfs. New code should not use this function. Use the core API functions instead, see INSPECTION in guestfs(3).

inspect_linux_kernelThis function is deprecated. It will not be updated in future versions of libguestfs. New code should not use this function. Use the core API functions instead, see INSPECTION in guestfs(3).

COPYRIGHTCopyright (C) 2009−2013 Red Hat Inc.

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

SEE ALSOvirt−inspector(1), ​Sys::Guestfs(3), ​guestfs(3), <http://libguestfs.org/>, ​Sys::Virt(3), <http://libvirt.org/>, ​guestfish(1).
0
Johanes Gumabo
Data Size   :   22,640 byte
man-Sys::Guestfs::Lib.3pmBuild   :   2024-12-29, 07:25   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 261,798
Visitor ID   :     :  
Visitor IP   :   18.191.234.202   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|252|Sys::Guestfs::Lib.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|Sys::Guestfs::Lib.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|252|Sys::Guestfs::Lib.3pm|41|br══─}─══|'br══─}─══ )         (htmlprn|149|Sys::Guestfs::Lib.3pm|41|'br══─}─══ |'br══─}─══ )         (rof_nr_x|149|Sys::Guestfs::Lib.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (rof_unit_scale_px|41|Sys::Guestfs::Lib.3pm|51/52|F|.ie \nF ══─{─══. de IX )         (rof_if|19|Sys::Guestfs::Lib.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (htmlprn|149|Sys::Guestfs::Lib.3pm|51/52|.ie \nF ══─{─══. de IX|.ie \nF ══─{─══. de IX )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|53|\$1\t\\n%\t"\\$2" |. tm Index:\\$1\t\\n%\t"\\$2" )         (parse_manual_page_|252|Sys::Guestfs::Lib.3pm|57|══─}─══|.══─}─══ )         (htmlprn|149|Sys::Guestfs::Lib.3pm|57|.══─}─══ |.══─}─══ )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|143|\*(C`Sys::Guestfs::Lib\*(C'\fR is an extra library of useful functions for using |\&\f(CW\*(C`Sys::Guestfs::Lib\*(C'\fR is an extra library of useful functions for using )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|178|\*(C`Sys::Guestfs\*(C'\fR handle \f(CW$g\fR is returned, or if there was an error |The \f(CW\*(C`Sys::Guestfs\*(C'\fR handle \f(CW$g\fR is returned, or if there was an error )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|184|\*(C`[$img1, $img2, ...]\*(C'\fR. For disk images, if the \f(CW\*(C`format\*(C'\fR parameter |\&\f(CW\*(C`[$img1, $img2, ...]\*(C'\fR. For disk images, if the \f(CW\*(C`format\*(C'\fR parameter )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|188|\*(C`rw => 1\*(C'\fR to open a read-write handle. However if you open a |\&\f(CW\*(C`rw => 1\*(C'\fR to open a read-write handle. However if you open a )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|193|\*(C`$g\->launch ()\*(C'\fR. |have to call \f(CW\*(C`$g\->launch ()\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|195|\*(C`address\*(C'\fR parameter can be added to specify the libvirt |The optional \f(CW\*(C`address\*(C'\fR parameter can be added to specify the libvirt )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|199|\*(C`wantarray\*(C'\fR context, in which case the |you call the function in \f(CW\*(C`wantarray\*(C'\fR context, in which case the )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|204|\*(C`undef\*(C'\fR. |a straight disk image, then \f(CW$conn\fR and \f(CW$dom\fR will be \f(CW\*(C`undef\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|206|\*(C`Sys::Virt\*(C'\fR module is not available, then libvirt is bypassed, |If the \f(CW\*(C`Sys::Virt\*(C'\fR module is not available, then libvirt is bypassed, )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|209|\*(C`interface\*(C'\fR parameter can be used to open devices with a |The optional \f(CW\*(C`interface\*(C'\fR parameter can be used to open devices with a )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|219|\*(C`$g\->available\*(C'\fR call. |\&\f(CW\*(C`$g\->available\*(C'\fR call. )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|221|\*(C`$g\->available\*(C'\fR tests for availability of a list of features and |\&\f(CW\*(C`$g\->available\*(C'\fR tests for availability of a list of features and )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|248|\*(C`undef\*(C'\fR. |If \f(CW$path\fR does not exist then this function returns \f(CW\*(C`undef\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|250|\*(C`/\*(C'\fR character and be separated |The \f(CW$path\fR parameter must begin with \f(CW\*(C`/\*(C'\fR character and be separated )         (rof_escape_sequence|91|Sys::Guestfs::Lib.3pm|251|\*(C`/\*(C'\fR characters. Do not use \f(CW\*(C`\e\*(C'\fR, drive names, etc. |by \f(CW\*(C`/\*(C'\fR characters. Do not use \f(CW\*(C`\e\*(C'\fR, drive names, etc. )