Hey Guys, We are seeing following assert when trying to convert disk image from vhdx to raw. This issue is seen only for disk with 4k logical sector size. $ qemu-img convert -f vhdx -O raw 4KTest1.vhdx test.raw qemu-img: util/iov.c:388: qiov_slice: Assertion `offset + len <= qiov->size' failed. Aborted $ qemu-img --version qemu-img version 5.0.91 (v5.1.0-rc1-2-g3cbc897-dirty) Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers $ qemu-img check -r all 4KTest1.vhdx No errors were found on the image. $ qemu-img info 4KTest1.vhdx image: 4KTest1.vhdx file format: vhdx virtual size: 10 GiB (10737418240 bytes) disk size: 35.7 GiB cluster_size: 33554432 The vhdx disk metadata is following, VhdFormat : VHDX VhdType : Dynamic LogicalSectorSize : 4096 PhysicalSectorSize : 4096 BlockSize : 33554432 Following is the backtrace of the assert, #0 0x00007ffff64cf387 in raise () from /lib64/libc.so.6 #1 0x00007ffff64d0a78 in abort () from /lib64/libc.so.6 #2 0x00007ffff64c81a6 in __assert_fail_base () from /lib64/libc.so.6 #3 0x00007ffff64c8252 in __assert_fail () from /lib64/libc.so.6 #4 0x00005555556abf5a in qiov_slice (qiov=0x7ffff4122a20, offset=0, len=2096640, head=0x7ffff4122648, tail=0x7ffff4122650, niov=0x7ffff4122640) at util/iov.c:388 #5 0x00005555556ac0f6 in qemu_iovec_init_extended (qiov=0x7ffff4122730, head_buf=0x0, head_len=0, mid_qiov=0x7ffff4122a20, mid_offset=0, mid_len=2096640, tail_buf=0x0, tail_len=0) at util/iov.c:429 #6 0x00005555556ac438 in qemu_iovec_init_slice (qiov=0x7ffff4122730, source=0x7ffff4122a20, offset=0, len=2096640) at util/iov.c:495 #7 0x0000555555609bd6 in bdrv_driver_preadv (bs=0x555555982a80, offset=15841886208, bytes=2096640, qiov=0x7ffff4122a20, qiov_offset=0, flags=0) at block/io.c:1134 #8 0x000055555560ad55 in bdrv_aligned_preadv (child=0x5555559891f0, req=0x7ffff4122900, offset=15841886208, bytes=2096640, align=1, qiov=0x7ffff4122a20, qiov_offset=0, flags=0) at block/io.c:1515 #9 0x000055555560b67b in bdrv_co_preadv_part (child=0x5555559891f0, offset=15841886208, bytes=2096640, qiov=0x7ffff4122a20, qiov_offset=0, flags=0) at block/io.c:1756 #10 0x000055555560b4b4 in bdrv_co_preadv (child=0x5555559891f0, offset=15841886208, bytes=2096640, qiov=0x7ffff4122a20, flags=0) at block/io.c:1714 #11 0x00005555555e3266 in vhdx_co_readv (bs=0x55555597b370, sector_num=4194304, nb_sectors=4095, qiov=0x7ffff4122e10) at block/vhdx.c:1208 #12 0x0000555555609da1 in bdrv_driver_preadv (bs=0x55555597b370, offset=2147483136, bytes=2097152, qiov=0x7ffff4122e10, qiov_offset=0, flags=0) at block/io.c:1169 #13 0x000055555560ad55 in bdrv_aligned_preadv (child=0x555555989150, req=0x7ffff4122cb0, offset=2147483136, bytes=2097152, align=512, qiov=0x7ffff4122e10, qiov_offset=0, flags=0) at block/io.c:1515 #14 0x000055555560b67b in bdrv_co_preadv_part (child=0x555555989150, offset=2147483136, bytes=2097152, qiov=0x7ffff4122e10, qiov_offset=0, flags=0) at block/io.c:1756 #15 0x000055555560b4b4 in bdrv_co_preadv (child=0x555555989150, offset=2147483136, bytes=2097152, qiov=0x7ffff4122e10, flags=0) at block/io.c:1714 #16 0x00005555555f34c3 in blk_do_preadv (blk=0x55555597b010, offset=2147483136, bytes=2097152, qiov=0x7ffff4122e10, flags=0) at block/block-backend.c:1211 #17 0x00005555555f351b in blk_co_preadv (blk=0x55555597b010, offset=2147483136, bytes=2097152, qiov=0x7ffff4122e10, flags=0) at block/block-backend.c:1223 #18 0x000055555557347b in blk_co_pread (blk=0x55555597b010, offset=2147483136, bytes=2097152, buf=0x7fffefdff000, flags=0) at /home/swapnil/dev/github/qemu/include/sysemu/block-backend.h:140 #19 0x00005555555771aa in convert_co_read (s=0x7fffffffdc30, sector_num=4194303, nb_sectors=4096, buf=0x7fffefdff000 "") at qemu-img.c:1830 #20 0x000055555557785c in convert_co_do_copy (opaque=0x7fffffffdc30) at qemu-img.c:2007 #21 0x00005555556a9e4e in coroutine_trampoline (i0=1436133568, i1=21845) at util/coroutine-ucontext.c:173 #22 0x00007ffff64e1190 in ?? () from /lib64/libc.so.6 #23 0x00007fffffffd2e0 in ?? () #24 0x0000000000000000 in ?? () Thanks and Regards, -Swapnil