qemu-img error and version madness

The Ubuntu Precise 12.04 qemu version is fairly “outdated” stopping at around 1.0. The current qemu release candiate is 1.3.0.rc2 .

So if you are running into a

qemu-img: error while reading sector 131072: Invalid argument

error while converting images using qemu-img, just try to update your qemu binaries, by the provided source files of qemu.org.

#Dependencies
apt-get install libglib2.0-dev dh-autoreconf

#untar
tar xvfj qemu-1.3.0-rc1.tar.bz2

cd qemu-1.3.0-rc1

#configure
./configure
./make
./make install

The binaries will be under

/usr/local/bin/qemu-img

So just for the sake of converting a full path to the qemu-img will do the trick:

/usr/local/bin/qemu-img convert disk1.vmdk -O qcow2 disk1.qcow2

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>