qemu-img create -f qcow2 foo.qcow2 64m qemu-img bitmap --add foo.qcow2 mybitmap This creates a bitmap extension header like this (starting at 0x1f8) 000001f0 00 00 00 00 00 00 00 00 23 85 28 75 00 00 00 18 |........#.(u....| 00000200 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 20 |............... | 00000210 00 00 00 00 00 05 00 00 |........ | And a bitmap table that looks like this: 00050000 00 00 00 00 00 04 00 00 00 00 00 01 00 00 00 02 |................| 00050010 01 10 00 08 00 00 00 00 6d 79 62 69 74 6d 61 70 |........mybitmap| I modified the bitmap table to add eight bytes of bad data: 00050000 00 00 00 00 00 04 00 00 00 00 00 01 00 00 00 02 |................| 00050010 01 10 00 08 00 00 00 08 62 61 64 64 61 74 61 21 |........baddata!| 00050020 6d 79 62 69 74 6d 61 70 |mybitmap| And modified the header accordingly to add eight bytes to the table (0x20f := 0x28): 000001f0 00 00 00 00 00 00 00 00 23 85 28 75 00 00 00 18 |........#.(u....| 00000200 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 28 |...............(| 00000210 00 00 00 00 00 05 00 00 |........ |