I succeeded to reproduce the bug without NBD:
$ ./qemu-img create -f vdi test.vdi 2G Formatting 'test.vdi', fmt=vdi size=2147483648 static=off $ ./qemu-img create -f raw test.raw 2G Formatting 'test.raw', fmt=raw size=2147483648 $ x86_64-softmmu/qemu-system-x86_64 -enable-kvm -drive if=virtio,file=blkverify:test.raw:test.vdi,format=raw -drive if=virtio,file=data.img,format=raw,format=raw -cdrom ~/tmp/arch.iso -m 512 -boot d blkverify: read sector_num=810976 nb_sectors=256 contents mismatch in sector 811008
Operations in the guest: $ dd if=/dev/vdb of=/dev/vda $ dd if=/dev/vda of=/dev/null
So it really looks like something's broken in qemu's VDI block driver.
Max
I succeeded to reproduce the bug without NBD:
$ ./qemu-img create -f vdi test.vdi 2G softmmu/ qemu-system- x86_64 -enable-kvm -drive if=virtio, file=blkverify: test.raw: test.vdi, format= raw -drive if=virtio, file=data. img,format= raw,format= raw -cdrom ~/tmp/arch.iso -m 512 -boot d
Formatting 'test.vdi', fmt=vdi size=2147483648 static=off
$ ./qemu-img create -f raw test.raw 2G
Formatting 'test.raw', fmt=raw size=2147483648
$ x86_64-
blkverify: read sector_num=810976 nb_sectors=256 contents mismatch in sector 811008
Operations in the guest:
$ dd if=/dev/vdb of=/dev/vda
$ dd if=/dev/vda of=/dev/null
So it really looks like something's broken in qemu's VDI block driver.
Max