[libvirt] Question about QCOW2 and Libvirt Storage Pools

Hi, I'm doing some work getting libvirt storage pools into OpenStack, as they definitely make certain operations much easier for the Nova libvirt driver. However, one thing I noticed is that since storage pools automatically refresh on reboot, initial creation information gets lost. This poses a problem, since libvirt probes for file type for the filesystem-based pools (dir, fs, netfs, etc), and can erroneously detect a RAW file as another file type (for instance, QCOW2). Is there a reason libvirt doesn't have an option to persist (to disk) the unchanging parts of the volume XML? Best Regards, Solly Ross P.S. we currently deal with a similar problem in OpenStack by saving the file type to disk the first time we use the image file. However, it would be nice if libvirt could handle this for us, at some point, as it seems like it would be a good thing to have in libvirt.

On 05/05/2014 12:05 PM, Solly Ross wrote:
Hi, I'm doing some work getting libvirt storage pools into OpenStack, as they definitely make certain operations much easier for the Nova libvirt driver. However, one thing I noticed is that since storage pools automatically refresh on reboot, initial creation information gets lost. This poses a problem, since libvirt probes for file type for the filesystem-based pools (dir, fs, netfs, etc), and can erroneously detect a RAW file as another file type (for instance, QCOW2). Is there a reason libvirt doesn't have an option to persist (to disk) the unchanging parts of the volume XML?
Only the reason of "no one has implemented it". Contributions welcome; I think it does indeed make sense to figure out a way to store persistent volume information alongside the persistent pool XML, so that we can track that a given file is raw and should not be probed. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Solly Ross