Change ownership of file or directory
Parameters: |
|
---|
Obfuscate the logical volume.
Parameters: | path – logical volume path |
---|
Copy a disk image to an existing directory
Parameters: |
|
---|
Create COW image
Creates a COW image with the given backing file
Parameters: |
|
---|
Create a disk image
Parameters: |
|
---|
Create LVM image.
Creates a LVM image with given size.
Parameters: |
|
---|---|
Size : | size of image in bytes |
Sparse : | create sparse logical volume |
Create a snapshot in a disk image
Parameters: |
|
---|
Create a snapshot in a disk image
Parameters: |
|
---|
Extract a named snapshot from a disk image
Parameters: |
|
---|
Grab image
Delete (unlink) file
Open file
see built-in file() documentation for more details
Get the backing file of a disk image
Parameters: | path – Path to the disk image |
---|---|
Returns: | a path to the image’s backing store |
Get the (virtual) size of a disk image
Parameters: | path – Path to the disk image |
---|---|
Returns: | Size (in bytes) of the given disk image as it would be seen by a virtual machine. |
Get free/used/total space info for a filesystem
Parameters: | path – Any dirent on the filesystem | ||||||
---|---|---|---|---|---|---|---|
Returns: | A dict containing:
|
Construct a filename for storing addtional information about a base image.
Returns a filename.
Get iscsi initiator name for this machine
Test if a given path matches the pattern for info files.
List logical volumes paths for given volume group.
Parameters: | vg – volume group name |
---|
Read contents of file
Parameters: | path – File to read |
---|
Get logical volume size in bytes.
Parameters: | path – logical volume path |
---|
Format a file or block device
Parameters: |
|
---|
Pick the libvirt primary backend driver name
If the hypervisor supports multiple backend drivers, then the name attribute selects the primary backend driver name, while the optional type attribute provides the sub-type. For example, xen supports a name of “tap”, “tap2”, “phy”, or “file”, with a type of “aio” or “qcow2”, while qemu only supports a name of “qemu”, but multiple types including “raw”, “bochs”, “qcow2”, and “qed”.
Parameters: | is_block_dev – |
---|---|
Returns: | driver_name or None |
Read information about an image.
Returns an empty dictionary if there is no info, just the field value if a field is requested, or the entire dictionary otherwise.
Remove one or more logical volume.
Return available space on volume group in bytes.
Parameters: | vg – volume group name |
---|
Write information about an image.
Write the given contents to a file
Parameters: |
|
---|