(php-libvirt 0.4)
libvirt_storagevolume_lookup_by_name — Lookup volume resource by name
This function returns the volume resource for the given name.
Connection resource of the storagepool.
Name of a volume
Volume resource identiefier. FALSE on failure
Example #1 libvirt_storagevolume_lookup_by_name() example
Return volume resource identifier
<?php
$conn=libvirt_connect($uri,true);
$pool=libvirt_storagepool_lookup_by_name($conn, 'default');
$volume=libvirt_storagevolume_lookup_by_name($pool, 'volume1');
var_dump($volume);
?>
The above example will output something similar to:
resource(3) of type (Libvirt storagevolume)