
On Mon, Aug 11, 2014 at 08:35:46PM +0000, Jianfeng Tang wrote:
I am using backing store when I create my volume. However, the backing store file is from another team, which can be either in raw or in qcow2 format.
Is there a libvirt API to detect image format by given an image file? Or I have to run qemu-img?
Nothing wrong with running `qemu-img info' IMHO. Libguestfs has some disk detection features, including format, backing file, virtual size. And of course it can go a lot deeper into the disk content itself using libguestfs inspection. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW