]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Rewrite qemu-img backing store format handling
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 16 Jun 2010 13:14:05 +0000 (14:14 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 19 Jul 2010 17:25:14 +0000 (18:25 +0100)
commit27f45438c816c8e8c01c455023a7f3a9a5a8de18
tree3167a9c53ff74d46761874e251882340fa51ea18
parent03ca42046a54c5cfadb2e69194896abf06f6a10f
Rewrite qemu-img backing store format handling

When creating qcow2 files with a backing store, it is important
to set an explicit format to prevent QEMU probing. The storage
backend was only doing this if it found a 'kvm-img' binary. This
is wrong because plenty of kvm-img binaries don't support an
explicit format, and plenty of 'qemu-img' binaries do support
a format. The result was that most qcow2 files were not getting
a backing store format.

This patch runs 'qemu-img -h' to check for the two support
argument formats

  '-o backing_format=raw'
  '-F raw'

and use whichever option it finds

* src/storage/storage_backend.c: Query binary to determine
  how to set the backing store format
src/storage/storage_backend.c