List all volumes in a storagepool

libvirt_list_storagepools
libvirt_node_get_info
Libvirt Functions
PHP Manual

# libvirt_list_volumes

(No version information available, might only be in CVS)

libvirt_list_volumes — List all volumes in a storagepool

### Description

array libvirt_list_volumes ( resource `$storagepool resource` )

This function returns array of volume names in a storagepool.

### Parameters

`connection`

  Storagepool reousrce.

### Return Values

Array of volume names. `FALSE` on failure

### Examples

Example #1 libvirt_list_volumes() example

List all volumes

`<?php
$conn=libvirt_connect($uri,true);
$pool=libvirt_storagepools_lookup_by_name($conn,'default');
$volumes=listvirt_list_volumes($pool);
var_dump($volumes);
?>`

The above example will output something similar to:

    array(3) {
      [0]=>
      string(7) "server1"
      [1]=>
      string(7) "server2"
      [2]=>
      string(7) "server3"
    }

### See Also

- libvirt_storagepool_lookup_by_name() - Lookup storagepool resource by name
- libvirt_storagepool_get_info() - Get storagepool information
- libvirt_list_storagepools() - List all storagepools

libvirt_list_storagepools
libvirt_node_get_info
Libvirt Functions
PHP Manual