[libvirt] virStoragePoolDefParseString() fails with the following pool xml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I have the following Pool XML 

<pool type='netfs'>
  <name>NFS ISO library</name>
  <uuid>6142b786-378d-9def-bc96-2d0dc0466c13</uuid>
  <capacity>838729728</capacity>
  <allocation>838729728</allocation>
  <available>148315040</available>
  <source>
    <host name='telos'/>
    <dir path='/images/autoinstall'/>
    <format type='auto'/>
  </source>
  <target>
    <permissions>
      <mode>00</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>

I'm passing this string to virStoragePoolDefParseString() to get a virStoragePoolDefPtr
But it returns NULL. Can anyone explain if there's something wrong with the XML format?
I ran gdb and I kind of figured out that it fails at
if (virStoragePoolDefParseSource(ctxt, &ret->source, ret->type,
                                         source_node) < 0) in virStoragePoolDefParseXML()
in ~/src/conf/storage_conf.c
The reason I need this is to dump Volume XML which takes the poolDefPtr as well as VolDefPtr
To return the XML format(virStorageVolDefFormat()). Is there a simpler way of producing the Volume XML just using the VolDefPtr?

Regards,
Sharadha

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]