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

Sharadha Prabhakar (3P) sharadha.prabhakar at citrix.com
Fri Mar 19 10:37:15 UTC 2010

I have the following Pool XML 

<pool type='netfs'>
  <name>NFS ISO library</name>
    <host name='telos'/>
    <dir path='/images/autoinstall'/>
    <format type='auto'/>

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?


More information about the libvir-list mailing list