Quoting Francesco Poli (2024-01-29 20:54:25)
> On Mon, 29 Jan 2024 10:21:29 +0100 Johannes Schauer Marin Rodrigues wrote:
> 
> [...]
> > With that said, I think mmdebstrap-autopkgtest-build-qemu should keep 
> > using raw images.
> 
> OK, after reading these opinions, I can agree that it makes sense to go
> on with raw images.  Thank you so much for taking the time to consult the
> experts!

There is actually one good argument to go with qcow2: That is the default
format that autopkgtest-build-qemu uses. And since
mmdebstrap-autopkgtest-build-qemu tries to be like autopkgtest-build-qemu it
might make sense to choose the same output format...

But then I also thought: if the output format is raw, the user can always
easily run qemu-img afterwards if they want qcow2. The user can then even
decide for themselves if and what kind of compression or other features they
want. I think it is suboptimal that autopkgtest-build-qemu doesn not make this
optional and just enforces the step that converts to qcow2, eating up runtime
and cpu cycles even if the user doesn't require qcow2.

Since this question will come up again in the future, I added this list to the
code:

# The image is raw and not in qcow2 format because:
#  - faster run-time as the "qemu-image convert" step is not needed
#  - image can be used independent of qemu tooling
#  - modifying the image just with "mount" instead of requiring qemu-nbd
#  - sparse images make the file just as small as with qcow2
#  - trim support is more difficult on qcow2
#  - snapshots and overlays work just as well with raw images
#  - users who prefer qcow2 get to choose to run it themselves with their own
#    custom options like compression

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to