[libvirt-users] Cannot create qcow2 images with libvirt 0.8.1

Guido Winkelmann guido-libvi at unknownsite.de
Fri May 28 15:10:30 UTC 2010


Hi,

After upgrading to libvirt 0.8.1, I can no longer create empty volumes with no 
backing store and an explicit format of qcow2.

This XML volume definition:

<volume>
  <name>testserverb-data2.img</name>
  <allocation>0</allocation>
  <capacity units='G'>20</capacity>
  <target>
    <format type='qcow2'/>
    <permissions>
      <owner>107</owner>
      <group>107</group>
      <mode>0744</mode>
    </permissions>
  </target>
</volume>

yields the error "Cannot run /usr/bin/qemu-img to create /data/testserverb-
data.img: Invalid argument"

In /var/log/messages on the qemu host I can find the following snippet after 
that:

error : virRunWithHook:933 : internal error '/usr/bin/qemu-img create -f qcow2 
/data/testserverb-data.img 0K' exited with non-zero status 1 and signal 0: 
qemu-img: Image creation needs a size parameter#012
error : virStorageBackendCreateExecCommand:537 : Cannot run /usr/bin/qemu-img 
to create /data/testserverb-data.img: Invalid argument
error : qemudClientReadBuf:1653 : gnutls_record_recv: A TLS packet with 
unexpected length was received.

If I leave out the <format> element and/or specify a <backingStore> element 
for the volume, it works again. (I suppose the backing store makes it work 
because in that case qemu-img does not need a size parameter...)

The host system is a vanilla Fedora Core 12 system (aside from the upgraded 
libvirt).

Regards,

	Guido Winkelmann




More information about the libvirt-users mailing list