Lookup storagepool resource by name

libvirt_storagepool_get_info
libvirt_storagevolume_create_xml
Libvirt Functions
PHP Manual

# libvirt_storagepool_lookup_by_name

(php-libvirt 0.4)

libvirt_storagepool_lookup_by_name — Lookup storagepool resource by name

### Description

array libvirt_storagepool_lookup_by_name ( resource `$connection` , string `$storagepool name` )

This function returns the storagepool resource for the given name.

### Parameters

`connection`

  Connection resource of hypervisor.

`storagepool name`

  Name of a storagepool

### Return Values

Storagepool resource identiefier. `FALSE` on failure

### Examples

Example #1 libvirt_storagepool_lookup_by_name() example

Return storagepool resource identifier

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

The above example will output something similar to:

    resource(3) of type (Libvirt storagepool)

### See Also

- libvirt_list_storagepools() - List all storagepools
- libvirt_storagepool_get_info() - Get storagepool information
- libvirt_list_volumes() - List all volumes in a storagepool

libvirt_storagepool_get_info
libvirt_storagevolume_create_xml
Libvirt Functions
PHP Manual