Repository URL to install this package:
|
Version:
1:1.38.2-12.el7.trilio ▾
|
ó
Ü^c @ s¥ d Z d d l Z d d l Z d d l Z d Z d Z d Z d Z d Z d Z d Z
d
Z d Z d Z
d
Z d Z d e f d YZ d e f d YZ d S( s= Python bindings for libguestfs
import guestfs
g = guestfs.GuestFS(python_return_dict=True)
g.add_drive_opts("guest.img", format="raw")
g.launch()
parts = g.list_partitions()
The guestfs module provides a Python 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.
Errors which happen while using the API are turned into Python
RuntimeError exceptions.
To create a guestfs handle you usually have to perform the following
sequence of calls:
# Create the handle, call add_drive* at least once, and possibly
# several times if the guest has multiple block devices:
g = guestfs.GuestFS()
g.add_drive_opts("guest.img", format="raw")
# Launch the qemu subprocess and wait for it to become ready:
g.launch()
# Now you can issue commands, for example:
logvols = g.lvs()
iÿÿÿÿNi i i i i i i@ i i i iÿ c C s
t j | S( s8 Return a printable string from an event or event bitmask( t
libguestfsmodt event_to_string( t events( ( s- /usr/lib64/python2.7/site-packages/guestfs.pyR X s t ClosedHandlec B s e Z RS( ( t __name__t
__module__( ( ( s- /usr/lib64/python2.7/site-packages/guestfs.pyR ] s t GuestFSc @ B sµ e Z d Z e e e d Z d Z d Z d Z d Z d Z
d Z d Z d Z
d
Z d Z dldldldldldldldldld Z dldldldldldldldldldldldld
Z e Z d Z d Z dldld Z d Z dldldldldldldld Z d Z d Z d Z d Z d Z d Z d Z d Z d Z! d Z" d Z# d Z$ d Z% d Z&