(php-libvirt 0.4)
libvirt_storagevolume_get_info — Get storagevolume information
This function returns array containing volume information
Note: Warning
. This function returns values that may be bigger than 32bit integer limit. Please read this note for more details.
Connection resource of volume
Array with volume information. FALSE on failure
Example #1 libvirt_storagevolume_get_info() example
Array with volume information
<?php
$conn=libvirt_connect($uri,true);
$pool=libvirt_storagepools_lookup_by_name($conn,'default');
$volume=libvirt_storagevolume_lookup_by_name($pool,'volume1');
$volumeInfo=libtvirt_storagevolume_get_info($volue);
var_dump($volumeInfo);
?>
The above example will output something similar to:
array(3) { ["type"]=> int(1) ["capacity"]=> int(2147483648) ["allocation"]=> int(2147483648) }