Skip to content

feat: support minimal image variant for LTS templates#5156

Closed
Nachiket-Roy wants to merge 1 commit into
lima-vm:masterfrom
Nachiket-Roy:ubuntu-minimal
Closed

feat: support minimal image variant for LTS templates#5156
Nachiket-Roy wants to merge 1 commit into
lima-vm:masterfrom
Nachiket-Roy:ubuntu-minimal

Conversation

@Nachiket-Roy

@Nachiket-Roy Nachiket-Roy commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Add support for Ubuntu minimal cloud images without increasing the number of templates. This change introduces a variant-based image selection mechanism that allows users to opt into Ubuntu minimal images while continuing to use the existing Ubuntu templates. The default behavior remains unchanged. The minimal images provide a smaller download and guest footprint compared to the regular Ubuntu images, while still working with the standard Lima provisioning flow.
The change also includes updates to template generation and test coverage to ensure both standard and minimal Ubuntu images continue to work correctly.

Manual Verification

Users can opt into the minimal image variant by overriding imageOpts.variant during creation:

limactl create template:ubuntu --set ".imageOpts.variant=\"minimal\""
limactl start ubuntu

fixes #5153

Comment thread templates/_images/ubuntu-26.04.yaml Outdated
Comment thread pkg/hostagent/hostagent.go Outdated
Comment thread pkg/limatype/lima_yaml.go Outdated
@AkihiroSuda

Copy link
Copy Markdown
Member

Probably we should just have separate ubuntu-minimal-VERSION.yaml to avoid overengineering

@Nachiket-Roy Nachiket-Roy marked this pull request as draft June 25, 2026 12:42
@Nachiket-Roy Nachiket-Roy marked this pull request as ready for review June 25, 2026 12:52
@Nachiket-Roy Nachiket-Roy requested a review from AkihiroSuda June 25, 2026 14:24
@AkihiroSuda

AkihiroSuda commented Jun 25, 2026

Copy link
Copy Markdown
Member

@Nachiket-Roy Nachiket-Roy requested a review from AkihiroSuda

I suggested to have separate ubuntu-minimal-VERSION.yaml to avoid overengineering.

But imageOpts.variant still sounds good if it works for other guest OSes, not just Ubuntu minimal.
( e.g., Windows https://github.com/lima-vm/lima/pull/5138/changes#r3476574557 )

@Nachiket-Roy Nachiket-Roy marked this pull request as draft June 25, 2026 19:05
@Nachiket-Roy Nachiket-Roy marked this pull request as ready for review June 26, 2026 08:17
@Nachiket-Roy Nachiket-Roy reopened this Jun 26, 2026
@AkihiroSuda

Copy link
Copy Markdown
Member

Drop imageOpts

Please keep the commit message descriptive

Comment thread templates/README.md
- Same as `default` but comment lines are omitted from the YAML
- [`ubuntu-22.04-minimal`](./ubuntu-22.04-minimal.yaml): Ubuntu 22.04 LTS Minimal (Jammy Jellyfish) [amd64 only]
- [`ubuntu-24.04-minimal`](./ubuntu-24.04-minimal.yaml): Ubuntu 24.04 LTS Minimal (Noble Numbat)
- [`ubuntu-26.04-minimal`](./ubuntu-26.04-minimal.yaml), `ubuntu-minimal`, `ubuntu-lts-minimal`: Ubuntu 26.04 LTS Minimal (Resolute Raccoon)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshedding: ubuntu-VERSION-minimal or ubuntu-minimal-VERSION.
cc @lima-vm/committers

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo ubuntu-VERSION-minimal would be better for grouping and consistency. It also aligns with the upstream Ubuntu image naming convention.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use name-version-variant, like in:

debian-13-genericcloud-amd64-daily.qcow2

Comment thread templates/_images/ubuntu-26.04-minimal.yaml
Signed-off-by: Nachiket Roy <nachiket.roy.2@gmail.com>
@afbjorklund

Copy link
Copy Markdown
Member

I suggested to have separate ubuntu-minimal-VERSION.yaml to avoid overengineering.

Now it became separate a separate distribution, like almalinux-kitten or the others

This "works", but it was the thing that I wanted to avoid when I created the #5153

@AkihiroSuda

Copy link
Copy Markdown
Member

As we have found other use cases of variants, shall we close this PR in favor of:

@Nachiket-Roy Nachiket-Roy deleted the ubuntu-minimal branch June 27, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create support for the ubuntu-minimal images

3 participants