lima-vm/lima · error

no images are configured (did you set --image-variant or --a

Error message

no images are configured (did you set --image-variant or --arch-variant to a value not present in the template?)

What it means

Prepare resolves which guest OS image to download. If, after applying --image-variant / --arch-variant filters, inst.Config.Images is empty, there is nothing to boot, so Start is aborted with this hint that the chosen variant does not exist in the template.

Source

Thrown at pkg/instance/start.go:118

	disk := filepath.Join(inst.Dir, filenames.Disk)
	kernel := filepath.Join(inst.Dir, filenames.Kernel)
	kernelCmdline := filepath.Join(inst.Dir, filenames.KernelCmdline)
	initrd := filepath.Join(inst.Dir, filenames.Initrd)
	if !osutil.FileExists(imagePath) && !osutil.FileExists(disk) {
		var ensuredImage bool
		var targetVariant, targetArchVariant string
		var targetVariantSet bool
		for _, img := range inst.Config.Images {
			if img.Arch == *inst.Config.Arch {
				targetVariant = img.Variant
				targetArchVariant = img.ArchVariant
				targetVariantSet = true
				break
			}
		}

		if len(inst.Config.Images) == 0 {
			return nil, errors.New("no images are configured (did you set --image-variant or --arch-variant to a value not present in the template?)")
		}
		errs := make([]error, len(inst.Config.Images))
		for i, f := range inst.Config.Images {
			if targetVariantSet && f.Variant != targetVariant {
				errs[i] = fmt.Errorf("%w: variant mismatch (expected %q, got %q)", fileutils.ErrSkipped, targetVariant, f.Variant)
				continue
			}
			if targetVariantSet && f.ArchVariant != targetArchVariant {
				errs[i] = fmt.Errorf("%w: archVariant mismatch (expected %q, got %q)", fileutils.ErrSkipped, targetArchVariant, f.ArchVariant)
				continue
			}
			if _, err := fileutils.DownloadFile(ctx, imagePath, f.File, true, "the image", *inst.Config.Arch, supportedImageFormats); err != nil {
				errs[i] = err
				continue
			}
			if f.Kernel != nil {
				// ensure decompress kernel because vz expects it to be decompressed
				if _, err := fileutils.DownloadFile(ctx, kernel, f.Kernel.File, true, "the kernel", *inst.Config.Arch, nil); err != nil {

View on GitHub (pinned to dd909d0973)

Solutions

  1. Run `limactl start --list-variants` (or inspect the template) to see available image variants/archVariants.
  2. Retry with a variant that exists in the template, or drop the flag to use the default image.
  3. Use a different base template that provides the desired variant.
  4. If editing lima.yaml manually, ensure the images: list is non-empty and matches your arch.

Example fix

// before
limactl create template://experimental/next --image-variant=desktop
// after
limactl create template://experimental/next --image-variant=server  # variant actually present in template
Defensive patterns

Strategy: validation

Validate before calling

// before create/start, ensure the template exposes the requested variant
variants := templatestore.ReadVariants(templateRef) // or inspect template YAML
if len(variants) > 0 && !slices.Contains(variants, requestedVariant) {
  return fmt.Errorf("variant %q not in template (have %v)", requestedVariant, variants)
}

Prevention

When it happens

Trigger: `limactl create/start --image-variant=<v>` or `--arch-variant=<v>` where the template has no image matching that variant/arch combination, leaving inst.Config.Images empty before the download loop.

Common situations: Typo'd variant names (e.g. --image-variant=alpine for an Ubuntu template); requesting an archVariant not published for that image; using a minimal template that only ships one variant.

Related errors


AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01). Data as JSON: /api/errors/d99d0c6cbd8f65e0. Report an issue: GitHub.