Skip to content

Feat: support configuring the disk storage size#447

Closed
karenheckel wants to merge 3 commits intoapple:mainfrom
karenheckel:main
Closed

Feat: support configuring the disk storage size#447
karenheckel wants to merge 3 commits intoapple:mainfrom
karenheckel:main

Conversation

@karenheckel
Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

  • For support of specifying a default disk capacity.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

@dcantah
Copy link
Copy Markdown
Member

dcantah commented Dec 12, 2025

Hi @karenheckel, thanks for the contribution! Just truncating the file won't have the filesystem inside updated to believe it has {insert new size} available to it unfortunately so this won't work as is. The approach I'd been thinking of for this problem, although this would be a tiny bit complex, is to leave the actual block containing the image contents alone (through the library you can choose whatever size you want for this already) and instead provide a secondary block that we'd create on the fly of the requested size. We'd attach both the container image block (as we already do today) and this new block of the requested size to the VM, mount both of them, and then union the two with overlayfs in the guest, where the upperdir would be the empty block of the requested size. The rationale for this is that in the container you'd now see you have {requested size} available to write. This works both ways, if you want to give a smaller filesystem size this should work completely fine, as well as a much larger size than our images are (512GiB) today as well. Then when the container exits we can just remove the block we made for this little dance.

@jglogan
Copy link
Copy Markdown
Contributor

jglogan commented Dec 12, 2025

@karenheckel I need to unburden myself from a couple other tasks but early next week let me look at your container PR and your latest comments there, and we can work out how to move the enhancement forward.

@dcantah
Copy link
Copy Markdown
Member

dcantah commented Mar 5, 2026

Hi @karenheckel this was solved via #533. It hasn't been integrated into https://github.com/apple/container however if you'd like to tackle that side

@dcantah dcantah closed this Mar 5, 2026
@karenheckel
Copy link
Copy Markdown
Author

karenheckel commented Mar 5, 2026

Hi @dcantah! I can tackle it on the container side. I should be able to start taking a look next week. Do you have any pointers for it given what's already been 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.

3 participants