[CentOS-devel] Problems with qemu-img when generating Vagrant images

Fri Jul 27 19:03:47 UTC 2018
Laurentiu Pancescu <lpancescu at centosproject.org>

Hello everyone,

we switched from using qemu-img from CentOS 7.x to qemu-img-ev from the 
Virt SIG several months ago, to allow us to generate Hyper-V images.

My attempts to build Vagrant images are failing the automated tests 
since the beginning of July, apparently due to corrupt filesystems.  I 
see XFS metadata corruption in the CentOS 7 images when using 
qemu-img-ev, as well as ext4 superblock corruption in the CentOS 6 
images.[1]

The distro installer runs just once and the resulting disk image is 
converted by Image Factory to different formats, depending on the 
virtualization target.  Since the VirtualBox images are working as 
expected, while the libvirt images don't even boot due to filesystem 
corruption, I would assume that the installation produces a valid image, 
but the conversion of the disk images for libvirt-kvm fall prey to bugs 
in qemu-img-ev and the stock qemu-img.  If anyone has the possibility to 
test with VmWare or Hyper-V, please write me off-list.

I noticed that qemu-img-ev is at version 2.1.2, while Debian Stable has 
version 2.8 and Fedora 28 has version 2.11.  Maybe such bugs, if real, 
were already fixed upstream - would it be possible to use a newer 
version than what qemu-img-ev provides?  We reverted to using the EL7 
qemu-img, but this still produces broken libvirt images and wețd have to 
drop the Hyper-V images as well.

Any help or suggestions are appreciated.

Best regards,
Laurențiu

[1] https://people.centos.org/bstinson/vagrant/c6-vagrant.png