Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Apr 2022 19:39:15 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 263029] [mkimg] qcow2 images are not compressed by default
Message-ID:  <bug-263029-227-fWLDwM1GW9@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-263029-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-263029-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263029

--- 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:=3Dsparse
-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:=3Dsparse
-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=3D0.10 -c mkimg.raw.o=
ut
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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-263029-227-fWLDwM1GW9>