(No version information available, might only be in CVS)
libvirt_storagevolume_create_xml — Create a new storage volume based on XML input
This function returns string containing volume information in XML format
Connection resource of the storagepool
XML information to base the new volume on
Volume resource of the newly created volume. FALSE on failure
Example #1 libvirt_storagevolume_create_xmlc() example
Create a new volume in a storagepool
<?php
$conn=libvirt_connect($uri,true);
$pool=libvirt_storagepools_lookup_by_name($conn,'default');
$xml = "<volume>
<name>volume2</name>
<key>b10fa7e2-5e48-4c97-a7a0-42ca197d400c</key>
<capacity unit='M'>100</capacity>
</volume>";
$volumeNew=libvirt_storagevolume_create_xml($pool,$xml);
var_dump($volumeNew);
?>
The above example will output something similar to:
resource(3) of type (Libvirt volume)