Sys::Virt::StorageVol - Represent & manage a libvirt storage volume
The Sys::Virt::StorageVol module represents a storage volume managed by libvirt. A storage volume is always associated with a containing storage pool (Sys::Virt::StoragePool).
Sys::Virt::StorageVol
Sys::Virt::StoragePool
Returns a string with a locally unique name of the storage vol
Returns a string with a globally unique key for the storage vol
Returns a string with a locally unique file path of the storage vol
Returns an XML document containing a complete description of the storage vol's configuration
Immediately delete the storage volume freeing its storage resources. The flags parameter indicates any special action to be taken when deleting the volume.
flags
Adjust the size of the storage volume. The $newcapacity value semantics depend on the $flags parameter. If $flags specifies RESIZE_DELTA then the $newcapacity is relative to the current size. If $flags specifies RESIZE_SHRINK then the $newcapacity value is the amount of space to remove
$newcapacity
$flags
RESIZE_DELTA
RESIZE_SHRINK
Clear the data in the storage volume to avoid future information leak. The flags parameter is currently unused and defaults to zero.
Clear the data in the storage volume to avoid future information leak. The $algorithm parameter specifies the data pattern used to erase data, and should be one of the WIPE ALGORITHM CONSTANTS listed later. The flags parameter is currently unused and defaults to zero.
$algorithm
Retrieve live information about the storage volume. The returned $info hash reference contains three keys. type indicates whether the volume is a file or block device. capacity provides the maximum logical size of the volume. allocation provides the current physical usage of the volume. The allocation may be less than the capacity for sparse, or grow-on-demand volumes. The allocation may also be larger than the capacity, if there is a metadata overhead for the volume format.
$info
type
capacity
allocation
Download data from $vol using the stream $st. If $offset and $length are non-zero, then restrict data to the specified volume byte range.
$vol
$st
$offset
$length
Upload data to $vol using the stream $st. If $offset and $length are non-zero, then restrict data to the specified volume byte range.
The following sets of constants are useful when dealing with storage volumes
The following constants are useful for interpreting the type field in the hash returned by the get_info method
get_info
The volume is a plain file
The volume is a block device
The volume is a directory
The volume is a network source
The volume is a network directory
The following constants are useful for the flags parameter of the create method
create
Preallocate header metadata when creating the volume.
Perform lightweight reference copy
The following constants are useful for the flags parameter of the delete method
delete
Do a plain delete without any attempt to scrub data.
Zero out current allocated blocks when deleteing the volume
Delete snapshots associated with the volume
The following constants specify the algorithm for erasing data
9-pass method recommended by the German Center of Security in Information Technologies
4-pass Dod 5220.22-M section, 8-306 procedure
The canonical 35-pass sequence
4-pass NNSA Policy Letter NAP-14.1-C (XVI-8)
7-pass random
33-pass random
1-pass random
7-pass method described by Bruce Schneier in "Applied Cryptography" (1996)
1-pass, all zeroes
VOLUME RESIZE CONSTANTS
The following constants control how storage volumes can be resized
Fully allocate the extra space required during resize
Treat the new capacity as a delta to the current capacity
Treat the new capacity as an amount to remove from the capacity
Daniel P. Berrange <berrange@redhat.com>
Copyright (C) 2006-2009 Red Hat Copyright (C) 2006-2009 Daniel P. Berrange
This program is free software; you can redistribute it and/or modify it under the terms of either the GNU General Public License as published by the Free Software Foundation (either version 2 of the License, or at your option any later version), or, the Artistic License, as specified in the Perl README file.
Sys::Virt, Sys::Virt::Error, http://libvirt.org
http://libvirt.org
To install Sys::Virt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sys::Virt
CPAN shell
perl -MCPAN -e shell install Sys::Virt
For more information on module installation, please visit the detailed CPAN module installation guide.