Libvirt Functions
PHP Manual

libvirt_storagevolume_get_info

(php-libvirt 0.4)

libvirt_storagevolume_get_infoGet storagevolume information

Description

array libvirt_storagevolume_get_info ( resource $volume resource )

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.

Parameters

volume resource

Connection resource of volume

Return Values

Array with volume information. FALSE on failure

Examples

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)
}

See Also


Libvirt Functions
PHP Manual