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

NAMESys::Guestfs − Perl bindings for libguestfs

SYNOPSIS​ use Sys::Guestfs; ​ ​ my $g = Sys::Guestfs−>new (); ​ $g−>add_drive_opts ('guest.img', format => 'raw'); ​ $g−>launch (); ​ $g−>mount ('/dev/sda1', '/'); ​ $g−>touch ('/hello'); ​ $g−>shutdown (); ​ $g−>close ();

DESCRIPTIONThe \*(C`Sys::Guestfs\*(C'\fR module provides a Perl \s-1XS\s0 binding to the libguestfs API for examining and modifying virtual machine disk images. Amongst the things this is good for: making batch configuration changes to guests, getting disk used/free statistics (see also: virt-df), migrating between virtualization systems (see also: virt−p2v), performing partial backups, performing partial guest clones, cloning guests and changing registry/UUID/hostname info, and much else besides. Libguestfs uses Linux kernel and qemu code, and can access any type of guest filesystem that Linux and qemu can, including but not limited to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, qcow2, vmdk. Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, what filesystem is in each LV, etc.). It can also run commands in the context of the guest. Also you can access filesystems over ​FUSE. See also Sys::Guestfs::Lib(3) for a set of useful library functions for using libguestfs from Perl, including integration with libvirt.

ERRORSAll errors turn into calls to \*(C`croak\*(C'\fR (see \fICarp\fR\|(3)). The error string from libguestfs is directly available from ​$@. Use the \*(C`last_errno\*(C'\fR method if you want to get the errno.

METHODS$g = Sys::Guestfs−>new ([environment => 0,] [close_on_exit => 0])Create a new guestfs handle. If the optional argument \*(C`environment\*(C'\fR is false, then the \*(C`GUESTFS_CREATE_NO_ENVIRONMENT\*(C'\fR flag is set. If the optional argument \*(C`close_on_exit\*(C'\fR is false, then the \*(C`GUESTFS_CREATE_NO_CLOSE_ON_EXIT\*(C'\fR flag is set. $g>close ()Explicitly close the guestfs handle. Note: You should not usually call this function. The handle will be closed implicitly when its reference count goes to zero (eg. when it goes out of scope or the program ends). This call is only required in some exceptional cases, such as where the program may contain cached references to the handle 'somewhere' and you really have to have the close happen right away. After calling ​\*(C`close\*(C'\fR the program must not call any method (including \f(CW\*(C`close\*(C'\fR) on the handle (but the implicit call to \*(C`DESTROY\*(C'\fR that happens when the final reference is cleaned up is OK). $Sys::Guestfs::EVENT_CLOSE See GUESTFS_EVENT_CLOSE in guestfs(3). $Sys::Guestfs::EVENT_SUBPROCESS_QUIT See GUESTFS_EVENT_SUBPROCESS_QUIT in guestfs(3). $Sys::Guestfs::EVENT_LAUNCH_DONE See GUESTFS_EVENT_LAUNCH_DONE in guestfs(3). $Sys::Guestfs::EVENT_PROGRESS See GUESTFS_EVENT_PROGRESS in guestfs(3). $Sys::Guestfs::EVENT_APPLIANCE See GUESTFS_EVENT_APPLIANCE in guestfs(3). $Sys::Guestfs::EVENT_LIBRARY See GUESTFS_EVENT_LIBRARY in guestfs(3). $Sys::Guestfs::EVENT_TRACE See GUESTFS_EVENT_TRACE in guestfs(3). $Sys::Guestfs::EVENT_ENTER See GUESTFS_EVENT_ENTER in guestfs(3). $Sys::Guestfs::EVENT_LIBVIRT_AUTH See GUESTFS_EVENT_LIBVIRT_AUTH in guestfs(3). $Sys::Guestfs::EVENT_ALL See GUESTFS_EVENT_ALL in guestfs(3). $event_handle = $g>set_event_callback (\&cb, $event_bitmask)Register \*(C`cb\*(C'\fR as a callback function for all of the events in $event_bitmask (one or more \*(C`$Sys::Guestfs::EVENT_*\*(C'\fR flags logically or'd together). This function returns an event handle which can be used to delete the callback using \*(C`delete_event_callback\*(C'\fR. The callback function receives 4 parameters: ​ &cb ($event, $event_handle, $buf, $array) $event The event which happened (equal to one of \*(C`$Sys::Guestfs::EVENT_*\*(C'\fR). $event_handle The event handle. $buf For some event types, this is a message buffer (ie. a string). $array For some event types (notably progress events), this is an array of integers. You should carefully read the documentation for ​guestfs_set_event_callback in guestfs(3) before using this function. $g>delete_event_callback ($event_handle)This removes the callback which was previously registered using ​\*(C`set_event_callback\*(C'\fR. $errnum = $g>last_errno ()This returns the last error number (errno) that happened on the handle $g. If successful, an errno integer not equal to zero is returned. If no error number is available, this returns 0. See guestfs_last_errno in guestfs(3) for more details of why this can happen. You can use the standard Perl module Errno(3) to compare the numeric error returned from this call with symbolic errnos: ​ $g−>mkdir ("/foo"); ​ if ($g−>last_errno() == Errno::EEXIST()) { ​ # mkdir failed because the directory exists already. ​ } $g>acl_delete_def_file ($dir)This function deletes the default POSIX Access Control List (ACL) attached to directory \*(C`dir\*(C'\fR. $acl = $g>acl_get_file ($path, $acltype)This function returns the POSIX Access Control List (ACL) attached to \*(C`path\*(C'\fR. The \s-1ACL\s0 is returned in \*(L"long text form\*(R" (see \fIacl\fR\|(5)). The \*(C`acltype\*(C'\fR parameter may be: access Return the ordinary (access) ACL for any file, directory or other filesystem object. default Return the default ACL. Normally this only makes sense if ​\*(C`path\*(C'\fR is a directory. $g>acl_set_file ($path, $acltype, $acl)This function sets the POSIX Access Control List (ACL) attached to \*(C`path\*(C'\fR. The \*(C`acltype\*(C'\fR parameter may be: access Set the ordinary (access) ACL for any file, directory or other filesystem object. default Set the default ACL. Normally this only makes sense if ​\*(C`path\*(C'\fR is a directory. The \*(C`acl\*(C'\fR parameter is the new \s-1ACL\s0 in either \*(L"long text form\*(R" or short text form (see acl(5)). The new ACL completely replaces any previous ACL on the file. The ACL must contain the full Unix permissions (eg. \*(C`u::rwx,g::rx,o::rx\*(C'\fR). If you are specifying individual users or groups, then the mask field is also required (eg. \*(C`m::rwx\*(C'\fR), followed by the ​\*(C`u:\f(CIID\f(CW:...\*(C'\fR and/or \f(CW\*(C`g:\f(CIID\f(CW:...\*(C'\fR field(s). A full \s-1ACL\s0 string might therefore look like this: ​ u::rwx,g::rwx,o::rwx,m::rwx,u:500:rwx,g:500:rwx ​ \ Unix permissions / \mask/ \ ACL / You should use numeric UIDs and GIDs. To map usernames and groupnames to the correct numeric ID in the context of the guest, use the Augeas functions (see \*(C`$g\->aug_init\*(C'\fR). $g>add_cdrom ($filename)This function adds a virtual CD-ROM disk image to the guest. Do not use this function! ISO files are just ordinary read-only disk images. Use \*(C`$g\->add_drive_ro\*(C'\fR instead. This function is deprecated. In new code, use the add_drive call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $nrdisks = $g>add_domain ($dom [, libvirturi => $libvirturi] [, readonly => $readonly] [, iface => $iface] [, live => $live] [, allowuuid => $allowuuid] [, readonlydisk => $readonlydisk])This function adds the disk(s) attached to the named libvirt domain \*(C`dom\*(C'\fR. It works by connecting to libvirt, requesting the domain and domain XML from libvirt, parsing it for disks, and calling \*(C`$g\->add_drive_opts\*(C'\fR on each one. The number of disks added is returned. This operation is atomic: if an error is returned, then no disks are added. This function does some minimal checks to make sure the libvirt domain is not running (unless \*(C`readonly\*(C'\fR is true). In a future version we will try to acquire the libvirt lock on each disk. Disks must be accessible locally. This often means that adding disks from a remote libvirt connection (see <http://libvirt.org/remote.html>) will fail unless those disks are accessible via the same device path locally too. The optional \*(C`libvirturi\*(C'\fR parameter sets the libvirt \s-1URI\s0 (see <http://libvirt.org/uri.html>). If this is not set then we connect to the default libvirt URI (or one set through an environment variable, see the libvirt documentation for full details). The optional \*(C`live\*(C'\fR flag controls whether this call will try to connect to a running virtual machine \*(C`guestfsd\*(C'\fR process if it sees a suitable <channel> element in the libvirt ​XML definition. The default (if the flag is omitted) is never to try. See ATTACHING TO RUNNING DAEMONS in guestfs(3) for more information. If the \*(C`allowuuid\*(C'\fR flag is true (default is false) then a \s-1UUID\s0 ​may be passed instead of the domain name. The \*(C`dom\*(C'\fR string is treated as a UUID first and looked up, and if that lookup fails then we treat \*(C`dom\*(C'\fR as a name as usual. The optional \*(C`readonlydisk\*(C'\fR parameter controls what we do for disks which are marked <readonly/> in the libvirt XML. Possible values are: readonlydisk = ``error'' If \*(C`readonly\*(C'\fR is false: The whole call is aborted with an error if any disk with the <readonly/> flag is found. If \*(C`readonly\*(C'\fR is true: Disks with the <readonly/> flag are added read-only. readonlydisk = ``read'' If \*(C`readonly\*(C'\fR is false: Disks with the <readonly/> flag are added read-only. Other disks are added read/write. If \*(C`readonly\*(C'\fR is true: Disks with the <readonly/> flag are added read-only. readonlydisk = ``write'' (default) If \*(C`readonly\*(C'\fR is false: Disks with the <readonly/> flag are added read/write. If \*(C`readonly\*(C'\fR is true: Disks with the <readonly/> flag are added read-only. readonlydisk = ``ignore'' If \*(C`readonly\*(C'\fR is true or false: Disks with the <readonly/> flag are skipped. The other optional parameters are passed directly through to ​\*(C`$g\->add_drive_opts\*(C'\fR. $g>add_drive ($filename [, readonly => $readonly] [, format => $format] [, iface => $iface] [, name => $name] [, label => $label] [, cachemode => $cachemode])This function adds a disk image called \*(C`filename\*(C'\fR to the handle. ​\*(C`filename\*(C'\fR may be a regular host file or a host device. When this function is called before \*(C`$g\->launch\*(C'\fR (the usual case) then the first time you call this function, the disk appears in the API as \*(C`/dev/sda\*(C'\fR, the second time as \*(C`/dev/sdb\*(C'\fR, and so on. In libguestfs X 1.20 you can also call this function after launch (with some restrictions). This is called ​hotplugging. When hotplugging, you must specify a ​\*(C`label\*(C'\fR so that the new disk gets a predictable name. For more information see HOTPLUGGING in guestfs(3). 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). This call checks that \*(C`filename\*(C'\fR exists. \*(C`filename\*(C'\fR may be the special string \f(CW"/dev/null"\fR. See NULL DISKS in guestfs(3). The optional arguments are: readonly If true then the image is treated as read-only. Writes are still allowed, but they are stored in a temporary snapshot overlay which is discarded at the end. The disk that you add is not modified. format This forces the image format. If you omit this (or use \*(C`$g\->add_drive\*(C'\fR or \*(C`$g\->add_drive_ro\*(C'\fR) then the format is automatically detected. Possible formats include \*(C`raw\*(C'\fR and \f(CW\*(C`qcow2\*(C'\fR. Automatic detection of the format opens you up to a potential security hole when dealing with untrusted raw-format images. See CVE−2010−3851 and RHBZ#642934. Specifying the format closes this security hole. iface This rarely-used option lets you emulate the behaviour of the deprecated \*(C`$g\->add_drive_with_if\*(C'\fR call (q.v.) name The name the drive had in the original guest, e.g. \*(C`/dev/sdb\*(C'\fR. This is used as a hint to the guest inspection process if it is available. label Give the disk a label. The label should be a unique, short string using only ASCII characters \*(C`[a\-zA\-Z]\*(C'\fR. As well as its usual name in the API (such as \*(C`/dev/sda\*(C'\fR), the drive will also be named \*(C`/dev/disk/guestfs/\f(CIlabel\f(CW\*(C'\fR. See DISK LABELS in guestfs(3). cachemode Choose whether or not libguestfs will obey sync operations (safe but slow) or not (unsafe but fast). The possible values for this string are: cachemode = ``writeback'' This is the default. Write operations in the API do not return until a write(2) call has completed in the host [but note this does not imply that anything gets written to disk]. Sync operations in the API, including implicit syncs caused by filesystem journalling, will not return until an fdatasync(2) call has completed in the host, indicating that data has been committed to disk. cachemode = ``unsafe'' In this mode, there are no guarantees. Libguestfs may cache anything and ignore sync requests. This is suitable only for scratch or temporary disks. $g>add_drive_opts ($filename [, readonly => $readonly] [, format => $format] [, iface => $iface] [, name => $name] [, label => $label] [, cachemode => $cachemode])This is an alias of add_drive. $g>add_drive_ro ($filename)This function is the equivalent of calling \*(C`$g\->add_drive_opts\*(C'\fR with the optional parameter \*(C`GUESTFS_ADD_DRIVE_OPTS_READONLY\*(C'\fR set to 1, so the disk is added read-only, with the format being detected automatically. $g>add_drive_ro_with_if ($filename, $iface)This is the same as \*(C`$g\->add_drive_ro\*(C'\fR but it allows you to specify the QEMU interface emulation to use at run time. This function is deprecated. In new code, use the add_drive call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>add_drive_with_if ($filename, $iface)This is the same as \*(C`$g\->add_drive\*(C'\fR but it allows you to specify the QEMU interface emulation to use at run time. This function is deprecated. In new code, use the add_drive call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>aug_clear ($augpath)Set the value associated with \*(C`path\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR. This is the same as the augtool(1) \*(C`clear\*(C'\fR command. $g>aug_close ()Close the current Augeas handle and free up any resources used by it. After calling this, you have to call ​\*(C`$g\->aug_init\*(C'\fR again before you can use any other Augeas functions. %nrnodescreated = $g>aug_defnode ($name, $expr, $val)Defines a variable \*(C`name\*(C'\fR whose value is the result of evaluating \*(C`expr\*(C'\fR. If \*(C`expr\*(C'\fR evaluates to an empty nodeset, a node is created, equivalent to calling \*(C`$g\->aug_set\*(C'\fR \f(CW\*(C`expr\*(C'\fR, \f(CW\*(C`value\*(C'\fR. ​\*(C`name\*(C'\fR will be the nodeset containing that single node. On success this returns a pair containing the number of nodes in the nodeset, and a boolean flag if a node was created. $nrnodes = $g>aug_defvar ($name, $expr)Defines an Augeas variable \*(C`name\*(C'\fR whose value is the result of evaluating \*(C`expr\*(C'\fR. If \f(CW\*(C`expr\*(C'\fR is \s-1NULL\s0, then \f(CW\*(C`name\*(C'\fR is undefined. On success this returns the number of nodes in \*(C`expr\*(C'\fR, or ​0 if \*(C`expr\*(C'\fR evaluates to something which is not a nodeset. $val = $g>aug_get ($augpath)Look up the value associated with \*(C`path\*(C'\fR. If \f(CW\*(C`path\*(C'\fR matches exactly one node, the \*(C`value\*(C'\fR is returned. $g>aug_init ($root, $flags)Create a new Augeas handle for editing configuration files. If there was any previous Augeas handle associated with this guestfs session, then it is closed. You must call this before using any other \*(C`$g\->aug_*\*(C'\fR commands. \*(C`root\*(C'\fR is the filesystem root. \f(CW\*(C`root\*(C'\fR must not be \s-1NULL\s0, use \*(C`/\*(C'\fR instead. The flags are the same as the flags defined in <augeas.h>, the logical or of the following integers: AUG_SAVE_BACKUP = 1 Keep the original file with a \*(C`.augsave\*(C'\fR extension. AUG_SAVE_NEWFILE = 2 Save changes into a file with extension \*(C`.augnew\*(C'\fR, and do not overwrite original. Overrides \*(C`AUG_SAVE_BACKUP\*(C'\fR. AUG_TYPE_CHECK = 4 Typecheck lenses. This option is only useful when debugging Augeas lenses. Use of this option may require additional memory for the libguestfs appliance. You may need to set the \*(C`LIBGUESTFS_MEMSIZE\*(C'\fR environment variable or call \*(C`$g\->set_memsize\*(C'\fR. AUG_NO_STDINC = 8 Do not use standard load path for modules. AUG_SAVE_NOOP = 16 Make save a no-op, just record what would have been changed. AUG_NO_LOAD = 32 Do not load the tree in \*(C`$g\->aug_init\*(C'\fR. To close the handle, you can call \*(C`$g\->aug_close\*(C'\fR. To find out more about Augeas, see <http://augeas.net/>. $g>aug_insert ($augpath, $label, $before)Create a new sibling \*(C`label\*(C'\fR for \f(CW\*(C`path\*(C'\fR, inserting it into the tree before or after \*(C`path\*(C'\fR (depending on the boolean flag \*(C`before\*(C'\fR). \*(C`path\*(C'\fR must match exactly one existing node in the tree, and ​\*(C`label\*(C'\fR must be a label, ie. not contain \f(CW\*(C`/\*(C'\fR, \f(CW\*(C`*\*(C'\fR or end with a bracketed index \*(C`[N]\*(C'\fR. $g>aug_load ()Load files into the tree. See \*(C`aug_load\*(C'\fR in the Augeas documentation for the full gory details. @matches = $g>aug_ls ($augpath)This is just a shortcut for listing \*(C`$g\->aug_match\*(C'\fR ​\*(C`path/*\*(C'\fR and sorting the resulting nodes into alphabetical order. @matches = $g>aug_match ($augpath)Returns a list of paths which match the path expression \*(C`path\*(C'\fR. The returned paths are sufficiently qualified so that they match exactly one node in the current tree. $g>aug_mv ($src, $dest)Move the node \*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR. \f(CW\*(C`src\*(C'\fR must match exactly one node. \*(C`dest\*(C'\fR is overwritten if it exists. $nrnodes = $g>aug_rm ($augpath)Remove \*(C`path\*(C'\fR and all of its children. On success this returns the number of entries which were removed. $g>aug_save ()This writes all pending changes to disk. The flags which were passed to \*(C`$g\->aug_init\*(C'\fR affect exactly how files are saved. $g>aug_set ($augpath, $val)Set the value associated with \*(C`path\*(C'\fR to \f(CW\*(C`val\*(C'\fR. In the Augeas API, it is possible to clear a node by setting the value to NULL. Due to an oversight in the libguestfs API you cannot do that with this call. Instead you must use the ​\*(C`$g\->aug_clear\*(C'\fR call. $g>available (\@groups)This command is used to check the availability of some groups of functionality in the appliance, which not all builds of the libguestfs appliance will be able to provide. The libguestfs groups, and the functions that those groups correspond to, are listed in AVAILABILITY in guestfs(3). You can also fetch this list at runtime by calling ​\*(C`$g\->available_all_groups\*(C'\fR. The argument \*(C`groups\*(C'\fR is a list of group names, eg: ​\*(C`["inotify", "augeas"]\*(C'\fR would check for the availability of the Linux inotify functions and Augeas (configuration file editing) functions. The command returns no error if all requested groups are available. It fails with an error if one or more of the requested groups is unavailable in the appliance. If an unknown group name is included in the list of groups then an error is always returned. Notes: • You must call \*(C`$g\->launch\*(C'\fR before calling this function. The reason is because we don't know what groups are supported by the appliance/daemon until it is running and can be queried. • If a group of functions is available, this does not necessarily mean that they will work. You still have to check for errors when calling individual API functions even if they are available. • It is usually the job of distro packagers to build complete functionality into the libguestfs appliance. Upstream libguestfs, if built from source with all requirements satisfied, will support everything. • This call was added in version 1.0.80. In previous versions of libguestfs all you could do would be to speculatively execute a command to find out if the daemon implemented it. See also \*(C`$g\->version\*(C'\fR. See also \*(C`$g\->filesystem_available\*(C'\fR. @groups = $g>available_all_groups ()This command returns a list of all optional groups that this daemon knows about. Note this returns both supported and unsupported groups. To find out which ones the daemon can actually support you have to call \*(C`$g\->available\*(C'\fR on each member of the returned list. See also \*(C`$g\->available\*(C'\fR and \*(L"\s-1AVAILABILITY\s0\*(R" in \fIguestfs\fR\|(3). $g>base64_in ($base64file, $filename)This command uploads base64−encoded data from \*(C`base64file\*(C'\fR to \*(C`filename\*(C'\fR. $g>base64_out ($filename, $base64file)This command downloads the contents of \*(C`filename\*(C'\fR, writing it out to local file \*(C`base64file\*(C'\fR encoded as base64. %info = $g>blkid ($device)This command returns block device attributes for \*(C`device\*(C'\fR. The following fields are usually present in the returned hash. Other fields may also be present. UUID The uuid of this device. LABEL The label of this device. VERSION The version of blkid command. TYPE The filesystem type or RAID of this device. USAGE The usage of this device, for example \*(C`filesystem\*(C'\fR or \f(CW\*(C`raid\*(C'\fR. $g>blockdev_flushbufs ($device)This tells the kernel to flush internal buffers associated with \*(C`device\*(C'\fR. This uses the blockdev(8) command. $blocksize = $g>blockdev_getbsz ($device)This returns the block size of a device. Note: this is different from both size in blocks and ​filesystem block size. Also this setting is not really used by anything. You should probably not use it for anything. Filesystems have their own idea about what block size to choose. This uses the blockdev(8) command. $ro = $g>blockdev_getro ($device)Returns a boolean indicating if the block device is read-only (true if read-only, false if not). This uses the blockdev(8) command. $sizeinbytes = $g>blockdev_getsize64 ($device)This returns the size of the device in bytes. See also \*(C`$g\->blockdev_getsz\*(C'\fR. This uses the blockdev(8) command. $sectorsize = $g>blockdev_getss ($device)This returns the size of sectors on a block device. Usually 512, but can be larger for modern devices. (Note, this is not the size in sectors, use \*(C`$g\->blockdev_getsz\*(C'\fR for that). This uses the blockdev(8) command. $sizeinsectors = $g>blockdev_getsz ($device)This returns the size of the device in units of 512−byte sectors (even if the sectorsize isn't 512 bytes ... weird). See also \*(C`$g\->blockdev_getss\*(C'\fR for the real sector size of the device, and \*(C`$g\->blockdev_getsize64\*(C'\fR for the more useful size in bytes. This uses the blockdev(8) command. $g>blockdev_rereadpt ($device)Reread the partition table on \*(C`device\*(C'\fR. This uses the blockdev(8) command. $g>blockdev_setbsz ($device, $blocksize)This call does nothing and has never done anything because of a bug in blockdev. Do not use it. If you need to set the filesystem block size, use the ​\*(C`blocksize\*(C'\fR option of \f(CW\*(C`$g\->mkfs\*(C'\fR. This function is deprecated. In new code, use the mkfs call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>blockdev_setro ($device)Sets the block device named \*(C`device\*(C'\fR to read-only. This uses the blockdev(8) command. $g>blockdev_setrw ($device)Sets the block device named \*(C`device\*(C'\fR to read-write. This uses the blockdev(8) command. $g>btrfs_device_add (\@devices, $fs)Add the list of device(s) in \*(C`devices\*(C'\fR to the btrfs filesystem mounted at \*(C`fs\*(C'\fR. If \f(CW\*(C`devices\*(C'\fR is an empty list, this does nothing. $g>btrfs_device_delete (\@devices, $fs)Remove the \*(C`devices\*(C'\fR from the btrfs filesystem mounted at \f(CW\*(C`fs\*(C'\fR. If \*(C`devices\*(C'\fR is an empty list, this does nothing. $g>btrfs_filesystem_balance ($fs)Balance the chunks in the btrfs filesystem mounted at \*(C`fs\*(C'\fR across the underlying devices. $g>btrfs_filesystem_resize ($mountpoint [, size => $size])This command resizes a btrfs filesystem. Note that unlike other resize calls, the filesystem has to be mounted and the parameter is the mountpoint not the device (this is a requirement of btrfs itself). The optional parameters are: size The new size (in bytes) of the filesystem. If omitted, the filesystem is resized to the maximum size. See also btrfs(8). $g>btrfs_filesystem_sync ($fs)Force sync on the btrfs filesystem mounted at \*(C`fs\*(C'\fR. $g>btrfs_fsck ($device [, superblock => $superblock] [, repair => $repair])Used to check a btrfs filesystem, \*(C`device\*(C'\fR is the device file where the filesystem is stored. $g>btrfs_set_seeding ($device, $seeding)Enable or disable the seeding feature of a device that contains a btrfs filesystem. $g>btrfs_subvolume_create ($dest)Create a btrfs subvolume. The \*(C`dest\*(C'\fR argument is the destination directory and the name of the snapshot, in the form \*(C`/path/to/dest/name\*(C'\fR. $g>btrfs_subvolume_delete ($subvolume)Delete the named btrfs subvolume. @subvolumes = $g>btrfs_subvolume_list ($fs)List the btrfs snapshots and subvolumes of the btrfs filesystem which is mounted at \*(C`fs\*(C'\fR. $g>btrfs_subvolume_set_default ($id, $fs)Set the subvolume of the btrfs filesystem \*(C`fs\*(C'\fR which will be mounted by default. See \*(C`$g\->btrfs_subvolume_list\*(C'\fR to get a list of subvolumes. $g>btrfs_subvolume_snapshot ($source, $dest)Create a writable snapshot of the btrfs subvolume \*(C`source\*(C'\fR. The \*(C`dest\*(C'\fR argument is the destination directory and the name of the snapshot, in the form \*(C`/path/to/dest/name\*(C'\fR. $canonical = $g>canonical_device_name ($device)This utility function is useful when displaying device names to the user. It takes a number of irregular device names and returns them in a consistent format: /dev/hdX /dev/vdX These are returned as \*(C`/dev/sdX\*(C'\fR. Note this works for device names and partition names. This is approximately the reverse of the algorithm described in BLOCK DEVICE NAMING in guestfs(3). /dev/mapper/VG−LV /dev/dm−N Converted to \*(C`/dev/VG/LV\*(C'\fR form using \f(CW\*(C`$g\->lvm_canonical_lvm_name\*(C'\fR. Other strings are returned unmodified. $cap = $g>cap_get_file ($path)This function returns the Linux capabilities attached to \*(C`path\*(C'\fR. The capabilities set is returned in text form (see cap_to_text(3)). If no capabilities are attached to a file, an empty string is returned. $g>cap_set_file ($path, $cap)This function sets the Linux capabilities attached to \*(C`path\*(C'\fR. The capabilities set \*(C`cap\*(C'\fR should be passed in text form (see cap_from_text(3)). $rpath = $g>case_sensitive_path ($path)This can be used to resolve case insensitive paths on a filesystem which is case sensitive. The use case is to resolve paths which you have read from Windows configuration files or the Windows Registry, to the true path. The command handles a peculiarity of the Linux ntfs−3g filesystem driver (and probably others), which is that although the underlying filesystem is case-insensitive, the driver exports the filesystem to Linux as case-sensitive. One consequence of this is that special directories such as \*(C`c:\ewindows\*(C'\fR may appear as \f(CW\*(C`/WINDOWS\*(C'\fR or \f(CW\*(C`/windows\*(C'\fR (or other things) depending on the precise details of how they were created. In Windows itself this would not be a problem. Bug or feature? You decide: <http://www.tuxera.com/community/ntfs−3g−faq/#posixfilenames1> This function resolves the true case of each element in the path and returns the case-sensitive path. Thus \*(C`$g\->case_sensitive_path\*(C'\fR (\*(L"/Windows/System32\*(R") might return "/WINDOWS/system32" (the exact return value would depend on details of how the directories were originally created under Windows). Note: This function does not handle drive names, backslashes etc. See also \*(C`$g\->realpath\*(C'\fR. $content = $g>cat ($path)Return the contents of the file named \*(C`path\*(C'\fR. Because, in C, this function returns a \*(C`char *\*(C'\fR, there is no way to differentiate between a \*(C`\e0\*(C'\fR character in a file and end of string. To handle binary files, use the \*(C`$g\->read_file\*(C'\fR or \*(C`$g\->download\*(C'\fR functions. $checksum = $g>checksum ($csumtype, $path)This call computes the MD5, SHAx or CRC checksum of the file named \*(C`path\*(C'\fR. The type of checksum to compute is given by the \*(C`csumtype\*(C'\fR parameter which must have one of the following values: crc Compute the cyclic redundancy check (CRC) specified by POSIX for the \*(C`cksum\*(C'\fR command. md5 Compute the MD5 hash (using the \*(C`md5sum\*(C'\fR program). sha1 Compute the SHA1 hash (using the \*(C`sha1sum\*(C'\fR program). sha224 Compute the SHA224 hash (using the \*(C`sha224sum\*(C'\fR program). sha256 Compute the SHA256 hash (using the \*(C`sha256sum\*(C'\fR program). sha384 Compute the SHA384 hash (using the \*(C`sha384sum\*(C'\fR program). sha512 Compute the SHA512 hash (using the \*(C`sha512sum\*(C'\fR program). The checksum is returned as a printable string. To get the checksum for a device, use \*(C`$g\->checksum_device\*(C'\fR. To get the checksums for many files, use \*(C`$g\->checksums_out\*(C'\fR. $checksum = $g>checksum_device ($csumtype, $device)This call computes the MD5, SHAx or CRC checksum of the contents of the device named \*(C`device\*(C'\fR. For the types of checksums supported see the \*(C`$g\->checksum\*(C'\fR command. $g>checksums_out ($csumtype, $directory, $sumsfile)This command computes the checksums of all regular files in ​\*(C`directory\*(C'\fR and then emits a list of those checksums to the local output file \*(C`sumsfile\*(C'\fR. This can be used for verifying the integrity of a virtual machine. However to be properly secure you should pay attention to the output of the checksum command (it uses the ones from GNU coreutils). In particular when the filename is not printable, coreutils uses a special backslash syntax. For more information, see the GNU coreutils info file. $g>chmod ($mode, $path)Change the mode (permissions) of \*(C`path\*(C'\fR to \f(CW\*(C`mode\*(C'\fR. Only numeric modes are supported. Note: When using this command from guestfish, \*(C`mode\*(C'\fR by default would be decimal, unless you prefix it with ​0 to get octal, ie. use 0700 not 700. The mode actually set is affected by the umask. $g>chown ($owner, $group, $path)Change the file owner to \*(C`owner\*(C'\fR and group to \f(CW\*(C`group\*(C'\fR. Only numeric uid and gid are supported. If you want to use names, you will need to locate and parse the password file yourself (Augeas support makes this relatively easy). $output = $g>command (\@arguments)This call runs a command from the guest filesystem. The filesystem must be mounted, and must contain a compatible operating system (ie. something Linux, with the same or compatible processor architecture). The single parameter is an argv-style list of arguments. The first element is the name of the program to run. Subsequent elements are parameters. The list must be non-empty (ie. must contain a program name). Note that the command runs directly, and is not invoked via the shell (see \*(C`$g\->sh\*(C'\fR). The return value is anything printed to stdout by the command. If the command returns a non-zero exit status, then this function returns an error message. The error message string is the content of stderr from the command. The $PATH environment variable will contain at least ​\*(C`/usr/bin\*(C'\fR and \f(CW\*(C`/bin\*(C'\fR. If you require a program from another location, you should provide the full path in the first parameter. Shared libraries and data files required by the program must be available on filesystems which are mounted in the correct places. It is the caller's responsibility to ensure all filesystems that are needed are mounted at the right locations. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). @lines = $g>command_lines (\@arguments)This is the same as \*(C`$g\->command\*(C'\fR, but splits the result into a list of lines. See also: \*(C`$g\->sh_lines\*(C'\fR Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). $g>compress_device_out ($ctype, $device, $zdevice [, level => $level])This command compresses \*(C`device\*(C'\fR and writes it out to the local file \*(C`zdevice\*(C'\fR. The \*(C`ctype\*(C'\fR and optional \f(CW\*(C`level\*(C'\fR parameters have the same meaning as in \*(C`$g\->compress_out\*(C'\fR. $g>compress_out ($ctype, $file, $zfile [, level => $level])This command compresses \*(C`file\*(C'\fR and writes it out to the local file \*(C`zfile\*(C'\fR. The compression program used is controlled by the \*(C`ctype\*(C'\fR parameter. Currently this includes: \*(C`compress\*(C'\fR, \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`bzip2\*(C'\fR, \f(CW\*(C`xz\*(C'\fR or \f(CW\*(C`lzop\*(C'\fR. Some compression types may not be supported by particular builds of libguestfs, in which case you will get an error containing the substring not supported. The optional \*(C`level\*(C'\fR parameter controls compression level. The meaning and default for this parameter depends on the compression program being used. $g>config ($qemuparam, $qemuvalue)This can be used to add arbitrary qemu command line parameters of the form −param value. Actually it's not quite arbitrary − we prevent you from setting some parameters which would interfere with parameters that we use. The first character of \*(C`qemuparam\*(C'\fR string must be a \f(CW\*(C`\-\*(C'\fR (dash). \*(C`qemuvalue\*(C'\fR can be \s-1NULL\s0. $g>copy_device_to_device ($src, $dest [, srcoffset => $srcoffset] [, destoffset => $destoffset] [, size => $size])The four calls \*(C`$g\->copy_device_to_device\*(C'\fR, ​\*(C`$g\->copy_device_to_file\*(C'\fR, ​\*(C`$g\->copy_file_to_device\*(C'\fR, and ​\*(C`$g\->copy_file_to_file\*(C'\fR let you copy from a source (device|file) to a destination (device|file). Partial copies can be made since you can specify optionally the source offset, destination offset and size to copy. These values are all specified in bytes. If not given, the offsets both default to zero, and the size defaults to copying as much as possible until we hit the end of the source. The source and destination may be the same object. However overlapping regions may not be copied correctly. If the destination is a file, it is created if required. If the destination file is not large enough, it is extended. $g>copy_device_to_file ($src, $dest [, srcoffset => $srcoffset] [, destoffset => $destoffset] [, size => $size])See \*(C`$g\->copy_device_to_device\*(C'\fR for a general overview of this call. $g>copy_file_to_device ($src, $dest [, srcoffset => $srcoffset] [, destoffset => $destoffset] [, size => $size])See \*(C`$g\->copy_device_to_device\*(C'\fR for a general overview of this call. $g>copy_file_to_file ($src, $dest [, srcoffset => $srcoffset] [, destoffset => $destoffset] [, size => $size])See \*(C`$g\->copy_device_to_device\*(C'\fR for a general overview of this call. This is not the function you want for copying files. This is for copying blocks within existing files. See \*(C`$g\->cp\*(C'\fR, ​\*(C`$g\->cp_a\*(C'\fR and \f(CW\*(C`$g\->mv\*(C'\fR for general file copying and moving functions. $g>copy_size ($src, $dest, $size)This command copies exactly \*(C`size\*(C'\fR bytes from one source device or file \*(C`src\*(C'\fR to another destination device or file \f(CW\*(C`dest\*(C'\fR. Note this will fail if the source is too short or if the destination is not large enough. This function is deprecated. In new code, use the copy_device_to_device call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>cp ($src, $dest)This copies a file from \*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR where \f(CW\*(C`dest\*(C'\fR is either a destination filename or destination directory. $g>cp_a ($src, $dest)This copies a file or directory from \*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR recursively using the \*(C`cp \-a\*(C'\fR command. $g>dd ($src, $dest)This command copies from one source device or file \*(C`src\*(C'\fR to another destination device or file \*(C`dest\*(C'\fR. Normally you would use this to copy to or from a device or partition, for example to duplicate a filesystem. If the destination is a device, it must be as large or larger than the source file or device, otherwise the copy will fail. This command cannot do partial copies (see \*(C`$g\->copy_device_to_device\*(C'\fR). This function is deprecated. In new code, use the copy_device_to_device call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $index = $g>device_index ($device)This function takes a device name (eg. /dev/sdb) and returns the index of the device in the list of devices. Index numbers start from 0. The named device must exist, for example as a string returned from \*(C`$g\->list_devices\*(C'\fR. See also \*(C`$g\->list_devices\*(C'\fR, \f(CW\*(C`$g\->part_to_dev\*(C'\fR. $output = $g>df ()This command runs the \*(C`df\*(C'\fR command to report disk space used. This command is mostly useful for interactive sessions. It is not intended that you try to parse the output string. Use \*(C`$g\->statvfs\*(C'\fR from programs. $output = $g>df_h ()This command runs the \*(C`df \-h\*(C'\fR command to report disk space used in human-readable format. This command is mostly useful for interactive sessions. It is not intended that you try to parse the output string. Use \*(C`$g\->statvfs\*(C'\fR from programs. $format = $g>disk_format ($filename)Detect and return the format of the disk image called \*(C`filename\*(C'\fR. ​\*(C`filename\*(C'\fR can also be a host device, etc. If the format of the image could not be detected, then "unknown" is returned. Note that detecting the disk format can be insecure under some circumstances. See CVE−2010−3851 in guestfs(3). See also: DISK IMAGE FORMATS in guestfs(3) $backingfile = $g>disk_has_backing_file ($filename)Detect and return whether the disk image \*(C`filename\*(C'\fR has a backing file. Note that detecting disk features can be insecure under some circumstances. See CVE−2010−3851 in guestfs(3). $size = $g>disk_virtual_size ($filename)Detect and return the virtual size in bytes of the disk image called \*(C`filename\*(C'\fR. Note that detecting disk features can be insecure under some circumstances. See CVE−2010−3851 in guestfs(3). $kmsgs = $g>dmesg ()This returns the kernel messages (\*(C`dmesg\*(C'\fR output) from the guest kernel. This is sometimes useful for extended debugging of problems. Another way to get the same information is to enable verbose messages with \*(C`$g\->set_verbose\*(C'\fR or by setting the environment variable \*(C`LIBGUESTFS_DEBUG=1\*(C'\fR before running the program. $g>download ($remotefilename, $filename)Download file \*(C`remotefilename\*(C'\fR and save it as \f(CW\*(C`filename\*(C'\fR on the local machine. \*(C`filename\*(C'\fR can also be a named pipe. See also \*(C`$g\->upload\*(C'\fR, \f(CW\*(C`$g\->cat\*(C'\fR. $g>download_offset ($remotefilename, $filename, $offset, $size)Download file \*(C`remotefilename\*(C'\fR and save it as \f(CW\*(C`filename\*(C'\fR on the local machine. \*(C`remotefilename\*(C'\fR is read for \f(CW\*(C`size\*(C'\fR bytes starting at \f(CW\*(C`offset\*(C'\fR (this region must be within the file or device). Note that there is no limit on the amount of data that can be downloaded with this call, unlike with \*(C`$g\->pread\*(C'\fR, and this call always reads the full amount unless an error occurs. See also \*(C`$g\->download\*(C'\fR, \f(CW\*(C`$g\->pread\*(C'\fR. $g>drop_caches ($whattodrop)This instructs the guest kernel to drop its page cache, and/or dentries and inode caches. The parameter \*(C`whattodrop\*(C'\fR tells the kernel what precisely to drop, see <http://linux−mm.org/Drop_Caches> Setting \*(C`whattodrop\*(C'\fR to 3 should drop everything. This automatically calls sync(2) before the operation, so that the maximum guest memory is freed. $sizekb = $g>du ($path)This command runs the \*(C`du \-s\*(C'\fR command to estimate file space usage for \*(C`path\*(C'\fR. \*(C`path\*(C'\fR can be a file or a directory. If \f(CW\*(C`path\*(C'\fR is a directory then the estimate includes the contents of the directory and all subdirectories (recursively). The result is the estimated size in kilobytes (ie. units of 1024 bytes). $g>e2fsck ($device [, correct => $correct] [, forceall => $forceall])This runs the ext2/ext3 filesystem checker on \*(C`device\*(C'\fR. It can take the following optional arguments: correct Automatically repair the file system. This option will cause e2fsck to automatically fix any filesystem problems that can be safely fixed without human intervention. This option may not be specified at the same time as the \*(C`forceall\*(C'\fR option. forceall Assume an answer of 'yes' to all questions; allows e2fsck to be used non-interactively. This option may not be specified at the same time as the \*(C`correct\*(C'\fR option. $g>e2fsck_f ($device)This runs \*(C`e2fsck \-p \-f device\*(C'\fR, ie. runs the ext2/ext3 filesystem checker on \*(C`device\*(C'\fR, noninteractively (\fI\-p\fR), even if the filesystem appears to be clean (−f). This function is deprecated. In new code, use the e2fsck call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $output = $g>echo_daemon (\@words)This command concatenates the list of \*(C`words\*(C'\fR passed with single spaces between them and returns the resulting string. You can use this command to test the connection through to the daemon. See also \*(C`$g\->ping_daemon\*(C'\fR. @lines = $g>egrep ($regex, $path)This calls the external \*(C`egrep\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. @lines = $g>egrepi ($regex, $path)This calls the external \*(C`egrep \-i\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $equality = $g>equal ($file1, $file2)This compares the two files \*(C`file1\*(C'\fR and \f(CW\*(C`file2\*(C'\fR and returns true if their content is exactly equal, or false otherwise. The external cmp(1) program is used for the comparison. $existsflag = $g>exists ($path)This returns \*(C`true\*(C'\fR if and only if there is a file, directory (or anything) with the given \*(C`path\*(C'\fR name. See also \*(C`$g\->is_file\*(C'\fR, \f(CW\*(C`$g\->is_dir\*(C'\fR, \f(CW\*(C`$g\->stat\*(C'\fR. $g>fallocate ($path, $len)This command preallocates a file (containing zero bytes) named ​\*(C`path\*(C'\fR of size \f(CW\*(C`len\*(C'\fR bytes. If the file exists already, it is overwritten. Do not confuse this with the guestfish-specific ​\*(C`alloc\*(C'\fR command which allocates a file in the host and attaches it as a device. This function is deprecated. In new code, use the fallocate64 call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>fallocate64 ($path, $len)This command preallocates a file (containing zero bytes) named ​\*(C`path\*(C'\fR of size \f(CW\*(C`len\*(C'\fR bytes. If the file exists already, it is overwritten. Note that this call allocates disk blocks for the file. To create a sparse file use \*(C`$g\->truncate_size\*(C'\fR instead. The deprecated call \*(C`$g\->fallocate\*(C'\fR does the same, but owing to an oversight it only allowed 30 bit lengths to be specified, effectively limiting the maximum size of files created through that call to 1GB. Do not confuse this with the guestfish-specific ​\*(C`alloc\*(C'\fR and \f(CW\*(C`sparse\*(C'\fR commands which create a file in the host and attach it as a device. @lines = $g>fgrep ($pattern, $path)This calls the external \*(C`fgrep\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. @lines = $g>fgrepi ($pattern, $path)This calls the external \*(C`fgrep \-i\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $description = $g>file ($path)This call uses the standard file(1) command to determine the type or contents of the file. This call will also transparently look inside various types of compressed file. The exact command which runs is \*(C`file \-zb path\*(C'\fR. Note in particular that the filename is not prepended to the output (the −b option). The output depends on the output of the underlying file(1) command and it can change in future in ways beyond our control. In other words, the output is not guaranteed by the ABI. See also: file(1), \*(C`$g\->vfs_type\*(C'\fR, \f(CW\*(C`$g\->lstat\*(C'\fR, ​\*(C`$g\->is_file\*(C'\fR, \f(CW\*(C`$g\->is_blockdev\*(C'\fR (etc), \f(CW\*(C`$g\->is_zero\*(C'\fR. $arch = $g>file_architecture ($filename)This detects the architecture of the binary \*(C`filename\*(C'\fR, and returns it if known. Currently defined architectures are: ``i386'' This string is returned for all 32 bit i386, i486, i586, i686 binaries irrespective of the precise processor requirements of the binary. ``x86_64'' 64 bit x86−64. ``sparc'' 32 bit SPARC. ``sparc64'' 64 bit SPARC V9 and above. ``ia64'' Intel Itanium. ``ppc'' 32 bit Power PC. ``ppc64'' 64 bit Power PC. Libguestfs may return other architecture strings in future. The function works on at least the following types of files: • many types of Un*x and Linux binary • many types of Un*x and Linux shared library • Windows Win32 and Win64 binaries • Windows Win32 and Win64 DLLs Win32 binaries and DLLs return \*(C`i386\*(C'\fR. Win64 binaries and DLLs return \*(C`x86_64\*(C'\fR. • Linux kernel modules • Linux new-style initrd images • some non−x86 Linux vmlinuz kernels What it can't do currently: • static libraries (libfoo.a) • Linux old-style initrd as compressed ext2 filesystem (RHEL 3) • x86 Linux vmlinuz kernels x86 vmlinuz images (bzImage format) consist of a mix of 16−, 32− and compressed code, and are horribly hard to unpack. If you want to find the architecture of a kernel, use the architecture of the associated initrd or kernel module(s) instead. $size = $g>filesize ($file)This command returns the size of \*(C`file\*(C'\fR in bytes. To get other stats about a file, use \*(C`$g\->stat\*(C'\fR, \f(CW\*(C`$g\->lstat\*(C'\fR, ​\*(C`$g\->is_dir\*(C'\fR, \f(CW\*(C`$g\->is_file\*(C'\fR etc. To get the size of block devices, use \*(C`$g\->blockdev_getsize64\*(C'\fR. $fsavail = $g>filesystem_available ($filesystem)Check whether libguestfs supports the named filesystem. The argument \*(C`filesystem\*(C'\fR is a filesystem name, such as ​\*(C`ext3\*(C'\fR. You must call \*(C`$g\->launch\*(C'\fR before using this command. This is mainly useful as a negative test. If this returns true, it doesn't mean that a particular filesystem can be created or mounted, since filesystems can fail for other reasons such as it being a later version of the filesystem, or having incompatible features, or lacking the right mkfs.<fs> tool. See also \*(C`$g\->available\*(C'\fR, \*(L"\s-1AVAILABILITY\s0\*(R" in \fIguestfs\fR\|(3). $g>fill ($c, $len, $path)This command creates a new file called \*(C`path\*(C'\fR. The initial content of the file is \*(C`len\*(C'\fR octets of \f(CW\*(C`c\*(C'\fR, where \f(CW\*(C`c\*(C'\fR must be a number in the range \*(C`[0..255]\*(C'\fR. To fill a file with zero bytes (sparsely), it is much more efficient to use \*(C`$g\->truncate_size\*(C'\fR. To create a file with a pattern of repeating bytes use \*(C`$g\->fill_pattern\*(C'\fR. $g>fill_dir ($dir, $nr)This function, useful for testing filesystems, creates \*(C`nr\*(C'\fR empty files in the directory \*(C`dir\*(C'\fR with names \f(CW00000000\fR through \*(C`nr\-1\*(C'\fR (ie. each file name is 8 digits long padded with zeroes). $g>fill_pattern ($pattern, $len, $path)This function is like \*(C`$g\->fill\*(C'\fR except that it creates a new file of length \*(C`len\*(C'\fR containing the repeating pattern of bytes in \*(C`pattern\*(C'\fR. The pattern is truncated if necessary to ensure the length of the file is exactly \*(C`len\*(C'\fR bytes. @names = $g>find ($directory)This command lists out all files and directories, recursively, starting at \*(C`directory\*(C'\fR. It is essentially equivalent to running the shell command \*(C`find directory \-print\*(C'\fR but some post-processing happens on the output, described below. This returns a list of strings without any prefix. Thus if the directory structure was: ​ /tmp/a ​ /tmp/b ​ /tmp/c/d then the returned list from \*(C`$g\->find\*(C'\fR \f(CW\*(C`/tmp\*(C'\fR would be 4 elements: ​ a ​ b ​ c ​ c/d If \*(C`directory\*(C'\fR is not a directory, then this command returns an error. The returned list is sorted. $g>find0 ($directory, $files)This command lists out all files and directories, recursively, starting at \*(C`directory\*(C'\fR, placing the resulting list in the external file called \*(C`files\*(C'\fR. This command works the same way as \*(C`$g\->find\*(C'\fR with the following exceptions: • The resulting list is written to an external file. • Items (filenames) in the result are separated by \*(C`\e0\*(C'\fR characters. See \fIfind\fR\|(1) option \fI\-print0\fR. • The result list is not sorted. $device = $g>findfs_label ($label)This command searches the filesystems and returns the one which has the given label. An error is returned if no such filesystem can be found. To find the label of a filesystem, use \*(C`$g\->vfs_label\*(C'\fR. $device = $g>findfs_uuid ($uuid)This command searches the filesystems and returns the one which has the given UUID. An error is returned if no such filesystem can be found. To find the UUID of a filesystem, use \*(C`$g\->vfs_uuid\*(C'\fR. $status = $g>fsck ($fstype, $device)This runs the filesystem checker (fsck) on \*(C`device\*(C'\fR which should have filesystem type \*(C`fstype\*(C'\fR. The returned integer is the status. See fsck(8) for the list of status codes from \*(C`fsck\*(C'\fR. Notes: • Multiple status codes can be summed together. • A non-zero return code can mean success, for example if errors have been corrected on the filesystem. • Checking or repairing NTFS volumes is not supported (by linux-ntfs). This command is entirely equivalent to running \*(C`fsck \-a \-t fstype device\*(C'\fR. $append = $g>get_append ()Return the additional kernel options which are added to the libguestfs appliance kernel command line. If \*(C`NULL\*(C'\fR then no options are added. $attachmethod = $g>get_attach_method ()Return the current attach method. See \*(C`$g\->set_attach_method\*(C'\fR and \*(L"\s-1ATTACH\s0 \s-1METHOD\s0\*(R" in \fIguestfs\fR\|(3). $autosync = $g>get_autosync ()Get the autosync flag. $cachedir = $g>get_cachedir ()Get the directory used by the handle to store the appliance cache. $direct = $g>get_direct ()Return the direct appliance mode flag. $attrs = $g>get_e2attrs ($file)This returns the file attributes associated with \*(C`file\*(C'\fR. The attributes are a set of bits associated with each inode which affect the behaviour of the file. The attributes are returned as a string of letters (described below). The string may be empty, indicating that no file attributes are set for this file. These attributes are only present when the file is located on an ext2/3/4 filesystem. Using this call on other filesystem types will result in an error. The characters (file attributes) in the returned string are currently: 'A' When the file is accessed, its atime is not modified. 'a' The file is append-only. 'c' The file is compressed on-disk. 'D' (Directories only.) Changes to this directory are written synchronously to disk. 'd' The file is not a candidate for backup (see dump(8)). 'E' The file has compression errors. 'e' The file is using extents. 'h' The file is storing its blocks in units of the filesystem blocksize instead of sectors. 'I' (Directories only.) The directory is using hashed trees. 'i' The file is immutable. It cannot be modified, deleted or renamed. No link can be created to this file. 'j' The file is data-journaled. 's' When the file is deleted, all its blocks will be zeroed. 'S' Changes to this file are written synchronously to disk. 'T' (Directories only.) This is a hint to the block allocator that subdirectories contained in this directory should be spread across blocks. If not present, the block allocator will try to group subdirectories together. 't' For a file, this disables tail-merging. (Not used by upstream implementations of ext2.) 'u' When the file is deleted, its blocks will be saved, allowing the file to be undeleted. 'X' The raw contents of the compressed file may be accessed. 'Z' The compressed file is dirty. More file attributes may be added to this list later. Not all file attributes may be set for all kinds of files. For detailed information, consult the chattr(1) man page. See also \*(C`$g\->set_e2attrs\*(C'\fR. Don't confuse these attributes with extended attributes (see \*(C`$g\->getxattr\*(C'\fR). $generation = $g>get_e2generation ($file)This returns the ext2 file generation of a file. The generation (which used to be called the version) is a number associated with an inode. This is most commonly used by NFS servers. The generation is only present when the file is located on an ext2/3/4 filesystem. Using this call on other filesystem types will result in an error. See \*(C`$g\->set_e2generation\*(C'\fR. $label = $g>get_e2label ($device)This returns the ext2/3/4 filesystem label of the filesystem on ​\*(C`device\*(C'\fR. This function is deprecated. In new code, use the vfs_label call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $uuid = $g>get_e2uuid ($device)This returns the ext2/3/4 filesystem UUID of the filesystem on ​\*(C`device\*(C'\fR. This function is deprecated. In new code, use the vfs_uuid call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $challenge = $g>get_libvirt_requested_credential_challenge ($index)Get the challenge (provided by libvirt) for the \*(C`index\*(C'\fR'th requested credential. If libvirt did not provide a challenge, this returns the empty string "". See LIBVIRT AUTHENTICATION in guestfs(3) for documentation and example code. $defresult = $g>get_libvirt_requested_credential_defresult ($index)Get the default result (provided by libvirt) for the \*(C`index\*(C'\fR'th requested credential. If libvirt did not provide a default result, this returns the empty string "". See LIBVIRT AUTHENTICATION in guestfs(3) for documentation and example code. $prompt = $g>get_libvirt_requested_credential_prompt ($index)Get the prompt (provided by libvirt) for the \*(C`index\*(C'\fR'th requested credential. If libvirt did not provide a prompt, this returns the empty string "". See LIBVIRT AUTHENTICATION in guestfs(3) for documentation and example code. @creds = $g>get_libvirt_requested_credentials ()This should only be called during the event callback for events of type \*(C`GUESTFS_EVENT_LIBVIRT_AUTH\*(C'\fR. Return the list of credentials requested by libvirt. Possible values are a subset of the strings provided when you called ​\*(C`$g\->set_libvirt_supported_credentials\*(C'\fR. See LIBVIRT AUTHENTICATION in guestfs(3) for documentation and example code. $memsize = $g>get_memsize ()This gets the memory size in megabytes allocated to the qemu subprocess. If \*(C`$g\->set_memsize\*(C'\fR was not called on this handle, and if \*(C`LIBGUESTFS_MEMSIZE\*(C'\fR was not set, then this returns the compiled-in default value for memsize. For more information on the architecture of libguestfs, see guestfs(3). $network = $g>get_network ()This returns the enable network flag. $path = $g>get_path ()Return the current search path. This is always non-NULL. If it wasn't set already, then this will return the default path. $pgroup = $g>get_pgroup ()This returns the process group flag. $pid = $g>get_pid ()Return the process ID of the qemu subprocess. If there is no qemu subprocess, then this will return an error. This is an internal call used for debugging and testing. $qemu = $g>get_qemu ()Return the current qemu binary. This is always non-NULL. If it wasn't set already, then this will return the default qemu binary name. $recoveryproc = $g>get_recovery_proc ()Return the recovery process enabled flag. $selinux = $g>get_selinux ()This returns the current setting of the selinux flag which is passed to the appliance at boot time. See \*(C`$g\->set_selinux\*(C'\fR. For more information on the architecture of libguestfs, see guestfs(3). $smp = $g>get_smp ()This returns the number of virtual CPUs assigned to the appliance. $state = $g>get_state ()This returns the current state as an opaque integer. This is only useful for printing debug and internal error messages. For more information on states, see guestfs(3). $tmpdir = $g>get_tmpdir ()Get the directory used by the handle to store temporary files. $trace = $g>get_trace ()Return the command trace flag. $mask = $g>get_umask ()Return the current umask. By default the umask is 022 unless it has been set by calling \*(C`$g\->umask\*(C'\fR. $verbose = $g>get_verbose ()This returns the verbose messages flag. $context = $g>getcon ()This gets the SELinux security context of the daemon. See the documentation about SELINUX in guestfs(3), and \*(C`$g\->setcon\*(C'\fR $xattr = $g>getxattr ($path, $name)Get a single extended attribute from file \*(C`path\*(C'\fR named \f(CW\*(C`name\*(C'\fR. This call follows symlinks. If you want to lookup an extended attribute for the symlink itself, use \*(C`$g\->lgetxattr\*(C'\fR. Normally it is better to get all extended attributes from a file in one go by calling \*(C`$g\->getxattrs\*(C'\fR. However some Linux filesystem implementations are buggy and do not provide a way to list out attributes. For these filesystems (notably ntfs−3g) you have to know the names of the extended attributes you want in advance and call this function. Extended attribute values are blobs of binary data. If there is no extended attribute named \*(C`name\*(C'\fR, this returns an error. See also: \*(C`$g\->getxattrs\*(C'\fR, \f(CW\*(C`$g\->lgetxattr\*(C'\fR, \fIattr\fR\|(5). @xattrs = $g>getxattrs ($path)This call lists the extended attributes of the file or directory ​\*(C`path\*(C'\fR. At the system call level, this is a combination of the ​listxattr(2) and getxattr(2) calls. See also: \*(C`$g\->lgetxattrs\*(C'\fR, \fIattr\fR\|(5). @paths = $g>glob_expand ($pattern)This command searches for all the pathnames matching ​\*(C`pattern\*(C'\fR according to the wildcard expansion rules used by the shell. If no paths match, then this returns an empty list (note: not an error). It is just a wrapper around the C glob(3) function with flags \*(C`GLOB_MARK|GLOB_BRACE\*(C'\fR. See that manual page for more details. Notice that there is no equivalent command for expanding a device name (eg. \*(C`/dev/sd*\*(C'\fR). Use \f(CW\*(C`$g\->list_devices\*(C'\fR, ​\*(C`$g\->list_partitions\*(C'\fR etc functions instead. @lines = $g>grep ($regex, $path [, extended => $extended] [, fixed => $fixed] [, insensitive => $insensitive] [, compressed => $compressed])This calls the external \*(C`grep\*(C'\fR program and returns the matching lines. The optional flags are: extended Use extended regular expressions. This is the same as using the −E flag. fixed Match fixed (don't use regular expressions). This is the same as using the −F flag. insensitive Match case-insensitive. This is the same as using the −i flag. compressed Use \*(C`zgrep\*(C'\fR instead of \f(CW\*(C`grep\*(C'\fR. This allows the input to be compress− or gzip-compressed. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). @lines = $g>grep_opts ($regex, $path [, extended => $extended] [, fixed => $fixed] [, insensitive => $insensitive] [, compressed => $compressed])This is an alias of grep. @lines = $g>grepi ($regex, $path)This calls the external \*(C`grep \-i\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>grub_install ($root, $device)This command installs GRUB 1 (the Grand Unified Bootloader) on ​\*(C`device\*(C'\fR, with the root directory being \f(CW\*(C`root\*(C'\fR. Notes: • There is currently no way in the API to install grub2, which is used by most modern Linux guests. It is possible to run the grub2 command from the guest, although see the caveats in RUNNING COMMANDS in guestfs(3). • This uses \*(C`grub\-install\*(C'\fR from the host. Unfortunately grub is not always compatible with itself, so this only works in rather narrow circumstances. Careful testing with each guest version is advisable. • If grub-install reports the error ​No suitable drive was found in the generated device map. it may be that you need to create a \*(C`/boot/grub/device.map\*(C'\fR file first that contains the mapping between grub device names and Linux device names. It is usually sufficient to create a file containing: (hd0) /dev/vda replacing \*(C`/dev/vda\*(C'\fR with the name of the installation device. @lines = $g>head ($path)This command returns up to the first 10 lines of a file as a list of strings. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). @lines = $g>head_n ($nrlines, $path)If the parameter \*(C`nrlines\*(C'\fR is a positive number, this returns the first ​\*(C`nrlines\*(C'\fR lines of the file \f(CW\*(C`path\*(C'\fR. If the parameter \*(C`nrlines\*(C'\fR is a negative number, this returns lines from the file \*(C`path\*(C'\fR, excluding the last \f(CW\*(C`nrlines\*(C'\fR lines. If the parameter \*(C`nrlines\*(C'\fR is zero, this returns an empty list. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). $dump = $g>hexdump ($path)This runs \*(C`hexdump \-C\*(C'\fR on the given \f(CW\*(C`path\*(C'\fR. The result is the human-readable, canonical hex dump of the file. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). $g>hivex_close ()Close the current hivex handle. This is a wrapper around the hivex(3) call of the same name. $g>hivex_commit ($filename)Commit (write) changes to the hive. If the optional \*(C`filename\*(C'\fR parameter is null, then the changes are written back to the same hive that was opened. If this is not null then they are written to the alternate filename given and the original hive is left untouched. This is a wrapper around the hivex(3) call of the same name. $nodeh = $g>hivex_node_add_child ($parent, $name)Add a child node to \*(C`parent\*(C'\fR named \f(CW\*(C`name\*(C'\fR. This is a wrapper around the hivex(3) call of the same name. @nodehs = $g>hivex_node_children ($nodeh)Return the list of nodes which are subkeys of \*(C`nodeh\*(C'\fR. This is a wrapper around the hivex(3) call of the same name. $g>hivex_node_delete_child ($nodeh)Delete \*(C`nodeh\*(C'\fR, recursively if necessary. This is a wrapper around the hivex(3) call of the same name. $child = $g>hivex_node_get_child ($nodeh, $name)Return the child of \*(C`nodeh\*(C'\fR with the name \f(CW\*(C`name\*(C'\fR, if it exists. This can return 0 meaning the name was not found. This is a wrapper around the hivex(3) call of the same name. $valueh = $g>hivex_node_get_value ($nodeh, $key)Return the value attached to \*(C`nodeh\*(C'\fR which has the name \*(C`key\*(C'\fR, if it exists. This can return \f(CW0\fR meaning the key was not found. This is a wrapper around the hivex(3) call of the same name. $name = $g>hivex_node_name ($nodeh)Return the name of \*(C`nodeh\*(C'\fR. This is a wrapper around the hivex(3) call of the same name. $parent = $g>hivex_node_parent ($nodeh)Return the parent node of \*(C`nodeh\*(C'\fR. This is a wrapper around the hivex(3) call of the same name. $g>hivex_node_set_value ($nodeh, $key, $t, $val)Set or replace a single value under the node \*(C`nodeh\*(C'\fR. The ​\*(C`key\*(C'\fR is the name, \f(CW\*(C`t\*(C'\fR is the type, and \f(CW\*(C`val\*(C'\fR is the data. This is a wrapper around the hivex(3) call of the same name. @valuehs = $g>hivex_node_values ($nodeh)Return the array of (key, datatype, data) tuples attached to \*(C`nodeh\*(C'\fR. This is a wrapper around the hivex(3) call of the same name. $g>hivex_open ($filename [, verbose => $verbose] [, debug => $debug] [, write => $write])Open the Windows Registry hive file named \*(C`filename\*(C'\fR. If there was any previous hivex handle associated with this guestfs session, then it is closed. This is a wrapper around the hivex(3) call of the same name. $nodeh = $g>hivex_root ()Return the root node of the hive. This is a wrapper around the hivex(3) call of the same name. $key = $g>hivex_value_key ($valueh)Return the key (name) field of a (key, datatype, data) tuple. This is a wrapper around the hivex(3) call of the same name. $datatype = $g>hivex_value_type ($valueh)Return the data type field from a (key, datatype, data) tuple. This is a wrapper around the hivex(3) call of the same name. $databuf = $g>hivex_value_utf8 ($valueh)This calls \*(C`$g\->hivex_value_value\*(C'\fR (which returns the data field from a hivex value tuple). It then assumes that the field is a UTF−16LE string and converts the result to ​UTF−8 (or if this is not possible, it returns an error). This is useful for reading strings out of the Windows registry. However it is not foolproof because the registry is not strongly-typed and fields can contain arbitrary or unexpected data. $databuf = $g>hivex_value_value ($valueh)Return the data field of a (key, datatype, data) tuple. This is a wrapper around the hivex(3) call of the same name. See also: \*(C`$g\->hivex_value_utf8\*(C'\fR. $content = $g>initrd_cat ($initrdpath, $filename)This command unpacks the file \*(C`filename\*(C'\fR from the initrd file called \*(C`initrdpath\*(C'\fR. The filename must be given \fIwithout\fR the initial \*(C`/\*(C'\fR character. For example, in guestfish you could use the following command to examine the boot script (usually called \*(C`/init\*(C'\fR) contained in a Linux initrd or initramfs image: ​ initrd−cat /boot/initrd−<version>.img init See also \*(C`$g\->initrd_list\*(C'\fR. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). @filenames = $g>initrd_list ($path)This command lists out files contained in an initrd. The files are listed without any initial \*(C`/\*(C'\fR character. The files are listed in the order they appear (not necessarily alphabetical). Directory names are listed as separate items. Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as initrd. We only support the newer initramfs format (compressed cpio files). $wd = $g>inotify_add_watch ($path, $mask)Watch \*(C`path\*(C'\fR for the events listed in \f(CW\*(C`mask\*(C'\fR. Note that if \*(C`path\*(C'\fR is a directory then events within that directory are watched, but this does not happen recursively (in subdirectories). Note for non-C or non-Linux callers: the inotify events are defined by the Linux kernel ABI and are listed in ​\*(C`/usr/include/sys/inotify.h\*(C'\fR. $g>inotify_close ()This closes the inotify handle which was previously opened by inotify_init. It removes all watches, throws away any pending events, and deallocates all resources. @paths = $g>inotify_files ()This function is a helpful wrapper around \*(C`$g\->inotify_read\*(C'\fR which just returns a list of pathnames of objects that were touched. The returned pathnames are sorted and deduplicated. $g>inotify_init ($maxevents)This command creates a new inotify handle. The inotify subsystem can be used to notify events which happen to objects in the guest filesystem. \*(C`maxevents\*(C'\fR is the maximum number of events which will be queued up between calls to \*(C`$g\->inotify_read\*(C'\fR or ​\*(C`$g\->inotify_files\*(C'\fR. If this is passed as 0, then the kernel (or previously set) default is used. For Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel throws away events, but records the fact that it threw them away by setting a flag ​\*(C`IN_Q_OVERFLOW\*(C'\fR in the returned structure list (see ​\*(C`$g\->inotify_read\*(C'\fR). Before any events are generated, you have to add some watches to the internal watch list. See: \*(C`$g\->inotify_add_watch\*(C'\fR and ​\*(C`$g\->inotify_rm_watch\*(C'\fR. Queued up events should be read periodically by calling ​\*(C`$g\->inotify_read\*(C'\fR (or \*(C`$g\->inotify_files\*(C'\fR which is just a helpful wrapper around \*(C`$g\->inotify_read\*(C'\fR). If you don't read the events out often enough then you risk the internal queue overflowing. The handle should be closed after use by calling ​\*(C`$g\->inotify_close\*(C'\fR. This also removes any watches automatically. See also inotify(7) for an overview of the inotify interface as exposed by the Linux kernel, which is roughly what we expose via libguestfs. Note that there is one global inotify handle per libguestfs instance. @events = $g>inotify_read ()Return the complete queue of events that have happened since the previous read call. If no events have happened, this returns an empty list. Note: In order to make sure that all events have been read, you must call this function repeatedly until it returns an empty list. The reason is that the call will read events up to the maximum appliance-to-host message size and leave remaining events in the queue. $g>inotify_rm_watch ($wd)Remove a previously defined inotify watch. See \*(C`$g\->inotify_add_watch\*(C'\fR. $arch = $g>inspect_get_arch ($root)This returns the architecture of the inspected operating system. The possible return values are listed under ​\*(C`$g\->file_architecture\*(C'\fR. If the architecture could not be determined, then the string \*(C`unknown\*(C'\fR is returned. Please read INSPECTION in guestfs(3) for more details. $distro = $g>inspect_get_distro ($root)This returns the distro (distribution) of the inspected operating system. Currently defined distros are: ``archlinux'' Arch Linux. ``buildroot'' Buildroot-derived distro, but not one we specifically recognize. ``centos'' CentOS. ``cirros'' Cirros. ``debian'' Debian. ``fedora'' Fedora. ``freedos'' FreeDOS. ``gentoo'' Gentoo. ``linuxmint'' Linux Mint. ``mageia'' Mageia. ``mandriva'' Mandriva. ``meego'' MeeGo. ``openbsd'' OpenBSD. ``opensuse'' OpenSUSE. ``pardus'' Pardus. ``redhat-based'' Some Red Hat-derived distro. ``rhel'' Red Hat Enterprise Linux. ``scientificlinux'' Scientific Linux. ``slackware'' Slackware. ``sles'' SuSE Linux Enterprise Server or Desktop. ``suse-based'' Some openSuSE-derived distro. ``ttylinux'' ttylinux. ``ubuntu'' Ubuntu. ``unknown'' The distro could not be determined. ``windows'' Windows does not have distributions. This string is returned if the OS type is Windows. Future versions of libguestfs may return other strings here. The caller should be prepared to handle any string. Please read INSPECTION in guestfs(3) for more details. %drives = $g>inspect_get_drive_mappings ($root)This call is useful for Windows which uses a primitive system of assigning drive letters (like C:) to partitions. This inspection API examines the Windows Registry to find out how disks/partitions are mapped to drive letters, and returns a hash table as in the example below: ​ C => /dev/vda2 ​ E => /dev/vdb1 ​ F => /dev/vdc1 Note that keys are drive letters. For Windows, the key is case insensitive and just contains the drive letter, without the customary colon separator character. In future we may support other operating systems that also used drive letters, but the keys for those might not be case insensitive and might be longer than 1 character. For example in OS−9, hard drives were named \*(C`h0\*(C'\fR, \f(CW\*(C`h1\*(C'\fR etc. For Windows guests, currently only hard drive mappings are returned. Removable disks (eg. DVD-ROMs) are ignored. For guests that do not use drive mappings, or if the drive mappings could not be determined, this returns an empty hash table. Please read INSPECTION in guestfs(3) for more details. See also \*(C`$g\->inspect_get_mountpoints\*(C'\fR, ​\*(C`$g\->inspect_get_filesystems\*(C'\fR. @filesystems = $g>inspect_get_filesystems ($root)This returns a list of all the filesystems that we think are associated with this operating system. This includes the root filesystem, other ordinary filesystems, and non-mounted devices like swap partitions. In the case of a multi-boot virtual machine, it is possible for a filesystem to be shared between operating systems. Please read INSPECTION in guestfs(3) for more details. See also \*(C`$g\->inspect_get_mountpoints\*(C'\fR. $format = $g>inspect_get_format ($root)This returns the format of the inspected operating system. You can use it to detect install images, live CDs and similar. Currently defined formats are: ``installed'' This is an installed operating system. ``installer'' The disk image being inspected is not an installed operating system, but a bootable install disk, live CD, or similar. ``unknown'' The format of this disk image is not known. Future versions of libguestfs may return other strings here. The caller should be prepared to handle any string. Please read INSPECTION in guestfs(3) for more details. $hostname = $g>inspect_get_hostname ($root)This function returns the hostname of the operating system as found by inspection of the guest's configuration files. If the hostname could not be determined, then the string \*(C`unknown\*(C'\fR is returned. Please read INSPECTION in guestfs(3) for more details. $icon = $g>inspect_get_icon ($root [, favicon => $favicon] [, highquality => $highquality])This function returns an icon corresponding to the inspected operating system. The icon is returned as a buffer containing a ​PNG image (re-encoded to PNG if necessary). If it was not possible to get an icon this function returns a zero-length (non-NULL) buffer. Callers must check for this case. Libguestfs will start by looking for a file called ​\*(C`/etc/favicon.png\*(C'\fR or \f(CW\*(C`C:\eetc\efavicon.png\*(C'\fR and if it has the correct format, the contents of this file will be returned. You can disable favicons by passing the optional \*(C`favicon\*(C'\fR boolean as false (default is true). If finding the favicon fails, then we look in other places in the guest for a suitable icon. If the optional \*(C`highquality\*(C'\fR boolean is true then only high quality icons are returned, which means only icons of high resolution with an alpha channel. The default (false) is to return any icon we can, even if it is of substandard quality. Notes: • Unlike most other inspection API calls, the guest's disks must be mounted up before you call this, since it needs to read information from the guest filesystem during the call. • Security: The icon data comes from the untrusted guest, and should be treated with caution. PNG files have been known to contain exploits. Ensure that libpng (or other relevant libraries) are fully up to date before trying to process or display the icon. • The PNG image returned can be any size. It might not be square. Libguestfs tries to return the largest, highest quality icon available. The application must scale the icon to the required size. • Extracting icons from Windows guests requires the external ​\*(C`wrestool\*(C'\fR program from the \f(CW\*(C`icoutils\*(C'\fR package, and several programs (\*(C`bmptopnm\*(C'\fR, \f(CW\*(C`pnmtopng\*(C'\fR, \f(CW\*(C`pamcut\*(C'\fR) from the \*(C`netpbm\*(C'\fR package. These must be installed separately. • Operating system icons are usually trademarks. Seek legal advice before using trademarks in applications. $major = $g>inspect_get_major_version ($root)This returns the major version number of the inspected operating system. Windows uses a consistent versioning scheme which is not reflected in the popular public names used by the operating system. Notably the operating system known as Windows 7 is really version 6.1 (ie. major = 6, minor = 1). You can find out the real versions corresponding to releases of Windows by consulting Wikipedia or MSDN. If the version could not be determined, then 0 is returned. Please read INSPECTION in guestfs(3) for more details. $minor = $g>inspect_get_minor_version ($root)This returns the minor version number of the inspected operating system. If the version could not be determined, then 0 is returned. Please read INSPECTION in guestfs(3) for more details. See also \*(C`$g\->inspect_get_major_version\*(C'\fR. %mountpoints = $g>inspect_get_mountpoints ($root)This returns a hash of where we think the filesystems associated with this operating system should be mounted. Callers should note that this is at best an educated guess made by reading configuration files such as \*(C`/etc/fstab\*(C'\fR. ​In particular note that this may return filesystems which are non-existent or not mountable and callers should be prepared to handle or ignore failures if they try to mount them. Each element in the returned hashtable has a key which is the path of the mountpoint (eg. \*(C`/boot\*(C'\fR) and a value which is the filesystem that would be mounted there (eg. \*(C`/dev/sda1\*(C'\fR). Non-mounted devices such as swap devices are not returned in this list. For operating systems like Windows which still use drive letters, this call will only return an entry for the first drive mounted on \*(C`/\*(C'\fR. For information about the mapping of drive letters to partitions, see ​\*(C`$g\->inspect_get_drive_mappings\*(C'\fR. Please read INSPECTION in guestfs(3) for more details. See also \*(C`$g\->inspect_get_filesystems\*(C'\fR. $packageformat = $g>inspect_get_package_format ($root)This function and \*(C`$g\->inspect_get_package_management\*(C'\fR return the package format and package management tool used by the inspected operating system. For example for Fedora these functions would return \*(C`rpm\*(C'\fR (package format) and ​\*(C`yum\*(C'\fR (package management). This returns the string \*(C`unknown\*(C'\fR if we could not determine the package format or if the operating system does not have a real packaging system (eg. Windows). Possible strings include: ​\*(C`rpm\*(C'\fR, \f(CW\*(C`deb\*(C'\fR, \f(CW\*(C`ebuild\*(C'\fR, \f(CW\*(C`pisi\*(C'\fR, \f(CW\*(C`pacman\*(C'\fR, \f(CW\*(C`pkgsrc\*(C'\fR. Future versions of libguestfs may return other strings. Please read INSPECTION in guestfs(3) for more details. $packagemanagement = $g>inspect_get_package_management ($root)\*(C`$g\->inspect_get_package_format\*(C'\fR and this function return the package format and package management tool used by the inspected operating system. For example for Fedora these functions would return \*(C`rpm\*(C'\fR (package format) and ​\*(C`yum\*(C'\fR (package management). This returns the string \*(C`unknown\*(C'\fR if we could not determine the package management tool or if the operating system does not have a real packaging system (eg. Windows). Possible strings include: \*(C`yum\*(C'\fR, \f(CW\*(C`up2date\*(C'\fR, ​\*(C`apt\*(C'\fR (for all Debian derivatives), ​\*(C`portage\*(C'\fR, \f(CW\*(C`pisi\*(C'\fR, \f(CW\*(C`pacman\*(C'\fR, \f(CW\*(C`urpmi\*(C'\fR, \f(CW\*(C`zypper\*(C'\fR. Future versions of libguestfs may return other strings. Please read INSPECTION in guestfs(3) for more details. $product = $g>inspect_get_product_name ($root)This returns the product name of the inspected operating system. The product name is generally some freeform string which can be displayed to the user, but should not be parsed by programs. If the product name could not be determined, then the string \*(C`unknown\*(C'\fR is returned. Please read INSPECTION in guestfs(3) for more details. $variant = $g>inspect_get_product_variant ($root)This returns the product variant of the inspected operating system. For Windows guests, this returns the contents of the Registry key ​\*(C`HKLM\eSoftware\eMicrosoft\eWindows NT\eCurrentVersion\*(C'\fR ​\*(C`InstallationType\*(C'\fR which is usually a string such as ​\*(C`Client\*(C'\fR or \f(CW\*(C`Server\*(C'\fR (other values are possible). This can be used to distinguish consumer and enterprise versions of Windows that have the same version number (for example, Windows 7 and Windows 2008 Server are both version 6.1, but the former is \*(C`Client\*(C'\fR and the latter is \f(CW\*(C`Server\*(C'\fR). For enterprise Linux guests, in future we intend this to return the product variant such as \*(C`Desktop\*(C'\fR, \f(CW\*(C`Server\*(C'\fR and so on. But this is not implemented at present. If the product variant could not be determined, then the string \*(C`unknown\*(C'\fR is returned. Please read INSPECTION in guestfs(3) for more details. See also \*(C`$g\->inspect_get_product_name\*(C'\fR, ​\*(C`$g\->inspect_get_major_version\*(C'\fR. @roots = $g>inspect_get_roots ()This function is a convenient way to get the list of root devices, as returned from a previous call to \*(C`$g\->inspect_os\*(C'\fR, but without redoing the whole inspection process. This returns an empty list if either no root devices were found or the caller has not called \*(C`$g\->inspect_os\*(C'\fR. Please read INSPECTION in guestfs(3) for more details. $name = $g>inspect_get_type ($root)This returns the type of the inspected operating system. Currently defined types are: ``linux'' Any Linux-based operating system. ``windows'' Any Microsoft Windows operating system. ``freebsd'' FreeBSD. ``netbsd'' NetBSD. ``openbsd'' OpenBSD. ``hurd'' GNU/Hurd. ``dos'' MS-DOS, FreeDOS and others. ``unknown'' The operating system type could not be determined. Future versions of libguestfs may return other strings here. The caller should be prepared to handle any string. Please read INSPECTION in guestfs(3) for more details. $controlset = $g>inspect_get_windows_current_control_set ($root)This returns the Windows CurrentControlSet of the inspected guest. The CurrentControlSet is a registry key name such as \*(C`ControlSet001\*(C'\fR. This call assumes that the guest is Windows and that the Registry could be examined by inspection. If this is not the case then an error is returned. Please read INSPECTION in guestfs(3) for more details. $systemroot = $g>inspect_get_windows_systemroot ($root)This returns the Windows systemroot of the inspected guest. The systemroot is a directory path such as \*(C`/WINDOWS\*(C'\fR. This call assumes that the guest is Windows and that the systemroot could be determined by inspection. If this is not the case then an error is returned. Please read INSPECTION in guestfs(3) for more details. $live = $g>inspect_is_live ($root)If \*(C`$g\->inspect_get_format\*(C'\fR returns \f(CW\*(C`installer\*(C'\fR (this is an install disk), then this returns true if a live image was detected on the disk. Please read INSPECTION in guestfs(3) for more details. $multipart = $g>inspect_is_multipart ($root)If \*(C`$g\->inspect_get_format\*(C'\fR returns \f(CW\*(C`installer\*(C'\fR (this is an install disk), then this returns true if the disk is part of a set. Please read INSPECTION in guestfs(3) for more details. $netinst = $g>inspect_is_netinst ($root)If \*(C`$g\->inspect_get_format\*(C'\fR returns \f(CW\*(C`installer\*(C'\fR (this is an install disk), then this returns true if the disk is a network installer, ie. not a self-contained install CD but one which is likely to require network access to complete the install. Please read INSPECTION in guestfs(3) for more details. @applications = $g>inspect_list_applications ($root)Return the list of applications installed in the operating system. Note: This call works differently from other parts of the inspection API. You have to call \*(C`$g\->inspect_os\*(C'\fR, then ​\*(C`$g\->inspect_get_mountpoints\*(C'\fR, then mount up the disks, before calling this. Listing applications is a significantly more difficult operation which requires access to the full filesystem. Also note that unlike the other ​\*(C`$g\->inspect_get_*\*(C'\fR calls which are just returning data cached in the libguestfs handle, this call actually reads parts of the mounted filesystems during the call. This returns an empty list if the inspection code was not able to determine the list of applications. The application structure contains the following fields: app_name The name of the application. For Red Hat-derived and Debian-derived Linux guests, this is the package name. app_display_name The display name of the application, sometimes localized to the install language of the guest operating system. If unavailable this is returned as an empty string "". Callers needing to display something can use \*(C`app_name\*(C'\fR instead. app_epoch For package managers which use epochs, this contains the epoch of the package (an integer). If unavailable, this is returned as 0. app_version The version string of the application or package. If unavailable this is returned as an empty string "". app_release The release string of the application or package, for package managers that use this. If unavailable this is returned as an empty string "". app_install_path The installation path of the application (on operating systems such as Windows which use installation paths). This path is in the format used by the guest operating system, it is not a libguestfs path. If unavailable this is returned as an empty string "". app_trans_path The install path translated into a libguestfs path. If unavailable this is returned as an empty string "". app_publisher The name of the publisher of the application, for package managers that use this. If unavailable this is returned as an empty string "". app_url The URL (eg. upstream URL) of the application. If unavailable this is returned as an empty string "". app_source_package For packaging systems which support this, the name of the source package. If unavailable this is returned as an empty string "". app_summary A short (usually one line) description of the application or package. If unavailable this is returned as an empty string "". app_description A longer description of the application or package. If unavailable this is returned as an empty string "". Please read INSPECTION in guestfs(3) for more details. This function is deprecated. In new code, use the inspect_list_applications2 call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. @applications2 = $g>inspect_list_applications2 ($root)Return the list of applications installed in the operating system. Note: This call works differently from other parts of the inspection API. You have to call \*(C`$g\->inspect_os\*(C'\fR, then ​\*(C`$g\->inspect_get_mountpoints\*(C'\fR, then mount up the disks, before calling this. Listing applications is a significantly more difficult operation which requires access to the full filesystem. Also note that unlike the other ​\*(C`$g\->inspect_get_*\*(C'\fR calls which are just returning data cached in the libguestfs handle, this call actually reads parts of the mounted filesystems during the call. This returns an empty list if the inspection code was not able to determine the list of applications. The application structure contains the following fields: app2_name The name of the application. For Red Hat-derived and Debian-derived Linux guests, this is the package name. app2_display_name The display name of the application, sometimes localized to the install language of the guest operating system. If unavailable this is returned as an empty string "". Callers needing to display something can use \*(C`app2_name\*(C'\fR instead. app2_epoch For package managers which use epochs, this contains the epoch of the package (an integer). If unavailable, this is returned as 0. app2_version The version string of the application or package. If unavailable this is returned as an empty string "". app2_release The release string of the application or package, for package managers that use this. If unavailable this is returned as an empty string "". app2_arch The architecture string of the application or package, for package managers that use this. If unavailable this is returned as an empty string "". app2_install_path The installation path of the application (on operating systems such as Windows which use installation paths). This path is in the format used by the guest operating system, it is not a libguestfs path. If unavailable this is returned as an empty string "". app2_trans_path The install path translated into a libguestfs path. If unavailable this is returned as an empty string "". app2_publisher The name of the publisher of the application, for package managers that use this. If unavailable this is returned as an empty string "". app2_url The URL (eg. upstream URL) of the application. If unavailable this is returned as an empty string "". app2_source_package For packaging systems which support this, the name of the source package. If unavailable this is returned as an empty string "". app2_summary A short (usually one line) description of the application or package. If unavailable this is returned as an empty string "". app2_description A longer description of the application or package. If unavailable this is returned as an empty string "". Please read INSPECTION in guestfs(3) for more details. @roots = $g>inspect_os ()This function uses other libguestfs functions and certain heuristics to inspect the disk(s) (usually disks belonging to a virtual machine), looking for operating systems. The list returned is empty if no operating systems were found. If one operating system was found, then this returns a list with a single element, which is the name of the root filesystem of this operating system. It is also possible for this function to return a list containing more than one element, indicating a dual-boot or multi-boot virtual machine, with each element being the root filesystem of one of the operating systems. You can pass the root string(s) returned to other ​\*(C`$g\->inspect_get_*\*(C'\fR functions in order to query further information about each operating system, such as the name and version. This function uses other libguestfs features such as ​\*(C`$g\->mount_ro\*(C'\fR and \f(CW\*(C`$g\->umount_all\*(C'\fR in order to mount and unmount filesystems and look at the contents. This should be called with no disks currently mounted. The function may also use Augeas, so any existing Augeas handle will be closed. This function cannot decrypt encrypted disks. The caller must do that first (supplying the necessary keys) if the disk is encrypted. Please read INSPECTION in guestfs(3) for more details. See also \*(C`$g\->list_filesystems\*(C'\fR. $flag = $g>is_blockdev ($path)This returns \*(C`true\*(C'\fR if and only if there is a block device with the given \*(C`path\*(C'\fR name. See also \*(C`$g\->stat\*(C'\fR. $busy = $g>is_busy ()This always returns false. This function is deprecated with no replacement. Do not use this function. For more information on states, see guestfs(3). $flag = $g>is_chardev ($path)This returns \*(C`true\*(C'\fR if and only if there is a character device with the given \*(C`path\*(C'\fR name. See also \*(C`$g\->stat\*(C'\fR. $config = $g>is_config ()This returns true iff this handle is being configured (in the \*(C`CONFIG\*(C'\fR state). For more information on states, see guestfs(3). $dirflag = $g>is_dir ($path)This returns \*(C`true\*(C'\fR if and only if there is a directory with the given \*(C`path\*(C'\fR name. Note that it returns false for other objects like files. See also \*(C`$g\->stat\*(C'\fR. $flag = $g>is_fifo ($path)This returns \*(C`true\*(C'\fR if and only if there is a \s-1FIFO\s0 (named pipe) with the given \*(C`path\*(C'\fR name. See also \*(C`$g\->stat\*(C'\fR. $fileflag = $g>is_file ($path)This returns \*(C`true\*(C'\fR if and only if there is a regular file with the given \*(C`path\*(C'\fR name. Note that it returns false for other objects like directories. See also \*(C`$g\->stat\*(C'\fR. $launching = $g>is_launching ()This returns true iff this handle is launching the subprocess (in the \*(C`LAUNCHING\*(C'\fR state). For more information on states, see guestfs(3). $lvflag = $g>is_lv ($device)This command tests whether \*(C`device\*(C'\fR is a logical volume, and returns true iff this is the case. $ready = $g>is_ready ()This returns true iff this handle is ready to accept commands (in the \*(C`READY\*(C'\fR state). For more information on states, see guestfs(3). $flag = $g>is_socket ($path)This returns \*(C`true\*(C'\fR if and only if there is a Unix domain socket with the given \*(C`path\*(C'\fR name. See also \*(C`$g\->stat\*(C'\fR. $flag = $g>is_symlink ($path)This returns \*(C`true\*(C'\fR if and only if there is a symbolic link with the given \*(C`path\*(C'\fR name. See also \*(C`$g\->stat\*(C'\fR. $zeroflag = $g>is_zero ($path)This returns true iff the file exists and the file is empty or it contains all zero bytes. $zeroflag = $g>is_zero_device ($device)This returns true iff the device exists and contains all zero bytes. Note that for large devices this can take a long time to run. %isodata = $g>isoinfo ($isofile)This is the same as \*(C`$g\->isoinfo_device\*(C'\fR except that it works for an ISO file located inside some other mounted filesystem. Note that in the common case where you have added an ISO file as a libguestfs device, you would not call this. Instead you would call \*(C`$g\->isoinfo_device\*(C'\fR. %isodata = $g>isoinfo_device ($device)\*(C`device\*(C'\fR is an \s-1ISO\s0 device. This returns a struct of information read from the primary volume descriptor (the ISO equivalent of the superblock) of the device. Usually it is more efficient to use the isoinfo(1) command with the −d option on the host to analyze ISO files, instead of going through libguestfs. For information on the primary volume descriptor fields, see <http://wiki.osdev.org/ISO_9660#The_Primary_Volume_Descriptor> $g>kill_subprocess ()This kills the qemu subprocess. Do not call this. See: \*(C`$g\->shutdown\*(C'\fR instead. This function is deprecated. In new code, use the shutdown call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>launch ()Internally libguestfs is implemented by running a virtual machine using qemu(1). You should call this after configuring the handle (eg. adding drives) but before performing any actions. Do not call \*(C`$g\->launch\*(C'\fR twice on the same handle. Although it will not give an error (for historical reasons), the precise behaviour when you do this is not well defined. Handles are very cheap to create, so create a new one for each launch. $g>lchown ($owner, $group, $path)Change the file owner to \*(C`owner\*(C'\fR and group to \f(CW\*(C`group\*(C'\fR. This is like \*(C`$g\->chown\*(C'\fR but if \f(CW\*(C`path\*(C'\fR is a symlink then the link itself is changed, not the target. Only numeric uid and gid are supported. If you want to use names, you will need to locate and parse the password file yourself (Augeas support makes this relatively easy). $g>ldmtool_create_all ()This function scans all block devices looking for Windows dynamic disk volumes and partitions, and creates devices for any that were found. Call \*(C`$g\->list_ldm_volumes\*(C'\fR and \f(CW\*(C`$g\->list_ldm_partitions\*(C'\fR to return all devices. Note that you don't normally need to call this explicitly, since it is done automatically at \*(C`$g\->launch\*(C'\fR time. However you might want to call this function if you have hotplugged disks or have just created a Windows dynamic disk. @disks = $g>ldmtool_diskgroup_disks ($diskgroup)Return the disks in a Windows dynamic disk group. The \*(C`diskgroup\*(C'\fR parameter should be the GUID of a disk group, one element from the list returned by \*(C`$g\->ldmtool_scan\*(C'\fR. $name = $g>ldmtool_diskgroup_name ($diskgroup)Return the name of a Windows dynamic disk group. The \*(C`diskgroup\*(C'\fR parameter should be the GUID of a disk group, one element from the list returned by \*(C`$g\->ldmtool_scan\*(C'\fR. @volumes = $g>ldmtool_diskgroup_volumes ($diskgroup)Return the volumes in a Windows dynamic disk group. The \*(C`diskgroup\*(C'\fR parameter should be the GUID of a disk group, one element from the list returned by \*(C`$g\->ldmtool_scan\*(C'\fR. $g>ldmtool_remove_all ()This is essentially the opposite of \*(C`$g\->ldmtool_create_all\*(C'\fR. It removes the device mapper mappings for all Windows dynamic disk volumes @guids = $g>ldmtool_scan ()This function scans for Windows dynamic disks. It returns a list of identifiers (GUIDs) for all disk groups that were found. These identifiers can be passed to other \*(C`$g\->ldmtool_*\*(C'\fR functions. This function scans all block devices. To scan a subset of block devices, call \*(C`$g\->ldmtool_scan_devices\*(C'\fR instead. @guids = $g>ldmtool_scan_devices (\@devices)This function scans for Windows dynamic disks. It returns a list of identifiers (GUIDs) for all disk groups that were found. These identifiers can be passed to other \*(C`$g\->ldmtool_*\*(C'\fR functions. The parameter \*(C`devices\*(C'\fR is a list of block devices which are scanned. If this list is empty, all block devices are scanned. $hint = $g>ldmtool_volume_hint ($diskgroup, $volume)Return the hint field of the volume named \*(C`volume\*(C'\fR in the disk group with GUID \*(C`diskgroup\*(C'\fR. This may not be defined, in which case the empty string is returned. The hint field is often, though not always, the name of a Windows drive, eg. \*(C`E:\*(C'\fR. @partitions = $g>ldmtool_volume_partitions ($diskgroup, $volume)Return the list of partitions in the volume named \*(C`volume\*(C'\fR in the disk group with GUID \*(C`diskgroup\*(C'\fR. $voltype = $g>ldmtool_volume_type ($diskgroup, $volume)Return the type of the volume named \*(C`volume\*(C'\fR in the disk group with GUID \*(C`diskgroup\*(C'\fR. Possible volume types that can be returned here include: ​\*(C`simple\*(C'\fR, \f(CW\*(C`spanned\*(C'\fR, \f(CW\*(C`striped\*(C'\fR, \f(CW\*(C`mirrored\*(C'\fR, \f(CW\*(C`raid5\*(C'\fR. Other types may also be returned. $xattr = $g>lgetxattr ($path, $name)Get a single extended attribute from file \*(C`path\*(C'\fR named \f(CW\*(C`name\*(C'\fR. If \*(C`path\*(C'\fR is a symlink, then this call returns an extended attribute from the symlink. Normally it is better to get all extended attributes from a file in one go by calling \*(C`$g\->getxattrs\*(C'\fR. However some Linux filesystem implementations are buggy and do not provide a way to list out attributes. For these filesystems (notably ntfs−3g) you have to know the names of the extended attributes you want in advance and call this function. Extended attribute values are blobs of binary data. If there is no extended attribute named \*(C`name\*(C'\fR, this returns an error. See also: \*(C`$g\->lgetxattrs\*(C'\fR, \f(CW\*(C`$g\->getxattr\*(C'\fR, \fIattr\fR\|(5). @xattrs = $g>lgetxattrs ($path)This is the same as \*(C`$g\->getxattrs\*(C'\fR, but if \f(CW\*(C`path\*(C'\fR is a symbolic link, then it returns the extended attributes of the link itself. @devices = $g>list_devices ()List all the block devices. The full block device names are returned, eg. \*(C`/dev/sda\*(C'\fR. See also \*(C`$g\->list_filesystems\*(C'\fR. %labels = $g>list_disk_labels ()If you add drives using the optional \*(C`label\*(C'\fR parameter of \*(C`$g\->add_drive_opts\*(C'\fR, you can use this call to map between disk labels, and raw block device and partition names (like \*(C`/dev/sda\*(C'\fR and \f(CW\*(C`/dev/sda1\*(C'\fR). This returns a hashtable, where keys are the disk labels (without the \*(C`/dev/disk/guestfs\*(C'\fR prefix), and the values are the full raw block device and partition names (eg. \*(C`/dev/sda\*(C'\fR and \f(CW\*(C`/dev/sda1\*(C'\fR). @devices = $g>list_dm_devices ()List all device mapper devices. The returned list contains \*(C`/dev/mapper/*\*(C'\fR devices, eg. ones created by a previous call to \*(C`$g\->luks_open\*(C'\fR. Device mapper devices which correspond to logical volumes are not returned in this list. Call \*(C`$g\->lvs\*(C'\fR if you want to list logical volumes. %fses = $g>list_filesystems ()This inspection command looks for filesystems on partitions, block devices and logical volumes, returning a list of devices containing filesystems and their type. The return value is a hash, where the keys are the devices containing filesystems, and the values are the filesystem types. For example: "/dev/sda1" => "ntfs""/dev/sda2" => "ext2""/dev/vg_guest/lv_root" => "ext4""/dev/vg_guest/lv_swap" => "swap" The value can have the special value unknown, meaning the content of the device is undetermined or empty. ​swap means a Linux swap partition. This command runs other libguestfs commands, which might include ​\*(C`$g\->mount\*(C'\fR and \f(CW\*(C`$g\->umount\*(C'\fR, and therefore you should use this soon after launch and only when nothing is mounted. Not all of the filesystems returned will be mountable. In particular, swap partitions are returned in the list. Also this command does not check that each filesystem found is valid and mountable, and some filesystems might be mountable but require special options. Filesystems may not all belong to a single logical operating system (use \*(C`$g\->inspect_os\*(C'\fR to look for OSes). @devices = $g>list_ldm_partitions ()This function returns all Windows dynamic disk partitions that were found at launch time. It returns a list of device names. @devices = $g>list_ldm_volumes ()This function returns all Windows dynamic disk volumes that were found at launch time. It returns a list of device names. @devices = $g>list_md_devices ()List all Linux md devices. @partitions = $g>list_partitions ()List all the partitions detected on all block devices. The full partition device names are returned, eg. \*(C`/dev/sda1\*(C'\fR This does not return logical volumes. For that you will need to call \*(C`$g\->lvs\*(C'\fR. See also \*(C`$g\->list_filesystems\*(C'\fR. $listing = $g>ll ($directory)List the files in \*(C`directory\*(C'\fR (relative to the root directory, there is no cwd) in the format of 'ls −la'. This command is mostly useful for interactive sessions. It is not intended that you try to parse the output string. $listing = $g>llz ($directory)List the files in \*(C`directory\*(C'\fR in the format of 'ls \-laZ'. This command is mostly useful for interactive sessions. It is not intended that you try to parse the output string. $g>ln ($target, $linkname)This command creates a hard link using the \*(C`ln\*(C'\fR command. $g>ln_f ($target, $linkname)This command creates a hard link using the \*(C`ln \-f\*(C'\fR command. The −f option removes the link (\*(C`linkname\*(C'\fR) if it exists already. $g>ln_s ($target, $linkname)This command creates a symbolic link using the \*(C`ln \-s\*(C'\fR command. $g>ln_sf ($target, $linkname)This command creates a symbolic link using the \*(C`ln \-sf\*(C'\fR command, The −f option removes the link (\*(C`linkname\*(C'\fR) if it exists already. $g>lremovexattr ($xattr, $path)This is the same as \*(C`$g\->removexattr\*(C'\fR, but if \f(CW\*(C`path\*(C'\fR is a symbolic link, then it removes an extended attribute of the link itself. @listing = $g>ls ($directory)List the files in \*(C`directory\*(C'\fR (relative to the root directory, there is no cwd). The '.' and '..' entries are not returned, but hidden files are shown. $g>ls0 ($dir, $filenames)This specialized command is used to get a listing of the filenames in the directory \*(C`dir\*(C'\fR. The list of filenames is written to the local file \*(C`filenames\*(C'\fR (on the host). In the output file, the filenames are separated by \*(C`\e0\*(C'\fR characters. \*(C`.\*(C'\fR and \f(CW\*(C`..\*(C'\fR are not returned. The filenames are not sorted. $g>lsetxattr ($xattr, $val, $vallen, $path)This is the same as \*(C`$g\->setxattr\*(C'\fR, but if \f(CW\*(C`path\*(C'\fR is a symbolic link, then it sets an extended attribute of the link itself. %statbuf = $g>lstat ($path)Returns file information for the given \*(C`path\*(C'\fR. This is the same as \*(C`$g\->stat\*(C'\fR except that if \f(CW\*(C`path\*(C'\fR is a symbolic link, then the link is stat-ed, not the file it refers to. This is the same as the lstat(2) system call. @statbufs = $g>lstatlist ($path, \@names)This call allows you to perform the \*(C`$g\->lstat\*(C'\fR operation on multiple files, where all files are in the directory \*(C`path\*(C'\fR. ​\*(C`names\*(C'\fR is the list of files from this directory. On return you get a list of stat structs, with a one-to-one correspondence to the \*(C`names\*(C'\fR list. If any name did not exist or could not be lstat'd, then the \*(C`ino\*(C'\fR field of that structure is set to \*(C`\-1\*(C'\fR. This call is intended for programs that want to efficiently list a directory contents without making many round-trips. See also \*(C`$g\->lxattrlist\*(C'\fR for a similarly efficient call for getting extended attributes. $g>luks_add_key ($device, $key, $newkey, $keyslot)This command adds a new key on LUKS device \*(C`device\*(C'\fR. ​\*(C`key\*(C'\fR is any existing key, and is used to access the device. ​\*(C`newkey\*(C'\fR is the new key to add. \f(CW\*(C`keyslot\*(C'\fR is the key slot that will be replaced. Note that if \*(C`keyslot\*(C'\fR already contains a key, then this command will fail. You have to use \*(C`$g\->luks_kill_slot\*(C'\fR first to remove that key. $g>luks_close ($device)This closes a LUKS device that was created earlier by ​\*(C`$g\->luks_open\*(C'\fR or \f(CW\*(C`$g\->luks_open_ro\*(C'\fR. The ​\*(C`device\*(C'\fR parameter must be the name of the \s-1LUKS\s0 mapping device (ie. \*(C`/dev/mapper/mapname\*(C'\fR) and \fInot\fR the name of the underlying block device. $g>luks_format ($device, $key, $keyslot)This command erases existing data on \*(C`device\*(C'\fR and formats the device as a LUKS encrypted device. \*(C`key\*(C'\fR is the initial key, which is added to key slot \*(C`slot\*(C'\fR. (\s-1LUKS\s0 supports 8 key slots, numbered 0−7). $g>luks_format_cipher ($device, $key, $keyslot, $cipher)This command is the same as \*(C`$g\->luks_format\*(C'\fR but it also allows you to set the \*(C`cipher\*(C'\fR used. $g>luks_kill_slot ($device, $key, $keyslot)This command deletes the key in key slot \*(C`keyslot\*(C'\fR from the encrypted LUKS device \*(C`device\*(C'\fR. \f(CW\*(C`key\*(C'\fR must be one of the ​other keys. $g>luks_open ($device, $key, $mapname)This command opens a block device which has been encrypted according to the Linux Unified Key Setup (LUKS) standard. \*(C`device\*(C'\fR is the encrypted block device or partition. The caller must supply one of the keys associated with the ​LUKS block device, in the \*(C`key\*(C'\fR parameter. This creates a new block device called \*(C`/dev/mapper/mapname\*(C'\fR. Reads and writes to this block device are decrypted from and encrypted to the underlying \*(C`device\*(C'\fR respectively. If this block device contains LVM volume groups, then calling \*(C`$g\->vgscan\*(C'\fR followed by \f(CW\*(C`$g\->vg_activate_all\*(C'\fR will make them visible. Use \*(C`$g\->list_dm_devices\*(C'\fR to list all device mapper devices. $g>luks_open_ro ($device, $key, $mapname)This is the same as \*(C`$g\->luks_open\*(C'\fR except that a read-only mapping is created. $g>lvcreate ($logvol, $volgroup, $mbytes)This creates an LVM logical volume called \*(C`logvol\*(C'\fR on the volume group \*(C`volgroup\*(C'\fR, with \f(CW\*(C`size\*(C'\fR megabytes. $g>lvcreate_free ($logvol, $volgroup, $percent)Create an LVM logical volume called \*(C`/dev/volgroup/logvol\*(C'\fR, using approximately \*(C`percent\*(C'\fR % of the free space remaining in the volume group. Most usefully, when \*(C`percent\*(C'\fR is \f(CW100\fR this will create the largest possible LV. $lv = $g>lvm_canonical_lv_name ($lvname)This converts alternative naming schemes for LVs that you might find to the canonical name. For example, \*(C`/dev/mapper/VG\-LV\*(C'\fR is converted to \*(C`/dev/VG/LV\*(C'\fR. This command returns an error if the \*(C`lvname\*(C'\fR parameter does not refer to a logical volume. See also \*(C`$g\->is_lv\*(C'\fR, \f(CW\*(C`$g\->canonical_device_name\*(C'\fR. $g>lvm_clear_filter ()This undoes the effect of \*(C`$g\->lvm_set_filter\*(C'\fR. \s-1LVM\s0 will be able to see every block device. This command also clears the LVM cache and performs a volume group scan. $g>lvm_remove_all ()This command removes all LVM logical volumes, volume groups and physical volumes. $g>lvm_set_filter (\@devices)This sets the LVM device filter so that LVM will only be able to see the block devices in the list \*(C`devices\*(C'\fR, and will ignore all other attached block devices. Where disk image(s) contain duplicate PVs or VGs, this command is useful to get LVM to ignore the duplicates, otherwise ​LVM can get confused. Note also there are two types of duplication possible: either cloned PVs/VGs which have identical UUIDs; or VGs that are not cloned but just happen to have the same name. In normal operation you cannot create this situation, but you can do it outside LVM, eg. by cloning disk images or by bit twiddling inside the LVM metadata. This command also clears the LVM cache and performs a volume group scan. You can filter whole block devices or individual partitions. You cannot use this if any VG is currently in use (eg. contains a mounted filesystem), even if you are not filtering out that VG. $g>lvremove ($device)Remove an LVM logical volume \*(C`device\*(C'\fR, where \f(CW\*(C`device\*(C'\fR is the path to the LV, such as \*(C`/dev/VG/LV\*(C'\fR. You can also remove all LVs in a volume group by specifying the VG name, \*(C`/dev/VG\*(C'\fR. $g>lvrename ($logvol, $newlogvol)Rename a logical volume \*(C`logvol\*(C'\fR with the new name \f(CW\*(C`newlogvol\*(C'\fR. $g>lvresize ($device, $mbytes)This resizes (expands or shrinks) an existing LVM logical volume to \*(C`mbytes\*(C'\fR. When reducing, data in the reduced part is lost. $g>lvresize_free ($lv, $percent)This expands an existing logical volume \*(C`lv\*(C'\fR so that it fills ​\*(C`pc\*(C'\fR% of the remaining free space in the volume group. Commonly you would call this with pc = 100 which expands the logical volume as much as possible, using all remaining free space in the volume group. @logvols = $g>lvs ()List all the logical volumes detected. This is the equivalent of the lvs(8) command. This returns a list of the logical volume device names (eg. \*(C`/dev/VolGroup00/LogVol00\*(C'\fR). See also \*(C`$g\->lvs_full\*(C'\fR, \f(CW\*(C`$g\->list_filesystems\*(C'\fR. @logvols = $g>lvs_full ()List all the logical volumes detected. This is the equivalent of the lvs(8) command. The full version includes all fields. $uuid = $g>lvuuid ($device)This command returns the UUID of the LVM LV \*(C`device\*(C'\fR. @xattrs = $g>lxattrlist ($path, \@names)This call allows you to get the extended attributes of multiple files, where all files are in the directory \*(C`path\*(C'\fR. ​\*(C`names\*(C'\fR is the list of files from this directory. On return you get a flat list of xattr structs which must be interpreted sequentially. The first xattr struct always has a zero-length ​\*(C`attrname\*(C'\fR. \f(CW\*(C`attrval\*(C'\fR in this struct is zero-length to indicate there was an error doing \*(C`lgetxattr\*(C'\fR for this file, or is a C string which is a decimal number (the number of following attributes for this file, which could be "0"). Then after the first xattr struct are the zero or more attributes for the first named file. This repeats for the second and subsequent files. This call is intended for programs that want to efficiently list a directory contents without making many round-trips. See also \*(C`$g\->lstatlist\*(C'\fR for a similarly efficient call for getting standard stats. $disks = $g>max_disks ()Return the maximum number of disks that may be added to a handle (eg. by \*(C`$g\->add_drive_opts\*(C'\fR and similar calls). This function was added in libguestfs 1.19.7. In previous versions of libguestfs the limit was 25. See MAXIMUM NUMBER OF DISKS in guestfs(3) for additional information on this topic. $g>md_create ($name, \@devices [, missingbitmap => $missingbitmap] [, nrdevices => $nrdevices] [, spare => $spare] [, chunk => $chunk] [, level => $level])Create a Linux md (RAID) device named \*(C`name\*(C'\fR on the devices in the list \*(C`devices\*(C'\fR. The optional parameters are: missingbitmap A bitmap of missing devices. If a bit is set it means that a missing device is added to the array. The least significant bit corresponds to the first device in the array. As examples: If \*(C`devices = ["/dev/sda"]\*(C'\fR and \f(CW\*(C`missingbitmap = 0x1\*(C'\fR then the resulting array would be \*(C`[<missing>, "/dev/sda"]\*(C'\fR. If \*(C`devices = ["/dev/sda"]\*(C'\fR and \f(CW\*(C`missingbitmap = 0x2\*(C'\fR then the resulting array would be \*(C`["/dev/sda", <missing>]\*(C'\fR. This defaults to 0 (no missing devices). The length of \*(C`devices\*(C'\fR + the number of bits set in ​\*(C`missingbitmap\*(C'\fR must equal \f(CW\*(C`nrdevices\*(C'\fR + \f(CW\*(C`spare\*(C'\fR. nrdevices The number of active RAID devices. If not set, this defaults to the length of \*(C`devices\*(C'\fR plus the number of bits set in \*(C`missingbitmap\*(C'\fR. spare The number of spare devices. If not set, this defaults to 0. chunk The chunk size in bytes. level The RAID level, which can be one of: ​linear, raid0, 0, stripe, raid1, 1, mirror, ​raid4, 4, raid5, 5, raid6, 6, raid10, 10. Some of these are synonymous, and more levels may be added in future. If not set, this defaults to \*(C`raid1\*(C'\fR. %info = $g>md_detail ($md)This command exposes the output of 'mdadm −DY <md>'. The following fields are usually present in the returned hash. Other fields may also be present. level The raid level of the MD device. devices The number of underlying devices in the MD device. metadata The metadata version used. uuid The UUID of the MD device. name The name of the MD device. @devices = $g>md_stat ($md)This call returns a list of the underlying devices which make up the single software RAID array device \*(C`md\*(C'\fR. To get a list of software RAID devices, call \*(C`$g\->list_md_devices\*(C'\fR. Each structure returned corresponds to one device along with additional status information: mdstat_device The name of the underlying device. mdstat_index The index of this device within the array. mdstat_flags Flags associated with this device. This is a string containing (in no specific order) zero or more of the following flags: W write-mostly F device is faulty S device is a RAID spare R replacement $g>md_stop ($md)This command deactivates the MD array named \*(C`md\*(C'\fR. The device is stopped, but it is not destroyed or zeroed. $g>mkdir ($path)Create a directory named \*(C`path\*(C'\fR. $g>mkdir_mode ($path, $mode)This command creates a directory, setting the initial permissions of the directory to \*(C`mode\*(C'\fR. For common Linux filesystems, the actual mode which is set will be \*(C`mode & ~umask & 01777\*(C'\fR. Non-native-Linux filesystems may interpret the mode in other ways. See also \*(C`$g\->mkdir\*(C'\fR, \f(CW\*(C`$g\->umask\*(C'\fR $g>mkdir_p ($path)Create a directory named \*(C`path\*(C'\fR, creating any parent directories as necessary. This is like the \*(C`mkdir \-p\*(C'\fR shell command. $dir = $g>mkdtemp ($tmpl)This command creates a temporary directory. The ​\*(C`tmpl\*(C'\fR parameter should be a full pathname for the temporary directory name with the final six characters being ​XXXXXX. For example: /tmp/myprogXXXXXX or /Temp/myprogXXXXXX, the second one being suitable for Windows filesystems. The name of the temporary directory that was created is returned. The temporary directory is created with mode 0700 and is owned by root. The caller is responsible for deleting the temporary directory and its contents after use. See also: mkdtemp(3) $g>mke2fs ($device [, blockscount => $blockscount] [, blocksize => $blocksize] [, fragsize => $fragsize] [, blockspergroup => $blockspergroup] [, numberofgroups => $numberofgroups] [, bytesperinode => $bytesperinode] [, inodesize => $inodesize] [, journalsize => $journalsize] [, numberofinodes => $numberofinodes] [, stridesize => $stridesize] [, stripewidth => $stripewidth] [, maxonlineresize => $maxonlineresize] [, reservedblockspercentage => $reservedblockspercentage] [, mmpupdateinterval => $mmpupdateinterval] [, journaldevice => $journaldevice] [, label => $label] [, lastmounteddir => $lastmounteddir] [, creatoros => $creatoros] [, fstype => $fstype] [, usagetype => $usagetype] [, uuid => $uuid] [, forcecreate => $forcecreate] [, writesbandgrouponly => $writesbandgrouponly] [, lazyitableinit => $lazyitableinit] [, lazyjournalinit => $lazyjournalinit] [, testfs => $testfs] [, discard => $discard] [, quotatype => $quotatype] [, extent => $extent] [, filetype => $filetype] [, flexbg => $flexbg] [, hasjournal => $hasjournal] [, journaldev => $journaldev] [, largefile => $largefile] [, quota => $quota] [, resizeinode => $resizeinode] [, sparsesuper => $sparsesuper] [, uninitbg => $uninitbg])\*(C`mke2fs\*(C'\fR is used to create an ext2, ext3, or ext4 filesystem on \*(C`device\*(C'\fR. The optional \*(C`blockscount\*(C'\fR is the size of the filesystem in blocks. If omitted it defaults to the size of \*(C`device\*(C'\fR. Note if the filesystem is too small to contain a journal, \*(C`mke2fs\*(C'\fR will silently create an ext2 filesystem instead. $g>mke2fs_J ($fstype, $blocksize, $device, $journal)This creates an ext2/3/4 filesystem on \*(C`device\*(C'\fR with an external journal on \*(C`journal\*(C'\fR. It is equivalent to the command: ​ mke2fs −t fstype −b blocksize −J device=<journal> <device> See also \*(C`$g\->mke2journal\*(C'\fR. This function is deprecated. In new code, use the mke2fs call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>mke2fs_JL ($fstype, $blocksize, $device, $label)This creates an ext2/3/4 filesystem on \*(C`device\*(C'\fR with an external journal on the journal labeled \*(C`label\*(C'\fR. See also \*(C`$g\->mke2journal_L\*(C'\fR. This function is deprecated. In new code, use the mke2fs call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>mke2fs_JU ($fstype, $blocksize, $device, $uuid)This creates an ext2/3/4 filesystem on \*(C`device\*(C'\fR with an external journal on the journal with UUID \*(C`uuid\*(C'\fR. See also \*(C`$g\->mke2journal_U\*(C'\fR. This function is deprecated. In new code, use the mke2fs call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>mke2journal ($blocksize, $device)This creates an ext2 external journal on \*(C`device\*(C'\fR. It is equivalent to the command: ​ mke2fs −O journal_dev −b blocksize device This function is deprecated. In new code, use the mke2fs call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>mke2journal_L ($blocksize, $label, $device)This creates an ext2 external journal on \*(C`device\*(C'\fR with label \f(CW\*(C`label\*(C'\fR. This function is deprecated. In new code, use the mke2fs call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>mke2journal_U ($blocksize, $uuid, $device)This creates an ext2 external journal on \*(C`device\*(C'\fR with \s-1UUID\s0 \f(CW\*(C`uuid\*(C'\fR. This function is deprecated. In new code, use the mke2fs call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>mkfifo ($mode, $path)This call creates a FIFO (named pipe) called \*(C`path\*(C'\fR with mode \*(C`mode\*(C'\fR. It is just a convenient wrapper around ​\*(C`$g\->mknod\*(C'\fR. The mode actually set is affected by the umask. $g>mkfs ($fstype, $device [, blocksize => $blocksize] [, features => $features] [, inode => $inode] [, sectorsize => $sectorsize])This function creates a filesystem on \*(C`device\*(C'\fR. The filesystem type is \*(C`fstype\*(C'\fR, for example \f(CW\*(C`ext3\*(C'\fR. The optional arguments are: blocksize The filesystem block size. Supported block sizes depend on the filesystem type, but typically they are 1024, 2048 or 4096 for Linux ext2/3 filesystems. For VFAT and NTFS the \*(C`blocksize\*(C'\fR parameter is treated as the requested cluster size. For UFS block sizes, please see mkfs.ufs(8). features This passes the −O parameter to the external mkfs program. For certain filesystem types, this allows extra filesystem features to be selected. See mke2fs(8) and mkfs.ufs(8) for more details. You cannot use this optional parameter with the \*(C`gfs\*(C'\fR or ​\*(C`gfs2\*(C'\fR filesystem type. inode This passes the −I parameter to the external mke2fs(8) program which sets the inode size (only for ext2/3/4 filesystems at present). sectorsize This passes the −S parameter to external mkfs.ufs(8) program, which sets sector size for ufs filesystem. $g>mkfs_opts ($fstype, $device [, blocksize => $blocksize] [, features => $features] [, inode => $inode] [, sectorsize => $sectorsize])This is an alias of mkfs. $g>mkfs_b ($fstype, $blocksize, $device)This call is similar to \*(C`$g\->mkfs\*(C'\fR, but it allows you to control the block size of the resulting filesystem. Supported block sizes depend on the filesystem type, but typically they are 1024, 2048 or 4096 only. For VFAT and NTFS the \*(C`blocksize\*(C'\fR parameter is treated as the requested cluster size. This function is deprecated. In new code, use the mkfs call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>mkfs_btrfs (\@devices [, allocstart => $allocstart] [, bytecount => $bytecount] [, datatype => $datatype] [, leafsize => $leafsize] [, label => $label] [, metadata => $metadata] [, nodesize => $nodesize] [, sectorsize => $sectorsize])Create a btrfs filesystem, allowing all configurables to be set. For more information on the optional arguments, see mkfs.btrfs(8). Since btrfs filesystems can span multiple devices, this takes a non-empty list of devices. To create general filesystems, use \*(C`$g\->mkfs\*(C'\fR. $g>mklost_and_found ($mountpoint)Make the \*(C`lost+found\*(C'\fR directory, normally in the root directory of an ext2/3/4 filesystem. \*(C`mountpoint\*(C'\fR is the directory under which we try to create the \*(C`lost+found\*(C'\fR directory. $g>mkmountpoint ($exemptpath)\*(C`$g\->mkmountpoint\*(C'\fR and \f(CW\*(C`$g\->rmmountpoint\*(C'\fR are specialized calls that can be used to create extra mountpoints before mounting the first filesystem. These calls are only necessary in some very limited circumstances, mainly the case where you want to mount a mix of unrelated and/or read-only filesystems together. For example, live CDs often contain a Russian doll nest of filesystems, an ISO outer layer, with a squashfs image inside, with an ext2/3 image inside that. You can unpack this as follows in guestfish: ​ add−ro Fedora−11−i686−Live.iso ​ run ​ mkmountpoint /cd ​ mkmountpoint /sqsh ​ mkmountpoint /ext3fs ​ mount /dev/sda /cd ​ mount−loop /cd/LiveOS/squashfs.img /sqsh ​ mount−loop /sqsh/LiveOS/ext3fs.img /ext3fs The inner filesystem is now unpacked under the /ext3fs mountpoint. \*(C`$g\->mkmountpoint\*(C'\fR is not compatible with \f(CW\*(C`$g\->umount_all\*(C'\fR. You may get unexpected errors if you try to mix these calls. It is safest to manually unmount filesystems and remove mountpoints after use. \*(C`$g\->umount_all\*(C'\fR unmounts filesystems by sorting the paths longest first, so for this to work for manual mountpoints, you must ensure that the innermost mountpoints have the longest pathnames, as in the example code above. For more details see <https://bugzilla.redhat.com/show_bug.cgi?id=599503> Autosync [see \*(C`$g\->set_autosync\*(C'\fR, this is set by default on handles] can cause \*(C`$g\->umount_all\*(C'\fR to be called when the handle is closed which can also trigger these issues. $g>mknod ($mode, $devmajor, $devminor, $path)This call creates block or character special devices, or named pipes (FIFOs). The \*(C`mode\*(C'\fR parameter should be the mode, using the standard constants. \*(C`devmajor\*(C'\fR and \f(CW\*(C`devminor\*(C'\fR are the device major and minor numbers, only used when creating block and character special devices. Note that, just like mknod(2), the mode must be bitwise ​OR'd with S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a regular file). These constants are available in the standard Linux header files, or you can use ​\*(C`$g\->mknod_b\*(C'\fR, \f(CW\*(C`$g\->mknod_c\*(C'\fR or \f(CW\*(C`$g\->mkfifo\*(C'\fR which are wrappers around this command which bitwise OR in the appropriate constant for you. The mode actually set is affected by the umask. $g>mknod_b ($mode, $devmajor, $devminor, $path)This call creates a block device node called \*(C`path\*(C'\fR with mode \*(C`mode\*(C'\fR and device major/minor \f(CW\*(C`devmajor\*(C'\fR and \f(CW\*(C`devminor\*(C'\fR. It is just a convenient wrapper around \*(C`$g\->mknod\*(C'\fR. The mode actually set is affected by the umask. $g>mknod_c ($mode, $devmajor, $devminor, $path)This call creates a char device node called \*(C`path\*(C'\fR with mode \*(C`mode\*(C'\fR and device major/minor \f(CW\*(C`devmajor\*(C'\fR and \f(CW\*(C`devminor\*(C'\fR. It is just a convenient wrapper around \*(C`$g\->mknod\*(C'\fR. The mode actually set is affected by the umask. $g>mkswap ($device [, label => $label] [, uuid => $uuid])Create a Linux swap partition on \*(C`device\*(C'\fR. The option arguments \*(C`label\*(C'\fR and \f(CW\*(C`uuid\*(C'\fR allow you to set the label and/or UUID of the new swap partition. $g>mkswap_opts ($device [, label => $label] [, uuid => $uuid])This is an alias of mkswap. $g>mkswap_L ($label, $device)Create a swap partition on \*(C`device\*(C'\fR with label \f(CW\*(C`label\*(C'\fR. Note that you cannot attach a swap label to a block device (eg. \*(C`/dev/sda\*(C'\fR), just to a partition. This appears to be a limitation of the kernel or swap tools. This function is deprecated. In new code, use the mkswap call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>mkswap_U ($uuid, $device)Create a swap partition on \*(C`device\*(C'\fR with \s-1UUID\s0 \f(CW\*(C`uuid\*(C'\fR. This function is deprecated. In new code, use the mkswap call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>mkswap_file ($path)Create a swap file. This command just writes a swap file signature to an existing file. To create the file itself, use something like \*(C`$g\->fallocate\*(C'\fR. $path = $g>mktemp ($tmpl [, suffix => $suffix])This command creates a temporary file. The ​\*(C`tmpl\*(C'\fR parameter should be a full pathname for the temporary directory name with the final six characters being ​XXXXXX. For example: /tmp/myprogXXXXXX or /Temp/myprogXXXXXX, the second one being suitable for Windows filesystems. The name of the temporary file that was created is returned. The temporary file is created with mode 0600 and is owned by root. The caller is responsible for deleting the temporary file after use. If the optional \*(C`suffix\*(C'\fR parameter is given, then the suffix (eg. \*(C`.txt\*(C'\fR) is appended to the temporary name. See also: \*(C`$g\->mkdtemp\*(C'\fR. $g>modprobe ($modulename)This loads a kernel module in the appliance. The kernel module must have been whitelisted when libguestfs was built (see \*(C`appliance/kmod.whitelist.in\*(C'\fR in the source). $g>mount ($device, $mountpoint)Mount a guest disk at a position in the filesystem. Block devices are named \*(C`/dev/sda\*(C'\fR, \f(CW\*(C`/dev/sdb\*(C'\fR and so on, as they were added to the guest. If those block devices contain partitions, they will have the usual names (eg. \*(C`/dev/sda1\*(C'\fR). Also \s-1LVM\s0 \f(CW\*(C`/dev/VG/LV\*(C'\fR\-style names can be used. The rules are the same as for mount(2): A filesystem must first be mounted on \*(C`/\*(C'\fR before others can be mounted. Other filesystems can only be mounted on directories which already exist. The mounted filesystem is writable, if we have sufficient permissions on the underlying device. Before libguestfs 1.13.16, this call implicitly added the options ​\*(C`sync\*(C'\fR and \f(CW\*(C`noatime\*(C'\fR. The \f(CW\*(C`sync\*(C'\fR option greatly slowed writes and caused many problems for users. If your program might need to work with older versions of libguestfs, use ​\*(C`$g\->mount_options\*(C'\fR instead (using an empty string for the first parameter if you don't want any options). $g>mount_local ($localmountpoint [, readonly => $readonly] [, options => $options] [, cachetimeout => $cachetimeout] [, debugcalls => $debugcalls])This call exports the libguestfs-accessible filesystem to a local mountpoint (directory) called \*(C`localmountpoint\*(C'\fR. Ordinary reads and writes to files and directories under ​\*(C`localmountpoint\*(C'\fR are redirected through libguestfs. If the optional \*(C`readonly\*(C'\fR flag is set to true, then writes to the filesystem return error \*(C`EROFS\*(C'\fR. \*(C`options\*(C'\fR is a comma-separated list of mount options. See guestmount(1) for some useful options. \*(C`cachetimeout\*(C'\fR sets the timeout (in seconds) for cached directory entries. The default is 60 seconds. See guestmount(1) for further information. If \*(C`debugcalls\*(C'\fR is set to true, then additional debugging information is generated for every FUSE call. When \*(C`$g\->mount_local\*(C'\fR returns, the filesystem is ready, but is not processing requests (access to it will block). You have to call \*(C`$g\->mount_local_run\*(C'\fR to run the main loop. See MOUNT LOCAL in guestfs(3) for full documentation. $g>mount_local_run ()Run the main loop which translates kernel calls to libguestfs calls. This should only be called after \*(C`$g\->mount_local\*(C'\fR returns successfully. The call will not return until the filesystem is unmounted. Note you must not make concurrent libguestfs calls on the same handle from another thread. You may call this from a different thread than the one which called \*(C`$g\->mount_local\*(C'\fR, subject to the usual rules for threads and libguestfs (see ​MULTIPLE HANDLES AND MULTIPLE THREADS in guestfs(3)). See MOUNT LOCAL in guestfs(3) for full documentation. $g>mount_loop ($file, $mountpoint)This command lets you mount \*(C`file\*(C'\fR (a filesystem image in a file) on a mount point. It is entirely equivalent to the command \*(C`mount \-o loop file mountpoint\*(C'\fR. $g>mount_options ($options, $device, $mountpoint)This is the same as the \*(C`$g\->mount\*(C'\fR command, but it allows you to set the mount options as for the ​mount(8) −o flag. If the \*(C`options\*(C'\fR parameter is an empty string, then no options are passed (all options default to whatever the filesystem uses). $g>mount_ro ($device, $mountpoint)This is the same as the \*(C`$g\->mount\*(C'\fR command, but it mounts the filesystem with the read-only (−o ro) flag. $g>mount_vfs ($options, $vfstype, $device, $mountpoint)This is the same as the \*(C`$g\->mount\*(C'\fR command, but it allows you to set both the mount options and the vfstype as for the mount(8) −o and −t flags. %mps = $g>mountpoints ()This call is similar to \*(C`$g\->mounts\*(C'\fR. That call returns a list of devices. This one returns a hash table (map) of device name to directory where the device is mounted. @devices = $g>mounts ()This returns the list of currently mounted filesystems. It returns the list of devices (eg. \*(C`/dev/sda1\*(C'\fR, \f(CW\*(C`/dev/VG/LV\*(C'\fR). Some internal mounts are not shown. See also: \*(C`$g\->mountpoints\*(C'\fR $g>mv ($src, $dest)This moves a file from \*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR where \f(CW\*(C`dest\*(C'\fR is either a destination filename or destination directory. See also: \*(C`$g\->rename\*(C'\fR. $nrdisks = $g>nr_devices ()This returns the number of whole block devices that were added. This is the same as the number of devices that would be returned if you called \*(C`$g\->list_devices\*(C'\fR. To find out the maximum number of devices that could be added, call \*(C`$g\->max_disks\*(C'\fR. $status = $g>ntfs_3g_probe ($rw, $device)This command runs the ntfs−3g.probe(8) command which probes an NTFS \*(C`device\*(C'\fR for mountability. (Not all \s-1NTFS\s0 volumes can be mounted read-write, and some cannot be mounted at all). \*(C`rw\*(C'\fR is a boolean flag. Set it to true if you want to test if the volume can be mounted read-write. Set it to false if you want to test if the volume can be mounted read-only. The return value is an integer which 0 if the operation would succeed, or some non-zero value documented in the ​ntfs−3g.probe(8) manual page. $g>ntfsclone_in ($backupfile, $device)Restore the \*(C`backupfile\*(C'\fR (from a previous call to ​\*(C`$g\->ntfsclone_out\*(C'\fR) to \f(CW\*(C`device\*(C'\fR, overwriting any existing contents of this device. $g>ntfsclone_out ($device, $backupfile [, metadataonly => $metadataonly] [, rescue => $rescue] [, ignorefscheck => $ignorefscheck] [, preservetimestamps => $preservetimestamps] [, force => $force])Stream the NTFS filesystem \*(C`device\*(C'\fR to the local file ​\*(C`backupfile\*(C'\fR. The format used for the backup file is a special format used by the ntfsclone(8) tool. If the optional \*(C`metadataonly\*(C'\fR flag is true, then \fIonly\fR the metadata is saved, losing all the user data (this is useful for diagnosing some filesystem problems). The optional \*(C`rescue\*(C'\fR, \f(CW\*(C`ignorefscheck\*(C'\fR, \f(CW\*(C`preservetimestamps\*(C'\fR and \*(C`force\*(C'\fR flags have precise meanings detailed in the ​ntfsclone(8) man page. Use \*(C`$g\->ntfsclone_in\*(C'\fR to restore the file back to a libguestfs device. $g>ntfsfix ($device [, clearbadsectors => $clearbadsectors])This command repairs some fundamental NTFS inconsistencies, resets the NTFS journal file, and schedules an NTFS consistency check for the first boot into Windows. This is not an equivalent of Windows \*(C`chkdsk\*(C'\fR. It does \fInot\fR scan the filesystem for inconsistencies. The optional \*(C`clearbadsectors\*(C'\fR flag clears the list of bad sectors. This is useful after cloning a disk with bad sectors to a new disk. $g>ntfsresize ($device [, size => $size] [, force => $force])This command resizes an NTFS filesystem, expanding or shrinking it to the size of the underlying device. The optional parameters are: size The new size (in bytes) of the filesystem. If omitted, the filesystem is resized to fit the container (eg. partition). force If this option is true, then force the resize of the filesystem even if the filesystem is marked as requiring a consistency check. After the resize operation, the filesystem is always marked as requiring a consistency check (for safety). You have to boot into Windows to perform this check and clear this condition. If you don't set the \*(C`force\*(C'\fR option then it is not possible to call \*(C`$g\->ntfsresize\*(C'\fR multiple times on a single filesystem without booting into Windows between each resize. See also ntfsresize(8). $g>ntfsresize_opts ($device [, size => $size] [, force => $force])This is an alias of ntfsresize. $g>ntfsresize_size ($device, $size)This command is the same as \*(C`$g\->ntfsresize\*(C'\fR except that it allows you to specify the new size (in bytes) explicitly. This function is deprecated. In new code, use the ntfsresize call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>parse_environment ()Parse the program's environment and set flags in the handle accordingly. For example if \*(C`LIBGUESTFS_DEBUG=1\*(C'\fR then the ​'verbose' flag is set in the handle. Most programs do not need to call this. It is done implicitly when you call \*(C`$g\->create\*(C'\fR. See ENVIRONMENT VARIABLES in guestfs(3) for a list of environment variables that can affect libguestfs handles. See also ​guestfs_create_flags in guestfs(3), and ​\*(C`$g\->parse_environment_list\*(C'\fR. $g>parse_environment_list (\@environment)Parse the list of strings in the argument \*(C`environment\*(C'\fR and set flags in the handle accordingly. For example if \*(C`LIBGUESTFS_DEBUG=1\*(C'\fR is a string in the list, then the 'verbose' flag is set in the handle. This is the same as \*(C`$g\->parse_environment\*(C'\fR except that it parses an explicit list of strings instead of the program's environment. $g>part_add ($device, $prlogex, $startsect, $endsect)This command adds a partition to \*(C`device\*(C'\fR. If there is no partition table on the device, call \*(C`$g\->part_init\*(C'\fR first. The \*(C`prlogex\*(C'\fR parameter is the type of partition. Normally you should pass \*(C`p\*(C'\fR or \f(CW\*(C`primary\*(C'\fR here, but \s-1MBR\s0 partition tables also support \*(C`l\*(C'\fR (or \f(CW\*(C`logical\*(C'\fR) and \f(CW\*(C`e\*(C'\fR (or \f(CW\*(C`extended\*(C'\fR) partition types. \*(C`startsect\*(C'\fR and \f(CW\*(C`endsect\*(C'\fR are the start and end of the partition in sectors. \*(C`endsect\*(C'\fR may be negative, which means it counts backwards from the end of the disk (\*(C`\-1\*(C'\fR is the last sector). Creating a partition which covers the whole disk is not so easy. Use \*(C`$g\->part_disk\*(C'\fR to do that. $g>part_del ($device, $partnum)This command deletes the partition numbered \*(C`partnum\*(C'\fR on \f(CW\*(C`device\*(C'\fR. Note that in the case of MBR partitioning, deleting an extended partition also deletes any logical partitions it contains. $g>part_disk ($device, $parttype)This command is simply a combination of \*(C`$g\->part_init\*(C'\fR followed by \*(C`$g\->part_add\*(C'\fR to create a single primary partition covering the whole disk. \*(C`parttype\*(C'\fR is the partition table type, usually \f(CW\*(C`mbr\*(C'\fR or \f(CW\*(C`gpt\*(C'\fR, but other possible values are described in \*(C`$g\->part_init\*(C'\fR. $bootable = $g>part_get_bootable ($device, $partnum)This command returns true if the partition \*(C`partnum\*(C'\fR on ​\*(C`device\*(C'\fR has the bootable flag set. See also \*(C`$g\->part_set_bootable\*(C'\fR. $guid = $g>part_get_gpt_type ($device, $partnum)Return the type GUID of numbered GPT partition \*(C`partnum\*(C'\fR. For \s-1MBR\s0 partitions, return an appropriate GUID corresponding to the MBR type. Behaviour is undefined for other partition types. $idbyte = $g>part_get_mbr_id ($device, $partnum)Returns the MBR type byte (also known as the ID byte) from the numbered partition \*(C`partnum\*(C'\fR. Note that only MBR (old DOS-style) partitions have type bytes. You will get undefined results for other partition table types (see \*(C`$g\->part_get_parttype\*(C'\fR). $parttype = $g>part_get_parttype ($device)This command examines the partition table on \*(C`device\*(C'\fR and returns the partition table type (format) being used. Common return values include: \*(C`msdos\*(C'\fR (a DOS/Windows style \s-1MBR\s0 partition table), \*(C`gpt\*(C'\fR (a GPT/EFI\-style partition table). Other values are possible, although unusual. See \*(C`$g\->part_init\*(C'\fR for a full list. $g>part_init ($device, $parttype)This creates an empty partition table on \*(C`device\*(C'\fR of one of the partition types listed below. Usually \*(C`parttype\*(C'\fR should be either \*(C`msdos\*(C'\fR or \f(CW\*(C`gpt\*(C'\fR (for large disks). Initially there are no partitions. Following this, you should call \*(C`$g\->part_add\*(C'\fR for each partition required. Possible values for \*(C`parttype\*(C'\fR are: efi gpt Intel EFI / GPT partition table. This is recommended for >= 2 TB partitions that will be accessed from Linux and Intel-based Mac OS X. It also has limited backwards compatibility with the \*(C`mbr\*(C'\fR format. mbr msdos The standard PC Master Boot Record (MBR) format used by MS-DOS and Windows. This partition type will only work for device sizes up to 2 TB. For large disks we recommend using \*(C`gpt\*(C'\fR. Other partition table types that may work but are not supported include: aix AIX disk labels. amiga rdb Amiga Rigid Disk Block format. bsd BSD disk labels. dasd DASD, used on IBM mainframes. dvh MIPS/SGI volumes. mac Old Mac partition format. Modern Macs use \*(C`gpt\*(C'\fR. pc98 NEC PC−98 format, common in Japan apparently. sun Sun disk labels. @partitions = $g>part_list ($device)This command parses the partition table on \*(C`device\*(C'\fR and returns the list of partitions found. The fields in the returned structure are: part_num Partition number, counting from 1. part_start Start of the partition in bytes. To get sectors you have to divide by the device's sector size, see \*(C`$g\->blockdev_getss\*(C'\fR. part_end End of the partition in bytes. part_size Size of the partition in bytes. $g>part_set_bootable ($device, $partnum, $bootable)This sets the bootable flag on partition numbered \*(C`partnum\*(C'\fR on device \*(C`device\*(C'\fR. Note that partitions are numbered from 1. The bootable flag is used by some operating systems (notably Windows) to determine which partition to boot from. It is by no means universally recognized. $g>part_set_gpt_type ($device, $partnum, $guid)Set the type GUID of numbered GPT partition \*(C`partnum\*(C'\fR to \f(CW\*(C`guid\*(C'\fR. Return an error if the partition table of \*(C`device\*(C'\fR isn't \s-1GPT\s0, or if \f(CW\*(C`guid\*(C'\fR is not a valid GUID. See <http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs> for a useful list of type GUIDs. $g>part_set_mbr_id ($device, $partnum, $idbyte)Sets the MBR type byte (also known as the ID byte) of the numbered partition \*(C`partnum\*(C'\fR to \f(CW\*(C`idbyte\*(C'\fR. Note that the type bytes quoted in most documentation are in fact hexadecimal numbers, but usually documented without any leading 0x which might be confusing. Note that only MBR (old DOS-style) partitions have type bytes. You will get undefined results for other partition table types (see \*(C`$g\->part_get_parttype\*(C'\fR). $g>part_set_name ($device, $partnum, $name)This sets the partition name on partition numbered \*(C`partnum\*(C'\fR on device \*(C`device\*(C'\fR. Note that partitions are numbered from 1. The partition name can only be set on certain types of partition table. This works on \*(C`gpt\*(C'\fR but not on \f(CW\*(C`mbr\*(C'\fR partitions. $device = $g>part_to_dev ($partition)This function takes a partition name (eg. /dev/sdb1) and removes the partition number, returning the device name (eg. /dev/sdb). The named partition must exist, for example as a string returned from \*(C`$g\->list_partitions\*(C'\fR. See also \*(C`$g\->part_to_partnum\*(C'\fR, \f(CW\*(C`$g\->device_index\*(C'\fR. $partnum = $g>part_to_partnum ($partition)This function takes a partition name (eg. /dev/sdb1) and returns the partition number (eg. 1). The named partition must exist, for example as a string returned from \*(C`$g\->list_partitions\*(C'\fR. See also \*(C`$g\->part_to_dev\*(C'\fR. $g>ping_daemon ()This is a test probe into the guestfs daemon running inside the qemu subprocess. Calling this function checks that the daemon responds to the ping message, without affecting the daemon or attached block device(s) in any other way. $content = $g>pread ($path, $count, $offset)This command lets you read part of a file. It reads \*(C`count\*(C'\fR bytes of the file, starting at \*(C`offset\*(C'\fR, from file \f(CW\*(C`path\*(C'\fR. This may read fewer bytes than requested. For further details see the pread(2) system call. See also \*(C`$g\->pwrite\*(C'\fR, \f(CW\*(C`$g\->pread_device\*(C'\fR. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). $content = $g>pread_device ($device, $count, $offset)This command lets you read part of a block device. It reads \*(C`count\*(C'\fR bytes of \*(C`device\*(C'\fR, starting at \f(CW\*(C`offset\*(C'\fR. This may read fewer bytes than requested. For further details see the pread(2) system call. See also \*(C`$g\->pread\*(C'\fR. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). $g>pvchange_uuid ($device)Generate a new random UUID for the physical volume \*(C`device\*(C'\fR. $g>pvchange_uuid_all ()Generate new random UUIDs for all physical volumes. $g>pvcreate ($device)This creates an LVM physical volume on the named \*(C`device\*(C'\fR, where \*(C`device\*(C'\fR should usually be a partition name such as \*(C`/dev/sda1\*(C'\fR. $g>pvremove ($device)This wipes a physical volume \*(C`device\*(C'\fR so that \s-1LVM\s0 will no longer recognise it. The implementation uses the \*(C`pvremove\*(C'\fR command which refuses to wipe physical volumes that contain any volume groups, so you have to remove those first. $g>pvresize ($device)This resizes (expands or shrinks) an existing LVM physical volume to match the new size of the underlying device. $g>pvresize_size ($device, $size)This command is the same as \*(C`$g\->pvresize\*(C'\fR except that it allows you to specify the new size (in bytes) explicitly. @physvols = $g>pvs ()List all the physical volumes detected. This is the equivalent of the pvs(8) command. This returns a list of just the device names that contain PVs (eg. \*(C`/dev/sda2\*(C'\fR). See also \*(C`$g\->pvs_full\*(C'\fR. @physvols = $g>pvs_full ()List all the physical volumes detected. This is the equivalent of the pvs(8) command. The full version includes all fields. $uuid = $g>pvuuid ($device)This command returns the UUID of the LVM PV \*(C`device\*(C'\fR. $nbytes = $g>pwrite ($path, $content, $offset)This command writes to part of a file. It writes the data buffer \*(C`content\*(C'\fR to the file \f(CW\*(C`path\*(C'\fR starting at offset \f(CW\*(C`offset\*(C'\fR. This command implements the pwrite(2) system call, and like that system call it may not write the full data requested. The return value is the number of bytes that were actually written to the file. This could even be 0, although short writes are unlikely for regular files in ordinary circumstances. See also \*(C`$g\->pread\*(C'\fR, \f(CW\*(C`$g\->pwrite_device\*(C'\fR. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). $nbytes = $g>pwrite_device ($device, $content, $offset)This command writes to part of a device. It writes the data buffer \*(C`content\*(C'\fR to \f(CW\*(C`device\*(C'\fR starting at offset \f(CW\*(C`offset\*(C'\fR. This command implements the pwrite(2) system call, and like that system call it may not write the full data requested (although short writes to disk devices and partitions are probably impossible with standard Linux kernels). See also \*(C`$g\->pwrite\*(C'\fR. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). $content = $g>read_file ($path)This calls returns the contents of the file \*(C`path\*(C'\fR as a buffer. Unlike \*(C`$g\->cat\*(C'\fR, this function can correctly handle files that contain embedded ASCII NUL characters. @lines = $g>read_lines ($path)Return the contents of the file named \*(C`path\*(C'\fR. The file contents are returned as a list of lines. Trailing ​\*(C`LF\*(C'\fR and \f(CW\*(C`CRLF\*(C'\fR character sequences are \fInot\fR returned. Note that this function cannot correctly handle binary files (specifically, files containing \*(C`\e0\*(C'\fR character which is treated as end of string). For those you need to use the \*(C`$g\->read_file\*(C'\fR function and split the buffer into lines yourself. @entries = $g>readdir ($dir)This returns the list of directory entries in directory \*(C`dir\*(C'\fR. All entries in the directory are returned, including \*(C`.\*(C'\fR and ​\*(C`..\*(C'\fR. The entries are \fInot\fR sorted, but returned in the same order as the underlying filesystem. Also this call returns basic file type information about each file. The \*(C`ftyp\*(C'\fR field will contain one of the following characters: 'b' Block special 'c' Char special 'd' Directory 'f' FIFO (named pipe) 'l' Symbolic link 'r' Regular file 's' Socket 'u' Unknown file type '?' The readdir(3) call returned a \*(C`d_type\*(C'\fR field with an unexpected value This function is primarily intended for use by programs. To get a simple list of names, use \*(C`$g\->ls\*(C'\fR. To get a printable directory for human consumption, use \*(C`$g\->ll\*(C'\fR. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). $link = $g>readlink ($path)This command reads the target of a symbolic link. @links = $g>readlinklist ($path, \@names)This call allows you to do a \*(C`readlink\*(C'\fR operation on multiple files, where all files are in the directory \*(C`path\*(C'\fR. ​\*(C`names\*(C'\fR is the list of files from this directory. On return you get a list of strings, with a one-to-one correspondence to the \*(C`names\*(C'\fR list. Each string is the value of the symbolic link. If the readlink(2) operation fails on any name, then the corresponding result string is the empty string "". However the whole operation is completed even if there were readlink(2) errors, and so you can call this function with names where you don't know if they are symbolic links already (albeit slightly less efficient). This call is intended for programs that want to efficiently list a directory contents without making many round-trips. $rpath = $g>realpath ($path)Return the canonicalized absolute pathname of \*(C`path\*(C'\fR. The returned path has no \*(C`.\*(C'\fR, \f(CW\*(C`..\*(C'\fR or symbolic link path elements. $g>remove_drive ($label)This function is conceptually the opposite of \*(C`$g\->add_drive_opts\*(C'\fR. It removes the drive that was previously added with label \*(C`label\*(C'\fR. Note that in order to remove drives, you have to add them with labels (see the optional \*(C`label\*(C'\fR argument to \f(CW\*(C`$g\->add_drive_opts\*(C'\fR). If you didn't use a label, then they cannot be removed. You can call this function before or after launching the handle. If called after launch, if the attach-method supports it, we try to hot unplug the drive: see HOTPLUGGING in guestfs(3). The disk must not be in use (eg. mounted) when you do this. We try to detect if the disk is in use and stop you from doing this. $g>removexattr ($xattr, $path)This call removes the extended attribute named \*(C`xattr\*(C'\fR of the file \*(C`path\*(C'\fR. See also: \*(C`$g\->lremovexattr\*(C'\fR, \fIattr\fR\|(5). $g>rename ($oldpath, $newpath)Rename a file to a new place on the same filesystem. This is the same as the Linux rename(2) system call. In most cases you are better to use \*(C`$g\->mv\*(C'\fR instead. $g>resize2fs ($device)This resizes an ext2, ext3 or ext4 filesystem to match the size of the underlying device. See also RESIZE2FS ERRORS in guestfs(3). $g>resize2fs_M ($device)This command is the same as \*(C`$g\->resize2fs\*(C'\fR, but the filesystem is resized to its minimum size. This works like the −M option to the \*(C`resize2fs\*(C'\fR command. To get the resulting size of the filesystem you should call ​\*(C`$g\->tune2fs_l\*(C'\fR and read the \f(CW\*(C`Block size\*(C'\fR and \f(CW\*(C`Block count\*(C'\fR values. These two numbers, multiplied together, give the resulting size of the minimal filesystem in bytes. See also RESIZE2FS ERRORS in guestfs(3). $g>resize2fs_size ($device, $size)This command is the same as \*(C`$g\->resize2fs\*(C'\fR except that it allows you to specify the new size (in bytes) explicitly. See also RESIZE2FS ERRORS in guestfs(3). $g>rm ($path)Remove the single file \*(C`path\*(C'\fR. $g>rm_f ($path)Remove the file \*(C`path\*(C'\fR. If the file doesn't exist, that error is ignored. (Other errors, eg. I/O errors or bad paths, are not ignored) This call cannot remove directories. Use \*(C`$g\->rmdir\*(C'\fR to remove an empty directory, or \*(C`$g\->rm_rf\*(C'\fR to remove directories recursively. $g>rm_rf ($path)Remove the file or directory \*(C`path\*(C'\fR, recursively removing the contents if its a directory. This is like the \*(C`rm \-rf\*(C'\fR shell command. $g>rmdir ($path)Remove the single directory \*(C`path\*(C'\fR. $g>rmmountpoint ($exemptpath)This calls removes a mountpoint that was previously created with \*(C`$g\->mkmountpoint\*(C'\fR. See \f(CW\*(C`$g\->mkmountpoint\*(C'\fR for full details. $g>rsync ($src, $dest [, archive => $archive] [, deletedest => $deletedest])This call may be used to copy or synchronize two directories under the same libguestfs handle. This uses the rsync(1) program which uses a fast algorithm that avoids copying files unnecessarily. \*(C`src\*(C'\fR and \f(CW\*(C`dest\*(C'\fR are the source and destination directories. Files are copied from \*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR. The optional arguments are: archive Turns on archive mode. This is the same as passing the ​−−archive flag to \*(C`rsync\*(C'\fR. deletedest Delete files at the destination that do not exist at the source. $g>rsync_in ($remote, $dest [, archive => $archive] [, deletedest => $deletedest])This call may be used to copy or synchronize the filesystem on the host or on a remote computer with the filesystem within libguestfs. This uses the rsync(1) program which uses a fast algorithm that avoids copying files unnecessarily. This call only works if the network is enabled. See ​\*(C`$g\->set_network\*(C'\fR or the \fI\-\-network\fR option to various tools like guestfish(1). Files are copied from the remote server and directory specified by \*(C`remote\*(C'\fR to the destination directory \f(CW\*(C`dest\*(C'\fR. The format of the remote server string is defined by rsync(1). Note that there is no way to supply a password or passphrase so the target must be set up not to require one. The optional arguments are the same as those of \*(C`$g\->rsync\*(C'\fR. $g>rsync_out ($src, $remote [, archive => $archive] [, deletedest => $deletedest])This call may be used to copy or synchronize the filesystem within libguestfs with a filesystem on the host or on a remote computer. This uses the rsync(1) program which uses a fast algorithm that avoids copying files unnecessarily. This call only works if the network is enabled. See ​\*(C`$g\->set_network\*(C'\fR or the \fI\-\-network\fR option to various tools like guestfish(1). Files are copied from the source directory \*(C`src\*(C'\fR to the remote server and directory specified by \*(C`remote\*(C'\fR. The format of the remote server string is defined by rsync(1). Note that there is no way to supply a password or passphrase so the target must be set up not to require one. The optional arguments are the same as those of \*(C`$g\->rsync\*(C'\fR. Globbing does not happen on the \*(C`src\*(C'\fR parameter. In programs which use the API directly you have to expand wildcards yourself (see \*(C`$g\->glob_expand\*(C'\fR). In guestfish you can use the \f(CW\*(C`glob\*(C'\fR command (see glob in guestfish(1)), for example: ><fs> glob rsync−out /* rsync://remote/ $g>scrub_device ($device)This command writes patterns over \*(C`device\*(C'\fR to make data retrieval more difficult. It is an interface to the scrub(1) program. See that manual page for more details. $g>scrub_file ($file)This command writes patterns over a file to make data retrieval more difficult. The file is removed after scrubbing. It is an interface to the scrub(1) program. See that manual page for more details. $g>scrub_freespace ($dir)This command creates the directory \*(C`dir\*(C'\fR and then fills it with files until the filesystem is full, and scrubs the files as for \*(C`$g\->scrub_file\*(C'\fR, and deletes them. The intention is to scrub any free space on the partition containing \*(C`dir\*(C'\fR. It is an interface to the scrub(1) program. See that manual page for more details. $g>set_append ($append)This function is used to add additional options to the libguestfs appliance kernel command line. The default is \*(C`NULL\*(C'\fR unless overridden by setting ​\*(C`LIBGUESTFS_APPEND\*(C'\fR environment variable. Setting \*(C`append\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR means \fIno\fR additional options are passed (libguestfs always adds a few of its own). $g>set_attach_method ($attachmethod)Set the method that libguestfs uses to connect to the back end guestfsd daemon. See ATTACH METHOD in guestfs(3). $g>set_autosync ($autosync)If \*(C`autosync\*(C'\fR is true, this enables autosync. Libguestfs will make a best effort attempt to make filesystems consistent and synchronized when the handle is closed (also if the program exits without closing handles). This is enabled by default (since libguestfs 1.5.24, previously it was disabled by default). $g>set_cachedir ($cachedir)Set the directory used by the handle to store the appliance cache, when using a supermin appliance. The appliance is cached and shared between all handles which have the same effective user ID. The environment variables \*(C`LIBGUESTFS_CACHEDIR\*(C'\fR and \f(CW\*(C`TMPDIR\*(C'\fR control the default value: If \*(C`LIBGUESTFS_CACHEDIR\*(C'\fR is set, then that is the default. Else if \*(C`TMPDIR\*(C'\fR is set, then that is the default. Else \*(C`/var/tmp\*(C'\fR is the default. $g>set_direct ($direct)If the direct appliance mode flag is enabled, then stdin and stdout are passed directly through to the appliance once it is launched. One consequence of this is that log messages aren't caught by the library and handled by \*(C`$g\->set_log_message_callback\*(C'\fR, but go straight to stdout. You probably don't want to use this unless you know what you are doing. The default is disabled. $g>set_e2attrs ($file, $attrs [, clear => $clear])This sets or clears the file attributes \*(C`attrs\*(C'\fR associated with the inode \*(C`file\*(C'\fR. \*(C`attrs\*(C'\fR is a string of characters representing file attributes. See \*(C`$g\->get_e2attrs\*(C'\fR for a list of possible attributes. Not all attributes can be changed. If optional boolean \*(C`clear\*(C'\fR is not present or false, then the \*(C`attrs\*(C'\fR listed are set in the inode. If \*(C`clear\*(C'\fR is true, then the \f(CW\*(C`attrs\*(C'\fR listed are cleared in the inode. In both cases, other attributes not present in the \*(C`attrs\*(C'\fR string are left unchanged. These attributes are only present when the file is located on an ext2/3/4 filesystem. Using this call on other filesystem types will result in an error. $g>set_e2generation ($file, $generation)This sets the ext2 file generation of a file. See \*(C`$g\->get_e2generation\*(C'\fR. $g>set_e2label ($device, $label)This sets the ext2/3/4 filesystem label of the filesystem on ​\*(C`device\*(C'\fR to \f(CW\*(C`label\*(C'\fR. Filesystem labels are limited to 16 characters. You can use either \*(C`$g\->tune2fs_l\*(C'\fR or \f(CW\*(C`$g\->get_e2label\*(C'\fR to return the existing label on a filesystem. This function is deprecated. In new code, use the set_label call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>set_e2uuid ($device, $uuid)This sets the ext2/3/4 filesystem UUID of the filesystem on ​\*(C`device\*(C'\fR to \f(CW\*(C`uuid\*(C'\fR. The format of the \s-1UUID\s0 and alternatives such as \*(C`clear\*(C'\fR, \f(CW\*(C`random\*(C'\fR and \f(CW\*(C`time\*(C'\fR are described in the ​tune2fs(8) manpage. You can use either \*(C`$g\->tune2fs_l\*(C'\fR or \f(CW\*(C`$g\->get_e2uuid\*(C'\fR to return the existing UUID of a filesystem. $g>set_label ($device, $label)Set the filesystem label on \*(C`device\*(C'\fR to \f(CW\*(C`label\*(C'\fR. Only some filesystem types support labels, and libguestfs supports setting labels on only a subset of these. ext2, ext3, ext4 Labels are limited to 16 bytes. NTFS Labels are limited to 128 unicode characters. XFS The label is limited to 12 bytes. The filesystem must not be mounted when trying to set the label. btrfs The label is limited to 255 bytes and some characters are not allowed. Setting the label on a btrfs subvolume will set the label on its parent filesystem. The filesystem must not be mounted when trying to set the label. To read the label on a filesystem, call \*(C`$g\->vfs_label\*(C'\fR. $g>set_libvirt_requested_credential ($index, $cred)After requesting the \*(C`index\*(C'\fR'th credential from the user, call this function to pass the answer back to libvirt. See LIBVIRT AUTHENTICATION in guestfs(3) for documentation and example code. $g>set_libvirt_supported_credentials (\@creds)Call this function before setting an event handler for ​\*(C`GUESTFS_EVENT_LIBVIRT_AUTH\*(C'\fR, to supply the list of credential types that the program knows how to process. The \*(C`creds\*(C'\fR list must be a non-empty list of strings. Possible strings are: username authname language cnonce passphrase echoprompt noechoprompt realm external See libvirt documentation for the meaning of these credential types. See LIBVIRT AUTHENTICATION in guestfs(3) for documentation and example code. $g>set_memsize ($memsize)This sets the memory size in megabytes allocated to the qemu subprocess. This only has any effect if called before ​\*(C`$g\->launch\*(C'\fR. You can also change this by setting the environment variable \*(C`LIBGUESTFS_MEMSIZE\*(C'\fR before the handle is created. For more information on the architecture of libguestfs, see guestfs(3). $g>set_network ($network)If \*(C`network\*(C'\fR is true, then the network is enabled in the libguestfs appliance. The default is false. This affects whether commands are able to access the network (see RUNNING COMMANDS in guestfs(3)). You must call this before calling \*(C`$g\->launch\*(C'\fR, otherwise it has no effect. $g>set_path ($searchpath)Set the path that libguestfs searches for kernel and initrd.img. The default is \*(C`$libdir/guestfs\*(C'\fR unless overridden by setting ​\*(C`LIBGUESTFS_PATH\*(C'\fR environment variable. Setting \*(C`path\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR restores the default path. $g>set_pgroup ($pgroup)If \*(C`pgroup\*(C'\fR is true, child processes are placed into their own process group. The practical upshot of this is that signals like \*(C`SIGINT\*(C'\fR (from users pressing \*(C`^C\*(C'\fR) won't be received by the child process. The default for this flag is false, because usually you want ​\*(C`^C\*(C'\fR to kill the subprocess. Guestfish sets this flag to true when used interactively, so that \*(C`^C\*(C'\fR can cancel long-running commands gracefully (see \*(C`$g\->user_cancel\*(C'\fR). $g>set_qemu ($qemu)Set the qemu binary that we will use. The default is chosen when the library was compiled by the configure script. You can also override this by setting the \*(C`LIBGUESTFS_QEMU\*(C'\fR environment variable. Setting \*(C`qemu\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR restores the default qemu binary. Note that you should call this function as early as possible after creating the handle. This is because some pre-launch operations depend on testing qemu features (by running \*(C`qemu \-help\*(C'\fR). If the qemu binary changes, we don't retest features, and so you might see inconsistent results. Using the environment variable \*(C`LIBGUESTFS_QEMU\*(C'\fR is safest of all since that picks the qemu binary at the same time as the handle is created. $g>set_recovery_proc ($recoveryproc)If this is called with the parameter \*(C`false\*(C'\fR then ​\*(C`$g\->launch\*(C'\fR does not create a recovery process. The purpose of the recovery process is to stop runaway qemu processes in the case where the main program aborts abruptly. This only has any effect if called before \*(C`$g\->launch\*(C'\fR, and the default is true. About the only time when you would want to disable this is if the main process will fork itself into the background (daemonize itself). In this case the recovery process thinks that the main program has disappeared and so kills qemu, which is not very helpful. $g>set_selinux ($selinux)This sets the selinux flag that is passed to the appliance at boot time. The default is \*(C`selinux=0\*(C'\fR (disabled). Note that if SELinux is enabled, it is always in Permissive mode (\*(C`enforcing=0\*(C'\fR). For more information on the architecture of libguestfs, see guestfs(3). $g>set_smp ($smp)Change the number of virtual CPUs assigned to the appliance. The default is 1. Increasing this may improve performance, though often it has no effect. This function must be called before \*(C`$g\->launch\*(C'\fR. $g>set_tmpdir ($tmpdir)Set the directory used by the handle to store temporary files. The environment variables \*(C`LIBGUESTFS_TMPDIR\*(C'\fR and \f(CW\*(C`TMPDIR\*(C'\fR control the default value: If \*(C`LIBGUESTFS_TMPDIR\*(C'\fR is set, then that is the default. Else if \*(C`TMPDIR\*(C'\fR is set, then that is the default. Else \*(C`/tmp\*(C'\fR is the default. $g>set_trace ($trace)If the command trace flag is set to 1, then libguestfs calls, parameters and return values are traced. If you want to trace C API calls into libguestfs (and other libraries) then possibly a better way is to use the external ltrace(1) command. Command traces are disabled unless the environment variable ​\*(C`LIBGUESTFS_TRACE\*(C'\fR is defined and set to \f(CW1\fR. Trace messages are normally sent to \*(C`stderr\*(C'\fR, unless you register a callback to send them somewhere else (see ​\*(C`$g\->set_event_callback\*(C'\fR). $g>set_verbose ($verbose)If \*(C`verbose\*(C'\fR is true, this turns on verbose messages. Verbose messages are disabled unless the environment variable ​\*(C`LIBGUESTFS_DEBUG\*(C'\fR is defined and set to \f(CW1\fR. Verbose messages are normally sent to \*(C`stderr\*(C'\fR, unless you register a callback to send them somewhere else (see ​\*(C`$g\->set_event_callback\*(C'\fR). $g>setcon ($context)This sets the SELinux security context of the daemon to the string \*(C`context\*(C'\fR. See the documentation about SELINUX in guestfs(3). $g>setxattr ($xattr, $val, $vallen, $path)This call sets the extended attribute named \*(C`xattr\*(C'\fR of the file \*(C`path\*(C'\fR to the value \f(CW\*(C`val\*(C'\fR (of length \f(CW\*(C`vallen\*(C'\fR). The value is arbitrary 8 bit data. See also: \*(C`$g\->lsetxattr\*(C'\fR, \fIattr\fR\|(5). $g>sfdisk ($device, $cyls, $heads, $sectors, \@lines)This is a direct interface to the sfdisk(8) program for creating partitions on block devices. \*(C`device\*(C'\fR should be a block device, for example \f(CW\*(C`/dev/sda\*(C'\fR. \*(C`cyls\*(C'\fR, \f(CW\*(C`heads\*(C'\fR and \f(CW\*(C`sectors\*(C'\fR are the number of cylinders, heads and sectors on the device, which are passed directly to sfdisk as the −C, −H and −S parameters. If you pass 0 for any of these, then the corresponding parameter is omitted. Usually for ​'large' disks, you can just pass 0 for these, but for small (floppy-sized) disks, sfdisk (or rather, the kernel) cannot work out the right geometry and you will need to tell it. \*(C`lines\*(C'\fR is a list of lines that we feed to \f(CW\*(C`sfdisk\*(C'\fR. For more information refer to the sfdisk(8) manpage. To create a single partition occupying the whole disk, you would pass \*(C`lines\*(C'\fR as a single element list, when the single element being the string \*(C`,\*(C'\fR (comma). See also: \*(C`$g\->sfdisk_l\*(C'\fR, \f(CW\*(C`$g\->sfdisk_N\*(C'\fR, ​\*(C`$g\->part_init\*(C'\fR This function is deprecated. In new code, use the part_add call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>sfdiskM ($device, \@lines)This is a simplified interface to the \*(C`$g\->sfdisk\*(C'\fR command, where partition sizes are specified in megabytes only (rounded to the nearest cylinder) and you don't need to specify the cyls, heads and sectors parameters which were rarely if ever used anyway. See also: \*(C`$g\->sfdisk\*(C'\fR, the \fIsfdisk\fR\|(8) manpage and \*(C`$g\->part_disk\*(C'\fR This function is deprecated. In new code, use the part_add call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>sfdisk_N ($device, $partnum, $cyls, $heads, $sectors, $line)This runs sfdisk(8) option to modify just the single partition \*(C`n\*(C'\fR (note: \f(CW\*(C`n\*(C'\fR counts from 1). For other parameters, see \*(C`$g\->sfdisk\*(C'\fR. You should usually pass 0 for the cyls/heads/sectors parameters. See also: \*(C`$g\->part_add\*(C'\fR This function is deprecated. In new code, use the part_add call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $partitions = $g>sfdisk_disk_geometry ($device)This displays the disk geometry of \*(C`device\*(C'\fR read from the partition table. Especially in the case where the underlying block device has been resized, this can be different from the kernel's idea of the geometry (see \*(C`$g\->sfdisk_kernel_geometry\*(C'\fR). The result is in human-readable format, and not designed to be parsed. $partitions = $g>sfdisk_kernel_geometry ($device)This displays the kernel's idea of the geometry of \*(C`device\*(C'\fR. The result is in human-readable format, and not designed to be parsed. $partitions = $g>sfdisk_l ($device)This displays the partition table on \*(C`device\*(C'\fR, in the human-readable output of the sfdisk(8) command. It is not intended to be parsed. See also: \*(C`$g\->part_list\*(C'\fR This function is deprecated. In new code, use the part_list call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $output = $g>sh ($command)This call runs a command from the guest filesystem via the guest's \*(C`/bin/sh\*(C'\fR. This is like \*(C`$g\->command\*(C'\fR, but passes the command to: ​ /bin/sh −c "command" Depending on the guest's shell, this usually results in wildcards being expanded, shell expressions being interpolated and so on. All the provisos about \*(C`$g\->command\*(C'\fR apply to this call. @lines = $g>sh_lines ($command)This is the same as \*(C`$g\->sh\*(C'\fR, but splits the result into a list of lines. See also: \*(C`$g\->command_lines\*(C'\fR $g>shutdown ()This is the opposite of \*(C`$g\->launch\*(C'\fR. It performs an orderly shutdown of the backend process(es). If the autosync flag is set (which is the default) then the disk image is synchronized. If the subprocess exits with an error then this function will return an error, which should not be ignored (it may indicate that the disk image could not be written out properly). It is safe to call this multiple times. Extra calls are ignored. This call does not close or free up the handle. You still need to call \*(C`$g\->close\*(C'\fR afterwards. \*(C`$g\->close\*(C'\fR will call this if you don't do it explicitly, but note that any errors are ignored in that case. $g>sleep ($secs)Sleep for \*(C`secs\*(C'\fR seconds. %statbuf = $g>stat ($path)Returns file information for the given \*(C`path\*(C'\fR. This is the same as the stat(2) system call. %statbuf = $g>statvfs ($path)Returns file system statistics for any mounted file system. ​\*(C`path\*(C'\fR should be a file or directory in the mounted file system (typically it is the mount point itself, but it doesn't need to be). This is the same as the statvfs(2) system call. @stringsout = $g>strings ($path)This runs the strings(1) command on a file and returns the list of printable strings found. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). @stringsout = $g>strings_e ($encoding, $path)This is like the \*(C`$g\->strings\*(C'\fR command, but allows you to specify the encoding of strings that are looked for in the source file \*(C`path\*(C'\fR. Allowed encodings are: Single 7−bit−byte characters like ASCII and the ASCII-compatible parts of ISO−8859−X (this is what \*(C`$g\->strings\*(C'\fR uses). Single 8−bit−byte characters. 16−bit big endian strings such as those encoded in ​UTF−16BE or UCS−2BE. l (lower case letter L) 16−bit little endian such as UTF−16LE and UCS−2LE. This is useful for examining binaries in Windows guests. 32−bit big endian such as UCS−4BE. 32−bit little endian such as UCS−4LE. The returned strings are transcoded to UTF−8. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). $g>swapoff_device ($device)This command disables the libguestfs appliance swap device or partition named \*(C`device\*(C'\fR. See \*(C`$g\->swapon_device\*(C'\fR. $g>swapoff_file ($file)This command disables the libguestfs appliance swap on file. $g>swapoff_label ($label)This command disables the libguestfs appliance swap on labeled swap partition. $g>swapoff_uuid ($uuid)This command disables the libguestfs appliance swap partition with the given UUID. $g>swapon_device ($device)This command enables the libguestfs appliance to use the swap device or partition named \*(C`device\*(C'\fR. The increased memory is made available for all commands, for example those run using \*(C`$g\->command\*(C'\fR or \f(CW\*(C`$g\->sh\*(C'\fR. Note that you should not swap to existing guest swap partitions unless you know what you are doing. They may contain hibernation information, or other information that the guest doesn't want you to trash. You also risk leaking information about the host to the guest this way. Instead, attach a new host device to the guest and swap on that. $g>swapon_file ($file)This command enables swap to a file. See \*(C`$g\->swapon_device\*(C'\fR for other notes. $g>swapon_label ($label)This command enables swap to a labeled swap partition. See \*(C`$g\->swapon_device\*(C'\fR for other notes. $g>swapon_uuid ($uuid)This command enables swap to a swap partition with the given UUID. See \*(C`$g\->swapon_device\*(C'\fR for other notes. $g>sync ()This syncs the disk, so that any writes are flushed through to the underlying disk image. You should always call this if you have modified a disk image, before closing the handle. @lines = $g>tail ($path)This command returns up to the last 10 lines of a file as a list of strings. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). @lines = $g>tail_n ($nrlines, $path)If the parameter \*(C`nrlines\*(C'\fR is a positive number, this returns the last ​\*(C`nrlines\*(C'\fR lines of the file \f(CW\*(C`path\*(C'\fR. If the parameter \*(C`nrlines\*(C'\fR is a negative number, this returns lines from the file \*(C`path\*(C'\fR, starting with the \f(CW\*(C`\-nrlines\*(C'\fRth line. If the parameter \*(C`nrlines\*(C'\fR is zero, this returns an empty list. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). $g>tar_in ($tarfile, $directory [, compress => $compress])This command uploads and unpacks local file \*(C`tarfile\*(C'\fR into \f(CW\*(C`directory\*(C'\fR. The optional \*(C`compress\*(C'\fR flag controls compression. If not given, then the input should be an uncompressed tar file. Otherwise one of the following strings may be given to select the compression type of the input file: \*(C`compress\*(C'\fR, \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`bzip2\*(C'\fR, \f(CW\*(C`xz\*(C'\fR, \f(CW\*(C`lzop\*(C'\fR. (Note that not all builds of libguestfs will support all of these compression types). $g>tar_in_opts ($tarfile, $directory [, compress => $compress])This is an alias of tar_in. $g>tar_out ($directory, $tarfile [, compress => $compress] [, numericowner => $numericowner] [, excludes => $excludes])This command packs the contents of \*(C`directory\*(C'\fR and downloads it to local file \*(C`tarfile\*(C'\fR. The optional \*(C`compress\*(C'\fR flag controls compression. If not given, then the output will be an uncompressed tar file. Otherwise one of the following strings may be given to select the compression type of the output file: \*(C`compress\*(C'\fR, \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`bzip2\*(C'\fR, \f(CW\*(C`xz\*(C'\fR, \f(CW\*(C`lzop\*(C'\fR. (Note that not all builds of libguestfs will support all of these compression types). The other optional arguments are: excludes A list of wildcards. Files are excluded if they match any of the wildcards. numericowner If set to true, the output tar file will contain UID/GID numbers instead of user/group names. $g>tar_out_opts ($directory, $tarfile [, compress => $compress] [, numericowner => $numericowner] [, excludes => $excludes])This is an alias of tar_out. $g>tgz_in ($tarball, $directory)This command uploads and unpacks local file \*(C`tarball\*(C'\fR (a ​gzip compressed tar file) into \*(C`directory\*(C'\fR. This function is deprecated. In new code, use the tar_in call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>tgz_out ($directory, $tarball)This command packs the contents of \*(C`directory\*(C'\fR and downloads it to local file \*(C`tarball\*(C'\fR. This function is deprecated. In new code, use the tar_out call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>touch ($path)Touch acts like the touch(1) command. It can be used to update the timestamps on a file, or, if the file does not exist, to create a new zero-length file. This command only works on regular files, and will fail on other file types such as directories, symbolic links, block special etc. $g>truncate ($path)This command truncates \*(C`path\*(C'\fR to a zero-length file. The file must exist already. $g>truncate_size ($path, $size)This command truncates \*(C`path\*(C'\fR to size \f(CW\*(C`size\*(C'\fR bytes. The file must exist already. If the current file size is less than \*(C`size\*(C'\fR then the file is extended to the required size with zero bytes. This creates a sparse file (ie. disk blocks are not allocated for the file until you write to it). To create a non-sparse file of zeroes, use \*(C`$g\->fallocate64\*(C'\fR instead. $g>tune2fs ($device [, force => $force] [, maxmountcount => $maxmountcount] [, mountcount => $mountcount] [, errorbehavior => $errorbehavior] [, group => $group] [, intervalbetweenchecks => $intervalbetweenchecks] [, reservedblockspercentage => $reservedblockspercentage] [, lastmounteddirectory => $lastmounteddirectory] [, reservedblockscount => $reservedblockscount] [, user => $user])This call allows you to adjust various filesystem parameters of an ext2/ext3/ext4 filesystem called \*(C`device\*(C'\fR. The optional parameters are: force Force tune2fs to complete the operation even in the face of errors. This is the same as the tune2fs \*(C`\-f\*(C'\fR option. maxmountcount Set the number of mounts after which the filesystem is checked by e2fsck(8). If this is 0 then the number of mounts is disregarded. This is the same as the tune2fs \*(C`\-c\*(C'\fR option. mountcount Set the number of times the filesystem has been mounted. This is the same as the tune2fs \*(C`\-C\*(C'\fR option. errorbehavior Change the behavior of the kernel code when errors are detected. Possible values currently are: \*(C`continue\*(C'\fR, \f(CW\*(C`remount\-ro\*(C'\fR, \f(CW\*(C`panic\*(C'\fR. In practice these options don't really make any difference, particularly for write errors. This is the same as the tune2fs \*(C`\-e\*(C'\fR option. group Set the group which can use reserved filesystem blocks. This is the same as the tune2fs \*(C`\-g\*(C'\fR option except that it can only be specified as a number. intervalbetweenchecks Adjust the maximal time between two filesystem checks (in seconds). If the option is passed as 0 then time-dependent checking is disabled. This is the same as the tune2fs \*(C`\-i\*(C'\fR option. reservedblockspercentage Set the percentage of the filesystem which may only be allocated by privileged processes. This is the same as the tune2fs \*(C`\-m\*(C'\fR option. lastmounteddirectory Set the last mounted directory. This is the same as the tune2fs \*(C`\-M\*(C'\fR option. reservedblockscount Set the number of reserved filesystem blocks. This is the same as the tune2fs −r option. user Set the user who can use the reserved filesystem blocks. This is the same as the tune2fs \*(C`\-u\*(C'\fR option except that it can only be specified as a number. To get the current values of filesystem parameters, see ​\*(C`$g\->tune2fs_l\*(C'\fR. For precise details of how tune2fs works, see the tune2fs(8) man page. %superblock = $g>tune2fs_l ($device)This returns the contents of the ext2, ext3 or ext4 filesystem superblock on \*(C`device\*(C'\fR. It is the same as running \*(C`tune2fs \-l device\*(C'\fR. See \fItune2fs\fR\|(8) manpage for more details. The list of fields returned isn't clearly defined, and depends on both the version of \*(C`tune2fs\*(C'\fR that libguestfs was built against, and the filesystem itself. $g>txz_in ($tarball, $directory)This command uploads and unpacks local file \*(C`tarball\*(C'\fR (an ​xz compressed tar file) into \*(C`directory\*(C'\fR. This function is deprecated. In new code, use the tar_in call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>txz_out ($directory, $tarball)This command packs the contents of \*(C`directory\*(C'\fR and downloads it to local file \*(C`tarball\*(C'\fR (as an xz compressed tar archive). This function is deprecated. In new code, use the tar_out call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $oldmask = $g>umask ($mask)This function sets the mask used for creating new files and device nodes to \*(C`mask & 0777\*(C'\fR. Typical umask values would be 022 which creates new files with permissions like −rw−r\*(--r\-\-\*(R" or \*(L"\-rwxr\-xr\-x\*(R", and ​002 which creates new files with permissions like ​−rw−rw−r−− or −rwxrwxr−x. The default umask is 022. This is important because it means that directories and device nodes will be created with ​0644 or 0755 mode even if you specify 0777. See also \*(C`$g\->get_umask\*(C'\fR, ​umask(2), \*(C`$g\->mknod\*(C'\fR, \f(CW\*(C`$g\->mkdir\*(C'\fR. This call returns the previous umask. $g>umount ($pathordevice [, force => $force] [, lazyunmount => $lazyunmount])This unmounts the given filesystem. The filesystem may be specified either by its mountpoint (path) or the device which contains the filesystem. $g>umount_opts ($pathordevice [, force => $force] [, lazyunmount => $lazyunmount])This is an alias of umount. $g>umount_all ()This unmounts all mounted filesystems. Some internal mounts are not unmounted by this call. $g>umount_local ([retry => $retry])If libguestfs is exporting the filesystem on a local mountpoint, then this unmounts it. See MOUNT LOCAL in guestfs(3) for full documentation. $g>upload ($filename, $remotefilename)Upload local file \*(C`filename\*(C'\fR to \f(CW\*(C`remotefilename\*(C'\fR on the filesystem. \*(C`filename\*(C'\fR can also be a named pipe. See also \*(C`$g\->download\*(C'\fR. $g>upload_offset ($filename, $remotefilename, $offset)Upload local file \*(C`filename\*(C'\fR to \f(CW\*(C`remotefilename\*(C'\fR on the filesystem. \*(C`remotefilename\*(C'\fR is overwritten starting at the byte \f(CW\*(C`offset\*(C'\fR specified. The intention is to overwrite parts of existing files or devices, although if a non-existent file is specified then it is created with a hole before \*(C`offset\*(C'\fR. The size of the data written is implicit in the size of the source \*(C`filename\*(C'\fR. Note that there is no limit on the amount of data that can be uploaded with this call, unlike with \*(C`$g\->pwrite\*(C'\fR, and this call always writes the full amount unless an error occurs. See also \*(C`$g\->upload\*(C'\fR, \f(CW\*(C`$g\->pwrite\*(C'\fR. $g>user_cancel ()This function cancels the current upload or download operation. Unlike most other libguestfs calls, this function is signal safe and thread safe. You can call it from a signal handler or from another thread, without needing to do any locking. The transfer that was in progress (if there is one) will stop shortly afterwards, and will return an error. The errno (see ​guestfs_last_errno) is set to \*(C`EINTR\*(C'\fR, so you can test for this to find out if the operation was cancelled or failed because of another error. No cleanup is performed: for example, if a file was being uploaded then after cancellation there may be a partially uploaded file. It is the caller's responsibility to clean up if necessary. There are two common places that you might call \*(C`$g\->user_cancel\*(C'\fR: In an interactive text-based program, you might call it from a ​\*(C`SIGINT\*(C'\fR signal handler so that pressing \f(CW\*(C`^C\*(C'\fR cancels the current operation. (You also need to call guestfs_set_pgroup so that child processes don't receive the \*(C`^C\*(C'\fR signal). In a graphical program, when the main thread is displaying a progress bar with a cancel button, wire up the cancel button to call this function. $g>utimens ($path, $atsecs, $atnsecs, $mtsecs, $mtnsecs)This command sets the timestamps of a file with nanosecond precision. \*(C`atsecs, atnsecs\*(C'\fR are the last access time (atime) in secs and nanoseconds from the epoch. \*(C`mtsecs, mtnsecs\*(C'\fR are the last modification time (mtime) in secs and nanoseconds from the epoch. If the *nsecs field contains the special value \*(C`\-1\*(C'\fR then the corresponding timestamp is set to the current time. (The ​*secs field is ignored in this case). If the *nsecs field contains the special value \*(C`\-2\*(C'\fR then the corresponding timestamp is left unchanged. (The ​*secs field is ignored in this case). %uts = $g>utsname ()This returns the kernel version of the appliance, where this is available. This information is only useful for debugging. Nothing in the returned structure is defined by the API. %version = $g>version ()Return the libguestfs version number that the program is linked against. Note that because of dynamic linking this is not necessarily the version of libguestfs that you compiled against. You can compile the program, and then at runtime dynamically link against a completely different \*(C`libguestfs.so\*(C'\fR library. This call was added in version 1.0.58. In previous versions of libguestfs there was no way to get the version number. From C code you can use dynamic linker functions to find out if this symbol exists (if it doesn't, then it's an earlier version). The call returns a structure with four elements. The first three (\*(C`major\*(C'\fR, \f(CW\*(C`minor\*(C'\fR and \f(CW\*(C`release\*(C'\fR) are numbers and correspond to the usual version triplet. The fourth element (\*(C`extra\*(C'\fR) is a string and is normally empty, but may be used for distro-specific information. To construct the original version string: ​\*(C`$major.$minor.$release$extra\*(C'\fR See also: LIBGUESTFS VERSION NUMBERS in guestfs(3). Note: Don't use this call to test for availability of features. In enterprise distributions we backport features from later versions into earlier versions, making this an unreliable way to test for features. Use \*(C`$g\->available\*(C'\fR instead. $label = $g>vfs_label ($device)This returns the filesystem label of the filesystem on ​\*(C`device\*(C'\fR. If the filesystem is unlabeled, this returns the empty string. To find a filesystem from the label, use \*(C`$g\->findfs_label\*(C'\fR. $fstype = $g>vfs_type ($device)This command gets the filesystem type corresponding to the filesystem on \*(C`device\*(C'\fR. For most filesystems, the result is the name of the Linux ​VFS module which would be used to mount this filesystem if you mounted it without specifying the filesystem type. For example a string such as \*(C`ext3\*(C'\fR or \f(CW\*(C`ntfs\*(C'\fR. $uuid = $g>vfs_uuid ($device)This returns the filesystem UUID of the filesystem on ​\*(C`device\*(C'\fR. If the filesystem does not have a UUID, this returns the empty string. To find a filesystem from the UUID, use \*(C`$g\->findfs_uuid\*(C'\fR. $g>vg_activate ($activate, \@volgroups)This command activates or (if \*(C`activate\*(C'\fR is false) deactivates all logical volumes in the listed volume groups \*(C`volgroups\*(C'\fR. This command is the same as running \*(C`vgchange \-a y|n volgroups...\*(C'\fR Note that if \*(C`volgroups\*(C'\fR is an empty list then \fBall\fR volume groups are activated or deactivated. $g>vg_activate_all ($activate)This command activates or (if \*(C`activate\*(C'\fR is false) deactivates all logical volumes in all volume groups. This command is the same as running \*(C`vgchange \-a y|n\*(C'\fR $g>vgchange_uuid ($vg)Generate a new random UUID for the volume group \*(C`vg\*(C'\fR. $g>vgchange_uuid_all ()Generate new random UUIDs for all volume groups. $g>vgcreate ($volgroup, \@physvols)This creates an LVM volume group called \*(C`volgroup\*(C'\fR from the non-empty list of physical volumes \*(C`physvols\*(C'\fR. @uuids = $g>vglvuuids ($vgname)Given a VG called \*(C`vgname\*(C'\fR, this returns the UUIDs of all the logical volumes created in this volume group. You can use this along with \*(C`$g\->lvs\*(C'\fR and \f(CW\*(C`$g\->lvuuid\*(C'\fR calls to associate logical volumes and volume groups. See also \*(C`$g\->vgpvuuids\*(C'\fR. $metadata = $g>vgmeta ($vgname)\*(C`vgname\*(C'\fR is an \s-1LVM\s0 volume group. This command examines the volume group and returns its metadata. Note that the metadata is an internal structure used by LVM, subject to change at any time, and is provided for information only. @uuids = $g>vgpvuuids ($vgname)Given a VG called \*(C`vgname\*(C'\fR, this returns the UUIDs of all the physical volumes that this volume group resides on. You can use this along with \*(C`$g\->pvs\*(C'\fR and \f(CW\*(C`$g\->pvuuid\*(C'\fR calls to associate physical volumes and volume groups. See also \*(C`$g\->vglvuuids\*(C'\fR. $g>vgremove ($vgname)Remove an LVM volume group \*(C`vgname\*(C'\fR, (for example \f(CW\*(C`VG\*(C'\fR). This also forcibly removes all logical volumes in the volume group (if any). $g>vgrename ($volgroup, $newvolgroup)Rename a volume group \*(C`volgroup\*(C'\fR with the new name \f(CW\*(C`newvolgroup\*(C'\fR. @volgroups = $g>vgs ()List all the volumes groups detected. This is the equivalent of the vgs(8) command. This returns a list of just the volume group names that were detected (eg. \*(C`VolGroup00\*(C'\fR). See also \*(C`$g\->vgs_full\*(C'\fR. @volgroups = $g>vgs_full ()List all the volumes groups detected. This is the equivalent of the vgs(8) command. The full version includes all fields. $g>vgscan ()This rescans all block devices and rebuilds the list of LVM physical volumes, volume groups and logical volumes. $uuid = $g>vguuid ($vgname)This command returns the UUID of the LVM VG named \*(C`vgname\*(C'\fR. $g>wait_ready ()This function is a no op. In versions of the API < 1.0.71 you had to call this function just after calling \*(C`$g\->launch\*(C'\fR to wait for the launch to complete. However this is no longer necessary because ​\*(C`$g\->launch\*(C'\fR now does the waiting. If you see any calls to this function in code then you can just remove them, unless you want to retain compatibility with older versions of the API. This function is deprecated. In new code, use the launch call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $chars = $g>wc_c ($path)This command counts the characters in a file, using the ​\*(C`wc \-c\*(C'\fR external command. $lines = $g>wc_l ($path)This command counts the lines in a file, using the ​\*(C`wc \-l\*(C'\fR external command. $words = $g>wc_w ($path)This command counts the words in a file, using the ​\*(C`wc \-w\*(C'\fR external command. $g>wipefs ($device)This command erases filesystem or RAID signatures from the specified \*(C`device\*(C'\fR to make the filesystem invisible to libblkid. This does not erase the filesystem itself nor any other data from the ​\*(C`device\*(C'\fR. Compare with \*(C`$g\->zero\*(C'\fR which zeroes the first few blocks of a device. $g>write ($path, $content)This call creates a file called \*(C`path\*(C'\fR. The content of the file is the string \*(C`content\*(C'\fR (which can contain any 8 bit data). See also \*(C`$g\->write_append\*(C'\fR. $g>write_append ($path, $content)This call appends \*(C`content\*(C'\fR to the end of file \f(CW\*(C`path\*(C'\fR. If ​\*(C`path\*(C'\fR does not exist, then a new file is created. See also \*(C`$g\->write\*(C'\fR. $g>write_file ($path, $content, $size)This call creates a file called \*(C`path\*(C'\fR. The contents of the file is the string \*(C`content\*(C'\fR (which can contain any 8 bit data), with length \*(C`size\*(C'\fR. As a special case, if \*(C`size\*(C'\fR is \f(CW0\fR then the length is calculated using \*(C`strlen\*(C'\fR (so in this case the content cannot contain embedded ASCII NULs). NB. Owing to a bug, writing content containing ASCII NUL characters does not work, even if the length is specified. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the write call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>xfs_admin ($device [, extunwritten => $extunwritten] [, imgfile => $imgfile] [, v2log => $v2log] [, projid32bit => $projid32bit] [, lazycounter => $lazycounter] [, label => $label] [, uuid => $uuid])Change the parameters of the XFS filesystem on \*(C`device\*(C'\fR. Devices that are mounted cannot be modified. Administrators must unmount filesystems before this call can modify parameters. Some of the parameters of a mounted filesystem can be examined and modified using the \*(C`$g\->xfs_info\*(C'\fR and ​\*(C`$g\->xfs_growfs\*(C'\fR calls. $g>xfs_growfs ($path [, datasec => $datasec] [, logsec => $logsec] [, rtsec => $rtsec] [, datasize => $datasize] [, logsize => $logsize] [, rtsize => $rtsize] [, rtextsize => $rtextsize] [, maxpct => $maxpct])Grow the XFS filesystem mounted at \*(C`path\*(C'\fR. The returned struct contains geometry information. Missing fields are returned as \*(C`\-1\*(C'\fR (for numeric fields) or empty string. %info = $g>xfs_info ($pathordevice)\*(C`pathordevice\*(C'\fR is a mounted \s-1XFS\s0 filesystem or a device containing an XFS filesystem. This command returns the geometry of the filesystem. The returned struct contains geometry information. Missing fields are returned as \*(C`\-1\*(C'\fR (for numeric fields) or empty string. $status = $g>xfs_repair ($device [, forcelogzero => $forcelogzero] [, nomodify => $nomodify] [, noprefetch => $noprefetch] [, forcegeometry => $forcegeometry] [, maxmem => $maxmem] [, ihashsize => $ihashsize] [, bhashsize => $bhashsize] [, agstride => $agstride] [, logdev => $logdev] [, rtdev => $rtdev])Repair corrupt or damaged XFS filesystem on \*(C`device\*(C'\fR. The filesystem is specified using the \*(C`device\*(C'\fR argument which should be the device name of the disk partition or volume containing the filesystem. If given the name of a block device, \*(C`xfs_repair\*(C'\fR will attempt to find the raw device associated with the specified block device and will use the raw device instead. Regardless, the filesystem to be repaired must be unmounted, otherwise, the resulting filesystem may be inconsistent or corrupt. The returned status indicates whether filesystem corruption was detected (returns 1) or was not detected (returns 0). @lines = $g>zegrep ($regex, $path)This calls the external \*(C`zegrep\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. @lines = $g>zegrepi ($regex, $path)This calls the external \*(C`zegrep \-i\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $g>zero ($device)This command writes zeroes over the first few blocks of \*(C`device\*(C'\fR. How many blocks are zeroed isn't specified (but it's not enough to securely wipe the device). It should be sufficient to remove any partition tables, filesystem superblocks and so on. If blocks are already zero, then this command avoids writing zeroes. This prevents the underlying device from becoming non-sparse or growing unnecessarily. See also: \*(C`$g\->zero_device\*(C'\fR, \f(CW\*(C`$g\->scrub_device\*(C'\fR, ​\*(C`$g\->is_zero_device\*(C'\fR $g>zero_device ($device)This command writes zeroes over the entire \*(C`device\*(C'\fR. Compare with \*(C`$g\->zero\*(C'\fR which just zeroes the first few blocks of a device. If blocks are already zero, then this command avoids writing zeroes. This prevents the underlying device from becoming non-sparse or growing unnecessarily. $g>zero_free_space ($directory)Zero the free space in the filesystem mounted on \*(C`directory\*(C'\fR. The filesystem must be mounted read-write. The filesystem contents are not affected, but any free space in the filesystem is freed. Free space is not trimmed. You may want to call ​\*(C`$g\->fstrim\*(C'\fR either as an alternative to this, or after calling this, depending on your requirements. $g>zerofree ($device)This runs the zerofree program on \*(C`device\*(C'\fR. This program claims to zero unused inodes and disk blocks on an ext2/3 filesystem, thus making it possible to compress the filesystem more effectively. You should not run this program if the filesystem is mounted. It is possible that using this program can damage the filesystem or data on the filesystem. @lines = $g>zfgrep ($pattern, $path)This calls the external \*(C`zfgrep\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. @lines = $g>zfgrepi ($pattern, $path)This calls the external \*(C`zfgrep \-i\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. $description = $g>zfile ($meth, $path)This command runs \*(C`file\*(C'\fR after first decompressing \f(CW\*(C`path\*(C'\fR using \*(C`method\*(C'\fR. \*(C`method\*(C'\fR must be one of \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`compress\*(C'\fR or \f(CW\*(C`bzip2\*(C'\fR. Since 1.0.63, use \*(C`$g\->file\*(C'\fR instead which can now process compressed files. This function is deprecated. In new code, use the file call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. @lines = $g>zgrep ($regex, $path)This calls the external \*(C`zgrep\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions. @lines = $g>zgrepi ($regex, $path)This calls the external \*(C`zgrep \-i\*(C'\fR program and returns the matching lines. Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See PROTOCOL LIMITS in guestfs(3). This function is deprecated. In new code, use the grep call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems with correct use of these functions.

AVAILABILITYFrom time to time we add new libguestfs APIs. Also some libguestfs APIs won't be available in all builds of libguestfs (the Fedora build is full-featured, but other builds may disable features). How do you test whether the APIs that your Perl program needs are available in the version of \*(C`Sys::Guestfs\*(C'\fR that you are using? To test if a particular function is available in the \*(C`Sys::Guestfs\*(C'\fR class, use the ordinary Perl UNIVERSAL method \*(C`can(METHOD)\*(C'\fR (see perlobj(1)). For example: ​ use Sys::Guestfs; ​ if (defined (Sys::Guestfs−>can ("set_verbose"))) { ​ print "\$g−>set_verbose is available\n"; ​ } Perl does not offer a way to list the arguments of a method, and from time to time we may add extra arguments to calls that take optional arguments. For this reason, we provide a global hash variable %guestfs_introspection which contains the arguments and their types for each libguestfs method. The keys of this hash are the method names, and the values are an hashref containing useful introspection information about the method (further fields may be added to this in future). ​ use Sys::Guestfs; ​ $Sys::Guestfs::guestfs_introspection{mkfs} ​ => { ​ ret => 'void', # return type ​ args => [ # required arguments ​ [ 'fstype', 'string', 0 ], ​ [ 'device', 'string(device)', 1 ], ​ ], ​ optargs => { # optional arguments ​ blocksize => [ 'blocksize', 'int', 0 ], ​ features => [ 'features', 'string', 1 ], ​ inode => [ 'inode', 'int', 2 ], ​ sectorsize => [ 'sectorsize', 'int', 3 ], ​ }, ​ name => "mkfs", ​ description => "make a filesystem", ​ } To test if particular features are supported by the current build, use the available method like the example below. Note that the appliance must be launched first. ​ $g−>available ( ["augeas"] ); Since the available method croaks if the feature is not supported, you might also want to wrap this in an eval and return a boolean. In fact this has already been done for you: use ​feature_available in Sys::Guestfs::Lib(3). For further discussion on this topic, refer to ​AVAILABILITY in guestfs(3).

STORING DATA IN THE HANDLEThe handle returned from new is a hash reference. The hash normally contains some elements: { ​ _g => [private data used by libguestfs], ​ _flags => [flags provided when creating the handle]} Callers can add other elements to this hash to store data for their own purposes. The data lasts for the lifetime of the handle. Any fields whose names begin with an underscore are reserved for private use by libguestfs. We may add more in future. It is recommended that callers prefix the name of their field(s) with some unique string, to avoid conflicts with other users.

COPYRIGHTCopyright (C) 2009−2017 Red Hat Inc.

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

SEE ALSOguestfs(3), ​guestfish(1), <http://libguestfs.org>, ​Sys::Guestfs::Lib(3).
0
Johanes Gumabo
Data Size   :   883,092 byte
man-Sys::Guestfs.3pmBuild   :   2024-12-29, 07:25   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 261,698
Visitor ID   :     :  
Visitor IP   :   3.128.199.242   :  
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.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|Sys::Guestfs.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|252|Sys::Guestfs.3pm|41|br══─}─══|'br══─}─══ )         (htmlprn|149|Sys::Guestfs.3pm|41|'br══─}─══ |'br══─}─══ )         (rof_nr_x|149|Sys::Guestfs.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (rof_unit_scale_px|41|Sys::Guestfs.3pm|51/52|F|.ie \nF ══─{─══. de IX )         (rof_if|19|Sys::Guestfs.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (htmlprn|149|Sys::Guestfs.3pm|51/52|.ie \nF ══─{─══. de IX|.ie \nF ══─{─══. de IX )         (rof_escape_sequence|91|Sys::Guestfs.3pm|53|\$1\t\\n%\t"\\$2" |. tm Index:\\$1\t\\n%\t"\\$2" )         (parse_manual_page_|252|Sys::Guestfs.3pm|57|══─}─══|.══─}─══ )         (htmlprn|149|Sys::Guestfs.3pm|57|.══─}─══ |.══─}─══ )         (rof_escape_sequence|91|Sys::Guestfs.3pm|149|\*(C`Sys::Guestfs\*(C'\fR module provides a Perl \s-1XS\s0 binding to the |The \f(CW\*(C`Sys::Guestfs\*(C'\fR module provides a Perl \s-1XS\s0 binding to the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|175|\*(C`croak\*(C'\fR (see \fICarp\fR\|(3)). |All errors turn into calls to \f(CW\*(C`croak\*(C'\fR (see \fICarp\fR\|(3)). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|178|\*(C`last_errno\*(C'\fR method if you want to get the errno. |\&\f(CW$@\fR. Use the \f(CW\*(C`last_errno\*(C'\fR method if you want to get the errno. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|186|\*(C`environment\*(C'\fR is false, then |If the optional argument \f(CW\*(C`environment\*(C'\fR is false, then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|187|\*(C`GUESTFS_CREATE_NO_ENVIRONMENT\*(C'\fR flag is set. |the \f(CW\*(C`GUESTFS_CREATE_NO_ENVIRONMENT\*(C'\fR flag is set. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|189|\*(C`close_on_exit\*(C'\fR is false, then |If the optional argument \f(CW\*(C`close_on_exit\*(C'\fR is false, then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|190|\*(C`GUESTFS_CREATE_NO_CLOSE_ON_EXIT\*(C'\fR flag is set. |the \f(CW\*(C`GUESTFS_CREATE_NO_CLOSE_ON_EXIT\*(C'\fR flag is set. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|202|\*(C`close\*(C'\fR the program must not call any method (including \f(CW\*(C`close\*(C'\fR) |\&\f(CW\*(C`close\*(C'\fR the program must not call any method (including \f(CW\*(C`close\*(C'\fR) )         (rof_escape_sequence|91|Sys::Guestfs.3pm|203|\*(C`DESTROY\*(C'\fR that happens |on the handle (but the implicit call to \f(CW\*(C`DESTROY\*(C'\fR that happens )         (rof_escape_sequence|91|Sys::Guestfs.3pm|248|\*(C`cb\*(C'\fR as a callback function for all of the events |Register \f(CW\*(C`cb\*(C'\fR as a callback function for all of the events )         (rof_escape_sequence|91|Sys::Guestfs.3pm|249|\*(C`$Sys::Guestfs::EVENT_*\*(C'\fR flags |in \f(CW$event_bitmask\fR (one or more \f(CW\*(C`$Sys::Guestfs::EVENT_*\*(C'\fR flags )         (rof_escape_sequence|91|Sys::Guestfs.3pm|253|\*(C`delete_event_callback\*(C'\fR. |can be used to delete the callback using \f(CW\*(C`delete_event_callback\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|264|\*(C`$Sys::Guestfs::EVENT_*\*(C'\fR). |The event which happened (equal to one of \f(CW\*(C`$Sys::Guestfs::EVENT_*\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|289|\*(C`set_event_callback\*(C'\fR. |\&\f(CW\*(C`set_event_callback\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|316|\*(C`dir\*(C'\fR. |attached to directory \f(CW\*(C`dir\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|321|\*(C`path\*(C'\fR. The \s-1ACL\s0 is returned in \*(L"long text form\*(R" (see \fIacl\fR\|(5)). |to \f(CW\*(C`path\*(C'\fR. The \s-1ACL\s0 is returned in \*(L"long text form\*(R" (see \fIacl\fR\|(5)). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|323|\*(C`acltype\*(C'\fR parameter may be: |The \f(CW\*(C`acltype\*(C'\fR parameter may be: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|334|\*(C`path\*(C'\fR is a directory. |\&\f(CW\*(C`path\*(C'\fR is a directory. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|342|\*(C`path\*(C'\fR. |to \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|344|\*(C`acltype\*(C'\fR parameter may be: |The \f(CW\*(C`acltype\*(C'\fR parameter may be: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|355|\*(C`path\*(C'\fR is a directory. |\&\f(CW\*(C`path\*(C'\fR is a directory. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|359|\*(C`acl\*(C'\fR parameter is the new \s-1ACL\s0 in either \*(L"long text form\*(R" |The \f(CW\*(C`acl\*(C'\fR parameter is the new \s-1ACL\s0 in either \*(L"long text form\*(R" )         (rof_escape_sequence|91|Sys::Guestfs.3pm|362|\*(C`u::rwx,g::rx,o::rx\*(C'\fR). |full Unix permissions (eg. \f(CW\*(C`u::rwx,g::rx,o::rx\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|365|\*(C`m::rwx\*(C'\fR), followed by the |mask field is also required (eg. \f(CW\*(C`m::rwx\*(C'\fR), followed by the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|366|\*(C`u:\f(CIID\f(CW:...\*(C'\fR and/or \f(CW\*(C`g:\f(CIID\f(CW:...\*(C'\fR field(s). A full \s-1ACL\s0 |\&\f(CW\*(C`u:\f(CIID\f(CW:...\*(C'\fR and/or \f(CW\*(C`g:\f(CIID\f(CW:...\*(C'\fR field(s). A full \s-1ACL\s0 )         (rof_escape_sequence|91|Sys::Guestfs.3pm|376|\*(C`$g\->aug_init\*(C'\fR). |guest, use the Augeas functions (see \f(CW\*(C`$g\->aug_init\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|384|\*(C`$g\->add_drive_ro\*(C'\fR instead. |read-only disk images. Use \f(CW\*(C`$g\->add_drive_ro\*(C'\fR instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|396|\*(C`dom\*(C'\fR. It works by connecting to libvirt, requesting |domain \f(CW\*(C`dom\*(C'\fR. It works by connecting to libvirt, requesting )         (rof_escape_sequence|91|Sys::Guestfs.3pm|398|\*(C`$g\->add_drive_opts\*(C'\fR on each one. |and calling \f(CW\*(C`$g\->add_drive_opts\*(C'\fR on each one. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|404|\*(C`readonly\*(C'\fR is true). In a future |domain is not running (unless \f(CW\*(C`readonly\*(C'\fR is true). In a future )         (rof_escape_sequence|91|Sys::Guestfs.3pm|412|\*(C`libvirturi\*(C'\fR parameter sets the libvirt \s-1URI\s0 |The optional \f(CW\*(C`libvirturi\*(C'\fR parameter sets the libvirt \s-1URI\s0 )         (rof_escape_sequence|91|Sys::Guestfs.3pm|418|\*(C`live\*(C'\fR flag controls whether this call will try |The optional \f(CW\*(C`live\*(C'\fR flag controls whether this call will try )         (rof_escape_sequence|91|Sys::Guestfs.3pm|419|\*(C`guestfsd\*(C'\fR process if |to connect to a running virtual machine \f(CW\*(C`guestfsd\*(C'\fR process if )         (rof_escape_sequence|91|Sys::Guestfs.3pm|425|\*(C`allowuuid\*(C'\fR flag is true (default is false) then a \s-1UUID\s0 |If the \f(CW\*(C`allowuuid\*(C'\fR flag is true (default is false) then a \s-1UUID\s0 )         (rof_escape_sequence|91|Sys::Guestfs.3pm|426|\*(C`dom\*(C'\fR string is |\&\fImay\fR be passed instead of the domain name. The \f(CW\*(C`dom\*(C'\fR string is )         (rof_escape_sequence|91|Sys::Guestfs.3pm|428|\*(C`dom\*(C'\fR as a name as usual. |then we treat \f(CW\*(C`dom\*(C'\fR as a name as usual. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|430|\*(C`readonlydisk\*(C'\fR parameter controls what we do for |The optional \f(CW\*(C`readonlydisk\*(C'\fR parameter controls what we do for )         (rof_escape_sequence|91|Sys::Guestfs.3pm|437|\*(C`readonly\*(C'\fR is false: |If \f(CW\*(C`readonly\*(C'\fR is false: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|442|\*(C`readonly\*(C'\fR is true: |If \f(CW\*(C`readonly\*(C'\fR is true: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|448|\*(C`readonly\*(C'\fR is false: |If \f(CW\*(C`readonly\*(C'\fR is false: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|453|\*(C`readonly\*(C'\fR is true: |If \f(CW\*(C`readonly\*(C'\fR is true: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|459|\*(C`readonly\*(C'\fR is false: |If \f(CW\*(C`readonly\*(C'\fR is false: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|463|\*(C`readonly\*(C'\fR is true: |If \f(CW\*(C`readonly\*(C'\fR is true: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|469|\*(C`readonly\*(C'\fR is true or false: |If \f(CW\*(C`readonly\*(C'\fR is true or false: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|476|\*(C`$g\->add_drive_opts\*(C'\fR. |\&\f(CW\*(C`$g\->add_drive_opts\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|481|\*(C`filename\*(C'\fR to the handle. |This function adds a disk image called \f(CW\*(C`filename\*(C'\fR to the handle. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|482|\*(C`filename\*(C'\fR may be a regular host file or a host device. |\&\f(CW\*(C`filename\*(C'\fR may be a regular host file or a host device. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|484|\*(C`$g\->launch\*(C'\fR (the |When this function is called before \f(CW\*(C`$g\->launch\*(C'\fR (the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|486|\*(C`/dev/sda\*(C'\fR, the second time |the disk appears in the \s-1API\s0 as \f(CW\*(C`/dev/sda\*(C'\fR, the second time )         (rof_escape_sequence|91|Sys::Guestfs.3pm|487|\*(C`/dev/sdb\*(C'\fR, and so on. |as \f(CW\*(C`/dev/sdb\*(C'\fR, and so on. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|492|\*(C`label\*(C'\fR so that the new disk gets a predictable name. |\&\f(CW\*(C`label\*(C'\fR so that the new disk gets a predictable name. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|501|\*(C`filename\*(C'\fR exists. |This call checks that \f(CW\*(C`filename\*(C'\fR exists. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|503|\*(C`filename\*(C'\fR may be the special string \f(CW"/dev/null"\fR. |\&\f(CW\*(C`filename\*(C'\fR may be the special string \f(CW"/dev/null"\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|517|\*(C`$g\->add_drive\*(C'\fR |This forces the image format. If you omit this (or use \f(CW\*(C`$g\->add_drive\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|518|\*(C`$g\->add_drive_ro\*(C'\fR) then the format is automatically detected. |or \f(CW\*(C`$g\->add_drive_ro\*(C'\fR) then the format is automatically detected. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|519|\*(C`raw\*(C'\fR and \f(CW\*(C`qcow2\*(C'\fR. |Possible formats include \f(CW\*(C`raw\*(C'\fR and \f(CW\*(C`qcow2\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|529|\*(C`$g\->add_drive_with_if\*(C'\fR call (q.v.) |deprecated \f(CW\*(C`$g\->add_drive_with_if\*(C'\fR call (q.v.) )         (rof_escape_sequence|91|Sys::Guestfs.3pm|533|\*(C`/dev/sdb\*(C'\fR. |The name the drive had in the original guest, e.g. \f(CW\*(C`/dev/sdb\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|540|\*(C`[a\-zA\-Z]\*(C'\fR. |string using \fIonly\fR \s-1ASCII\s0 characters \f(CW\*(C`[a\-zA\-Z]\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|541|\*(C`/dev/sda\*(C'\fR), |As well as its usual name in the \s-1API\s0 (such as \f(CW\*(C`/dev/sda\*(C'\fR), )         (rof_escape_sequence|91|Sys::Guestfs.3pm|542|\*(C`/dev/disk/guestfs/\f(CIlabel\f(CW\*(C'\fR. |the drive will also be named \f(CW\*(C`/dev/disk/guestfs/\f(CIlabel\f(CW\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|583|\*(C`$g\->add_drive_opts\*(C'\fR |This function is the equivalent of calling \f(CW\*(C`$g\->add_drive_opts\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|584|\*(C`GUESTFS_ADD_DRIVE_OPTS_READONLY\*(C'\fR set to 1, |with the optional parameter \f(CW\*(C`GUESTFS_ADD_DRIVE_OPTS_READONLY\*(C'\fR set to 1, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|590|\*(C`$g\->add_drive_ro\*(C'\fR but it allows you |This is the same as \f(CW\*(C`$g\->add_drive_ro\*(C'\fR but it allows you )         (rof_escape_sequence|91|Sys::Guestfs.3pm|602|\*(C`$g\->add_drive\*(C'\fR but it allows you |This is the same as \f(CW\*(C`$g\->add_drive\*(C'\fR but it allows you )         (rof_escape_sequence|91|Sys::Guestfs.3pm|614|\*(C`path\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR. This |Set the value associated with \f(CW\*(C`path\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR. This )         (rof_escape_sequence|91|Sys::Guestfs.3pm|615|\*(C`clear\*(C'\fR command. |is the same as the \fIaugtool\fR\|(1) \f(CW\*(C`clear\*(C'\fR command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|621|\*(C`$g\->aug_init\*(C'\fR again before you can use any other |\&\f(CW\*(C`$g\->aug_init\*(C'\fR again before you can use any other )         (rof_escape_sequence|91|Sys::Guestfs.3pm|626|\*(C`name\*(C'\fR whose value is the result of |Defines a variable \f(CW\*(C`name\*(C'\fR whose value is the result of )         (rof_escape_sequence|91|Sys::Guestfs.3pm|627|\*(C`expr\*(C'\fR. |evaluating \f(CW\*(C`expr\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|629|\*(C`expr\*(C'\fR evaluates to an empty nodeset, a node is created, |If \f(CW\*(C`expr\*(C'\fR evaluates to an empty nodeset, a node is created, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|630|\*(C`$g\->aug_set\*(C'\fR \f(CW\*(C`expr\*(C'\fR, \f(CW\*(C`value\*(C'\fR. |equivalent to calling \f(CW\*(C`$g\->aug_set\*(C'\fR \f(CW\*(C`expr\*(C'\fR, \f(CW\*(C`value\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|631|\*(C`name\*(C'\fR will be the nodeset containing that single node. |\&\f(CW\*(C`name\*(C'\fR will be the nodeset containing that single node. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|639|\*(C`name\*(C'\fR whose value is the result |Defines an Augeas variable \f(CW\*(C`name\*(C'\fR whose value is the result )         (rof_escape_sequence|91|Sys::Guestfs.3pm|640|\*(C`expr\*(C'\fR. If \f(CW\*(C`expr\*(C'\fR is \s-1NULL\s0, then \f(CW\*(C`name\*(C'\fR is |of evaluating \f(CW\*(C`expr\*(C'\fR. If \f(CW\*(C`expr\*(C'\fR is \s-1NULL\s0, then \f(CW\*(C`name\*(C'\fR is )         (rof_escape_sequence|91|Sys::Guestfs.3pm|643|\*(C`expr\*(C'\fR, or |On success this returns the number of nodes in \f(CW\*(C`expr\*(C'\fR, or )         (rof_escape_sequence|91|Sys::Guestfs.3pm|644|\*(C`expr\*(C'\fR evaluates to something which is not a nodeset. |\&\f(CW0\fR if \f(CW\*(C`expr\*(C'\fR evaluates to something which is not a nodeset. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|648|\*(C`path\*(C'\fR. If \f(CW\*(C`path\*(C'\fR |Look up the value associated with \f(CW\*(C`path\*(C'\fR. If \f(CW\*(C`path\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|649|\*(C`value\*(C'\fR is returned. |matches exactly one node, the \f(CW\*(C`value\*(C'\fR is returned. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|657|\*(C`$g\->aug_*\*(C'\fR |You must call this before using any other \f(CW\*(C`$g\->aug_*\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|660|\*(C`root\*(C'\fR is the filesystem root. \f(CW\*(C`root\*(C'\fR must not be \s-1NULL\s0, |\&\f(CW\*(C`root\*(C'\fR is the filesystem root. \f(CW\*(C`root\*(C'\fR must not be \s-1NULL\s0, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|661|\*(C`/\*(C'\fR instead. |use \f(CW\*(C`/\*(C'\fR instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|670|\*(C`.augsave\*(C'\fR extension. |Keep the original file with a \f(CW\*(C`.augsave\*(C'\fR extension. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|674|\*(C`.augnew\*(C'\fR, and |Save changes into a file with extension \f(CW\*(C`.augnew\*(C'\fR, and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|675|\*(C`AUG_SAVE_BACKUP\*(C'\fR. |do not overwrite original. Overrides \f(CW\*(C`AUG_SAVE_BACKUP\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|683|\*(C`LIBGUESTFS_MEMSIZE\*(C'\fR |appliance. You may need to set the \f(CW\*(C`LIBGUESTFS_MEMSIZE\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|684|\*(C`$g\->set_memsize\*(C'\fR. |environment variable or call \f(CW\*(C`$g\->set_memsize\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|696|\*(C`$g\->aug_init\*(C'\fR. |Do not load the tree in \f(CW\*(C`$g\->aug_init\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|700|\*(C`$g\->aug_close\*(C'\fR. |To close the handle, you can call \f(CW\*(C`$g\->aug_close\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|707|\*(C`label\*(C'\fR for \f(CW\*(C`path\*(C'\fR, inserting it into |Create a new sibling \f(CW\*(C`label\*(C'\fR for \f(CW\*(C`path\*(C'\fR, inserting it into )         (rof_escape_sequence|91|Sys::Guestfs.3pm|708|\*(C`path\*(C'\fR (depending on the boolean |the tree before or after \f(CW\*(C`path\*(C'\fR (depending on the boolean )         (rof_escape_sequence|91|Sys::Guestfs.3pm|709|\*(C`before\*(C'\fR). |flag \f(CW\*(C`before\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|711|\*(C`path\*(C'\fR must match exactly one existing node in the tree, and |\&\f(CW\*(C`path\*(C'\fR must match exactly one existing node in the tree, and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|712|\*(C`label\*(C'\fR must be a label, ie. not contain \f(CW\*(C`/\*(C'\fR, \f(CW\*(C`*\*(C'\fR or end |\&\f(CW\*(C`label\*(C'\fR must be a label, ie. not contain \f(CW\*(C`/\*(C'\fR, \f(CW\*(C`*\*(C'\fR or end )         (rof_escape_sequence|91|Sys::Guestfs.3pm|713|\*(C`[N]\*(C'\fR. |with a bracketed index \f(CW\*(C`[N]\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|719|\*(C`aug_load\*(C'\fR in the Augeas documentation for the full gory |See \f(CW\*(C`aug_load\*(C'\fR in the Augeas documentation for the full gory )         (rof_escape_sequence|91|Sys::Guestfs.3pm|724|\*(C`$g\->aug_match\*(C'\fR |This is just a shortcut for listing \f(CW\*(C`$g\->aug_match\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|725|\*(C`path/*\*(C'\fR and sorting the resulting nodes into alphabetical order. |\&\f(CW\*(C`path/*\*(C'\fR and sorting the resulting nodes into alphabetical order. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|729|\*(C`path\*(C'\fR. |Returns a list of paths which match the path expression \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|735|\*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR. \f(CW\*(C`src\*(C'\fR must match exactly |Move the node \f(CW\*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR. \f(CW\*(C`src\*(C'\fR must match exactly )         (rof_escape_sequence|91|Sys::Guestfs.3pm|736|\*(C`dest\*(C'\fR is overwritten if it exists. |one node. \f(CW\*(C`dest\*(C'\fR is overwritten if it exists. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|740|\*(C`path\*(C'\fR and all of its children. |Remove \f(CW\*(C`path\*(C'\fR and all of its children. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|748|\*(C`$g\->aug_init\*(C'\fR affect exactly |The flags which were passed to \f(CW\*(C`$g\->aug_init\*(C'\fR affect exactly )         (rof_escape_sequence|91|Sys::Guestfs.3pm|753|\*(C`path\*(C'\fR to \f(CW\*(C`val\*(C'\fR. |Set the value associated with \f(CW\*(C`path\*(C'\fR to \f(CW\*(C`val\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|758|\*(C`$g\->aug_clear\*(C'\fR call. |\&\f(CW\*(C`$g\->aug_clear\*(C'\fR call. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|769|\*(C`$g\->available_all_groups\*(C'\fR. |\&\f(CW\*(C`$g\->available_all_groups\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|771|\*(C`groups\*(C'\fR is a list of group names, eg: |The argument \f(CW\*(C`groups\*(C'\fR is a list of group names, eg: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|772|\*(C`["inotify", "augeas"]\*(C'\fR would check for the availability of |\&\f(CW\*(C`["inotify", "augeas"]\*(C'\fR would check for the availability of )         (rof_escape_sequence|91|Sys::Guestfs.3pm|787|\*(C`$g\->launch\*(C'\fR before calling this function. |You must call \f(CW\*(C`$g\->launch\*(C'\fR before calling this function. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|806|\*(C`$g\->version\*(C'\fR. |See also \f(CW\*(C`$g\->version\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|810|\*(C`$g\->filesystem_available\*(C'\fR. |See also \f(CW\*(C`$g\->filesystem_available\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|818|\*(C`$g\->available\*(C'\fR on each member of the |you have to call \f(CW\*(C`$g\->available\*(C'\fR on each member of the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|821|\*(C`$g\->available\*(C'\fR and \*(L"\s-1AVAILABILITY\s0\*(R" in \fIguestfs\fR\|(3). |See also \f(CW\*(C`$g\->available\*(C'\fR and \*(L"\s-1AVAILABILITY\s0\*(R" in \fIguestfs\fR\|(3). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|825|\*(C`base64file\*(C'\fR |This command uploads base64\-encoded data from \f(CW\*(C`base64file\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|826|\*(C`filename\*(C'\fR. |to \f(CW\*(C`filename\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|830|\*(C`filename\*(C'\fR, writing |This command downloads the contents of \f(CW\*(C`filename\*(C'\fR, writing )         (rof_escape_sequence|91|Sys::Guestfs.3pm|831|\*(C`base64file\*(C'\fR encoded as base64. |it out to local file \f(CW\*(C`base64file\*(C'\fR encoded as base64. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|835|\*(C`device\*(C'\fR. The following fields are |This command returns block device attributes for \f(CW\*(C`device\*(C'\fR. The following fields are )         (rof_escape_sequence|91|Sys::Guestfs.3pm|857|\*(C`filesystem\*(C'\fR or \f(CW\*(C`raid\*(C'\fR. |The usage of this device, for example \f(CW\*(C`filesystem\*(C'\fR or \f(CW\*(C`raid\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|865|\*(C`device\*(C'\fR. |with \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|892|\*(C`$g\->blockdev_getsz\*(C'\fR. |See also \f(CW\*(C`$g\->blockdev_getsz\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|901|\*(C`$g\->blockdev_getsz\*(C'\fR |(Note, this is not the size in sectors, use \f(CW\*(C`$g\->blockdev_getsz\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|911|\*(C`$g\->blockdev_getss\*(C'\fR for the real sector size of |See also \f(CW\*(C`$g\->blockdev_getss\*(C'\fR for the real sector size of )         (rof_escape_sequence|91|Sys::Guestfs.3pm|912|\*(C`$g\->blockdev_getsize64\*(C'\fR for the more |the device, and \f(CW\*(C`$g\->blockdev_getsize64\*(C'\fR for the more )         (rof_escape_sequence|91|Sys::Guestfs.3pm|919|\*(C`device\*(C'\fR. |Reread the partition table on \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|929|\*(C`blocksize\*(C'\fR option of \f(CW\*(C`$g\->mkfs\*(C'\fR. |\&\f(CW\*(C`blocksize\*(C'\fR option of \f(CW\*(C`$g\->mkfs\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|940|\*(C`device\*(C'\fR to read-only. |Sets the block device named \f(CW\*(C`device\*(C'\fR to read-only. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|946|\*(C`device\*(C'\fR to read-write. |Sets the block device named \f(CW\*(C`device\*(C'\fR to read-write. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|952|\*(C`devices\*(C'\fR to the btrfs filesystem |Add the list of device(s) in \f(CW\*(C`devices\*(C'\fR to the btrfs filesystem )         (rof_escape_sequence|91|Sys::Guestfs.3pm|953|\*(C`fs\*(C'\fR. If \f(CW\*(C`devices\*(C'\fR is an empty list, this does nothing. |mounted at \f(CW\*(C`fs\*(C'\fR. If \f(CW\*(C`devices\*(C'\fR is an empty list, this does nothing. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|957|\*(C`devices\*(C'\fR from the btrfs filesystem mounted at \f(CW\*(C`fs\*(C'\fR. |Remove the \f(CW\*(C`devices\*(C'\fR from the btrfs filesystem mounted at \f(CW\*(C`fs\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|958|\*(C`devices\*(C'\fR is an empty list, this does nothing. |If \f(CW\*(C`devices\*(C'\fR is an empty list, this does nothing. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|962|\*(C`fs\*(C'\fR |Balance the chunks in the btrfs filesystem mounted at \f(CW\*(C`fs\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|988|\*(C`fs\*(C'\fR. |Force sync on the btrfs filesystem mounted at \f(CW\*(C`fs\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|992|\*(C`device\*(C'\fR is the device file where the |Used to check a btrfs filesystem, \f(CW\*(C`device\*(C'\fR is the device file where the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1002|\*(C`dest\*(C'\fR argument is the destination |Create a btrfs subvolume. The \f(CW\*(C`dest\*(C'\fR argument is the destination )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1003|\*(C`/path/to/dest/name\*(C'\fR. |directory and the name of the snapshot, in the form \f(CW\*(C`/path/to/dest/name\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1012|\*(C`fs\*(C'\fR. |which is mounted at \f(CW\*(C`fs\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1016|\*(C`fs\*(C'\fR which will |Set the subvolume of the btrfs filesystem \f(CW\*(C`fs\*(C'\fR which will )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1017|\*(C`$g\->btrfs_subvolume_list\*(C'\fR to |be mounted by default. See \f(CW\*(C`$g\->btrfs_subvolume_list\*(C'\fR to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1022|\*(C`source\*(C'\fR. |Create a writable snapshot of the btrfs subvolume \f(CW\*(C`source\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1023|\*(C`dest\*(C'\fR argument is the destination directory and the name |The \f(CW\*(C`dest\*(C'\fR argument is the destination directory and the name )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1024|\*(C`/path/to/dest/name\*(C'\fR. |of the snapshot, in the form \f(CW\*(C`/path/to/dest/name\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1040|\*(C`/dev/sdX\*(C'\fR. Note this works for device |These are returned as \f(CW\*(C`/dev/sdX\*(C'\fR. Note this works for device )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1051|\*(C`/dev/VG/LV\*(C'\fR form using \f(CW\*(C`$g\->lvm_canonical_lvm_name\*(C'\fR. |Converted to \f(CW\*(C`/dev/VG/LV\*(C'\fR form using \f(CW\*(C`$g\->lvm_canonical_lvm_name\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1060|\*(C`path\*(C'\fR. |This function returns the Linux capabilities attached to \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1067|\*(C`path\*(C'\fR. |This function sets the Linux capabilities attached to \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1068|\*(C`cap\*(C'\fR should be passed in text form |The capabilities set \f(CW\*(C`cap\*(C'\fR should be passed in text form )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1084|\*(C`c:\ewindows\*(C'\fR may appear as \f(CW\*(C`/WINDOWS\*(C'\fR or \f(CW\*(C`/windows\*(C'\fR |as \f(CW\*(C`c:\ewindows\*(C'\fR may appear as \f(CW\*(C`/WINDOWS\*(C'\fR or \f(CW\*(C`/windows\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1095|\*(C`$g\->case_sensitive_path\*(C'\fR (\*(L"/Windows/System32\*(R") |Thus \f(CW\*(C`$g\->case_sensitive_path\*(C'\fR (\*(L"/Windows/System32\*(R") )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1103|\*(C`$g\->realpath\*(C'\fR. |See also \f(CW\*(C`$g\->realpath\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1107|\*(C`path\*(C'\fR. |Return the contents of the file named \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1109|\*(C`char *\*(C'\fR, there is no |Because, in C, this function returns a \f(CW\*(C`char *\*(C'\fR, there is no )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1110|\*(C`\e0\*(C'\fR character in a file and |way to differentiate between a \f(CW\*(C`\e0\*(C'\fR character in a file and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1111|\*(C`$g\->read_file\*(C'\fR |end of string. To handle binary files, use the \f(CW\*(C`$g\->read_file\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1112|\*(C`$g\->download\*(C'\fR functions. |or \f(CW\*(C`$g\->download\*(C'\fR functions. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1117|\*(C`path\*(C'\fR. |file named \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1119|\*(C`csumtype\*(C'\fR |The type of checksum to compute is given by the \f(CW\*(C`csumtype\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1126|\*(C`cksum\*(C'\fR command. |for the \f(CW\*(C`cksum\*(C'\fR command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1130|\*(C`md5sum\*(C'\fR program). |Compute the \s-1MD5\s0 hash (using the \f(CW\*(C`md5sum\*(C'\fR program). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1134|\*(C`sha1sum\*(C'\fR program). |Compute the \s-1SHA1\s0 hash (using the \f(CW\*(C`sha1sum\*(C'\fR program). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1138|\*(C`sha224sum\*(C'\fR program). |Compute the \s-1SHA224\s0 hash (using the \f(CW\*(C`sha224sum\*(C'\fR program). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1142|\*(C`sha256sum\*(C'\fR program). |Compute the \s-1SHA256\s0 hash (using the \f(CW\*(C`sha256sum\*(C'\fR program). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1146|\*(C`sha384sum\*(C'\fR program). |Compute the \s-1SHA384\s0 hash (using the \f(CW\*(C`sha384sum\*(C'\fR program). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1150|\*(C`sha512sum\*(C'\fR program). |Compute the \s-1SHA512\s0 hash (using the \f(CW\*(C`sha512sum\*(C'\fR program). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1156|\*(C`$g\->checksum_device\*(C'\fR. |To get the checksum for a device, use \f(CW\*(C`$g\->checksum_device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1158|\*(C`$g\->checksums_out\*(C'\fR. |To get the checksums for many files, use \f(CW\*(C`$g\->checksums_out\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1164|\*(C`device\*(C'\fR. For the types of |contents of the device named \f(CW\*(C`device\*(C'\fR. For the types of )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1165|\*(C`$g\->checksum\*(C'\fR command. |checksums supported see the \f(CW\*(C`$g\->checksum\*(C'\fR command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1170|\*(C`directory\*(C'\fR and then emits a list of those checksums to |\&\f(CW\*(C`directory\*(C'\fR and then emits a list of those checksums to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1171|\*(C`sumsfile\*(C'\fR. |the local output file \f(CW\*(C`sumsfile\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1183|\*(C`path\*(C'\fR to \f(CW\*(C`mode\*(C'\fR. Only |Change the mode (permissions) of \f(CW\*(C`path\*(C'\fR to \f(CW\*(C`mode\*(C'\fR. Only )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1186|\*(C`mode\*(C'\fR |\&\fINote\fR: When using this command from guestfish, \f(CW\*(C`mode\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1194|\*(C`owner\*(C'\fR and group to \f(CW\*(C`group\*(C'\fR. |Change the file owner to \f(CW\*(C`owner\*(C'\fR and group to \f(CW\*(C`group\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1212|\*(C`$g\->sh\*(C'\fR). |the shell (see \f(CW\*(C`$g\->sh\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1222|\*(C`/usr/bin\*(C'\fR and \f(CW\*(C`/bin\*(C'\fR. If you require a program from |\&\f(CW\*(C`/usr/bin\*(C'\fR and \f(CW\*(C`/bin\*(C'\fR. If you require a program from )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1237|\*(C`$g\->command\*(C'\fR, but splits the |This is the same as \f(CW\*(C`$g\->command\*(C'\fR, but splits the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1240|\*(C`$g\->sh_lines\*(C'\fR |See also: \f(CW\*(C`$g\->sh_lines\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1247|\*(C`device\*(C'\fR and writes it out to the local |This command compresses \f(CW\*(C`device\*(C'\fR and writes it out to the local )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1248|\*(C`zdevice\*(C'\fR. |file \f(CW\*(C`zdevice\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1250|\*(C`ctype\*(C'\fR and optional \f(CW\*(C`level\*(C'\fR parameters have the same meaning |The \f(CW\*(C`ctype\*(C'\fR and optional \f(CW\*(C`level\*(C'\fR parameters have the same meaning )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1251|\*(C`$g\->compress_out\*(C'\fR. |as in \f(CW\*(C`$g\->compress_out\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1255|\*(C`file\*(C'\fR and writes it out to the local |This command compresses \f(CW\*(C`file\*(C'\fR and writes it out to the local )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1256|\*(C`zfile\*(C'\fR. |file \f(CW\*(C`zfile\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1258|\*(C`ctype\*(C'\fR parameter. |The compression program used is controlled by the \f(CW\*(C`ctype\*(C'\fR parameter. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1259|\*(C`compress\*(C'\fR, \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`bzip2\*(C'\fR, \f(CW\*(C`xz\*(C'\fR or \f(CW\*(C`lzop\*(C'\fR. |Currently this includes: \f(CW\*(C`compress\*(C'\fR, \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`bzip2\*(C'\fR, \f(CW\*(C`xz\*(C'\fR or \f(CW\*(C`lzop\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1264|\*(C`level\*(C'\fR parameter controls compression level. The |The optional \f(CW\*(C`level\*(C'\fR parameter controls compression level. The )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1275|\*(C`qemuparam\*(C'\fR string must be a \f(CW\*(C`\-\*(C'\fR (dash). |The first character of \f(CW\*(C`qemuparam\*(C'\fR string must be a \f(CW\*(C`\-\*(C'\fR (dash). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1277|\*(C`qemuvalue\*(C'\fR can be \s-1NULL\s0. |\&\f(CW\*(C`qemuvalue\*(C'\fR can be \s-1NULL\s0. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1281|\*(C`$g\->copy_device_to_device\*(C'\fR, |The four calls \f(CW\*(C`$g\->copy_device_to_device\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1282|\*(C`$g\->copy_device_to_file\*(C'\fR, |\&\f(CW\*(C`$g\->copy_device_to_file\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1283|\*(C`$g\->copy_file_to_device\*(C'\fR, and |\&\f(CW\*(C`$g\->copy_file_to_device\*(C'\fR, and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1284|\*(C`$g\->copy_file_to_file\*(C'\fR |\&\f(CW\*(C`$g\->copy_file_to_file\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1302|\*(C`$g\->copy_device_to_device\*(C'\fR for a general overview |See \f(CW\*(C`$g\->copy_device_to_device\*(C'\fR for a general overview )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1307|\*(C`$g\->copy_device_to_device\*(C'\fR for a general overview |See \f(CW\*(C`$g\->copy_device_to_device\*(C'\fR for a general overview )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1312|\*(C`$g\->copy_device_to_device\*(C'\fR for a general overview |See \f(CW\*(C`$g\->copy_device_to_device\*(C'\fR for a general overview )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1316|\*(C`$g\->cp\*(C'\fR, |is for copying blocks within existing files. See \f(CW\*(C`$g\->cp\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1317|\*(C`$g\->cp_a\*(C'\fR and \f(CW\*(C`$g\->mv\*(C'\fR for general file copying and |\&\f(CW\*(C`$g\->cp_a\*(C'\fR and \f(CW\*(C`$g\->mv\*(C'\fR for general file copying and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1322|\*(C`size\*(C'\fR bytes from one source device |This command copies exactly \f(CW\*(C`size\*(C'\fR bytes from one source device )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1323|\*(C`src\*(C'\fR to another destination device or file \f(CW\*(C`dest\*(C'\fR. |or file \f(CW\*(C`src\*(C'\fR to another destination device or file \f(CW\*(C`dest\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1337|\*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR where \f(CW\*(C`dest\*(C'\fR is |This copies a file from \f(CW\*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR where \f(CW\*(C`dest\*(C'\fR is )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1342|\*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR |This copies a file or directory from \f(CW\*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1343|\*(C`cp \-a\*(C'\fR command. |recursively using the \f(CW\*(C`cp \-a\*(C'\fR command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1347|\*(C`src\*(C'\fR |This command copies from one source device or file \f(CW\*(C`src\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1348|\*(C`dest\*(C'\fR. Normally you |to another destination device or file \f(CW\*(C`dest\*(C'\fR. Normally you )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1355|\*(C`$g\->copy_device_to_device\*(C'\fR). |(see \f(CW\*(C`$g\->copy_device_to_device\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1370|\*(C`$g\->list_devices\*(C'\fR. |for example as a string returned from \f(CW\*(C`$g\->list_devices\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1372|\*(C`$g\->list_devices\*(C'\fR, \f(CW\*(C`$g\->part_to_dev\*(C'\fR. |See also \f(CW\*(C`$g\->list_devices\*(C'\fR, \f(CW\*(C`$g\->part_to_dev\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1376|\*(C`df\*(C'\fR command to report disk space used. |This command runs the \f(CW\*(C`df\*(C'\fR command to report disk space used. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1380|\*(C`$g\->statvfs\*(C'\fR from programs. |Use \f(CW\*(C`$g\->statvfs\*(C'\fR from programs. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1384|\*(C`df \-h\*(C'\fR command to report disk space used |This command runs the \f(CW\*(C`df \-h\*(C'\fR command to report disk space used )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1389|\*(C`$g\->statvfs\*(C'\fR from programs. |Use \f(CW\*(C`$g\->statvfs\*(C'\fR from programs. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1393|\*(C`filename\*(C'\fR. |Detect and return the format of the disk image called \f(CW\*(C`filename\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1394|\*(C`filename\*(C'\fR can also be a host device, etc. If the format of the |\&\f(CW\*(C`filename\*(C'\fR can also be a host device, etc. If the format of the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1404|\*(C`filename\*(C'\fR has a |Detect and return whether the disk image \f(CW\*(C`filename\*(C'\fR has a )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1413|\*(C`filename\*(C'\fR. |called \f(CW\*(C`filename\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1420|\*(C`dmesg\*(C'\fR output) from |This returns the kernel messages (\f(CW\*(C`dmesg\*(C'\fR output) from )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1425|\*(C`$g\->set_verbose\*(C'\fR or by setting |verbose messages with \f(CW\*(C`$g\->set_verbose\*(C'\fR or by setting )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1426|\*(C`LIBGUESTFS_DEBUG=1\*(C'\fR before |the environment variable \f(CW\*(C`LIBGUESTFS_DEBUG=1\*(C'\fR before )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1431|\*(C`remotefilename\*(C'\fR and save it as \f(CW\*(C`filename\*(C'\fR |Download file \f(CW\*(C`remotefilename\*(C'\fR and save it as \f(CW\*(C`filename\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1434|\*(C`filename\*(C'\fR can also be a named pipe. |\&\f(CW\*(C`filename\*(C'\fR can also be a named pipe. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1436|\*(C`$g\->upload\*(C'\fR, \f(CW\*(C`$g\->cat\*(C'\fR. |See also \f(CW\*(C`$g\->upload\*(C'\fR, \f(CW\*(C`$g\->cat\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1440|\*(C`remotefilename\*(C'\fR and save it as \f(CW\*(C`filename\*(C'\fR |Download file \f(CW\*(C`remotefilename\*(C'\fR and save it as \f(CW\*(C`filename\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1443|\*(C`remotefilename\*(C'\fR is read for \f(CW\*(C`size\*(C'\fR bytes starting at \f(CW\*(C`offset\*(C'\fR |\&\f(CW\*(C`remotefilename\*(C'\fR is read for \f(CW\*(C`size\*(C'\fR bytes starting at \f(CW\*(C`offset\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1447|\*(C`$g\->pread\*(C'\fR, |can be downloaded with this call, unlike with \f(CW\*(C`$g\->pread\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1451|\*(C`$g\->download\*(C'\fR, \f(CW\*(C`$g\->pread\*(C'\fR. |See also \f(CW\*(C`$g\->download\*(C'\fR, \f(CW\*(C`$g\->pread\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1456|\*(C`whattodrop\*(C'\fR |and/or dentries and inode caches. The parameter \f(CW\*(C`whattodrop\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1460|\*(C`whattodrop\*(C'\fR to 3 should drop everything. |Setting \f(CW\*(C`whattodrop\*(C'\fR to 3 should drop everything. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1467|\*(C`du \-s\*(C'\fR command to estimate file space |This command runs the \f(CW\*(C`du \-s\*(C'\fR command to estimate file space )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1468|\*(C`path\*(C'\fR. |usage for \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1470|\*(C`path\*(C'\fR can be a file or a directory. If \f(CW\*(C`path\*(C'\fR is a directory |\&\f(CW\*(C`path\*(C'\fR can be a file or a directory. If \f(CW\*(C`path\*(C'\fR is a directory )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1479|\*(C`device\*(C'\fR. |This runs the ext2/ext3 filesystem checker on \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1489|\*(C`forceall\*(C'\fR option. |This option may not be specified at the same time as the \f(CW\*(C`forceall\*(C'\fR option. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1496|\*(C`correct\*(C'\fR option. |This option may not be specified at the same time as the \f(CW\*(C`correct\*(C'\fR option. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1503|\*(C`e2fsck \-p \-f device\*(C'\fR, ie. runs the ext2/ext3 |This runs \f(CW\*(C`e2fsck \-p \-f device\*(C'\fR, ie. runs the ext2/ext3 )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1504|\*(C`device\*(C'\fR, noninteractively (\fI\-p\fR), |filesystem checker on \f(CW\*(C`device\*(C'\fR, noninteractively (\fI\-p\fR), )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1516|\*(C`words\*(C'\fR passed with single spaces |This command concatenates the list of \f(CW\*(C`words\*(C'\fR passed with single spaces )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1521|\*(C`$g\->ping_daemon\*(C'\fR. |See also \f(CW\*(C`$g\->ping_daemon\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1525|\*(C`egrep\*(C'\fR program and returns the |This calls the external \f(CW\*(C`egrep\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1540|\*(C`egrep \-i\*(C'\fR program and returns the |This calls the external \f(CW\*(C`egrep \-i\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1555|\*(C`file1\*(C'\fR and \f(CW\*(C`file2\*(C'\fR and returns |This compares the two files \f(CW\*(C`file1\*(C'\fR and \f(CW\*(C`file2\*(C'\fR and returns )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1562|\*(C`true\*(C'\fR if and only if there is a file, directory |This returns \f(CW\*(C`true\*(C'\fR if and only if there is a file, directory )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1563|\*(C`path\*(C'\fR name. |(or anything) with the given \f(CW\*(C`path\*(C'\fR name. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1565|\*(C`$g\->is_file\*(C'\fR, \f(CW\*(C`$g\->is_dir\*(C'\fR, \f(CW\*(C`$g\->stat\*(C'\fR. |See also \f(CW\*(C`$g\->is_file\*(C'\fR, \f(CW\*(C`$g\->is_dir\*(C'\fR, \f(CW\*(C`$g\->stat\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1570|\*(C`path\*(C'\fR of size \f(CW\*(C`len\*(C'\fR bytes. If the file exists already, it |\&\f(CW\*(C`path\*(C'\fR of size \f(CW\*(C`len\*(C'\fR bytes. If the file exists already, it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1574|\*(C`alloc\*(C'\fR command which allocates a file in the host and |\&\f(CW\*(C`alloc\*(C'\fR command which allocates a file in the host and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1587|\*(C`path\*(C'\fR of size \f(CW\*(C`len\*(C'\fR bytes. If the file exists already, it |\&\f(CW\*(C`path\*(C'\fR of size \f(CW\*(C`len\*(C'\fR bytes. If the file exists already, it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1591|\*(C`$g\->truncate_size\*(C'\fR instead. |To create a sparse file use \f(CW\*(C`$g\->truncate_size\*(C'\fR instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1593|\*(C`$g\->fallocate\*(C'\fR does the same, |The deprecated call \f(CW\*(C`$g\->fallocate\*(C'\fR does the same, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1599|\*(C`alloc\*(C'\fR and \f(CW\*(C`sparse\*(C'\fR commands which create |\&\f(CW\*(C`alloc\*(C'\fR and \f(CW\*(C`sparse\*(C'\fR commands which create )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1604|\*(C`fgrep\*(C'\fR program and returns the |This calls the external \f(CW\*(C`fgrep\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1619|\*(C`fgrep \-i\*(C'\fR program and returns the |This calls the external \f(CW\*(C`fgrep \-i\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1640|\*(C`file \-zb path\*(C'\fR. Note in |The exact command which runs is \f(CW\*(C`file \-zb path\*(C'\fR. Note in )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1648|\*(C`$g\->vfs_type\*(C'\fR, \f(CW\*(C`$g\->lstat\*(C'\fR, |See also: \fIfile\fR\|(1), \f(CW\*(C`$g\->vfs_type\*(C'\fR, \f(CW\*(C`$g\->lstat\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1649|\*(C`$g\->is_file\*(C'\fR, \f(CW\*(C`$g\->is_blockdev\*(C'\fR (etc), \f(CW\*(C`$g\->is_zero\*(C'\fR. |\&\f(CW\*(C`$g\->is_file\*(C'\fR, \f(CW\*(C`$g\->is_blockdev\*(C'\fR (etc), \f(CW\*(C`$g\->is_zero\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1653|\*(C`filename\*(C'\fR, |This detects the architecture of the binary \f(CW\*(C`filename\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1702|\*(C`i386\*(C'\fR. |Win32 binaries and DLLs return \f(CW\*(C`i386\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1704|\*(C`x86_64\*(C'\fR. |Win64 binaries and DLLs return \f(CW\*(C`x86_64\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1732|\*(C`file\*(C'\fR in bytes. |This command returns the size of \f(CW\*(C`file\*(C'\fR in bytes. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1734|\*(C`$g\->stat\*(C'\fR, \f(CW\*(C`$g\->lstat\*(C'\fR, |To get other stats about a file, use \f(CW\*(C`$g\->stat\*(C'\fR, \f(CW\*(C`$g\->lstat\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1735|\*(C`$g\->is_dir\*(C'\fR, \f(CW\*(C`$g\->is_file\*(C'\fR etc. |\&\f(CW\*(C`$g\->is_dir\*(C'\fR, \f(CW\*(C`$g\->is_file\*(C'\fR etc. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1736|\*(C`$g\->blockdev_getsize64\*(C'\fR. |To get the size of block devices, use \f(CW\*(C`$g\->blockdev_getsize64\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1741|\*(C`filesystem\*(C'\fR is a filesystem name, such as |The argument \f(CW\*(C`filesystem\*(C'\fR is a filesystem name, such as )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1742|\*(C`ext3\*(C'\fR. |\&\f(CW\*(C`ext3\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1744|\*(C`$g\->launch\*(C'\fR before using this command. |You must call \f(CW\*(C`$g\->launch\*(C'\fR before using this command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1753|\*(C`$g\->available\*(C'\fR, \*(L"\s-1AVAILABILITY\s0\*(R" in \fIguestfs\fR\|(3). |See also \f(CW\*(C`$g\->available\*(C'\fR, \*(L"\s-1AVAILABILITY\s0\*(R" in \fIguestfs\fR\|(3). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1757|\*(C`path\*(C'\fR. The initial |This command creates a new file called \f(CW\*(C`path\*(C'\fR. The initial )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1758|\*(C`len\*(C'\fR octets of \f(CW\*(C`c\*(C'\fR, where \f(CW\*(C`c\*(C'\fR |content of the file is \f(CW\*(C`len\*(C'\fR octets of \f(CW\*(C`c\*(C'\fR, where \f(CW\*(C`c\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1759|\*(C`[0..255]\*(C'\fR. |must be a number in the range \f(CW\*(C`[0..255]\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1762|\*(C`$g\->truncate_size\*(C'\fR. |much more efficient to use \f(CW\*(C`$g\->truncate_size\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1764|\*(C`$g\->fill_pattern\*(C'\fR. |use \f(CW\*(C`$g\->fill_pattern\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1768|\*(C`nr\*(C'\fR |This function, useful for testing filesystems, creates \f(CW\*(C`nr\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1769|\*(C`dir\*(C'\fR with names \f(CW00000000\fR |empty files in the directory \f(CW\*(C`dir\*(C'\fR with names \f(CW00000000\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1770|\*(C`nr\-1\*(C'\fR (ie. each file name is 8 digits long padded |through \f(CW\*(C`nr\-1\*(C'\fR (ie. each file name is 8 digits long padded )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1775|\*(C`$g\->fill\*(C'\fR except that it creates |This function is like \f(CW\*(C`$g\->fill\*(C'\fR except that it creates )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1776|\*(C`len\*(C'\fR containing the repeating pattern |a new file of length \f(CW\*(C`len\*(C'\fR containing the repeating pattern )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1777|\*(C`pattern\*(C'\fR. The pattern is truncated if necessary |of bytes in \f(CW\*(C`pattern\*(C'\fR. The pattern is truncated if necessary )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1778|\*(C`len\*(C'\fR bytes. |to ensure the length of the file is exactly \f(CW\*(C`len\*(C'\fR bytes. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1783|\*(C`directory\*(C'\fR. It is essentially equivalent to |starting at \f(CW\*(C`directory\*(C'\fR. It is essentially equivalent to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1784|\*(C`find directory \-print\*(C'\fR but some |running the shell command \f(CW\*(C`find directory \-print\*(C'\fR but some )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1796|\*(C`$g\->find\*(C'\fR \f(CW\*(C`/tmp\*(C'\fR would be |then the returned list from \f(CW\*(C`$g\->find\*(C'\fR \f(CW\*(C`/tmp\*(C'\fR would be )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1806|\*(C`directory\*(C'\fR is not a directory, then this command returns |If \f(CW\*(C`directory\*(C'\fR is not a directory, then this command returns )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1814|\*(C`directory\*(C'\fR, placing the resulting list in the |starting at \f(CW\*(C`directory\*(C'\fR, placing the resulting list in the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1815|\*(C`files\*(C'\fR. |external file called \f(CW\*(C`files\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1817|\*(C`$g\->find\*(C'\fR with the |This command works the same way as \f(CW\*(C`$g\->find\*(C'\fR with the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1824|\*(C`\e0\*(C'\fR characters. See \fIfind\fR\|(1) option \fI\-print0\fR. |by \f(CW\*(C`\e0\*(C'\fR characters. See \fIfind\fR\|(1) option \fI\-print0\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1837|\*(C`$g\->vfs_label\*(C'\fR. |To find the label of a filesystem, use \f(CW\*(C`$g\->vfs_label\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1845|\*(C`$g\->vfs_uuid\*(C'\fR. |To find the \s-1UUID\s0 of a filesystem, use \f(CW\*(C`$g\->vfs_uuid\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1849|\*(C`device\*(C'\fR which |This runs the filesystem checker (fsck) on \f(CW\*(C`device\*(C'\fR which )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1850|\*(C`fstype\*(C'\fR. |should have filesystem type \f(CW\*(C`fstype\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1853|\*(C`fsck\*(C'\fR. |list of status codes from \f(CW\*(C`fsck\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1868|\*(C`fsck \-a \-t fstype device\*(C'\fR. |This command is entirely equivalent to running \f(CW\*(C`fsck \-a \-t fstype device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1876|\*(C`NULL\*(C'\fR then no options are added. |If \f(CW\*(C`NULL\*(C'\fR then no options are added. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1882|\*(C`$g\->set_attach_method\*(C'\fR and \*(L"\s-1ATTACH\s0 \s-1METHOD\s0\*(R" in \fIguestfs\fR\|(3). |See \f(CW\*(C`$g\->set_attach_method\*(C'\fR and \*(L"\s-1ATTACH\s0 \s-1METHOD\s0\*(R" in \fIguestfs\fR\|(3). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1898|\*(C`file\*(C'\fR. |This returns the file attributes associated with \f(CW\*(C`file\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1982|\*(C`$g\->set_e2attrs\*(C'\fR. |See also \f(CW\*(C`$g\->set_e2attrs\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1985|\*(C`$g\->getxattr\*(C'\fR). |(see \f(CW\*(C`$g\->getxattr\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|1998|\*(C`$g\->set_e2generation\*(C'\fR. |See \f(CW\*(C`$g\->set_e2generation\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2003|\*(C`device\*(C'\fR. |\&\f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2015|\*(C`device\*(C'\fR. |\&\f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2026|\*(C`index\*(C'\fR'th |Get the challenge (provided by libvirt) for the \f(CW\*(C`index\*(C'\fR'th )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2034|\*(C`index\*(C'\fR'th |Get the default result (provided by libvirt) for the \f(CW\*(C`index\*(C'\fR'th )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2042|\*(C`index\*(C'\fR'th |Get the prompt (provided by libvirt) for the \f(CW\*(C`index\*(C'\fR'th )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2051|\*(C`GUESTFS_EVENT_LIBVIRT_AUTH\*(C'\fR. |for events of type \f(CW\*(C`GUESTFS_EVENT_LIBVIRT_AUTH\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2055|\*(C`$g\->set_libvirt_supported_credentials\*(C'\fR. |\&\f(CW\*(C`$g\->set_libvirt_supported_credentials\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2064|\*(C`$g\->set_memsize\*(C'\fR was not called |If \f(CW\*(C`$g\->set_memsize\*(C'\fR was not called )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2065|\*(C`LIBGUESTFS_MEMSIZE\*(C'\fR was not set, |on this handle, and if \f(CW\*(C`LIBGUESTFS_MEMSIZE\*(C'\fR was not set, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2107|\*(C`$g\->set_selinux\*(C'\fR. |is passed to the appliance at boot time. See \f(CW\*(C`$g\->set_selinux\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2134|\*(C`$g\->umask\*(C'\fR. |unless it has been set by calling \f(CW\*(C`$g\->umask\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2145|\*(C`$g\->setcon\*(C'\fR |and \f(CW\*(C`$g\->setcon\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2149|\*(C`path\*(C'\fR named \f(CW\*(C`name\*(C'\fR. |Get a single extended attribute from file \f(CW\*(C`path\*(C'\fR named \f(CW\*(C`name\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2151|\*(C`$g\->lgetxattr\*(C'\fR. |attribute for the symlink itself, use \f(CW\*(C`$g\->lgetxattr\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2154|\*(C`$g\->getxattrs\*(C'\fR. However some Linux |in one go by calling \f(CW\*(C`$g\->getxattrs\*(C'\fR. However some Linux )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2161|\*(C`name\*(C'\fR, this returns an error. |is no extended attribute named \f(CW\*(C`name\*(C'\fR, this returns an error. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2163|\*(C`$g\->getxattrs\*(C'\fR, \f(CW\*(C`$g\->lgetxattr\*(C'\fR, \fIattr\fR\|(5). |See also: \f(CW\*(C`$g\->getxattrs\*(C'\fR, \f(CW\*(C`$g\->lgetxattr\*(C'\fR, \fIattr\fR\|(5). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2168|\*(C`path\*(C'\fR. |\&\f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2173|\*(C`$g\->lgetxattrs\*(C'\fR, \fIattr\fR\|(5). |See also: \f(CW\*(C`$g\->lgetxattrs\*(C'\fR, \fIattr\fR\|(5). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2178|\*(C`pattern\*(C'\fR according to the wildcard expansion rules |\&\f(CW\*(C`pattern\*(C'\fR according to the wildcard expansion rules )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2185|\*(C`GLOB_MARK|GLOB_BRACE\*(C'\fR. |with flags \f(CW\*(C`GLOB_MARK|GLOB_BRACE\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2189|\*(C`/dev/sd*\*(C'\fR). Use \f(CW\*(C`$g\->list_devices\*(C'\fR, |name (eg. \f(CW\*(C`/dev/sd*\*(C'\fR). Use \f(CW\*(C`$g\->list_devices\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2190|\*(C`$g\->list_partitions\*(C'\fR etc functions instead. |\&\f(CW\*(C`$g\->list_partitions\*(C'\fR etc functions instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2194|\*(C`grep\*(C'\fR program and returns the |This calls the external \f(CW\*(C`grep\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2216|\*(C`zgrep\*(C'\fR instead of \f(CW\*(C`grep\*(C'\fR. This allows the input to be |Use \f(CW\*(C`zgrep\*(C'\fR instead of \f(CW\*(C`grep\*(C'\fR. This allows the input to be )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2231|\*(C`grep \-i\*(C'\fR program and returns the |This calls the external \f(CW\*(C`grep \-i\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2247|\*(C`device\*(C'\fR, with the root directory being \f(CW\*(C`root\*(C'\fR. |\&\f(CW\*(C`device\*(C'\fR, with the root directory being \f(CW\*(C`root\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2257|\*(C`grub\-install\*(C'\fR from the host. Unfortunately grub is |This uses \f(CW\*(C`grub\-install\*(C'\fR from the host. Unfortunately grub is )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2264|\*(C`/boot/grub/device.map\*(C'\fR |it may be that you need to create a \f(CW\*(C`/boot/grub/device.map\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2273|\*(C`/dev/vda\*(C'\fR with the name of the installation device. |replacing \f(CW\*(C`/dev/vda\*(C'\fR with the name of the installation device. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2288|\*(C`nrlines\*(C'\fR is a positive number, this returns the first |If the parameter \f(CW\*(C`nrlines\*(C'\fR is a positive number, this returns the first )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2289|\*(C`nrlines\*(C'\fR lines of the file \f(CW\*(C`path\*(C'\fR. |\&\f(CW\*(C`nrlines\*(C'\fR lines of the file \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2291|\*(C`nrlines\*(C'\fR is a negative number, this returns lines |If the parameter \f(CW\*(C`nrlines\*(C'\fR is a negative number, this returns lines )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2292|\*(C`path\*(C'\fR, excluding the last \f(CW\*(C`nrlines\*(C'\fR lines. |from the file \f(CW\*(C`path\*(C'\fR, excluding the last \f(CW\*(C`nrlines\*(C'\fR lines. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2294|\*(C`nrlines\*(C'\fR is zero, this returns an empty list. |If the parameter \f(CW\*(C`nrlines\*(C'\fR is zero, this returns an empty list. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2301|\*(C`hexdump \-C\*(C'\fR on the given \f(CW\*(C`path\*(C'\fR. The result is |This runs \f(CW\*(C`hexdump \-C\*(C'\fR on the given \f(CW\*(C`path\*(C'\fR. The result is )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2317|\*(C`filename\*(C'\fR parameter is null, then the changes |If the optional \f(CW\*(C`filename\*(C'\fR parameter is null, then the changes )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2326|\*(C`parent\*(C'\fR named \f(CW\*(C`name\*(C'\fR. |Add a child node to \f(CW\*(C`parent\*(C'\fR named \f(CW\*(C`name\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2332|\*(C`nodeh\*(C'\fR. |Return the list of nodes which are subkeys of \f(CW\*(C`nodeh\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2338|\*(C`nodeh\*(C'\fR, recursively if necessary. |Delete \f(CW\*(C`nodeh\*(C'\fR, recursively if necessary. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2344|\*(C`nodeh\*(C'\fR with the name \f(CW\*(C`name\*(C'\fR, if it exists. |Return the child of \f(CW\*(C`nodeh\*(C'\fR with the name \f(CW\*(C`name\*(C'\fR, if it exists. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2351|\*(C`nodeh\*(C'\fR which has the |Return the value attached to \f(CW\*(C`nodeh\*(C'\fR which has the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2352|\*(C`key\*(C'\fR, if it exists. This can return \f(CW0\fR meaning |name \f(CW\*(C`key\*(C'\fR, if it exists. This can return \f(CW0\fR meaning )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2359|\*(C`nodeh\*(C'\fR. |Return the name of \f(CW\*(C`nodeh\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2365|\*(C`nodeh\*(C'\fR. |Return the parent node of \f(CW\*(C`nodeh\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2371|\*(C`nodeh\*(C'\fR. The |Set or replace a single value under the node \f(CW\*(C`nodeh\*(C'\fR. The )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2372|\*(C`key\*(C'\fR is the name, \f(CW\*(C`t\*(C'\fR is the type, and \f(CW\*(C`val\*(C'\fR is the data. |\&\f(CW\*(C`key\*(C'\fR is the name, \f(CW\*(C`t\*(C'\fR is the type, and \f(CW\*(C`val\*(C'\fR is the data. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2378|\*(C`nodeh\*(C'\fR. |Return the array of (key, datatype, data) tuples attached to \f(CW\*(C`nodeh\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2384|\*(C`filename\*(C'\fR. |Open the Windows Registry hive file named \f(CW\*(C`filename\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2410|\*(C`$g\->hivex_value_value\*(C'\fR (which returns the |This calls \f(CW\*(C`$g\->hivex_value_value\*(C'\fR (which returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2426|\*(C`$g\->hivex_value_utf8\*(C'\fR. |See also: \f(CW\*(C`$g\->hivex_value_utf8\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2430|\*(C`filename\*(C'\fR from the initrd file |This command unpacks the file \f(CW\*(C`filename\*(C'\fR from the initrd file )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2431|\*(C`initrdpath\*(C'\fR. The filename must be given \fIwithout\fR the |called \f(CW\*(C`initrdpath\*(C'\fR. The filename must be given \fIwithout\fR the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2432|\*(C`/\*(C'\fR character. |initial \f(CW\*(C`/\*(C'\fR character. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2435|\*(C`/init\*(C'\fR) |to examine the boot script (usually called \f(CW\*(C`/init\*(C'\fR) )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2442|\*(C`$g\->initrd_list\*(C'\fR. |See also \f(CW\*(C`$g\->initrd_list\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2451|\*(C`/\*(C'\fR character. The |The files are listed without any initial \f(CW\*(C`/\*(C'\fR character. The )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2461|\*(C`path\*(C'\fR for the events listed in \f(CW\*(C`mask\*(C'\fR. |Watch \f(CW\*(C`path\*(C'\fR for the events listed in \f(CW\*(C`mask\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2463|\*(C`path\*(C'\fR is a directory then events within that |Note that if \f(CW\*(C`path\*(C'\fR is a directory then events within that )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2469|\*(C`/usr/include/sys/inotify.h\*(C'\fR. |\&\f(CW\*(C`/usr/include/sys/inotify.h\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2479|\*(C`$g\->inotify_read\*(C'\fR |This function is a helpful wrapper around \f(CW\*(C`$g\->inotify_read\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2489|\*(C`maxevents\*(C'\fR is the maximum number of events which will be |\&\f(CW\*(C`maxevents\*(C'\fR is the maximum number of events which will be )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2490|\*(C`$g\->inotify_read\*(C'\fR or |queued up between calls to \f(CW\*(C`$g\->inotify_read\*(C'\fR or )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2491|\*(C`$g\->inotify_files\*(C'\fR. |\&\f(CW\*(C`$g\->inotify_files\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2496|\*(C`IN_Q_OVERFLOW\*(C'\fR in the returned structure list (see |\&\f(CW\*(C`IN_Q_OVERFLOW\*(C'\fR in the returned structure list (see )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2497|\*(C`$g\->inotify_read\*(C'\fR). |\&\f(CW\*(C`$g\->inotify_read\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2500|\*(C`$g\->inotify_add_watch\*(C'\fR and |watches to the internal watch list. See: \f(CW\*(C`$g\->inotify_add_watch\*(C'\fR and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2501|\*(C`$g\->inotify_rm_watch\*(C'\fR. |\&\f(CW\*(C`$g\->inotify_rm_watch\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2504|\*(C`$g\->inotify_read\*(C'\fR |\&\f(CW\*(C`$g\->inotify_read\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2505|\*(C`$g\->inotify_files\*(C'\fR which is just a helpful |(or \f(CW\*(C`$g\->inotify_files\*(C'\fR which is just a helpful )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2506|\*(C`$g\->inotify_read\*(C'\fR). If you don't |wrapper around \f(CW\*(C`$g\->inotify_read\*(C'\fR). If you don't )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2511|\*(C`$g\->inotify_close\*(C'\fR. This also removes any |\&\f(CW\*(C`$g\->inotify_close\*(C'\fR. This also removes any )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2535|\*(C`$g\->inotify_add_watch\*(C'\fR. |See \f(CW\*(C`$g\->inotify_add_watch\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2541|\*(C`$g\->file_architecture\*(C'\fR. |\&\f(CW\*(C`$g\->file_architecture\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2544|\*(C`unknown\*(C'\fR is returned. |string \f(CW\*(C`unknown\*(C'\fR is returned. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2686|\*(C`h0\*(C'\fR, \f(CW\*(C`h1\*(C'\fR etc. |hard drives were named \f(CW\*(C`h0\*(C'\fR, \f(CW\*(C`h1\*(C'\fR etc. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2695|\*(C`$g\->inspect_get_mountpoints\*(C'\fR, |See also \f(CW\*(C`$g\->inspect_get_mountpoints\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2696|\*(C`$g\->inspect_get_filesystems\*(C'\fR. |\&\f(CW\*(C`$g\->inspect_get_filesystems\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2709|\*(C`$g\->inspect_get_mountpoints\*(C'\fR. |See also \f(CW\*(C`$g\->inspect_get_mountpoints\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2746|\*(C`unknown\*(C'\fR is returned. |string \f(CW\*(C`unknown\*(C'\fR is returned. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2760|\*(C`/etc/favicon.png\*(C'\fR or \f(CW\*(C`C:\eetc\efavicon.png\*(C'\fR |\&\f(CW\*(C`/etc/favicon.png\*(C'\fR or \f(CW\*(C`C:\eetc\efavicon.png\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2763|\*(C`favicon\*(C'\fR boolean as false (default is true). |optional \f(CW\*(C`favicon\*(C'\fR boolean as false (default is true). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2768|\*(C`highquality\*(C'\fR boolean is true then |If the optional \f(CW\*(C`highquality\*(C'\fR boolean is true then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2792|\*(C`wrestool\*(C'\fR program from the \f(CW\*(C`icoutils\*(C'\fR package, and |\&\f(CW\*(C`wrestool\*(C'\fR program from the \f(CW\*(C`icoutils\*(C'\fR package, and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2793|\*(C`bmptopnm\*(C'\fR, \f(CW\*(C`pnmtopng\*(C'\fR, \f(CW\*(C`pamcut\*(C'\fR) |several programs (\f(CW\*(C`bmptopnm\*(C'\fR, \f(CW\*(C`pnmtopng\*(C'\fR, \f(CW\*(C`pamcut\*(C'\fR) )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2794|\*(C`netpbm\*(C'\fR package. These must be installed separately. |from the \f(CW\*(C`netpbm\*(C'\fR package. These must be installed separately. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2826|\*(C`$g\->inspect_get_major_version\*(C'\fR. |See also \f(CW\*(C`$g\->inspect_get_major_version\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2833|\*(C`/etc/fstab\*(C'\fR. |made by reading configuration files such as \f(CW\*(C`/etc/fstab\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2840|\*(C`/boot\*(C'\fR) and a value |is the path of the mountpoint (eg. \f(CW\*(C`/boot\*(C'\fR) and a value )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2842|\*(C`/dev/sda1\*(C'\fR). |(eg. \f(CW\*(C`/dev/sda1\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2849|\*(C`/\*(C'\fR. For information about the |drive \*(L"mounted on\*(R" \f(CW\*(C`/\*(C'\fR. For information about the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2851|\*(C`$g\->inspect_get_drive_mappings\*(C'\fR. |\&\f(CW\*(C`$g\->inspect_get_drive_mappings\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2854|\*(C`$g\->inspect_get_filesystems\*(C'\fR. |See also \f(CW\*(C`$g\->inspect_get_filesystems\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2858|\*(C`$g\->inspect_get_package_management\*(C'\fR return |This function and \f(CW\*(C`$g\->inspect_get_package_management\*(C'\fR return )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2861|\*(C`rpm\*(C'\fR (package format) and |functions would return \f(CW\*(C`rpm\*(C'\fR (package format) and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2862|\*(C`yum\*(C'\fR (package management). |\&\f(CW\*(C`yum\*(C'\fR (package management). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2864|\*(C`unknown\*(C'\fR if we could not determine the |This returns the string \f(CW\*(C`unknown\*(C'\fR if we could not determine the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2869|\*(C`rpm\*(C'\fR, \f(CW\*(C`deb\*(C'\fR, \f(CW\*(C`ebuild\*(C'\fR, \f(CW\*(C`pisi\*(C'\fR, \f(CW\*(C`pacman\*(C'\fR, \f(CW\*(C`pkgsrc\*(C'\fR. |\&\f(CW\*(C`rpm\*(C'\fR, \f(CW\*(C`deb\*(C'\fR, \f(CW\*(C`ebuild\*(C'\fR, \f(CW\*(C`pisi\*(C'\fR, \f(CW\*(C`pacman\*(C'\fR, \f(CW\*(C`pkgsrc\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2876|\*(C`$g\->inspect_get_package_format\*(C'\fR and this function return |\&\f(CW\*(C`$g\->inspect_get_package_format\*(C'\fR and this function return )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2879|\*(C`rpm\*(C'\fR (package format) and |functions would return \f(CW\*(C`rpm\*(C'\fR (package format) and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2880|\*(C`yum\*(C'\fR (package management). |\&\f(CW\*(C`yum\*(C'\fR (package management). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2882|\*(C`unknown\*(C'\fR if we could not determine the |This returns the string \f(CW\*(C`unknown\*(C'\fR if we could not determine the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2886|\*(C`yum\*(C'\fR, \f(CW\*(C`up2date\*(C'\fR, |Possible strings include: \f(CW\*(C`yum\*(C'\fR, \f(CW\*(C`up2date\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2887|\*(C`apt\*(C'\fR (for all Debian derivatives), |\&\f(CW\*(C`apt\*(C'\fR (for all Debian derivatives), )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2888|\*(C`portage\*(C'\fR, \f(CW\*(C`pisi\*(C'\fR, \f(CW\*(C`pacman\*(C'\fR, \f(CW\*(C`urpmi\*(C'\fR, \f(CW\*(C`zypper\*(C'\fR. |\&\f(CW\*(C`portage\*(C'\fR, \f(CW\*(C`pisi\*(C'\fR, \f(CW\*(C`pacman\*(C'\fR, \f(CW\*(C`urpmi\*(C'\fR, \f(CW\*(C`zypper\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2901|\*(C`unknown\*(C'\fR is returned. |string \f(CW\*(C`unknown\*(C'\fR is returned. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2911|\*(C`HKLM\eSoftware\eMicrosoft\eWindows NT\eCurrentVersion\*(C'\fR |\&\f(CW\*(C`HKLM\eSoftware\eMicrosoft\eWindows NT\eCurrentVersion\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2912|\*(C`InstallationType\*(C'\fR which is usually a string such as |\&\f(CW\*(C`InstallationType\*(C'\fR which is usually a string such as )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2913|\*(C`Client\*(C'\fR or \f(CW\*(C`Server\*(C'\fR (other values are possible). This |\&\f(CW\*(C`Client\*(C'\fR or \f(CW\*(C`Server\*(C'\fR (other values are possible). This )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2917|\*(C`Client\*(C'\fR and the latter is \f(CW\*(C`Server\*(C'\fR). |but the former is \f(CW\*(C`Client\*(C'\fR and the latter is \f(CW\*(C`Server\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2920|\*(C`Desktop\*(C'\fR, \f(CW\*(C`Server\*(C'\fR and so on. But |the product variant such as \f(CW\*(C`Desktop\*(C'\fR, \f(CW\*(C`Server\*(C'\fR and so on. But )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2924|\*(C`unknown\*(C'\fR is returned. |string \f(CW\*(C`unknown\*(C'\fR is returned. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2927|\*(C`$g\->inspect_get_product_name\*(C'\fR, |See also \f(CW\*(C`$g\->inspect_get_product_name\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2928|\*(C`$g\->inspect_get_major_version\*(C'\fR. |\&\f(CW\*(C`$g\->inspect_get_major_version\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2933|\*(C`$g\->inspect_os\*(C'\fR, |devices, as returned from a previous call to \f(CW\*(C`$g\->inspect_os\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2937|\*(C`$g\->inspect_os\*(C'\fR. |found or the caller has not called \f(CW\*(C`$g\->inspect_os\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|2990|\*(C`ControlSet001\*(C'\fR. |The CurrentControlSet is a registry key name such as \f(CW\*(C`ControlSet001\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3001|\*(C`/WINDOWS\*(C'\fR. |The systemroot is a directory path such as \f(CW\*(C`/WINDOWS\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3011|\*(C`$g\->inspect_get_format\*(C'\fR returns \f(CW\*(C`installer\*(C'\fR (this |If \f(CW\*(C`$g\->inspect_get_format\*(C'\fR returns \f(CW\*(C`installer\*(C'\fR (this )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3019|\*(C`$g\->inspect_get_format\*(C'\fR returns \f(CW\*(C`installer\*(C'\fR (this |If \f(CW\*(C`$g\->inspect_get_format\*(C'\fR returns \f(CW\*(C`installer\*(C'\fR (this )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3027|\*(C`$g\->inspect_get_format\*(C'\fR returns \f(CW\*(C`installer\*(C'\fR (this |If \f(CW\*(C`$g\->inspect_get_format\*(C'\fR returns \f(CW\*(C`installer\*(C'\fR (this )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3040|\*(C`$g\->inspect_os\*(C'\fR, then |inspection \s-1API\s0. You have to call \f(CW\*(C`$g\->inspect_os\*(C'\fR, then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3041|\*(C`$g\->inspect_get_mountpoints\*(C'\fR, then mount up the disks, |\&\f(CW\*(C`$g\->inspect_get_mountpoints\*(C'\fR, then mount up the disks, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3045|\*(C`$g\->inspect_get_*\*(C'\fR calls which are just returning |\&\f(CW\*(C`$g\->inspect_get_*\*(C'\fR calls which are just returning )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3066|\*(C`app_name\*(C'\fR instead. |Callers needing to display something can use \f(CW\*(C`app_name\*(C'\fR instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3141|\*(C`$g\->inspect_os\*(C'\fR, then |inspection \s-1API\s0. You have to call \f(CW\*(C`$g\->inspect_os\*(C'\fR, then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3142|\*(C`$g\->inspect_get_mountpoints\*(C'\fR, then mount up the disks, |\&\f(CW\*(C`$g\->inspect_get_mountpoints\*(C'\fR, then mount up the disks, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3146|\*(C`$g\->inspect_get_*\*(C'\fR calls which are just returning |\&\f(CW\*(C`$g\->inspect_get_*\*(C'\fR calls which are just returning )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3167|\*(C`app2_name\*(C'\fR instead. |Callers needing to display something can use \f(CW\*(C`app2_name\*(C'\fR instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3252|\*(C`$g\->inspect_get_*\*(C'\fR functions in order to query further |\&\f(CW\*(C`$g\->inspect_get_*\*(C'\fR functions in order to query further )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3257|\*(C`$g\->mount_ro\*(C'\fR and \f(CW\*(C`$g\->umount_all\*(C'\fR in order to mount |\&\f(CW\*(C`$g\->mount_ro\*(C'\fR and \f(CW\*(C`$g\->umount_all\*(C'\fR in order to mount )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3268|\*(C`$g\->list_filesystems\*(C'\fR. |See also \f(CW\*(C`$g\->list_filesystems\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3272|\*(C`true\*(C'\fR if and only if there is a block device |This returns \f(CW\*(C`true\*(C'\fR if and only if there is a block device )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3273|\*(C`path\*(C'\fR name. |with the given \f(CW\*(C`path\*(C'\fR name. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3275|\*(C`$g\->stat\*(C'\fR. |See also \f(CW\*(C`$g\->stat\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3286|\*(C`true\*(C'\fR if and only if there is a character device |This returns \f(CW\*(C`true\*(C'\fR if and only if there is a character device )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3287|\*(C`path\*(C'\fR name. |with the given \f(CW\*(C`path\*(C'\fR name. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3289|\*(C`$g\->stat\*(C'\fR. |See also \f(CW\*(C`$g\->stat\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3294|\*(C`CONFIG\*(C'\fR state). |(in the \f(CW\*(C`CONFIG\*(C'\fR state). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3300|\*(C`true\*(C'\fR if and only if there is a directory |This returns \f(CW\*(C`true\*(C'\fR if and only if there is a directory )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3301|\*(C`path\*(C'\fR name. Note that it returns false for |with the given \f(CW\*(C`path\*(C'\fR name. Note that it returns false for )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3304|\*(C`$g\->stat\*(C'\fR. |See also \f(CW\*(C`$g\->stat\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3308|\*(C`true\*(C'\fR if and only if there is a \s-1FIFO\s0 (named pipe) |This returns \f(CW\*(C`true\*(C'\fR if and only if there is a \s-1FIFO\s0 (named pipe) )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3309|\*(C`path\*(C'\fR name. |with the given \f(CW\*(C`path\*(C'\fR name. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3311|\*(C`$g\->stat\*(C'\fR. |See also \f(CW\*(C`$g\->stat\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3315|\*(C`true\*(C'\fR if and only if there is a regular file |This returns \f(CW\*(C`true\*(C'\fR if and only if there is a regular file )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3316|\*(C`path\*(C'\fR name. Note that it returns false for |with the given \f(CW\*(C`path\*(C'\fR name. Note that it returns false for )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3319|\*(C`$g\->stat\*(C'\fR. |See also \f(CW\*(C`$g\->stat\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3324|\*(C`LAUNCHING\*(C'\fR state). |(in the \f(CW\*(C`LAUNCHING\*(C'\fR state). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3330|\*(C`device\*(C'\fR is a logical volume, and |This command tests whether \f(CW\*(C`device\*(C'\fR is a logical volume, and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3336|\*(C`READY\*(C'\fR state). |(in the \f(CW\*(C`READY\*(C'\fR state). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3342|\*(C`true\*(C'\fR if and only if there is a Unix domain socket |This returns \f(CW\*(C`true\*(C'\fR if and only if there is a Unix domain socket )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3343|\*(C`path\*(C'\fR name. |with the given \f(CW\*(C`path\*(C'\fR name. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3345|\*(C`$g\->stat\*(C'\fR. |See also \f(CW\*(C`$g\->stat\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3349|\*(C`true\*(C'\fR if and only if there is a symbolic link |This returns \f(CW\*(C`true\*(C'\fR if and only if there is a symbolic link )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3350|\*(C`path\*(C'\fR name. |with the given \f(CW\*(C`path\*(C'\fR name. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3352|\*(C`$g\->stat\*(C'\fR. |See also \f(CW\*(C`$g\->stat\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3367|\*(C`$g\->isoinfo_device\*(C'\fR except that it |This is the same as \f(CW\*(C`$g\->isoinfo_device\*(C'\fR except that it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3371|\*(C`$g\->isoinfo_device\*(C'\fR. |you would call \f(CW\*(C`$g\->isoinfo_device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3375|\*(C`device\*(C'\fR is an \s-1ISO\s0 device. This returns a struct of information |\&\f(CW\*(C`device\*(C'\fR is an \s-1ISO\s0 device. This returns a struct of information )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3390|\*(C`$g\->shutdown\*(C'\fR instead. |Do not call this. See: \f(CW\*(C`$g\->shutdown\*(C'\fR instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3407|\*(C`$g\->launch\*(C'\fR twice on the same handle. Although |Do not call \f(CW\*(C`$g\->launch\*(C'\fR twice on the same handle. Although )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3414|\*(C`owner\*(C'\fR and group to \f(CW\*(C`group\*(C'\fR. |Change the file owner to \f(CW\*(C`owner\*(C'\fR and group to \f(CW\*(C`group\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3415|\*(C`$g\->chown\*(C'\fR but if \f(CW\*(C`path\*(C'\fR is a symlink then |This is like \f(CW\*(C`$g\->chown\*(C'\fR but if \f(CW\*(C`path\*(C'\fR is a symlink then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3428|\*(C`$g\->list_ldm_volumes\*(C'\fR and \f(CW\*(C`$g\->list_ldm_partitions\*(C'\fR |Call \f(CW\*(C`$g\->list_ldm_volumes\*(C'\fR and \f(CW\*(C`$g\->list_ldm_partitions\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3432|\*(C`$g\->launch\*(C'\fR time. |since it is done automatically at \f(CW\*(C`$g\->launch\*(C'\fR time. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3438|\*(C`diskgroup\*(C'\fR |Return the disks in a Windows dynamic disk group. The \f(CW\*(C`diskgroup\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3440|\*(C`$g\->ldmtool_scan\*(C'\fR. |the list returned by \f(CW\*(C`$g\->ldmtool_scan\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3444|\*(C`diskgroup\*(C'\fR |Return the name of a Windows dynamic disk group. The \f(CW\*(C`diskgroup\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3446|\*(C`$g\->ldmtool_scan\*(C'\fR. |the list returned by \f(CW\*(C`$g\->ldmtool_scan\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3450|\*(C`diskgroup\*(C'\fR |Return the volumes in a Windows dynamic disk group. The \f(CW\*(C`diskgroup\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3452|\*(C`$g\->ldmtool_scan\*(C'\fR. |the list returned by \f(CW\*(C`$g\->ldmtool_scan\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3456|\*(C`$g\->ldmtool_create_all\*(C'\fR. |This is essentially the opposite of \f(CW\*(C`$g\->ldmtool_create_all\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3464|\*(C`$g\->ldmtool_*\*(C'\fR functions. |identifiers can be passed to other \f(CW\*(C`$g\->ldmtool_*\*(C'\fR functions. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3467|\*(C`$g\->ldmtool_scan_devices\*(C'\fR instead. |block devices, call \f(CW\*(C`$g\->ldmtool_scan_devices\*(C'\fR instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3473|\*(C`$g\->ldmtool_*\*(C'\fR functions. |identifiers can be passed to other \f(CW\*(C`$g\->ldmtool_*\*(C'\fR functions. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3475|\*(C`devices\*(C'\fR is a list of block devices which are |The parameter \f(CW\*(C`devices\*(C'\fR is a list of block devices which are )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3480|\*(C`volume\*(C'\fR in the disk |Return the hint field of the volume named \f(CW\*(C`volume\*(C'\fR in the disk )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3481|\*(C`diskgroup\*(C'\fR. This may not be defined, in which |group with \s-1GUID\s0 \f(CW\*(C`diskgroup\*(C'\fR. This may not be defined, in which )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3483|\*(C`E:\*(C'\fR. |not always, the name of a Windows drive, eg. \f(CW\*(C`E:\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3487|\*(C`volume\*(C'\fR in the disk |Return the list of partitions in the volume named \f(CW\*(C`volume\*(C'\fR in the disk )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3488|\*(C`diskgroup\*(C'\fR. |group with \s-1GUID\s0 \f(CW\*(C`diskgroup\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3492|\*(C`volume\*(C'\fR in the disk |Return the type of the volume named \f(CW\*(C`volume\*(C'\fR in the disk )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3493|\*(C`diskgroup\*(C'\fR. |group with \s-1GUID\s0 \f(CW\*(C`diskgroup\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3496|\*(C`simple\*(C'\fR, \f(CW\*(C`spanned\*(C'\fR, \f(CW\*(C`striped\*(C'\fR, \f(CW\*(C`mirrored\*(C'\fR, \f(CW\*(C`raid5\*(C'\fR. |\&\f(CW\*(C`simple\*(C'\fR, \f(CW\*(C`spanned\*(C'\fR, \f(CW\*(C`striped\*(C'\fR, \f(CW\*(C`mirrored\*(C'\fR, \f(CW\*(C`raid5\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3501|\*(C`path\*(C'\fR named \f(CW\*(C`name\*(C'\fR. |Get a single extended attribute from file \f(CW\*(C`path\*(C'\fR named \f(CW\*(C`name\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3502|\*(C`path\*(C'\fR is a symlink, then this call returns an extended |If \f(CW\*(C`path\*(C'\fR is a symlink, then this call returns an extended )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3506|\*(C`$g\->getxattrs\*(C'\fR. However some Linux |in one go by calling \f(CW\*(C`$g\->getxattrs\*(C'\fR. However some Linux )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3513|\*(C`name\*(C'\fR, this returns an error. |is no extended attribute named \f(CW\*(C`name\*(C'\fR, this returns an error. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3515|\*(C`$g\->lgetxattrs\*(C'\fR, \f(CW\*(C`$g\->getxattr\*(C'\fR, \fIattr\fR\|(5). |See also: \f(CW\*(C`$g\->lgetxattrs\*(C'\fR, \f(CW\*(C`$g\->getxattr\*(C'\fR, \fIattr\fR\|(5). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3519|\*(C`$g\->getxattrs\*(C'\fR, but if \f(CW\*(C`path\*(C'\fR |This is the same as \f(CW\*(C`$g\->getxattrs\*(C'\fR, but if \f(CW\*(C`path\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3527|\*(C`/dev/sda\*(C'\fR. |The full block device names are returned, eg. \f(CW\*(C`/dev/sda\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3529|\*(C`$g\->list_filesystems\*(C'\fR. |See also \f(CW\*(C`$g\->list_filesystems\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3533|\*(C`label\*(C'\fR parameter |If you add drives using the optional \f(CW\*(C`label\*(C'\fR parameter )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3534|\*(C`$g\->add_drive_opts\*(C'\fR, you can use this call to |of \f(CW\*(C`$g\->add_drive_opts\*(C'\fR, you can use this call to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3536|\*(C`/dev/sda\*(C'\fR and \f(CW\*(C`/dev/sda1\*(C'\fR). |names (like \f(CW\*(C`/dev/sda\*(C'\fR and \f(CW\*(C`/dev/sda1\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3539|\*(C`/dev/disk/guestfs\*(C'\fR prefix), and the values |(\fIwithout\fR the \f(CW\*(C`/dev/disk/guestfs\*(C'\fR prefix), and the values )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3541|\*(C`/dev/sda\*(C'\fR and \f(CW\*(C`/dev/sda1\*(C'\fR). |(eg. \f(CW\*(C`/dev/sda\*(C'\fR and \f(CW\*(C`/dev/sda1\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3547|\*(C`/dev/mapper/*\*(C'\fR devices, eg. ones created |The returned list contains \f(CW\*(C`/dev/mapper/*\*(C'\fR devices, eg. ones created )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3548|\*(C`$g\->luks_open\*(C'\fR. |by a previous call to \f(CW\*(C`$g\->luks_open\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3551|\*(C`$g\->lvs\*(C'\fR if you want to list logical |returned in this list. Call \f(CW\*(C`$g\->lvs\*(C'\fR if you want to list logical )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3576|\*(C`$g\->mount\*(C'\fR and \f(CW\*(C`$g\->umount\*(C'\fR, and therefore you should |\&\f(CW\*(C`$g\->mount\*(C'\fR and \f(CW\*(C`$g\->umount\*(C'\fR, and therefore you should )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3585|\*(C`$g\->inspect_os\*(C'\fR to look for OSes). |(use \f(CW\*(C`$g\->inspect_os\*(C'\fR to look for OSes). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3607|\*(C`/dev/sda1\*(C'\fR |The full partition device names are returned, eg. \f(CW\*(C`/dev/sda1\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3610|\*(C`$g\->lvs\*(C'\fR. |call \f(CW\*(C`$g\->lvs\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3612|\*(C`$g\->list_filesystems\*(C'\fR. |See also \f(CW\*(C`$g\->list_filesystems\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3616|\*(C`directory\*(C'\fR (relative to the root directory, |List the files in \f(CW\*(C`directory\*(C'\fR (relative to the root directory, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3624|\*(C`directory\*(C'\fR in the format of 'ls \-laZ'. |List the files in \f(CW\*(C`directory\*(C'\fR in the format of 'ls \-laZ'. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3631|\*(C`ln\*(C'\fR command. |This command creates a hard link using the \f(CW\*(C`ln\*(C'\fR command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3635|\*(C`ln \-f\*(C'\fR command. |This command creates a hard link using the \f(CW\*(C`ln \-f\*(C'\fR command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3636|\*(C`linkname\*(C'\fR) if it exists already. |The \fI\-f\fR option removes the link (\f(CW\*(C`linkname\*(C'\fR) if it exists already. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3640|\*(C`ln \-s\*(C'\fR command. |This command creates a symbolic link using the \f(CW\*(C`ln \-s\*(C'\fR command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3644|\*(C`ln \-sf\*(C'\fR command, |This command creates a symbolic link using the \f(CW\*(C`ln \-sf\*(C'\fR command, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3645|\*(C`linkname\*(C'\fR) if it exists already. |The \fI\-f\fR option removes the link (\f(CW\*(C`linkname\*(C'\fR) if it exists already. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3649|\*(C`$g\->removexattr\*(C'\fR, but if \f(CW\*(C`path\*(C'\fR |This is the same as \f(CW\*(C`$g\->removexattr\*(C'\fR, but if \f(CW\*(C`path\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3655|\*(C`directory\*(C'\fR (relative to the root directory, |List the files in \f(CW\*(C`directory\*(C'\fR (relative to the root directory, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3662|\*(C`dir\*(C'\fR. The list of filenames |the filenames in the directory \f(CW\*(C`dir\*(C'\fR. The list of filenames )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3663|\*(C`filenames\*(C'\fR (on the host). |is written to the local file \f(CW\*(C`filenames\*(C'\fR (on the host). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3665|\*(C`\e0\*(C'\fR characters. |In the output file, the filenames are separated by \f(CW\*(C`\e0\*(C'\fR characters. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3667|\*(C`.\*(C'\fR and \f(CW\*(C`..\*(C'\fR are not returned. The filenames are not sorted. |\&\f(CW\*(C`.\*(C'\fR and \f(CW\*(C`..\*(C'\fR are not returned. The filenames are not sorted. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3671|\*(C`$g\->setxattr\*(C'\fR, but if \f(CW\*(C`path\*(C'\fR |This is the same as \f(CW\*(C`$g\->setxattr\*(C'\fR, but if \f(CW\*(C`path\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3677|\*(C`path\*(C'\fR. |Returns file information for the given \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3679|\*(C`$g\->stat\*(C'\fR except that if \f(CW\*(C`path\*(C'\fR |This is the same as \f(CW\*(C`$g\->stat\*(C'\fR except that if \f(CW\*(C`path\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3687|\*(C`$g\->lstat\*(C'\fR operation |This call allows you to perform the \f(CW\*(C`$g\->lstat\*(C'\fR operation )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3688|\*(C`path\*(C'\fR. |on multiple files, where all files are in the directory \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3689|\*(C`names\*(C'\fR is the list of files from this directory. |\&\f(CW\*(C`names\*(C'\fR is the list of files from this directory. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3692|\*(C`names\*(C'\fR list. If any name did not exist |correspondence to the \f(CW\*(C`names\*(C'\fR list. If any name did not exist )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3693|\*(C`ino\*(C'\fR field of that structure |or could not be lstat'd, then the \f(CW\*(C`ino\*(C'\fR field of that structure )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3694|\*(C`\-1\*(C'\fR. |is set to \f(CW\*(C`\-1\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3698|\*(C`$g\->lxattrlist\*(C'\fR for a similarly efficient call |See also \f(CW\*(C`$g\->lxattrlist\*(C'\fR for a similarly efficient call )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3703|\*(C`device\*(C'\fR. |This command adds a new key on \s-1LUKS\s0 device \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3704|\*(C`key\*(C'\fR is any existing key, and is used to access the device. |\&\f(CW\*(C`key\*(C'\fR is any existing key, and is used to access the device. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3705|\*(C`newkey\*(C'\fR is the new key to add. \f(CW\*(C`keyslot\*(C'\fR is the key slot |\&\f(CW\*(C`newkey\*(C'\fR is the new key to add. \f(CW\*(C`keyslot\*(C'\fR is the key slot )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3708|\*(C`keyslot\*(C'\fR already contains a key, then this |Note that if \f(CW\*(C`keyslot\*(C'\fR already contains a key, then this )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3709|\*(C`$g\->luks_kill_slot\*(C'\fR |command will fail. You have to use \f(CW\*(C`$g\->luks_kill_slot\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3715|\*(C`$g\->luks_open\*(C'\fR or \f(CW\*(C`$g\->luks_open_ro\*(C'\fR. The |\&\f(CW\*(C`$g\->luks_open\*(C'\fR or \f(CW\*(C`$g\->luks_open_ro\*(C'\fR. The )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3716|\*(C`device\*(C'\fR parameter must be the name of the \s-1LUKS\s0 mapping |\&\f(CW\*(C`device\*(C'\fR parameter must be the name of the \s-1LUKS\s0 mapping )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3717|\*(C`/dev/mapper/mapname\*(C'\fR) and \fInot\fR the name |device (ie. \f(CW\*(C`/dev/mapper/mapname\*(C'\fR) and \fInot\fR the name )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3722|\*(C`device\*(C'\fR and formats |This command erases existing data on \f(CW\*(C`device\*(C'\fR and formats )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3723|\*(C`key\*(C'\fR is the |the device as a \s-1LUKS\s0 encrypted device. \f(CW\*(C`key\*(C'\fR is the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3724|\*(C`slot\*(C'\fR. (\s-1LUKS\s0 |initial key, which is added to key slot \f(CW\*(C`slot\*(C'\fR. (\s-1LUKS\s0 )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3729|\*(C`$g\->luks_format\*(C'\fR but |This command is the same as \f(CW\*(C`$g\->luks_format\*(C'\fR but )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3730|\*(C`cipher\*(C'\fR used. |it also allows you to set the \f(CW\*(C`cipher\*(C'\fR used. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3734|\*(C`keyslot\*(C'\fR from the |This command deletes the key in key slot \f(CW\*(C`keyslot\*(C'\fR from the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3735|\*(C`device\*(C'\fR. \f(CW\*(C`key\*(C'\fR must be one of the |encrypted \s-1LUKS\s0 device \f(CW\*(C`device\*(C'\fR. \f(CW\*(C`key\*(C'\fR must be one of the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3743|\*(C`device\*(C'\fR is the encrypted block device or partition. |\&\f(CW\*(C`device\*(C'\fR is the encrypted block device or partition. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3746|\*(C`key\*(C'\fR parameter. |\&\s-1LUKS\s0 block device, in the \f(CW\*(C`key\*(C'\fR parameter. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3748|\*(C`/dev/mapper/mapname\*(C'\fR. |This creates a new block device called \f(CW\*(C`/dev/mapper/mapname\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3750|\*(C`device\*(C'\fR respectively. |encrypted to the underlying \f(CW\*(C`device\*(C'\fR respectively. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3753|\*(C`$g\->vgscan\*(C'\fR followed by \f(CW\*(C`$g\->vg_activate_all\*(C'\fR |calling \f(CW\*(C`$g\->vgscan\*(C'\fR followed by \f(CW\*(C`$g\->vg_activate_all\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3756|\*(C`$g\->list_dm_devices\*(C'\fR to list all device mapper |Use \f(CW\*(C`$g\->list_dm_devices\*(C'\fR to list all device mapper )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3761|\*(C`$g\->luks_open\*(C'\fR except that a read-only |This is the same as \f(CW\*(C`$g\->luks_open\*(C'\fR except that a read-only )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3766|\*(C`logvol\*(C'\fR |This creates an \s-1LVM\s0 logical volume called \f(CW\*(C`logvol\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3767|\*(C`volgroup\*(C'\fR, with \f(CW\*(C`size\*(C'\fR megabytes. |on the volume group \f(CW\*(C`volgroup\*(C'\fR, with \f(CW\*(C`size\*(C'\fR megabytes. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3771|\*(C`/dev/volgroup/logvol\*(C'\fR, |Create an \s-1LVM\s0 logical volume called \f(CW\*(C`/dev/volgroup/logvol\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3772|\*(C`percent\*(C'\fR % of the free space remaining |using approximately \f(CW\*(C`percent\*(C'\fR % of the free space remaining )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3773|\*(C`percent\*(C'\fR is \f(CW100\fR |in the volume group. Most usefully, when \f(CW\*(C`percent\*(C'\fR is \f(CW100\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3779|\*(C`/dev/mapper/VG\-LV\*(C'\fR |might find to the canonical name. For example, \f(CW\*(C`/dev/mapper/VG\-LV\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3780|\*(C`/dev/VG/LV\*(C'\fR. |is converted to \f(CW\*(C`/dev/VG/LV\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3782|\*(C`lvname\*(C'\fR parameter does |This command returns an error if the \f(CW\*(C`lvname\*(C'\fR parameter does )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3785|\*(C`$g\->is_lv\*(C'\fR, \f(CW\*(C`$g\->canonical_device_name\*(C'\fR. |See also \f(CW\*(C`$g\->is_lv\*(C'\fR, \f(CW\*(C`$g\->canonical_device_name\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3789|\*(C`$g\->lvm_set_filter\*(C'\fR. \s-1LVM\s0 |This undoes the effect of \f(CW\*(C`$g\->lvm_set_filter\*(C'\fR. \s-1LVM\s0 )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3803|\*(C`devices\*(C'\fR, |able to \*(L"see\*(R" the block devices in the list \f(CW\*(C`devices\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3827|\*(C`device\*(C'\fR, where \f(CW\*(C`device\*(C'\fR is |Remove an \s-1LVM\s0 logical volume \f(CW\*(C`device\*(C'\fR, where \f(CW\*(C`device\*(C'\fR is )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3828|\*(C`/dev/VG/LV\*(C'\fR. |the path to the \s-1LV\s0, such as \f(CW\*(C`/dev/VG/LV\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3831|\*(C`/dev/VG\*(C'\fR. |the \s-1VG\s0 name, \f(CW\*(C`/dev/VG\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3835|\*(C`logvol\*(C'\fR with the new name \f(CW\*(C`newlogvol\*(C'\fR. |Rename a logical volume \f(CW\*(C`logvol\*(C'\fR with the new name \f(CW\*(C`newlogvol\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3840|\*(C`mbytes\*(C'\fR. When reducing, data in the reduced part |volume to \f(CW\*(C`mbytes\*(C'\fR. When reducing, data in the reduced part )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3845|\*(C`lv\*(C'\fR so that it fills |This expands an existing logical volume \f(CW\*(C`lv\*(C'\fR so that it fills )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3846|\*(C`pc\*(C'\fR% of the remaining free space in the volume group. Commonly |\&\f(CW\*(C`pc\*(C'\fR% of the remaining free space in the volume group. Commonly )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3857|\*(C`/dev/VolGroup00/LogVol00\*(C'\fR). |(eg. \f(CW\*(C`/dev/VolGroup00/LogVol00\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3859|\*(C`$g\->lvs_full\*(C'\fR, \f(CW\*(C`$g\->list_filesystems\*(C'\fR. |See also \f(CW\*(C`$g\->lvs_full\*(C'\fR, \f(CW\*(C`$g\->list_filesystems\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3868|\*(C`device\*(C'\fR. |This command returns the \s-1UUID\s0 of the \s-1LVM\s0 \s-1LV\s0 \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3873|\*(C`path\*(C'\fR. |of multiple files, where all files are in the directory \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3874|\*(C`names\*(C'\fR is the list of files from this directory. |\&\f(CW\*(C`names\*(C'\fR is the list of files from this directory. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3878|\*(C`attrname\*(C'\fR. \f(CW\*(C`attrval\*(C'\fR in this struct is zero-length |\&\f(CW\*(C`attrname\*(C'\fR. \f(CW\*(C`attrval\*(C'\fR in this struct is zero-length )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3879|\*(C`lgetxattr\*(C'\fR for this |to indicate there was an error doing \f(CW\*(C`lgetxattr\*(C'\fR for this )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3888|\*(C`$g\->lstatlist\*(C'\fR for a similarly efficient call |See also \f(CW\*(C`$g\->lstatlist\*(C'\fR for a similarly efficient call )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3894|\*(C`$g\->add_drive_opts\*(C'\fR and similar calls). |handle (eg. by \f(CW\*(C`$g\->add_drive_opts\*(C'\fR and similar calls). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3904|\*(C`name\*(C'\fR on the devices |Create a Linux md (\s-1RAID\s0) device named \f(CW\*(C`name\*(C'\fR on the devices )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3905|\*(C`devices\*(C'\fR. |in the list \f(CW\*(C`devices\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3918|\*(C`devices = ["/dev/sda"]\*(C'\fR and \f(CW\*(C`missingbitmap = 0x1\*(C'\fR then |If \f(CW\*(C`devices = ["/dev/sda"]\*(C'\fR and \f(CW\*(C`missingbitmap = 0x1\*(C'\fR then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3919|\*(C`[, "/dev/sda"]\*(C'\fR. |the resulting array would be \f(CW\*(C`[, "/dev/sda"]\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3921|\*(C`devices = ["/dev/sda"]\*(C'\fR and \f(CW\*(C`missingbitmap = 0x2\*(C'\fR then |If \f(CW\*(C`devices = ["/dev/sda"]\*(C'\fR and \f(CW\*(C`missingbitmap = 0x2\*(C'\fR then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3922|\*(C`["/dev/sda", ]\*(C'\fR. |the resulting array would be \f(CW\*(C`["/dev/sda", ]\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3926|\*(C`devices\*(C'\fR + the number of bits set in |The length of \f(CW\*(C`devices\*(C'\fR + the number of bits set in )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3927|\*(C`missingbitmap\*(C'\fR must equal \f(CW\*(C`nrdevices\*(C'\fR + \f(CW\*(C`spare\*(C'\fR. |\&\f(CW\*(C`missingbitmap\*(C'\fR must equal \f(CW\*(C`nrdevices\*(C'\fR + \f(CW\*(C`spare\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3933|\*(C`devices\*(C'\fR plus |If not set, this defaults to the length of \f(CW\*(C`devices\*(C'\fR plus )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3934|\*(C`missingbitmap\*(C'\fR. |the number of bits set in \f(CW\*(C`missingbitmap\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3953|\*(C`raid1\*(C'\fR. |If not set, this defaults to \f(CW\*(C`raid1\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3991|\*(C`md\*(C'\fR. |up the single software \s-1RAID\s0 array device \f(CW\*(C`md\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|3993|\*(C`$g\->list_md_devices\*(C'\fR. |To get a list of software \s-1RAID\s0 devices, call \f(CW\*(C`$g\->list_md_devices\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4037|\*(C`md\*(C'\fR. The |This command deactivates the \s-1MD\s0 array named \f(CW\*(C`md\*(C'\fR. The )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4042|\*(C`path\*(C'\fR. |Create a directory named \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4047|\*(C`mode\*(C'\fR. |of the directory to \f(CW\*(C`mode\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4050|\*(C`mode & ~umask & 01777\*(C'\fR. Non-native-Linux filesystems may |be \f(CW\*(C`mode & ~umask & 01777\*(C'\fR. Non-native-Linux filesystems may )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4053|\*(C`$g\->mkdir\*(C'\fR, \f(CW\*(C`$g\->umask\*(C'\fR |See also \f(CW\*(C`$g\->mkdir\*(C'\fR, \f(CW\*(C`$g\->umask\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4057|\*(C`path\*(C'\fR, creating any parent directories |Create a directory named \f(CW\*(C`path\*(C'\fR, creating any parent directories )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4058|\*(C`mkdir \-p\*(C'\fR shell command. |as necessary. This is like the \f(CW\*(C`mkdir \-p\*(C'\fR shell command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4063|\*(C`tmpl\*(C'\fR parameter should be a full pathname for the |\&\f(CW\*(C`tmpl\*(C'\fR parameter should be a full pathname for the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4083|\*(C`mke2fs\*(C'\fR is used to create an ext2, ext3, or ext4 filesystem |\&\f(CW\*(C`mke2fs\*(C'\fR is used to create an ext2, ext3, or ext4 filesystem )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4084|\*(C`device\*(C'\fR. |on \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4086|\*(C`blockscount\*(C'\fR is the size of the filesystem in blocks. |The optional \f(CW\*(C`blockscount\*(C'\fR is the size of the filesystem in blocks. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4087|\*(C`device\*(C'\fR. Note if the |If omitted it defaults to the size of \f(CW\*(C`device\*(C'\fR. Note if the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4088|\*(C`mke2fs\*(C'\fR will |filesystem is too small to contain a journal, \f(CW\*(C`mke2fs\*(C'\fR will )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4093|\*(C`device\*(C'\fR with |This creates an ext2/3/4 filesystem on \f(CW\*(C`device\*(C'\fR with )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4094|\*(C`journal\*(C'\fR. It is equivalent |an external journal on \f(CW\*(C`journal\*(C'\fR. It is equivalent )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4101|\*(C`$g\->mke2journal\*(C'\fR. |See also \f(CW\*(C`$g\->mke2journal\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4112|\*(C`device\*(C'\fR with |This creates an ext2/3/4 filesystem on \f(CW\*(C`device\*(C'\fR with )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4113|\*(C`label\*(C'\fR. |an external journal on the journal labeled \f(CW\*(C`label\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4115|\*(C`$g\->mke2journal_L\*(C'\fR. |See also \f(CW\*(C`$g\->mke2journal_L\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4126|\*(C`device\*(C'\fR with |This creates an ext2/3/4 filesystem on \f(CW\*(C`device\*(C'\fR with )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4127|\*(C`uuid\*(C'\fR. |an external journal on the journal with \s-1UUID\s0 \f(CW\*(C`uuid\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4129|\*(C`$g\->mke2journal_U\*(C'\fR. |See also \f(CW\*(C`$g\->mke2journal_U\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4140|\*(C`device\*(C'\fR. It is equivalent |This creates an ext2 external journal on \f(CW\*(C`device\*(C'\fR. It is equivalent )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4156|\*(C`device\*(C'\fR with label \f(CW\*(C`label\*(C'\fR. |This creates an ext2 external journal on \f(CW\*(C`device\*(C'\fR with label \f(CW\*(C`label\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4167|\*(C`device\*(C'\fR with \s-1UUID\s0 \f(CW\*(C`uuid\*(C'\fR. |This creates an ext2 external journal on \f(CW\*(C`device\*(C'\fR with \s-1UUID\s0 \f(CW\*(C`uuid\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4178|\*(C`path\*(C'\fR with |This call creates a \s-1FIFO\s0 (named pipe) called \f(CW\*(C`path\*(C'\fR with )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4179|\*(C`mode\*(C'\fR. It is just a convenient wrapper around |mode \f(CW\*(C`mode\*(C'\fR. It is just a convenient wrapper around )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4180|\*(C`$g\->mknod\*(C'\fR. |\&\f(CW\*(C`$g\->mknod\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4186|\*(C`device\*(C'\fR. The filesystem |This function creates a filesystem on \f(CW\*(C`device\*(C'\fR. The filesystem )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4187|\*(C`fstype\*(C'\fR, for example \f(CW\*(C`ext3\*(C'\fR. |type is \f(CW\*(C`fstype\*(C'\fR, for example \f(CW\*(C`ext3\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4198|\*(C`blocksize\*(C'\fR parameter is treated as |For \s-1VFAT\s0 and \s-1NTFS\s0 the \f(CW\*(C`blocksize\*(C'\fR parameter is treated as )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4211|\*(C`gfs\*(C'\fR or |You cannot use this optional parameter with the \f(CW\*(C`gfs\*(C'\fR or )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4212|\*(C`gfs2\*(C'\fR filesystem type. |\&\f(CW\*(C`gfs2\*(C'\fR filesystem type. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4233|\*(C`$g\->mkfs\*(C'\fR, but it allows you to |This call is similar to \f(CW\*(C`$g\->mkfs\*(C'\fR, but it allows you to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4238|\*(C`blocksize\*(C'\fR parameter is treated as |For \s-1VFAT\s0 and \s-1NTFS\s0 the \f(CW\*(C`blocksize\*(C'\fR parameter is treated as )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4256|\*(C`$g\->mkfs\*(C'\fR. |To create general filesystems, use \f(CW\*(C`$g\->mkfs\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4260|\*(C`lost+found\*(C'\fR directory, normally in the root directory |Make the \f(CW\*(C`lost+found\*(C'\fR directory, normally in the root directory )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4261|\*(C`mountpoint\*(C'\fR is the directory under |of an ext2/3/4 filesystem. \f(CW\*(C`mountpoint\*(C'\fR is the directory under )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4262|\*(C`lost+found\*(C'\fR directory. |which we try to create the \f(CW\*(C`lost+found\*(C'\fR directory. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4266|\*(C`$g\->mkmountpoint\*(C'\fR and \f(CW\*(C`$g\->rmmountpoint\*(C'\fR are |\&\f(CW\*(C`$g\->mkmountpoint\*(C'\fR and \f(CW\*(C`$g\->rmmountpoint\*(C'\fR are )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4292|\*(C`$g\->mkmountpoint\*(C'\fR is not compatible with \f(CW\*(C`$g\->umount_all\*(C'\fR. |\&\f(CW\*(C`$g\->mkmountpoint\*(C'\fR is not compatible with \f(CW\*(C`$g\->umount_all\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4296|\*(C`$g\->umount_all\*(C'\fR unmounts filesystems by sorting the paths |\&\f(CW\*(C`$g\->umount_all\*(C'\fR unmounts filesystems by sorting the paths )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4303|\*(C`$g\->set_autosync\*(C'\fR, this is set by default on |Autosync [see \f(CW\*(C`$g\->set_autosync\*(C'\fR, this is set by default on )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4304|\*(C`$g\->umount_all\*(C'\fR to be called when the handle |handles] can cause \f(CW\*(C`$g\->umount_all\*(C'\fR to be called when the handle )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4312|\*(C`mode\*(C'\fR parameter should be the mode, using the standard |The \f(CW\*(C`mode\*(C'\fR parameter should be the mode, using the standard )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4313|\*(C`devmajor\*(C'\fR and \f(CW\*(C`devminor\*(C'\fR are the |constants. \f(CW\*(C`devmajor\*(C'\fR and \f(CW\*(C`devminor\*(C'\fR are the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4321|\*(C`$g\->mknod_b\*(C'\fR, \f(CW\*(C`$g\->mknod_c\*(C'\fR or \f(CW\*(C`$g\->mkfifo\*(C'\fR |\&\f(CW\*(C`$g\->mknod_b\*(C'\fR, \f(CW\*(C`$g\->mknod_c\*(C'\fR or \f(CW\*(C`$g\->mkfifo\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4329|\*(C`path\*(C'\fR with |This call creates a block device node called \f(CW\*(C`path\*(C'\fR with )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4330|\*(C`mode\*(C'\fR and device major/minor \f(CW\*(C`devmajor\*(C'\fR and \f(CW\*(C`devminor\*(C'\fR. |mode \f(CW\*(C`mode\*(C'\fR and device major/minor \f(CW\*(C`devmajor\*(C'\fR and \f(CW\*(C`devminor\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4331|\*(C`$g\->mknod\*(C'\fR. |It is just a convenient wrapper around \f(CW\*(C`$g\->mknod\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4337|\*(C`path\*(C'\fR with |This call creates a char device node called \f(CW\*(C`path\*(C'\fR with )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4338|\*(C`mode\*(C'\fR and device major/minor \f(CW\*(C`devmajor\*(C'\fR and \f(CW\*(C`devminor\*(C'\fR. |mode \f(CW\*(C`mode\*(C'\fR and device major/minor \f(CW\*(C`devmajor\*(C'\fR and \f(CW\*(C`devminor\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4339|\*(C`$g\->mknod\*(C'\fR. |It is just a convenient wrapper around \f(CW\*(C`$g\->mknod\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4345|\*(C`device\*(C'\fR. |Create a Linux swap partition on \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4347|\*(C`label\*(C'\fR and \f(CW\*(C`uuid\*(C'\fR allow you to set the |The option arguments \f(CW\*(C`label\*(C'\fR and \f(CW\*(C`uuid\*(C'\fR allow you to set the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4356|\*(C`device\*(C'\fR with label \f(CW\*(C`label\*(C'\fR. |Create a swap partition on \f(CW\*(C`device\*(C'\fR with label \f(CW\*(C`label\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4359|\*(C`/dev/sda\*(C'\fR), just to a partition. This appears to be |(eg. \f(CW\*(C`/dev/sda\*(C'\fR), just to a partition. This appears to be )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4371|\*(C`device\*(C'\fR with \s-1UUID\s0 \f(CW\*(C`uuid\*(C'\fR. |Create a swap partition on \f(CW\*(C`device\*(C'\fR with \s-1UUID\s0 \f(CW\*(C`uuid\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4385|\*(C`$g\->fallocate\*(C'\fR. |file. To create the file itself, use something like \f(CW\*(C`$g\->fallocate\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4390|\*(C`tmpl\*(C'\fR parameter should be a full pathname for the |\&\f(CW\*(C`tmpl\*(C'\fR parameter should be a full pathname for the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4406|\*(C`suffix\*(C'\fR parameter is given, then the suffix |If the optional \f(CW\*(C`suffix\*(C'\fR parameter is given, then the suffix )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4407|\*(C`.txt\*(C'\fR) is appended to the temporary name. |(eg. \f(CW\*(C`.txt\*(C'\fR) is appended to the temporary name. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4409|\*(C`$g\->mkdtemp\*(C'\fR. |See also: \f(CW\*(C`$g\->mkdtemp\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4416|\*(C`appliance/kmod.whitelist.in\*(C'\fR in the source). |was built (see \f(CW\*(C`appliance/kmod.whitelist.in\*(C'\fR in the source). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4421|\*(C`/dev/sda\*(C'\fR, \f(CW\*(C`/dev/sdb\*(C'\fR and so on, as they were added to |are named \f(CW\*(C`/dev/sda\*(C'\fR, \f(CW\*(C`/dev/sdb\*(C'\fR and so on, as they were added to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4423|\*(C`/dev/sda1\*(C'\fR). Also \s-1LVM\s0 \f(CW\*(C`/dev/VG/LV\*(C'\fR\-style |the usual names (eg. \f(CW\*(C`/dev/sda1\*(C'\fR). Also \s-1LVM\s0 \f(CW\*(C`/dev/VG/LV\*(C'\fR\-style )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4427|\*(C`/\*(C'\fR before others can be mounted. Other |first be mounted on \f(CW\*(C`/\*(C'\fR before others can be mounted. Other )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4435|\*(C`sync\*(C'\fR and \f(CW\*(C`noatime\*(C'\fR. The \f(CW\*(C`sync\*(C'\fR option greatly slowed |\&\f(CW\*(C`sync\*(C'\fR and \f(CW\*(C`noatime\*(C'\fR. The \f(CW\*(C`sync\*(C'\fR option greatly slowed )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4438|\*(C`$g\->mount_options\*(C'\fR instead (using an empty string for the |\&\f(CW\*(C`$g\->mount_options\*(C'\fR instead (using an empty string for the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4444|\*(C`localmountpoint\*(C'\fR. |a local mountpoint (directory) called \f(CW\*(C`localmountpoint\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4446|\*(C`localmountpoint\*(C'\fR are redirected through libguestfs. |\&\f(CW\*(C`localmountpoint\*(C'\fR are redirected through libguestfs. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4448|\*(C`readonly\*(C'\fR flag is set to true, then |If the optional \f(CW\*(C`readonly\*(C'\fR flag is set to true, then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4449|\*(C`EROFS\*(C'\fR. |writes to the filesystem return error \f(CW\*(C`EROFS\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4451|\*(C`options\*(C'\fR is a comma-separated list of mount options. |\&\f(CW\*(C`options\*(C'\fR is a comma-separated list of mount options. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4454|\*(C`cachetimeout\*(C'\fR sets the timeout (in seconds) for cached directory |\&\f(CW\*(C`cachetimeout\*(C'\fR sets the timeout (in seconds) for cached directory )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4458|\*(C`debugcalls\*(C'\fR is set to true, then additional debugging |If \f(CW\*(C`debugcalls\*(C'\fR is set to true, then additional debugging )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4461|\*(C`$g\->mount_local\*(C'\fR returns, the filesystem is ready, |When \f(CW\*(C`$g\->mount_local\*(C'\fR returns, the filesystem is ready, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4463|\*(C`$g\->mount_local_run\*(C'\fR to run the main loop. |have to call \f(CW\*(C`$g\->mount_local_run\*(C'\fR to run the main loop. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4472|\*(C`$g\->mount_local\*(C'\fR |This should only be called after \f(CW\*(C`$g\->mount_local\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4480|\*(C`$g\->mount_local\*(C'\fR, subject to the usual rules |called \f(CW\*(C`$g\->mount_local\*(C'\fR, subject to the usual rules )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4488|\*(C`file\*(C'\fR (a filesystem image |This command lets you mount \f(CW\*(C`file\*(C'\fR (a filesystem image )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4490|\*(C`mount \-o loop file mountpoint\*(C'\fR. |the command \f(CW\*(C`mount \-o loop file mountpoint\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4494|\*(C`$g\->mount\*(C'\fR command, but it |This is the same as the \f(CW\*(C`$g\->mount\*(C'\fR command, but it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4498|\*(C`options\*(C'\fR parameter is an empty string, then |If the \f(CW\*(C`options\*(C'\fR parameter is an empty string, then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4504|\*(C`$g\->mount\*(C'\fR command, but it |This is the same as the \f(CW\*(C`$g\->mount\*(C'\fR command, but it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4509|\*(C`$g\->mount\*(C'\fR command, but it |This is the same as the \f(CW\*(C`$g\->mount\*(C'\fR command, but it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4515|\*(C`$g\->mounts\*(C'\fR. That call returns |This call is similar to \f(CW\*(C`$g\->mounts\*(C'\fR. That call returns )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4522|\*(C`/dev/sda1\*(C'\fR, \f(CW\*(C`/dev/VG/LV\*(C'\fR). |the list of devices (eg. \f(CW\*(C`/dev/sda1\*(C'\fR, \f(CW\*(C`/dev/VG/LV\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4526|\*(C`$g\->mountpoints\*(C'\fR |See also: \f(CW\*(C`$g\->mountpoints\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4530|\*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR where \f(CW\*(C`dest\*(C'\fR is |This moves a file from \f(CW\*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR where \f(CW\*(C`dest\*(C'\fR is )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4533|\*(C`$g\->rename\*(C'\fR. |See also: \f(CW\*(C`$g\->rename\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4539|\*(C`$g\->list_devices\*(C'\fR. |be returned if you called \f(CW\*(C`$g\->list_devices\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4542|\*(C`$g\->max_disks\*(C'\fR. |call \f(CW\*(C`$g\->max_disks\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4547|\*(C`device\*(C'\fR for mountability. (Not all \s-1NTFS\s0 volumes can |an \s-1NTFS\s0 \f(CW\*(C`device\*(C'\fR for mountability. (Not all \s-1NTFS\s0 volumes can )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4550|\*(C`rw\*(C'\fR is a boolean flag. Set it to true if you want to test |\&\f(CW\*(C`rw\*(C'\fR is a boolean flag. Set it to true if you want to test )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4560|\*(C`backupfile\*(C'\fR (from a previous call to |Restore the \f(CW\*(C`backupfile\*(C'\fR (from a previous call to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4561|\*(C`$g\->ntfsclone_out\*(C'\fR) to \f(CW\*(C`device\*(C'\fR, overwriting |\&\f(CW\*(C`$g\->ntfsclone_out\*(C'\fR) to \f(CW\*(C`device\*(C'\fR, overwriting )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4566|\*(C`device\*(C'\fR to the local file |Stream the \s-1NTFS\s0 filesystem \f(CW\*(C`device\*(C'\fR to the local file )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4567|\*(C`backupfile\*(C'\fR. The format used for the backup file is a |\&\f(CW\*(C`backupfile\*(C'\fR. The format used for the backup file is a )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4570|\*(C`metadataonly\*(C'\fR flag is true, then \fIonly\fR the |If the optional \f(CW\*(C`metadataonly\*(C'\fR flag is true, then \fIonly\fR the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4574|\*(C`rescue\*(C'\fR, \f(CW\*(C`ignorefscheck\*(C'\fR, \f(CW\*(C`preservetimestamps\*(C'\fR |The optional \f(CW\*(C`rescue\*(C'\fR, \f(CW\*(C`ignorefscheck\*(C'\fR, \f(CW\*(C`preservetimestamps\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4575|\*(C`force\*(C'\fR flags have precise meanings detailed in the |and \f(CW\*(C`force\*(C'\fR flags have precise meanings detailed in the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4578|\*(C`$g\->ntfsclone_in\*(C'\fR to restore the file back to a |Use \f(CW\*(C`$g\->ntfsclone_in\*(C'\fR to restore the file back to a )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4587|\*(C`chkdsk\*(C'\fR. It does \fInot\fR |This is \fInot\fR an equivalent of Windows \f(CW\*(C`chkdsk\*(C'\fR. It does \fInot\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4590|\*(C`clearbadsectors\*(C'\fR flag clears the list of bad sectors. |The optional \f(CW\*(C`clearbadsectors\*(C'\fR flag clears the list of bad sectors. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4614|\*(C`force\*(C'\fR option then it is not |If you \fIdon't\fR set the \f(CW\*(C`force\*(C'\fR option then it is not )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4615|\*(C`$g\->ntfsresize\*(C'\fR multiple times on a |possible to call \f(CW\*(C`$g\->ntfsresize\*(C'\fR multiple times on a )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4629|\*(C`$g\->ntfsresize\*(C'\fR except that it |This command is the same as \f(CW\*(C`$g\->ntfsresize\*(C'\fR except that it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4642|\*(C`LIBGUESTFS_DEBUG=1\*(C'\fR then the |accordingly. For example if \f(CW\*(C`LIBGUESTFS_DEBUG=1\*(C'\fR then the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4646|\*(C`$g\->create\*(C'\fR. |when you call \f(CW\*(C`$g\->create\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4651|\*(C`$g\->parse_environment_list\*(C'\fR. |\&\f(CW\*(C`$g\->parse_environment_list\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4655|\*(C`environment\*(C'\fR |Parse the list of strings in the argument \f(CW\*(C`environment\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4657|\*(C`LIBGUESTFS_DEBUG=1\*(C'\fR is a string in the list, |For example if \f(CW\*(C`LIBGUESTFS_DEBUG=1\*(C'\fR is a string in the list, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4660|\*(C`$g\->parse_environment\*(C'\fR except that |This is the same as \f(CW\*(C`$g\->parse_environment\*(C'\fR except that )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4666|\*(C`device\*(C'\fR. If there is no partition |This command adds a partition to \f(CW\*(C`device\*(C'\fR. If there is no partition )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4667|\*(C`$g\->part_init\*(C'\fR first. |table on the device, call \f(CW\*(C`$g\->part_init\*(C'\fR first. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4669|\*(C`prlogex\*(C'\fR parameter is the type of partition. Normally you |The \f(CW\*(C`prlogex\*(C'\fR parameter is the type of partition. Normally you )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4670|\*(C`p\*(C'\fR or \f(CW\*(C`primary\*(C'\fR here, but \s-1MBR\s0 partition tables also |should pass \f(CW\*(C`p\*(C'\fR or \f(CW\*(C`primary\*(C'\fR here, but \s-1MBR\s0 partition tables also )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4671|\*(C`l\*(C'\fR (or \f(CW\*(C`logical\*(C'\fR) and \f(CW\*(C`e\*(C'\fR (or \f(CW\*(C`extended\*(C'\fR) partition |support \f(CW\*(C`l\*(C'\fR (or \f(CW\*(C`logical\*(C'\fR) and \f(CW\*(C`e\*(C'\fR (or \f(CW\*(C`extended\*(C'\fR) partition )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4674|\*(C`startsect\*(C'\fR and \f(CW\*(C`endsect\*(C'\fR are the start and end of the partition |\&\f(CW\*(C`startsect\*(C'\fR and \f(CW\*(C`endsect\*(C'\fR are the start and end of the partition )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4675|\*(C`endsect\*(C'\fR may be negative, which means it counts |in \fIsectors\fR. \f(CW\*(C`endsect\*(C'\fR may be negative, which means it counts )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4676|\*(C`\-1\*(C'\fR is the last sector). |backwards from the end of the disk (\f(CW\*(C`\-1\*(C'\fR is the last sector). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4679|\*(C`$g\->part_disk\*(C'\fR to do that. |Use \f(CW\*(C`$g\->part_disk\*(C'\fR to do that. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4683|\*(C`partnum\*(C'\fR on \f(CW\*(C`device\*(C'\fR. |This command deletes the partition numbered \f(CW\*(C`partnum\*(C'\fR on \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4691|\*(C`$g\->part_init\*(C'\fR |This command is simply a combination of \f(CW\*(C`$g\->part_init\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4692|\*(C`$g\->part_add\*(C'\fR to create a single primary partition |followed by \f(CW\*(C`$g\->part_add\*(C'\fR to create a single primary partition )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4695|\*(C`parttype\*(C'\fR is the partition table type, usually \f(CW\*(C`mbr\*(C'\fR or \f(CW\*(C`gpt\*(C'\fR, |\&\f(CW\*(C`parttype\*(C'\fR is the partition table type, usually \f(CW\*(C`mbr\*(C'\fR or \f(CW\*(C`gpt\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4696|\*(C`$g\->part_init\*(C'\fR. |but other possible values are described in \f(CW\*(C`$g\->part_init\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4700|\*(C`partnum\*(C'\fR on |This command returns true if the partition \f(CW\*(C`partnum\*(C'\fR on )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4701|\*(C`device\*(C'\fR has the bootable flag set. |\&\f(CW\*(C`device\*(C'\fR has the bootable flag set. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4703|\*(C`$g\->part_set_bootable\*(C'\fR. |See also \f(CW\*(C`$g\->part_set_bootable\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4707|\*(C`partnum\*(C'\fR. For \s-1MBR\s0 partitions, |Return the type \s-1GUID\s0 of numbered \s-1GPT\s0 partition \f(CW\*(C`partnum\*(C'\fR. For \s-1MBR\s0 partitions, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4714|\*(C`partnum\*(C'\fR. |the numbered partition \f(CW\*(C`partnum\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4718|\*(C`$g\->part_get_parttype\*(C'\fR). |types (see \f(CW\*(C`$g\->part_get_parttype\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4722|\*(C`device\*(C'\fR and |This command examines the partition table on \f(CW\*(C`device\*(C'\fR and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4725|\*(C`msdos\*(C'\fR (a DOS/Windows style \s-1MBR\s0 |Common return values include: \f(CW\*(C`msdos\*(C'\fR (a DOS/Windows style \s-1MBR\s0 )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4726|\*(C`gpt\*(C'\fR (a GPT/EFI\-style partition table). Other |partition table), \f(CW\*(C`gpt\*(C'\fR (a GPT/EFI\-style partition table). Other )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4727|\*(C`$g\->part_init\*(C'\fR |values are possible, although unusual. See \f(CW\*(C`$g\->part_init\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4732|\*(C`device\*(C'\fR of one of the |This creates an empty partition table on \f(CW\*(C`device\*(C'\fR of one of the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4733|\*(C`parttype\*(C'\fR should be |partition types listed below. Usually \f(CW\*(C`parttype\*(C'\fR should be )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4734|\*(C`msdos\*(C'\fR or \f(CW\*(C`gpt\*(C'\fR (for large disks). |either \f(CW\*(C`msdos\*(C'\fR or \f(CW\*(C`gpt\*(C'\fR (for large disks). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4737|\*(C`$g\->part_add\*(C'\fR for each partition required. |call \f(CW\*(C`$g\->part_add\*(C'\fR for each partition required. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4739|\*(C`parttype\*(C'\fR are: |Possible values for \f(CW\*(C`parttype\*(C'\fR are: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4751|\*(C`mbr\*(C'\fR format. |compatibility with the \f(CW\*(C`mbr\*(C'\fR format. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4761|\*(C`gpt\*(C'\fR. |using \f(CW\*(C`gpt\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4788|\*(C`gpt\*(C'\fR. |Old Mac partition format. Modern Macs use \f(CW\*(C`gpt\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4801|\*(C`device\*(C'\fR and |This command parses the partition table on \f(CW\*(C`device\*(C'\fR and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4812|\*(C`$g\->blockdev_getss\*(C'\fR. |divide by the device's sector size, see \f(CW\*(C`$g\->blockdev_getss\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4825|\*(C`partnum\*(C'\fR on |This sets the bootable flag on partition numbered \f(CW\*(C`partnum\*(C'\fR on )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4826|\*(C`device\*(C'\fR. Note that partitions are numbered from 1. |device \f(CW\*(C`device\*(C'\fR. Note that partitions are numbered from 1. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4834|\*(C`partnum\*(C'\fR to \f(CW\*(C`guid\*(C'\fR. Return an |Set the type \s-1GUID\s0 of numbered \s-1GPT\s0 partition \f(CW\*(C`partnum\*(C'\fR to \f(CW\*(C`guid\*(C'\fR. Return an )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4835|\*(C`device\*(C'\fR isn't \s-1GPT\s0, or if \f(CW\*(C`guid\*(C'\fR is not a |error if the partition table of \f(CW\*(C`device\*(C'\fR isn't \s-1GPT\s0, or if \f(CW\*(C`guid\*(C'\fR is not a )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4844|\*(C`partnum\*(C'\fR to \f(CW\*(C`idbyte\*(C'\fR. Note |the numbered partition \f(CW\*(C`partnum\*(C'\fR to \f(CW\*(C`idbyte\*(C'\fR. Note )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4851|\*(C`$g\->part_get_parttype\*(C'\fR). |types (see \f(CW\*(C`$g\->part_get_parttype\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4855|\*(C`partnum\*(C'\fR on |This sets the partition name on partition numbered \f(CW\*(C`partnum\*(C'\fR on )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4856|\*(C`device\*(C'\fR. Note that partitions are numbered from 1. |device \f(CW\*(C`device\*(C'\fR. Note that partitions are numbered from 1. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4859|\*(C`gpt\*(C'\fR but not on \f(CW\*(C`mbr\*(C'\fR partitions. |table. This works on \f(CW\*(C`gpt\*(C'\fR but not on \f(CW\*(C`mbr\*(C'\fR partitions. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4868|\*(C`$g\->list_partitions\*(C'\fR. |from \f(CW\*(C`$g\->list_partitions\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4870|\*(C`$g\->part_to_partnum\*(C'\fR, \f(CW\*(C`$g\->device_index\*(C'\fR. |See also \f(CW\*(C`$g\->part_to_partnum\*(C'\fR, \f(CW\*(C`$g\->device_index\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4878|\*(C`$g\->list_partitions\*(C'\fR. |from \f(CW\*(C`$g\->list_partitions\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4880|\*(C`$g\->part_to_dev\*(C'\fR. |See also \f(CW\*(C`$g\->part_to_dev\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4891|\*(C`count\*(C'\fR |This command lets you read part of a file. It reads \f(CW\*(C`count\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4892|\*(C`offset\*(C'\fR, from file \f(CW\*(C`path\*(C'\fR. |bytes of the file, starting at \f(CW\*(C`offset\*(C'\fR, from file \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4897|\*(C`$g\->pwrite\*(C'\fR, \f(CW\*(C`$g\->pread_device\*(C'\fR. |See also \f(CW\*(C`$g\->pwrite\*(C'\fR, \f(CW\*(C`$g\->pread_device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4904|\*(C`count\*(C'\fR |This command lets you read part of a block device. It reads \f(CW\*(C`count\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4905|\*(C`device\*(C'\fR, starting at \f(CW\*(C`offset\*(C'\fR. |bytes of \f(CW\*(C`device\*(C'\fR, starting at \f(CW\*(C`offset\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4910|\*(C`$g\->pread\*(C'\fR. |See also \f(CW\*(C`$g\->pread\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4917|\*(C`device\*(C'\fR. |Generate a new random \s-1UUID\s0 for the physical volume \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4925|\*(C`device\*(C'\fR, |This creates an \s-1LVM\s0 physical volume on the named \f(CW\*(C`device\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4926|\*(C`device\*(C'\fR should usually be a partition name such |where \f(CW\*(C`device\*(C'\fR should usually be a partition name such )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4927|\*(C`/dev/sda1\*(C'\fR. |as \f(CW\*(C`/dev/sda1\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4931|\*(C`device\*(C'\fR so that \s-1LVM\s0 will no longer |This wipes a physical volume \f(CW\*(C`device\*(C'\fR so that \s-1LVM\s0 will no longer )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4934|\*(C`pvremove\*(C'\fR command which refuses to |The implementation uses the \f(CW\*(C`pvremove\*(C'\fR command which refuses to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4945|\*(C`$g\->pvresize\*(C'\fR except that it |This command is the same as \f(CW\*(C`$g\->pvresize\*(C'\fR except that it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4954|\*(C`/dev/sda2\*(C'\fR). |PVs (eg. \f(CW\*(C`/dev/sda2\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4956|\*(C`$g\->pvs_full\*(C'\fR. |See also \f(CW\*(C`$g\->pvs_full\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4965|\*(C`device\*(C'\fR. |This command returns the \s-1UUID\s0 of the \s-1LVM\s0 \s-1PV\s0 \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4970|\*(C`content\*(C'\fR to the file \f(CW\*(C`path\*(C'\fR starting at offset \f(CW\*(C`offset\*(C'\fR. |buffer \f(CW\*(C`content\*(C'\fR to the file \f(CW\*(C`path\*(C'\fR starting at offset \f(CW\*(C`offset\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4978|\*(C`$g\->pread\*(C'\fR, \f(CW\*(C`$g\->pwrite_device\*(C'\fR. |See also \f(CW\*(C`$g\->pread\*(C'\fR, \f(CW\*(C`$g\->pwrite_device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4986|\*(C`content\*(C'\fR to \f(CW\*(C`device\*(C'\fR starting at offset \f(CW\*(C`offset\*(C'\fR. |buffer \f(CW\*(C`content\*(C'\fR to \f(CW\*(C`device\*(C'\fR starting at offset \f(CW\*(C`offset\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|4993|\*(C`$g\->pwrite\*(C'\fR. |See also \f(CW\*(C`$g\->pwrite\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5000|\*(C`path\*(C'\fR as a |This calls returns the contents of the file \f(CW\*(C`path\*(C'\fR as a )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5003|\*(C`$g\->cat\*(C'\fR, this function can correctly |Unlike \f(CW\*(C`$g\->cat\*(C'\fR, this function can correctly )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5008|\*(C`path\*(C'\fR. |Return the contents of the file named \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5011|\*(C`LF\*(C'\fR and \f(CW\*(C`CRLF\*(C'\fR character sequences are \fInot\fR returned. |\&\f(CW\*(C`LF\*(C'\fR and \f(CW\*(C`CRLF\*(C'\fR character sequences are \fInot\fR returned. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5014|\*(C`\e0\*(C'\fR character which is treated |(specifically, files containing \f(CW\*(C`\e0\*(C'\fR character which is treated )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5015|\*(C`$g\->read_file\*(C'\fR |as end of string). For those you need to use the \f(CW\*(C`$g\->read_file\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5020|\*(C`dir\*(C'\fR. |This returns the list of directory entries in directory \f(CW\*(C`dir\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5022|\*(C`.\*(C'\fR and |All entries in the directory are returned, including \f(CW\*(C`.\*(C'\fR and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5023|\*(C`..\*(C'\fR. The entries are \fInot\fR sorted, but returned in the same |\&\f(CW\*(C`..\*(C'\fR. The entries are \fInot\fR sorted, but returned in the same )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5027|\*(C`ftyp\*(C'\fR field will contain one of the following characters: |file. The \f(CW\*(C`ftyp\*(C'\fR field will contain one of the following characters: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5054|\*(C`d_type\*(C'\fR field with an |The \fIreaddir\fR\|(3) call returned a \f(CW\*(C`d_type\*(C'\fR field with an )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5060|\*(C`$g\->ls\*(C'\fR. To get a printable |get a simple list of names, use \f(CW\*(C`$g\->ls\*(C'\fR. To get a printable )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5061|\*(C`$g\->ll\*(C'\fR. |directory for human consumption, use \f(CW\*(C`$g\->ll\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5073|\*(C`readlink\*(C'\fR operation |This call allows you to do a \f(CW\*(C`readlink\*(C'\fR operation )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5074|\*(C`path\*(C'\fR. |on multiple files, where all files are in the directory \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5075|\*(C`names\*(C'\fR is the list of files from this directory. |\&\f(CW\*(C`names\*(C'\fR is the list of files from this directory. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5078|\*(C`names\*(C'\fR list. Each string is the |correspondence to the \f(CW\*(C`names\*(C'\fR list. Each string is the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5093|\*(C`path\*(C'\fR. The |Return the canonicalized absolute pathname of \f(CW\*(C`path\*(C'\fR. The )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5094|\*(C`.\*(C'\fR, \f(CW\*(C`..\*(C'\fR or symbolic link path elements. |returned path has no \f(CW\*(C`.\*(C'\fR, \f(CW\*(C`..\*(C'\fR or symbolic link path elements. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5098|\*(C`$g\->add_drive_opts\*(C'\fR. |This function is conceptually the opposite of \f(CW\*(C`$g\->add_drive_opts\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5099|\*(C`label\*(C'\fR. |It removes the drive that was previously added with label \f(CW\*(C`label\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5102|\*(C`label\*(C'\fR argument to \f(CW\*(C`$g\->add_drive_opts\*(C'\fR). |labels (see the optional \f(CW\*(C`label\*(C'\fR argument to \f(CW\*(C`$g\->add_drive_opts\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5113|\*(C`xattr\*(C'\fR |This call removes the extended attribute named \f(CW\*(C`xattr\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5114|\*(C`path\*(C'\fR. |of the file \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5116|\*(C`$g\->lremovexattr\*(C'\fR, \fIattr\fR\|(5). |See also: \f(CW\*(C`$g\->lremovexattr\*(C'\fR, \fIattr\fR\|(5). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5122|\*(C`$g\->mv\*(C'\fR instead. |you are better to use \f(CW\*(C`$g\->mv\*(C'\fR instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5133|\*(C`$g\->resize2fs\*(C'\fR, but the filesystem |This command is the same as \f(CW\*(C`$g\->resize2fs\*(C'\fR, but the filesystem )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5135|\*(C`resize2fs\*(C'\fR command. |to the \f(CW\*(C`resize2fs\*(C'\fR command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5138|\*(C`$g\->tune2fs_l\*(C'\fR and read the \f(CW\*(C`Block size\*(C'\fR and \f(CW\*(C`Block count\*(C'\fR |\&\f(CW\*(C`$g\->tune2fs_l\*(C'\fR and read the \f(CW\*(C`Block size\*(C'\fR and \f(CW\*(C`Block count\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5146|\*(C`$g\->resize2fs\*(C'\fR except that it |This command is the same as \f(CW\*(C`$g\->resize2fs\*(C'\fR except that it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5153|\*(C`path\*(C'\fR. |Remove the single file \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5157|\*(C`path\*(C'\fR. |Remove the file \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5163|\*(C`$g\->rmdir\*(C'\fR to remove an empty directory, |Use \f(CW\*(C`$g\->rmdir\*(C'\fR to remove an empty directory, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5164|\*(C`$g\->rm_rf\*(C'\fR to remove directories recursively. |or \f(CW\*(C`$g\->rm_rf\*(C'\fR to remove directories recursively. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5168|\*(C`path\*(C'\fR, recursively removing the |Remove the file or directory \f(CW\*(C`path\*(C'\fR, recursively removing the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5169|\*(C`rm \-rf\*(C'\fR shell |contents if its a directory. This is like the \f(CW\*(C`rm \-rf\*(C'\fR shell )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5174|\*(C`path\*(C'\fR. |Remove the single directory \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5179|\*(C`$g\->mkmountpoint\*(C'\fR. See \f(CW\*(C`$g\->mkmountpoint\*(C'\fR |with \f(CW\*(C`$g\->mkmountpoint\*(C'\fR. See \f(CW\*(C`$g\->mkmountpoint\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5189|\*(C`src\*(C'\fR and \f(CW\*(C`dest\*(C'\fR are the source and destination directories. |\&\f(CW\*(C`src\*(C'\fR and \f(CW\*(C`dest\*(C'\fR are the source and destination directories. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5190|\*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR. |Files are copied from \f(CW\*(C`src\*(C'\fR to \f(CW\*(C`dest\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5198|\*(C`rsync\*(C'\fR. |\&\fI\-\-archive\fR flag to \f(CW\*(C`rsync\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5215|\*(C`$g\->set_network\*(C'\fR or the \fI\-\-network\fR option to |\&\f(CW\*(C`$g\->set_network\*(C'\fR or the \fI\-\-network\fR option to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5219|\*(C`remote\*(C'\fR to the destination directory \f(CW\*(C`dest\*(C'\fR. |specified by \f(CW\*(C`remote\*(C'\fR to the destination directory \f(CW\*(C`dest\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5225|\*(C`$g\->rsync\*(C'\fR. |The optional arguments are the same as those of \f(CW\*(C`$g\->rsync\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5235|\*(C`$g\->set_network\*(C'\fR or the \fI\-\-network\fR option to |\&\f(CW\*(C`$g\->set_network\*(C'\fR or the \fI\-\-network\fR option to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5238|\*(C`src\*(C'\fR to the |Files are copied from the source directory \f(CW\*(C`src\*(C'\fR to the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5239|\*(C`remote\*(C'\fR. |remote server and directory specified by \f(CW\*(C`remote\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5245|\*(C`$g\->rsync\*(C'\fR. |The optional arguments are the same as those of \f(CW\*(C`$g\->rsync\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5247|\*(C`src\*(C'\fR parameter. In programs |Globbing does not happen on the \f(CW\*(C`src\*(C'\fR parameter. In programs )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5249|\*(C`$g\->glob_expand\*(C'\fR). In guestfish you can use the \f(CW\*(C`glob\*(C'\fR |(see \f(CW\*(C`$g\->glob_expand\*(C'\fR). In guestfish you can use the \f(CW\*(C`glob\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5258|\*(C`device\*(C'\fR to make data retrieval |This command writes patterns over \f(CW\*(C`device\*(C'\fR to make data retrieval )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5276|\*(C`dir\*(C'\fR and then fills it |This command creates the directory \f(CW\*(C`dir\*(C'\fR and then fills it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5278|\*(C`$g\->scrub_file\*(C'\fR, and deletes them. |as for \f(CW\*(C`$g\->scrub_file\*(C'\fR, and deletes them. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5280|\*(C`dir\*(C'\fR. |containing \f(CW\*(C`dir\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5290|\*(C`NULL\*(C'\fR unless overridden by setting |The default is \f(CW\*(C`NULL\*(C'\fR unless overridden by setting )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5291|\*(C`LIBGUESTFS_APPEND\*(C'\fR environment variable. |\&\f(CW\*(C`LIBGUESTFS_APPEND\*(C'\fR environment variable. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5293|\*(C`append\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR means \fIno\fR additional options |Setting \f(CW\*(C`append\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR means \fIno\fR additional options )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5305|\*(C`autosync\*(C'\fR is true, this enables autosync. Libguestfs will make a |If \f(CW\*(C`autosync\*(C'\fR is true, this enables autosync. Libguestfs will make a )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5320|\*(C`LIBGUESTFS_CACHEDIR\*(C'\fR and \f(CW\*(C`TMPDIR\*(C'\fR |The environment variables \f(CW\*(C`LIBGUESTFS_CACHEDIR\*(C'\fR and \f(CW\*(C`TMPDIR\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5321|\*(C`LIBGUESTFS_CACHEDIR\*(C'\fR is set, then |control the default value: If \f(CW\*(C`LIBGUESTFS_CACHEDIR\*(C'\fR is set, then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5322|\*(C`TMPDIR\*(C'\fR is set, then that is |that is the default. Else if \f(CW\*(C`TMPDIR\*(C'\fR is set, then that is )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5323|\*(C`/var/tmp\*(C'\fR is the default. |the default. Else \f(CW\*(C`/var/tmp\*(C'\fR is the default. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5332|\*(C`$g\->set_log_message_callback\*(C'\fR, |by the library and handled by \f(CW\*(C`$g\->set_log_message_callback\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5342|\*(C`attrs\*(C'\fR |This sets or clears the file attributes \f(CW\*(C`attrs\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5343|\*(C`file\*(C'\fR. |associated with the inode \f(CW\*(C`file\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5345|\*(C`attrs\*(C'\fR is a string of characters representing |\&\f(CW\*(C`attrs\*(C'\fR is a string of characters representing )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5346|\*(C`$g\->get_e2attrs\*(C'\fR for a list of |file attributes. See \f(CW\*(C`$g\->get_e2attrs\*(C'\fR for a list of )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5349|\*(C`clear\*(C'\fR is not present or false, then |If optional boolean \f(CW\*(C`clear\*(C'\fR is not present or false, then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5350|\*(C`attrs\*(C'\fR listed are set in the inode. |the \f(CW\*(C`attrs\*(C'\fR listed are set in the inode. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5352|\*(C`clear\*(C'\fR is true, then the \f(CW\*(C`attrs\*(C'\fR listed are cleared |If \f(CW\*(C`clear\*(C'\fR is true, then the \f(CW\*(C`attrs\*(C'\fR listed are cleared )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5355|\*(C`attrs\*(C'\fR |In both cases, other attributes not present in the \f(CW\*(C`attrs\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5366|\*(C`$g\->get_e2generation\*(C'\fR. |See \f(CW\*(C`$g\->get_e2generation\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5371|\*(C`device\*(C'\fR to \f(CW\*(C`label\*(C'\fR. Filesystem labels are limited to |\&\f(CW\*(C`device\*(C'\fR to \f(CW\*(C`label\*(C'\fR. Filesystem labels are limited to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5374|\*(C`$g\->tune2fs_l\*(C'\fR or \f(CW\*(C`$g\->get_e2label\*(C'\fR |You can use either \f(CW\*(C`$g\->tune2fs_l\*(C'\fR or \f(CW\*(C`$g\->get_e2label\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5387|\*(C`device\*(C'\fR to \f(CW\*(C`uuid\*(C'\fR. The format of the \s-1UUID\s0 and alternatives |\&\f(CW\*(C`device\*(C'\fR to \f(CW\*(C`uuid\*(C'\fR. The format of the \s-1UUID\s0 and alternatives )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5388|\*(C`clear\*(C'\fR, \f(CW\*(C`random\*(C'\fR and \f(CW\*(C`time\*(C'\fR are described in the |such as \f(CW\*(C`clear\*(C'\fR, \f(CW\*(C`random\*(C'\fR and \f(CW\*(C`time\*(C'\fR are described in the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5391|\*(C`$g\->tune2fs_l\*(C'\fR or \f(CW\*(C`$g\->get_e2uuid\*(C'\fR |You can use either \f(CW\*(C`$g\->tune2fs_l\*(C'\fR or \f(CW\*(C`$g\->get_e2uuid\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5396|\*(C`device\*(C'\fR to \f(CW\*(C`label\*(C'\fR. |Set the filesystem label on \f(CW\*(C`device\*(C'\fR to \f(CW\*(C`label\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5420|\*(C`$g\->vfs_label\*(C'\fR. |To read the label on a filesystem, call \f(CW\*(C`$g\->vfs_label\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5425|\*(C`index\*(C'\fR'th credential from the user, |After requesting the \f(CW\*(C`index\*(C'\fR'th credential from the user, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5433|\*(C`GUESTFS_EVENT_LIBVIRT_AUTH\*(C'\fR, to supply the list of credential types |\&\f(CW\*(C`GUESTFS_EVENT_LIBVIRT_AUTH\*(C'\fR, to supply the list of credential types )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5436|\*(C`creds\*(C'\fR list must be a non-empty list of strings. |The \f(CW\*(C`creds\*(C'\fR list must be a non-empty list of strings. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5480|\*(C`$g\->launch\*(C'\fR. |\&\f(CW\*(C`$g\->launch\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5483|\*(C`LIBGUESTFS_MEMSIZE\*(C'\fR before the handle is |variable \f(CW\*(C`LIBGUESTFS_MEMSIZE\*(C'\fR before the handle is )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5491|\*(C`network\*(C'\fR is true, then the network is enabled in the |If \f(CW\*(C`network\*(C'\fR is true, then the network is enabled in the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5497|\*(C`$g\->launch\*(C'\fR, otherwise |You must call this before calling \f(CW\*(C`$g\->launch\*(C'\fR, otherwise )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5504|\*(C`$libdir/guestfs\*(C'\fR unless overridden by setting |The default is \f(CW\*(C`$libdir/guestfs\*(C'\fR unless overridden by setting )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5505|\*(C`LIBGUESTFS_PATH\*(C'\fR environment variable. |\&\f(CW\*(C`LIBGUESTFS_PATH\*(C'\fR environment variable. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5507|\*(C`path\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR restores the default path. |Setting \f(CW\*(C`path\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR restores the default path. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5511|\*(C`pgroup\*(C'\fR is true, child processes are placed into |If \f(CW\*(C`pgroup\*(C'\fR is true, child processes are placed into )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5514|\*(C`SIGINT\*(C'\fR (from |The practical upshot of this is that signals like \f(CW\*(C`SIGINT\*(C'\fR (from )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5515|\*(C`^C\*(C'\fR) won't be received by the child process. |users pressing \f(CW\*(C`^C\*(C'\fR) won't be received by the child process. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5518|\*(C`^C\*(C'\fR to kill the subprocess. Guestfish sets this flag to |\&\f(CW\*(C`^C\*(C'\fR to kill the subprocess. Guestfish sets this flag to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5519|\*(C`^C\*(C'\fR can cancel |true when used interactively, so that \f(CW\*(C`^C\*(C'\fR can cancel )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5520|\*(C`$g\->user_cancel\*(C'\fR). |long-running commands gracefully (see \f(CW\*(C`$g\->user_cancel\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5529|\*(C`LIBGUESTFS_QEMU\*(C'\fR |You can also override this by setting the \f(CW\*(C`LIBGUESTFS_QEMU\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5532|\*(C`qemu\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR restores the default qemu binary. |Setting \f(CW\*(C`qemu\*(C'\fR to \f(CW\*(C`NULL\*(C'\fR restores the default qemu binary. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5536|\*(C`qemu \-help\*(C'\fR). |operations depend on testing qemu features (by running \f(CW\*(C`qemu \-help\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5539|\*(C`LIBGUESTFS_QEMU\*(C'\fR is safest of all since that picks |variable \f(CW\*(C`LIBGUESTFS_QEMU\*(C'\fR is safest of all since that picks )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5544|\*(C`false\*(C'\fR then |If this is called with the parameter \f(CW\*(C`false\*(C'\fR then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5545|\*(C`$g\->launch\*(C'\fR does not create a recovery process. The |\&\f(CW\*(C`$g\->launch\*(C'\fR does not create a recovery process. The )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5549|\*(C`$g\->launch\*(C'\fR, |This only has any effect if called before \f(CW\*(C`$g\->launch\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5561|\*(C`selinux=0\*(C'\fR (disabled). |at boot time. The default is \f(CW\*(C`selinux=0\*(C'\fR (disabled). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5564|\*(C`enforcing=0\*(C'\fR). |Permissive mode (\f(CW\*(C`enforcing=0\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5575|\*(C`$g\->launch\*(C'\fR. |This function must be called before \f(CW\*(C`$g\->launch\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5581|\*(C`LIBGUESTFS_TMPDIR\*(C'\fR and \f(CW\*(C`TMPDIR\*(C'\fR |The environment variables \f(CW\*(C`LIBGUESTFS_TMPDIR\*(C'\fR and \f(CW\*(C`TMPDIR\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5582|\*(C`LIBGUESTFS_TMPDIR\*(C'\fR is set, then |control the default value: If \f(CW\*(C`LIBGUESTFS_TMPDIR\*(C'\fR is set, then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5583|\*(C`TMPDIR\*(C'\fR is set, then that is |that is the default. Else if \f(CW\*(C`TMPDIR\*(C'\fR is set, then that is )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5584|\*(C`/tmp\*(C'\fR is the default. |the default. Else \f(CW\*(C`/tmp\*(C'\fR is the default. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5596|\*(C`LIBGUESTFS_TRACE\*(C'\fR is defined and set to \f(CW1\fR. |\&\f(CW\*(C`LIBGUESTFS_TRACE\*(C'\fR is defined and set to \f(CW1\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5598|\*(C`stderr\*(C'\fR, unless you |Trace messages are normally sent to \f(CW\*(C`stderr\*(C'\fR, unless you )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5600|\*(C`$g\->set_event_callback\*(C'\fR). |\&\f(CW\*(C`$g\->set_event_callback\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5604|\*(C`verbose\*(C'\fR is true, this turns on verbose messages. |If \f(CW\*(C`verbose\*(C'\fR is true, this turns on verbose messages. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5607|\*(C`LIBGUESTFS_DEBUG\*(C'\fR is defined and set to \f(CW1\fR. |\&\f(CW\*(C`LIBGUESTFS_DEBUG\*(C'\fR is defined and set to \f(CW1\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5609|\*(C`stderr\*(C'\fR, unless you |Verbose messages are normally sent to \f(CW\*(C`stderr\*(C'\fR, unless you )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5611|\*(C`$g\->set_event_callback\*(C'\fR). |\&\f(CW\*(C`$g\->set_event_callback\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5616|\*(C`context\*(C'\fR. |to the string \f(CW\*(C`context\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5622|\*(C`xattr\*(C'\fR |This call sets the extended attribute named \f(CW\*(C`xattr\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5623|\*(C`path\*(C'\fR to the value \f(CW\*(C`val\*(C'\fR (of length \f(CW\*(C`vallen\*(C'\fR). |of the file \f(CW\*(C`path\*(C'\fR to the value \f(CW\*(C`val\*(C'\fR (of length \f(CW\*(C`vallen\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5626|\*(C`$g\->lsetxattr\*(C'\fR, \fIattr\fR\|(5). |See also: \f(CW\*(C`$g\->lsetxattr\*(C'\fR, \fIattr\fR\|(5). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5633|\*(C`device\*(C'\fR should be a block device, for example \f(CW\*(C`/dev/sda\*(C'\fR. |\&\f(CW\*(C`device\*(C'\fR should be a block device, for example \f(CW\*(C`/dev/sda\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5635|\*(C`cyls\*(C'\fR, \f(CW\*(C`heads\*(C'\fR and \f(CW\*(C`sectors\*(C'\fR are the number of cylinders, heads |\&\f(CW\*(C`cyls\*(C'\fR, \f(CW\*(C`heads\*(C'\fR and \f(CW\*(C`sectors\*(C'\fR are the number of cylinders, heads )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5643|\*(C`lines\*(C'\fR is a list of lines that we feed to \f(CW\*(C`sfdisk\*(C'\fR. For more |\&\f(CW\*(C`lines\*(C'\fR is a list of lines that we feed to \f(CW\*(C`sfdisk\*(C'\fR. For more )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5647|\*(C`lines\*(C'\fR as a single element list, when the single element being |pass \f(CW\*(C`lines\*(C'\fR as a single element list, when the single element being )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5648|\*(C`,\*(C'\fR (comma). |the string \f(CW\*(C`,\*(C'\fR (comma). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5650|\*(C`$g\->sfdisk_l\*(C'\fR, \f(CW\*(C`$g\->sfdisk_N\*(C'\fR, |See also: \f(CW\*(C`$g\->sfdisk_l\*(C'\fR, \f(CW\*(C`$g\->sfdisk_N\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5651|\*(C`$g\->part_init\*(C'\fR |\&\f(CW\*(C`$g\->part_init\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5662|\*(C`$g\->sfdisk\*(C'\fR |This is a simplified interface to the \f(CW\*(C`$g\->sfdisk\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5668|\*(C`$g\->sfdisk\*(C'\fR, the \fIsfdisk\fR\|(8) manpage |See also: \f(CW\*(C`$g\->sfdisk\*(C'\fR, the \fIsfdisk\fR\|(8) manpage )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5669|\*(C`$g\->part_disk\*(C'\fR |and \f(CW\*(C`$g\->part_disk\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5681|\*(C`n\*(C'\fR (note: \f(CW\*(C`n\*(C'\fR counts from 1). |partition \f(CW\*(C`n\*(C'\fR (note: \f(CW\*(C`n\*(C'\fR counts from 1). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5683|\*(C`$g\->sfdisk\*(C'\fR. You should usually |For other parameters, see \f(CW\*(C`$g\->sfdisk\*(C'\fR. You should usually )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5686|\*(C`$g\->part_add\*(C'\fR |See also: \f(CW\*(C`$g\->part_add\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5697|\*(C`device\*(C'\fR read from the |This displays the disk geometry of \f(CW\*(C`device\*(C'\fR read from the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5700|\*(C`$g\->sfdisk_kernel_geometry\*(C'\fR). |kernel's idea of the geometry (see \f(CW\*(C`$g\->sfdisk_kernel_geometry\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5707|\*(C`device\*(C'\fR. |This displays the kernel's idea of the geometry of \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5714|\*(C`device\*(C'\fR, in the |This displays the partition table on \f(CW\*(C`device\*(C'\fR, in the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5718|\*(C`$g\->part_list\*(C'\fR |See also: \f(CW\*(C`$g\->part_list\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5730|\*(C`/bin/sh\*(C'\fR. |guest's \f(CW\*(C`/bin/sh\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5732|\*(C`$g\->command\*(C'\fR, but passes the command to: |This is like \f(CW\*(C`$g\->command\*(C'\fR, but passes the command to: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5742|\*(C`$g\->command\*(C'\fR apply to this call. |All the provisos about \f(CW\*(C`$g\->command\*(C'\fR apply to this call. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5746|\*(C`$g\->sh\*(C'\fR, but splits the result |This is the same as \f(CW\*(C`$g\->sh\*(C'\fR, but splits the result )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5749|\*(C`$g\->command_lines\*(C'\fR |See also: \f(CW\*(C`$g\->command_lines\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5753|\*(C`$g\->launch\*(C'\fR. It performs an orderly |This is the opposite of \f(CW\*(C`$g\->launch\*(C'\fR. It performs an orderly )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5764|\*(C`$g\->close\*(C'\fR afterwards. |need to call \f(CW\*(C`$g\->close\*(C'\fR afterwards. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5766|\*(C`$g\->close\*(C'\fR will call this if you don't do it explicitly, |\&\f(CW\*(C`$g\->close\*(C'\fR will call this if you don't do it explicitly, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5771|\*(C`secs\*(C'\fR seconds. |Sleep for \f(CW\*(C`secs\*(C'\fR seconds. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5775|\*(C`path\*(C'\fR. |Returns file information for the given \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5782|\*(C`path\*(C'\fR should be a file or directory in the mounted file system |\&\f(CW\*(C`path\*(C'\fR should be a file or directory in the mounted file system )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5797|\*(C`$g\->strings\*(C'\fR command, but allows you to |This is like the \f(CW\*(C`$g\->strings\*(C'\fR command, but allows you to )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5799|\*(C`path\*(C'\fR. |the source file \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5806|\*(C`$g\->strings\*(C'\fR uses). |parts of \s-1ISO\-8859\-X\s0 (this is what \f(CW\*(C`$g\->strings\*(C'\fR uses). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5836|\*(C`device\*(C'\fR. |device or partition named \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5837|\*(C`$g\->swapon_device\*(C'\fR. |See \f(CW\*(C`$g\->swapon_device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5856|\*(C`device\*(C'\fR. The increased |swap device or partition named \f(CW\*(C`device\*(C'\fR. The increased )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5858|\*(C`$g\->command\*(C'\fR or \f(CW\*(C`$g\->sh\*(C'\fR. |those run using \f(CW\*(C`$g\->command\*(C'\fR or \f(CW\*(C`$g\->sh\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5870|\*(C`$g\->swapon_device\*(C'\fR for other notes. |See \f(CW\*(C`$g\->swapon_device\*(C'\fR for other notes. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5875|\*(C`$g\->swapon_device\*(C'\fR for other notes. |See \f(CW\*(C`$g\->swapon_device\*(C'\fR for other notes. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5880|\*(C`$g\->swapon_device\*(C'\fR for other notes. |See \f(CW\*(C`$g\->swapon_device\*(C'\fR for other notes. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5900|\*(C`nrlines\*(C'\fR is a positive number, this returns the last |If the parameter \f(CW\*(C`nrlines\*(C'\fR is a positive number, this returns the last )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5901|\*(C`nrlines\*(C'\fR lines of the file \f(CW\*(C`path\*(C'\fR. |\&\f(CW\*(C`nrlines\*(C'\fR lines of the file \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5903|\*(C`nrlines\*(C'\fR is a negative number, this returns lines |If the parameter \f(CW\*(C`nrlines\*(C'\fR is a negative number, this returns lines )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5904|\*(C`path\*(C'\fR, starting with the \f(CW\*(C`\-nrlines\*(C'\fRth line. |from the file \f(CW\*(C`path\*(C'\fR, starting with the \f(CW\*(C`\-nrlines\*(C'\fRth line. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5906|\*(C`nrlines\*(C'\fR is zero, this returns an empty list. |If the parameter \f(CW\*(C`nrlines\*(C'\fR is zero, this returns an empty list. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5913|\*(C`tarfile\*(C'\fR into \f(CW\*(C`directory\*(C'\fR. |This command uploads and unpacks local file \f(CW\*(C`tarfile\*(C'\fR into \f(CW\*(C`directory\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5915|\*(C`compress\*(C'\fR flag controls compression. If not given, |The optional \f(CW\*(C`compress\*(C'\fR flag controls compression. If not given, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5918|\*(C`compress\*(C'\fR, \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`bzip2\*(C'\fR, \f(CW\*(C`xz\*(C'\fR, \f(CW\*(C`lzop\*(C'\fR. |type of the input file: \f(CW\*(C`compress\*(C'\fR, \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`bzip2\*(C'\fR, \f(CW\*(C`xz\*(C'\fR, \f(CW\*(C`lzop\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5928|\*(C`directory\*(C'\fR and downloads |This command packs the contents of \f(CW\*(C`directory\*(C'\fR and downloads )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5929|\*(C`tarfile\*(C'\fR. |it to local file \f(CW\*(C`tarfile\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5931|\*(C`compress\*(C'\fR flag controls compression. If not given, |The optional \f(CW\*(C`compress\*(C'\fR flag controls compression. If not given, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5934|\*(C`compress\*(C'\fR, \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`bzip2\*(C'\fR, \f(CW\*(C`xz\*(C'\fR, \f(CW\*(C`lzop\*(C'\fR. |type of the output file: \f(CW\*(C`compress\*(C'\fR, \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`bzip2\*(C'\fR, \f(CW\*(C`xz\*(C'\fR, \f(CW\*(C`lzop\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5960|\*(C`tarball\*(C'\fR (a |This command uploads and unpacks local file \f(CW\*(C`tarball\*(C'\fR (a )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5961|\*(C`directory\*(C'\fR. |\&\fIgzip compressed\fR tar file) into \f(CW\*(C`directory\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5972|\*(C`directory\*(C'\fR and downloads |This command packs the contents of \f(CW\*(C`directory\*(C'\fR and downloads )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5973|\*(C`tarball\*(C'\fR. |it to local file \f(CW\*(C`tarball\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5993|\*(C`path\*(C'\fR to a zero-length file. The |This command truncates \f(CW\*(C`path\*(C'\fR to a zero-length file. The )         (rof_escape_sequence|91|Sys::Guestfs.3pm|5998|\*(C`path\*(C'\fR to size \f(CW\*(C`size\*(C'\fR bytes. The file |This command truncates \f(CW\*(C`path\*(C'\fR to size \f(CW\*(C`size\*(C'\fR bytes. The file )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6001|\*(C`size\*(C'\fR then |If the current file size is less than \f(CW\*(C`size\*(C'\fR then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6005|\*(C`$g\->fallocate64\*(C'\fR instead. |file of zeroes, use \f(CW\*(C`$g\->fallocate64\*(C'\fR instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6010|\*(C`device\*(C'\fR. |an ext2/ext3/ext4 filesystem called \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6018|\*(C`\-f\*(C'\fR option. |This is the same as the tune2fs \f(CW\*(C`\-f\*(C'\fR option. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6024|\*(C`\-c\*(C'\fR option. |disregarded. This is the same as the tune2fs \f(CW\*(C`\-c\*(C'\fR option. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6029|\*(C`\-C\*(C'\fR option. |This is the same as the tune2fs \f(CW\*(C`\-C\*(C'\fR option. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6034|\*(C`continue\*(C'\fR, \f(CW\*(C`remount\-ro\*(C'\fR, \f(CW\*(C`panic\*(C'\fR. |Possible values currently are: \f(CW\*(C`continue\*(C'\fR, \f(CW\*(C`remount\-ro\*(C'\fR, \f(CW\*(C`panic\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6038|\*(C`\-e\*(C'\fR option. |This is the same as the tune2fs \f(CW\*(C`\-e\*(C'\fR option. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6043|\*(C`\-g\*(C'\fR option except that it |This is the same as the tune2fs \f(CW\*(C`\-g\*(C'\fR option except that it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6052|\*(C`\-i\*(C'\fR option. |This is the same as the tune2fs \f(CW\*(C`\-i\*(C'\fR option. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6058|\*(C`\-m\*(C'\fR option. |This is the same as the tune2fs \f(CW\*(C`\-m\*(C'\fR option. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6063|\*(C`\-M\*(C'\fR option. |This is the same as the tune2fs \f(CW\*(C`\-M\*(C'\fR option. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6073|\*(C`\-u\*(C'\fR option except that it |This is the same as the tune2fs \f(CW\*(C`\-u\*(C'\fR option except that it )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6079|\*(C`$g\->tune2fs_l\*(C'\fR. For precise details of how tune2fs |\&\f(CW\*(C`$g\->tune2fs_l\*(C'\fR. For precise details of how tune2fs )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6086|\*(C`device\*(C'\fR. |superblock on \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6088|\*(C`tune2fs \-l device\*(C'\fR. See \fItune2fs\fR\|(8) |It is the same as running \f(CW\*(C`tune2fs \-l device\*(C'\fR. See \fItune2fs\fR\|(8) )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6090|\*(C`tune2fs\*(C'\fR |clearly defined, and depends on both the version of \f(CW\*(C`tune2fs\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6095|\*(C`tarball\*(C'\fR (an |This command uploads and unpacks local file \f(CW\*(C`tarball\*(C'\fR (an )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6096|\*(C`directory\*(C'\fR. |\&\fIxz compressed\fR tar file) into \f(CW\*(C`directory\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6107|\*(C`directory\*(C'\fR and downloads |This command packs the contents of \f(CW\*(C`directory\*(C'\fR and downloads )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6108|\*(C`tarball\*(C'\fR (as an xz compressed tar archive). |it to local file \f(CW\*(C`tarball\*(C'\fR (as an xz compressed tar archive). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6120|\*(C`mask & 0777\*(C'\fR. |device nodes to \f(CW\*(C`mask & 0777\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6123|\*(--r\-\-\*(R" or \*(L"\-rwxr\-xr\-x\*(R", and |with permissions like \*(L"\-rw\-r\*(--r\-\-\*(R" or \*(L"\-rwxr\-xr\-x\*(R", and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6131|\*(C`$g\->get_umask\*(C'\fR, |See also \f(CW\*(C`$g\->get_umask\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6132|\*(C`$g\->mknod\*(C'\fR, \f(CW\*(C`$g\->mkdir\*(C'\fR. |\&\fIumask\fR\|(2), \f(CW\*(C`$g\->mknod\*(C'\fR, \f(CW\*(C`$g\->mkdir\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6161|\*(C`filename\*(C'\fR to \f(CW\*(C`remotefilename\*(C'\fR on the |Upload local file \f(CW\*(C`filename\*(C'\fR to \f(CW\*(C`remotefilename\*(C'\fR on the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6164|\*(C`filename\*(C'\fR can also be a named pipe. |\&\f(CW\*(C`filename\*(C'\fR can also be a named pipe. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6166|\*(C`$g\->download\*(C'\fR. |See also \f(CW\*(C`$g\->download\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6170|\*(C`filename\*(C'\fR to \f(CW\*(C`remotefilename\*(C'\fR on the |Upload local file \f(CW\*(C`filename\*(C'\fR to \f(CW\*(C`remotefilename\*(C'\fR on the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6173|\*(C`remotefilename\*(C'\fR is overwritten starting at the byte \f(CW\*(C`offset\*(C'\fR |\&\f(CW\*(C`remotefilename\*(C'\fR is overwritten starting at the byte \f(CW\*(C`offset\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6176|\*(C`offset\*(C'\fR. The |then it is created with a \*(L"hole\*(R" before \f(CW\*(C`offset\*(C'\fR. The )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6178|\*(C`filename\*(C'\fR. |source \f(CW\*(C`filename\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6181|\*(C`$g\->pwrite\*(C'\fR, |can be uploaded with this call, unlike with \f(CW\*(C`$g\->pwrite\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6185|\*(C`$g\->upload\*(C'\fR, \f(CW\*(C`$g\->pwrite\*(C'\fR. |See also \f(CW\*(C`$g\->upload\*(C'\fR, \f(CW\*(C`$g\->pwrite\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6197|\*(C`EINTR\*(C'\fR, so you can test for this |\&\*(L"guestfs_last_errno\*(R") is set to \f(CW\*(C`EINTR\*(C'\fR, so you can test for this )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6205|\*(C`$g\->user_cancel\*(C'\fR: |There are two common places that you might call \f(CW\*(C`$g\->user_cancel\*(C'\fR: )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6208|\*(C`SIGINT\*(C'\fR signal handler so that pressing \f(CW\*(C`^C\*(C'\fR cancels the current |\&\f(CW\*(C`SIGINT\*(C'\fR signal handler so that pressing \f(CW\*(C`^C\*(C'\fR cancels the current )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6210|\*(C`^C\*(C'\fR signal). |child processes don't receive the \f(CW\*(C`^C\*(C'\fR signal). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6221|\*(C`atsecs, atnsecs\*(C'\fR are the last access time (atime) in secs and |\&\f(CW\*(C`atsecs, atnsecs\*(C'\fR are the last access time (atime) in secs and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6224|\*(C`mtsecs, mtnsecs\*(C'\fR are the last modification time (mtime) in |\&\f(CW\*(C`mtsecs, mtnsecs\*(C'\fR are the last modification time (mtime) in )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6227|\*(C`\-1\*(C'\fR then |If the \f(CW*nsecs\fR field contains the special value \f(CW\*(C`\-1\*(C'\fR then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6231|\*(C`\-2\*(C'\fR then |If the \f(CW*nsecs\fR field contains the special value \f(CW\*(C`\-2\*(C'\fR then )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6249|\*(C`libguestfs.so\*(C'\fR library. |against a completely different \f(CW\*(C`libguestfs.so\*(C'\fR library. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6258|\*(C`major\*(C'\fR, \f(CW\*(C`minor\*(C'\fR and \f(CW\*(C`release\*(C'\fR) are numbers and |three (\f(CW\*(C`major\*(C'\fR, \f(CW\*(C`minor\*(C'\fR and \f(CW\*(C`release\*(C'\fR) are numbers and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6260|\*(C`extra\*(C'\fR) is a string and is normally empty, but may be |(\f(CW\*(C`extra\*(C'\fR) is a string and is normally empty, but may be )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6264|\*(C`$major.$minor.$release$extra\*(C'\fR |\&\f(CW\*(C`$major.$minor.$release$extra\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6272|\*(C`$g\->available\*(C'\fR instead. |Use \f(CW\*(C`$g\->available\*(C'\fR instead. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6277|\*(C`device\*(C'\fR. |\&\f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6281|\*(C`$g\->findfs_label\*(C'\fR. |To find a filesystem from the label, use \f(CW\*(C`$g\->findfs_label\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6286|\*(C`device\*(C'\fR. |the filesystem on \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6291|\*(C`ext3\*(C'\fR or \f(CW\*(C`ntfs\*(C'\fR. |For example a string such as \f(CW\*(C`ext3\*(C'\fR or \f(CW\*(C`ntfs\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6296|\*(C`device\*(C'\fR. |\&\f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6300|\*(C`$g\->findfs_uuid\*(C'\fR. |To find a filesystem from the \s-1UUID\s0, use \f(CW\*(C`$g\->findfs_uuid\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6304|\*(C`activate\*(C'\fR is false) deactivates |This command activates or (if \f(CW\*(C`activate\*(C'\fR is false) deactivates )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6305|\*(C`volgroups\*(C'\fR. |all logical volumes in the listed volume groups \f(CW\*(C`volgroups\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6307|\*(C`vgchange \-a y|n volgroups...\*(C'\fR |This command is the same as running \f(CW\*(C`vgchange \-a y|n volgroups...\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6309|\*(C`volgroups\*(C'\fR is an empty list then \fBall\fR volume groups |Note that if \f(CW\*(C`volgroups\*(C'\fR is an empty list then \fBall\fR volume groups )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6314|\*(C`activate\*(C'\fR is false) deactivates |This command activates or (if \f(CW\*(C`activate\*(C'\fR is false) deactivates )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6317|\*(C`vgchange \-a y|n\*(C'\fR |This command is the same as running \f(CW\*(C`vgchange \-a y|n\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6321|\*(C`vg\*(C'\fR. |Generate a new random \s-1UUID\s0 for the volume group \f(CW\*(C`vg\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6329|\*(C`volgroup\*(C'\fR |This creates an \s-1LVM\s0 volume group called \f(CW\*(C`volgroup\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6330|\*(C`physvols\*(C'\fR. |from the non-empty list of physical volumes \f(CW\*(C`physvols\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6334|\*(C`vgname\*(C'\fR, this returns the UUIDs of all |Given a \s-1VG\s0 called \f(CW\*(C`vgname\*(C'\fR, this returns the UUIDs of all )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6337|\*(C`$g\->lvs\*(C'\fR and \f(CW\*(C`$g\->lvuuid\*(C'\fR |You can use this along with \f(CW\*(C`$g\->lvs\*(C'\fR and \f(CW\*(C`$g\->lvuuid\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6340|\*(C`$g\->vgpvuuids\*(C'\fR. |See also \f(CW\*(C`$g\->vgpvuuids\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6344|\*(C`vgname\*(C'\fR is an \s-1LVM\s0 volume group. This command examines the |\&\f(CW\*(C`vgname\*(C'\fR is an \s-1LVM\s0 volume group. This command examines the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6352|\*(C`vgname\*(C'\fR, this returns the UUIDs of all |Given a \s-1VG\s0 called \f(CW\*(C`vgname\*(C'\fR, this returns the UUIDs of all )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6355|\*(C`$g\->pvs\*(C'\fR and \f(CW\*(C`$g\->pvuuid\*(C'\fR |You can use this along with \f(CW\*(C`$g\->pvs\*(C'\fR and \f(CW\*(C`$g\->pvuuid\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6358|\*(C`$g\->vglvuuids\*(C'\fR. |See also \f(CW\*(C`$g\->vglvuuids\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6362|\*(C`vgname\*(C'\fR, (for example \f(CW\*(C`VG\*(C'\fR). |Remove an \s-1LVM\s0 volume group \f(CW\*(C`vgname\*(C'\fR, (for example \f(CW\*(C`VG\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6369|\*(C`volgroup\*(C'\fR with the new name \f(CW\*(C`newvolgroup\*(C'\fR. |Rename a volume group \f(CW\*(C`volgroup\*(C'\fR with the new name \f(CW\*(C`newvolgroup\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6377|\*(C`VolGroup00\*(C'\fR). |detected (eg. \f(CW\*(C`VolGroup00\*(C'\fR). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6379|\*(C`$g\->vgs_full\*(C'\fR. |See also \f(CW\*(C`$g\->vgs_full\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6393|\*(C`vgname\*(C'\fR. |This command returns the \s-1UUID\s0 of the \s-1LVM\s0 \s-1VG\s0 named \f(CW\*(C`vgname\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6400|\*(C`$g\->launch\*(C'\fR to wait for the launch |just after calling \f(CW\*(C`$g\->launch\*(C'\fR to wait for the launch )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6402|\*(C`$g\->launch\*(C'\fR now does the waiting. |\&\f(CW\*(C`$g\->launch\*(C'\fR now does the waiting. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6418|\*(C`wc \-c\*(C'\fR external command. |\&\f(CW\*(C`wc \-c\*(C'\fR external command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6423|\*(C`wc \-l\*(C'\fR external command. |\&\f(CW\*(C`wc \-l\*(C'\fR external command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6428|\*(C`wc \-w\*(C'\fR external command. |\&\f(CW\*(C`wc \-w\*(C'\fR external command. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6433|\*(C`device\*(C'\fR to make the filesystem invisible to libblkid. |the specified \f(CW\*(C`device\*(C'\fR to make the filesystem invisible to libblkid. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6436|\*(C`device\*(C'\fR. |\&\f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6438|\*(C`$g\->zero\*(C'\fR which zeroes the first few blocks of a |Compare with \f(CW\*(C`$g\->zero\*(C'\fR which zeroes the first few blocks of a )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6443|\*(C`path\*(C'\fR. The content of the |This call creates a file called \f(CW\*(C`path\*(C'\fR. The content of the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6444|\*(C`content\*(C'\fR (which can contain any 8 bit data). |file is the string \f(CW\*(C`content\*(C'\fR (which can contain any 8 bit data). )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6446|\*(C`$g\->write_append\*(C'\fR. |See also \f(CW\*(C`$g\->write_append\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6450|\*(C`content\*(C'\fR to the end of file \f(CW\*(C`path\*(C'\fR. If |This call appends \f(CW\*(C`content\*(C'\fR to the end of file \f(CW\*(C`path\*(C'\fR. If )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6451|\*(C`path\*(C'\fR does not exist, then a new file is created. |\&\f(CW\*(C`path\*(C'\fR does not exist, then a new file is created. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6453|\*(C`$g\->write\*(C'\fR. |See also \f(CW\*(C`$g\->write\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6457|\*(C`path\*(C'\fR. The contents of the |This call creates a file called \f(CW\*(C`path\*(C'\fR. The contents of the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6458|\*(C`content\*(C'\fR (which can contain any 8 bit data), |file is the string \f(CW\*(C`content\*(C'\fR (which can contain any 8 bit data), )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6459|\*(C`size\*(C'\fR. |with length \f(CW\*(C`size\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6461|\*(C`size\*(C'\fR is \f(CW0\fR |As a special case, if \f(CW\*(C`size\*(C'\fR is \f(CW0\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6462|\*(C`strlen\*(C'\fR (so in this case |then the length is calculated using \f(CW\*(C`strlen\*(C'\fR (so in this case )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6480|\*(C`device\*(C'\fR. |Change the parameters of the \s-1XFS\s0 filesystem on \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6487|\*(C`$g\->xfs_info\*(C'\fR and |and modified using the \f(CW\*(C`$g\->xfs_info\*(C'\fR and )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6488|\*(C`$g\->xfs_growfs\*(C'\fR calls. |\&\f(CW\*(C`$g\->xfs_growfs\*(C'\fR calls. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6492|\*(C`path\*(C'\fR. |Grow the \s-1XFS\s0 filesystem mounted at \f(CW\*(C`path\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6495|\*(C`\-1\*(C'\fR (for numeric fields) or empty |fields are returned as \f(CW\*(C`\-1\*(C'\fR (for numeric fields) or empty )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6500|\*(C`pathordevice\*(C'\fR is a mounted \s-1XFS\s0 filesystem or a device containing |\&\f(CW\*(C`pathordevice\*(C'\fR is a mounted \s-1XFS\s0 filesystem or a device containing )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6504|\*(C`\-1\*(C'\fR (for numeric fields) or empty |fields are returned as \f(CW\*(C`\-1\*(C'\fR (for numeric fields) or empty )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6509|\*(C`device\*(C'\fR. |Repair corrupt or damaged \s-1XFS\s0 filesystem on \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6511|\*(C`device\*(C'\fR argument which should be |The filesystem is specified using the \f(CW\*(C`device\*(C'\fR argument which should be )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6513|\*(C`xfs_repair\*(C'\fR will attempt to find |If given the name of a block device, \f(CW\*(C`xfs_repair\*(C'\fR will attempt to find )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6525|\*(C`zegrep\*(C'\fR program and returns the |This calls the external \f(CW\*(C`zegrep\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6540|\*(C`zegrep \-i\*(C'\fR program and returns the |This calls the external \f(CW\*(C`zegrep \-i\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6555|\*(C`device\*(C'\fR. |This command writes zeroes over the first few blocks of \f(CW\*(C`device\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6565|\*(C`$g\->zero_device\*(C'\fR, \f(CW\*(C`$g\->scrub_device\*(C'\fR, |See also: \f(CW\*(C`$g\->zero_device\*(C'\fR, \f(CW\*(C`$g\->scrub_device\*(C'\fR, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6566|\*(C`$g\->is_zero_device\*(C'\fR |\&\f(CW\*(C`$g\->is_zero_device\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6570|\*(C`device\*(C'\fR. Compare |This command writes zeroes over the entire \f(CW\*(C`device\*(C'\fR. Compare )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6571|\*(C`$g\->zero\*(C'\fR which just zeroes the first few blocks of |with \f(CW\*(C`$g\->zero\*(C'\fR which just zeroes the first few blocks of )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6580|\*(C`directory\*(C'\fR. |Zero the free space in the filesystem mounted on \f(CW\*(C`directory\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6587|\*(C`$g\->fstrim\*(C'\fR either as an alternative to this, |\&\f(CW\*(C`$g\->fstrim\*(C'\fR either as an alternative to this, )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6592|\*(C`device\*(C'\fR. This program |This runs the \fIzerofree\fR program on \f(CW\*(C`device\*(C'\fR. This program )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6605|\*(C`zfgrep\*(C'\fR program and returns the |This calls the external \f(CW\*(C`zfgrep\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6620|\*(C`zfgrep \-i\*(C'\fR program and returns the |This calls the external \f(CW\*(C`zfgrep \-i\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6635|\*(C`file\*(C'\fR after first decompressing \f(CW\*(C`path\*(C'\fR |This command runs \f(CW\*(C`file\*(C'\fR after first decompressing \f(CW\*(C`path\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6636|\*(C`method\*(C'\fR. |using \f(CW\*(C`method\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6638|\*(C`method\*(C'\fR must be one of \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`compress\*(C'\fR or \f(CW\*(C`bzip2\*(C'\fR. |\&\f(CW\*(C`method\*(C'\fR must be one of \f(CW\*(C`gzip\*(C'\fR, \f(CW\*(C`compress\*(C'\fR or \f(CW\*(C`bzip2\*(C'\fR. )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6640|\*(C`$g\->file\*(C'\fR instead which can now |Since 1.0.63, use \f(CW\*(C`$g\->file\*(C'\fR instead which can now )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6652|\*(C`zgrep\*(C'\fR program and returns the |This calls the external \f(CW\*(C`zgrep\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6667|\*(C`zgrep \-i\*(C'\fR program and returns the |This calls the external \f(CW\*(C`zgrep \-i\*(C'\fR program and returns the )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6685|\*(C`Sys::Guestfs\*(C'\fR that you are using? |available in the version of \f(CW\*(C`Sys::Guestfs\*(C'\fR that you are using? )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6687|\*(C`Sys::Guestfs\*(C'\fR |To test if a particular function is available in the \f(CW\*(C`Sys::Guestfs\*(C'\fR )         (rof_escape_sequence|91|Sys::Guestfs.3pm|6688|\*(C`can(METHOD)\*(C'\fR |class, use the ordinary Perl \s-1UNIVERSAL\s0 method \f(CW\*(C`can(METHOD)\*(C'\fR )