I don't think a 'fudge factor' option is particularly clean or intuitive. I
think what you actually want is to be able to declare the overall size of
the image that you're building. It's a waste of mental energy to think
about VM image sizes in increments less than 1G, especially given that these
are all still going to be sparse files.
So I would suggest:
- a --size option to ubuntu-image to specify the full image size (needs
some careful thought for the multiple-image case)
- keep the 50% buffer on ext4 filesystem size as a floor (the '50%' can be
refined over time with investigation into the actual size requirements
for ext4 metadata, but this is not a high priority; highest priority is
that it works reliably)
- if --size is smaller than the minimum size needed to accommodate the
contents, warn but build the image anyway - because all the expensive
work of ubuntu-image happens /before/ we're able to calculate the final
size, so throwing that all away at the end would be /very annoying/.
From the mailing list:
I don't think a 'fudge factor' option is particularly clean or intuitive. I
think what you actually want is to be able to declare the overall size of
the image that you're building. It's a waste of mental energy to think
about VM image sizes in increments less than 1G, especially given that these
are all still going to be sparse files.
So I would suggest:
- a --size option to ubuntu-image to specify the full image size (needs
some careful thought for the multiple-image case)
- keep the 50% buffer on ext4 filesystem size as a floor (the '50%' can be
refined over time with investigation into the actual size requirements
for ext4 metadata, but this is not a high priority; highest priority is
that it works reliably)
- if --size is smaller than the minimum size needed to accommodate the
contents, warn but build the image anyway - because all the expensive
work of ubuntu-image happens /before/ we're able to calculate the final
size, so throwing that all away at the end would be /very annoying/.