libvirt_storagevolume_get_xml_desc Get storagevolume information in XML format
&reftitle.description; array libvirt_storagevolume_get_xml_desc resource volume resource

This function returns string containing volume information in XML format

&reftitle.parameters;

volume resource

  Connection resource of volume

&reftitle.returnvalues;

String with volume information in XML format. &false; on failure

&reftitle.examples;

`libvirt_storagevolume_get_xml_desc` example

String with volume information in XML format

    <?php

    	$conn=libvirt_connect($uri,true);
    	$pool=libvirt_storagepools_lookup_by_name($conn,'default');
    	$volume=libvirt_storagevolume_lookup_by_name($pool,'volume1');
    	$volumeXML=libtvirt_storagevolume_get_xml_desc($volume);

    	var_dump($volumeXML);
    ?>

&example.outputs.similar;

    string(451) "<volume>
      <name>volume1</name>
      <key>mQ3tpH-dAjE-IdHi-iafe-QElg-X2r7-Pv59e6</key>
      <source>
        <device path='/dev/sdb'>
          <extent start='27971813376' end='30119297024'/>
        </device>
      </source>
      <capacity>2147483648</capacity>
      <allocation>2147483648</allocation>
      <target>
        <path>/dev/data/volume1</path>
        <permissions>
          <mode>0660</mode>
          <owner>0</owner>
          <group>6</group>
        </permissions>
      </target>
    </volume>

&reftitle.seealso;

- `libvirt_storagevolume_lookup_by_name`
- `libvirt_storagevolume_get_info`
- `libvirt_storagevolume_create_xml`