[libvirt-users] Problems creating a new volume
Pablo Vieytes
pablo.vb80 at gmail.com
Tue Jun 27 11:27:44 UTC 2017
Hi,
I'm having troubles creating a new storage volume in c++.
This is my code:
storageVolXml = "<volume>\
<name>" + name +".img</name>\
<allocation>0</allocation>\
<capacity unit=\"G\">" + hd + "</capacity>\
<target>\
<path>" + filePath + "</path>\
<format type='"+ diskFormatType + "'/>\
</target>\
</volume>";
storageVolPtr = virStorageVolCreateXML(pool,
storageVolXml.toLatin1().data(),
VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA);
I don't have any error but no file is created in the specified path (filePath).
Any suggestion?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20170627/3227e661/attachment.htm>
More information about the libvirt-users
mailing list