{"record":{"id":"d99d0c6cbd8f65e0","repo":"lima-vm/lima","slug":"no-images-are-configured-did-you-set-image-vari","errorCode":null,"errorMessage":"no images are configured (did you set --image-variant or --arch-variant to a value not present in the template?)","messagePattern":"no images are configured \\(did you set --image-variant or --arch-variant to a value not present in the template\\?\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/instance/start.go","lineNumber":118,"sourceCode":"\tdisk := filepath.Join(inst.Dir, filenames.Disk)\n\tkernel := filepath.Join(inst.Dir, filenames.Kernel)\n\tkernelCmdline := filepath.Join(inst.Dir, filenames.KernelCmdline)\n\tinitrd := filepath.Join(inst.Dir, filenames.Initrd)\n\tif !osutil.FileExists(imagePath) && !osutil.FileExists(disk) {\n\t\tvar ensuredImage bool\n\t\tvar targetVariant, targetArchVariant string\n\t\tvar targetVariantSet bool\n\t\tfor _, img := range inst.Config.Images {\n\t\t\tif img.Arch == *inst.Config.Arch {\n\t\t\t\ttargetVariant = img.Variant\n\t\t\t\ttargetArchVariant = img.ArchVariant\n\t\t\t\ttargetVariantSet = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tif len(inst.Config.Images) == 0 {\n\t\t\treturn nil, errors.New(\"no images are configured (did you set --image-variant or --arch-variant to a value not present in the template?)\")\n\t\t}\n\t\terrs := make([]error, len(inst.Config.Images))\n\t\tfor i, f := range inst.Config.Images {\n\t\t\tif targetVariantSet && f.Variant != targetVariant {\n\t\t\t\terrs[i] = fmt.Errorf(\"%w: variant mismatch (expected %q, got %q)\", fileutils.ErrSkipped, targetVariant, f.Variant)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif targetVariantSet && f.ArchVariant != targetArchVariant {\n\t\t\t\terrs[i] = fmt.Errorf(\"%w: archVariant mismatch (expected %q, got %q)\", fileutils.ErrSkipped, targetArchVariant, f.ArchVariant)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif _, err := fileutils.DownloadFile(ctx, imagePath, f.File, true, \"the image\", *inst.Config.Arch, supportedImageFormats); err != nil {\n\t\t\t\terrs[i] = err\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif f.Kernel != nil {\n\t\t\t\t// ensure decompress kernel because vz expects it to be decompressed\n\t\t\t\tif _, err := fileutils.DownloadFile(ctx, kernel, f.Kernel.File, true, \"the kernel\", *inst.Config.Arch, nil); err != nil {","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/instance/start.go#L100-L136","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Run `limactl start --list-variants` (or inspect the template) to see available image variants/archVariants.","Retry with a variant that exists in the template, or drop the flag to use the default image.","Use a different base template that provides the desired variant.","If editing lima.yaml manually, ensure the images: list is non-empty and matches your arch."],"exampleFix":"// before\nlimactl create template://experimental/next --image-variant=desktop\n// after\nlimactl create template://experimental/next --image-variant=server  # variant actually present in template","handlingStrategy":"validation","validationCode":"// before create/start, ensure the template exposes the requested variant\nvariants := templatestore.ReadVariants(templateRef) // or inspect template YAML\nif len(variants) > 0 && !slices.Contains(variants, requestedVariant) {\n  return fmt.Errorf(\"variant %q not in template (have %v)\", requestedVariant, variants)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Discover variant names from the template before passing --image-variant","Don't hardcode variant strings in scripts across Lima versions","Omit the flags to accept the template default","Verify images: list is non-empty after custom template edits"],"tags":["images","variant","configuration"],"backgroundTag":"no-matching-image-variant","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}