Skip to content

image: replace output_size with a qcow2 virtual_size - #319

Merged
martinpitt merged 1 commit into
mainfrom
virtual-size
Oct 16, 2026
Merged

martinpitt merged 1 commit into
mainfrom
virtual-size

Conversation

@martinpitt

Copy link
Copy Markdown
Member

The output_size attribute from commit 4240a39 pads the raw disk with free space. But the main purpose of the raw is for writing to real iron and cloud images, and in both cases the real disk is larger anyway -- firstboot grows into it. All that padding is unnecessary, needs careful "sparse files" treatment, and gets in the way when trying to upload them as e.g. an AMI.

The extra room is only really useful for virtual disks like qcow2 or VMDK. Keep the raw as small as its partitions, drop output_size, and and give the qcow2 a virtual_size instead. Cloud images such as an AMI will size their volume from the same attribute in the future.


Preparation for reworking #311

@martinpitt martinpitt added the update-reproducibility accept new image digests label Oct 16, 2026
The `output_size` attribute from commit 4240a39 pads the raw disk with
free space. But the main purpose of the raw is for writing to real iron
and cloud images, and in both cases the real disk is larger anyway --
firstboot grows into it. All that padding is unnecessary, needs careful
"sparse files" treatment, and gets in the way when trying to upload them
as e.g. an AMI.

The extra room is only really useful for virtual disks like qcow2 or
VMDK. Keep the raw as small as its partitions, drop `output_size`, and
and give the qcow2 a `virtual_size` instead. Cloud images such as an AMI
will size their volume from the same attribute in the future.

Signed-off-by: Martin Pitt <[email protected]>
@github-actions github-actions Bot removed the update-reproducibility accept new image digests label Oct 16, 2026
@martinpitt
martinpitt merged commit e0bd4df into main Oct 16, 2026
2 checks passed
@martinpitt
martinpitt deleted the virtual-size branch October 16, 2026 10:52
@martinpitt martinpitt mentioned this pull request Oct 16, 2026
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants