[libvirt-users] Does libvirt have API to detect image format
Richard W.M. Jones
rjones at redhat.com
Wed Aug 13 14:10:21 UTC 2014
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
More information about the libvirt-users
mailing list