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
Find root device path for instance
May be file or device
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. |
Retrieve disk type (raw, qcow2, lvm) for given file.
Get the Fibre Channel HBA information.
Get Fibre Channel WWNs and device paths from the system, if any.
Get Fibre Channel WWNNs from the system, if any.
Get Fibre Channel WWPNs from the system, if any.
Get free/used/total space info for a filesystem
Parameters: | path – Any dirent on the filesystem | ||||||
---|---|---|---|---|---|---|---|
Returns: | A dict containing:
|
Determine the correct path for instance storage.
This method determines the directory name for instance storage, while handling the fact that we changed the naming style to something more unique in the grizzly release.
Parameters: |
|
---|---|
Returns: | a path to store information about that instance |
Get iscsi initiator name for this machine.
Return free/used/total space info for a volume group in bytes
Parameters: | vg – volume group name |
---|---|
Returns: | A dict containing: :total: How big the filesystem is (in bytes) :free: How much space is free (in bytes) :used: How much space is used (in bytes) |
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 info.
Parameters: | path – logical volume path |
---|
Get logical volume size in bytes.
Parameters: | path – logical volume path |
---|
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 |
Remove one or more logical volume.
Write the given contents to a file
Parameters: |
|
---|