libvirt_storagevolume_create_xml Create a new storage volume based on XML input
&reftitle.description; array libvirt_storagevolume_create_xml resource storagepool resource string xml

This function returns string containing volume information in XML format

&reftitle.parameters;

storagepool resource

  Connection resource of the storagepool

xml

  XML information to base the new volume on

&reftitle.returnvalues;

Volume resource of the newly created volume. &false; on failure

&reftitle.examples;

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

&example.outputs.similar;

    resource(3) of type (Libvirt volume)

&reftitle.seealso;

- `libvirt_storagevolume_lookup_by_name`
- `libvirt_storagevolume_get_info`
- `libvirt_storagevolume_get_xml_desc`