Get storagevolume information

libvirt_storagevolume_create_xml
libvirt_storagevolume_get_xml_desc
Libvirt Functions
PHP Manual

# libvirt_storagevolume_get_info

(php-libvirt 0.4)

libvirt_storagevolume_get_info — Get 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_storagevolume_lookup_by_name() - Lookup volume resource by name
- libvirt_storagevolume_get_xml_desc() - Get storagevolume information in XML format
- libvirt_storagevolume_create_xml() - Create a new storage volume based on XML input

libvirt_storagevolume_create_xml
libvirt_storagevolume_get_xml_desc
Libvirt Functions
PHP Manual