libvirt_storagevolume_lookup_by_name Lookup volume resource by name
&reftitle.description; array libvirt_storagevolume_lookup_by_name resource connection string volume name

This function returns the volume resource for the given name.

&reftitle.parameters;

connection

  Connection resource of the storagepool.

volume name

  Name of a volume

&reftitle.returnvalues;

Volume resource identiefier. &false; on failure

&reftitle.examples;

`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);
    ?>

&example.outputs.similar;

    resource(3) of type (Libvirt storagevolume)

&reftitle.seealso;

- `libvirt_storagevolume_get_info`
- `libvirt_storagevolume_get_xml_desc`
- `libvirt_storagevolume_create_xml`
- `libvirt_list_volumes`