lima-vm / lima-vm/lima

Add --latest to start command

Open
#5,033 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

### Description

Currently there is an ad-hoc list of the images, with one "release" and one "latest":

```yaml
images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.

- location: "https://cloud-images.ubuntu.com/releases/questing/release-20260414/ubuntu-25.10-server-cloudimg-***.img"
arch: "***"
digest: "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache

- location: https://cloud-images.ubuntu.com/releases/questing/release/ubuntu-25.10-server-cloudimg-***.img
arch: ***
```

```yaml
images:
- location: "https://repo.almalinux.org/almalinux/10.1/cloud/***/images/AlmaLinux-10-GenericCloud-10.1-20260414.0.***.qcow2"
arch: "***"
digest: "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache

- location: https://repo.almalinux.org/almalinux/10/cloud/***/images/AlmaLinux-10-GenericCloud-latest.***.qcow2
arch: ***

```

By editing the yaml document, or a PhD in yq, you can make it use the latest daily image.

But maybe it should be a flag to the create command, to go straight for latest-greatest?

* #5032

It might require a `latest: true` metadata?

```go
type Image struct {
File `yaml:",inline"`
Latest *bool `yaml:"latest,omitempty" json:"latest,omitempty"`
Kernel *Kernel `yaml:"kernel,omitempty" json:"kernel,omitempty"`
Initrd *File `yaml:"initrd,omitempty" json:"initrd,omitempty"`
}
```

Contributor guide

Open the contributing guide

Research direction

Start at the start/create command and the Image struct shown in the issue, then trace how the YAML images list is selected. Review #5032 for related context and define how a --latest option and any latest metadata should affect selection; done means the command can choose the latest image without manually editing YAML.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
44/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.