[Bug 263029] [mkimg] qcow2 images are not compressed by default
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 263029] [mkimg] qcow2 images are not compressed by default"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 06 Apr 2022 19:39:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263029 --- Comment #3 from Ed Maste <emaste@freebsd.org> --- Starting with a 1G file of all zeros and converting I see: $ mkimg -f qcow2 -o mkimg.qcow2.out -s gpt -p freebsd-ufs:=sparse -rw-r--r-- 1 emaste emaste 524288 Apr 6 15:28 mkimg.qcow2.out $ mkimg -f raw -o mkimg.raw.out -s gpt -p freebsd-ufs:=sparse -rw-r--r-- 1 emaste emaste 1073744384 Apr 6 15:28 mkimg.raw.out $ qemu-img convert -S 1k -p -f raw -O qcow2 -c mkimg.raw.out qemu-img.out -rw-r--r-- 1 emaste emaste 458752 Apr 6 15:30 qemu-img.out $ hexdump -Cv mkimg.qcow2.out 00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 40 01 00 00 |............@...| mkimg indeed produces V2 $ hexdump -Cv qemu-img.out 00000000 51 46 49 fb 00 00 00 03 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 40 00 0a 00 |............@...| qemu-img produces V3 We can ask for qcow2 compat: $ qemu-img convert -S 1k -p -f raw -O qcow2 -o compat=0.10 -c mkimg.raw.out qemu-img.compat.out -rw-r--r-- 1 emaste emaste 458752 Apr 6 15:36 qemu-img.compat.out $ hexdump -Cv qemu-img.compat.out 00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| 00000010 00 00 00 00 00 00 00 10 00 00 00 00 40 00 0a 00 |............@...| It is now V2. -- You are receiving this mail because: You are the assignee for the bug.