{"record":{"id":"2989b25e58eb6dfe","repo":"lima-vm/lima","slug":"field-containerd-archives-must-be-provided","errorCode":null,"errorMessage":"field `containerd.archives` must be provided","messagePattern":"field `containerd\\.archives` must be provided","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/limayaml/validate.go","lineNumber":280,"sourceCode":"\t\t\tif p.Script != nil && *p.Script != \"\" {\n\t\t\t\terrs = errors.Join(errs, fmt.Errorf(\"field `provision[%d].script must be empty if playbook is set\", i))\n\t\t\t}\n\t\t\tplaybook := p.Playbook\n\t\t\tif _, err := os.Stat(playbook); err != nil {\n\t\t\t\terrs = errors.Join(errs, fmt.Errorf(\"field `provision[%d].playbook` refers to an inaccessible path: %#q: %w\", i, playbook, err))\n\t\t\t}\n\t\t\tlogrus.Warnf(\"provision mode %#q is deprecated, use `ansible-playbook %#q` instead\", limatype.ProvisionModeAnsible, playbook)\n\t\t}\n\t\tif p.Script != nil {\n\t\t\tif strings.Contains(*p.Script, \"LIMA_CIDATA\") {\n\t\t\t\tlogrus.Warn(\"provisioning scripts should not reference the LIMA_CIDATA variables\")\n\t\t\t}\n\t\t}\n\t}\n\tneedsContainerdArchives := (y.Containerd.User != nil && *y.Containerd.User) || (y.Containerd.System != nil && *y.Containerd.System)\n\tif needsContainerdArchives {\n\t\tif len(y.Containerd.Archives) == 0 {\n\t\t\terrs = errors.Join(errs, errors.New(\"field `containerd.archives` must be provided\"))\n\t\t}\n\t\tfor i, f := range y.Containerd.Archives {\n\t\t\terr := validateFileObject(f, fmt.Sprintf(\"containerd.archives[%d]\", i))\n\t\t\tif err != nil {\n\t\t\t\terrs = errors.Join(errs, err)\n\t\t\t}\n\t\t}\n\t}\n\tfor i, p := range y.Probes {\n\t\tif p.File != nil {\n\t\t\tif p.File.URL != \"\" {\n\t\t\t\terrs = errors.Join(errs, fmt.Errorf(\"field `probe[%d].file.url` must be empty during validation (script should already be embedded)\", i))\n\t\t\t}\n\t\t\tif p.File.Digest != nil {\n\t\t\t\terrs = errors.Join(errs, fmt.Errorf(\"field `probe[%d].file.digest` support is not yet implemented\", i))\n\t\t\t}\n\t\t}\n\t\tif p.Script != nil && !strings.HasPrefix(*p.Script, \"#!\") {","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/limayaml/validate.go#L262-L298","documentation":"Lima requires `containerd.archives` to be non-empty when containerd is enabled (`containerd.system: true` and/or `containerd.user: true`). The archives list supplies the containerd tarballs to install inside the VM; without them Lima cannot provision containerd.","triggerScenarios":"Calling limactl validate/start/etc. with a config where `containerd.system` or `containerd.user` is explicitly true but `containerd.archives` is an empty list.","commonSituations":"Copy-pasting a config fragment enabling containerd without the archives section; after limayaml defaults were not applied (raw load without Defaulting); trimming archives during offline air-gapped setups.","solutions":["Populate `containerd.archives` with at least one file object (location + arch + digest)","Set `containerd.system` and `containerd.user` to false if containerd is not needed","Let Lima apply defaults (`limactl` normally defaults archives automatically); only raw unmarshalling skips this"],"exampleFix":"// before\ncontainerd:\n  system: true\n  archives: []\n// after\ncontainerd:\n  system: true\n  archives:\n  - location: \"https://github.com/containerd/containerd/releases/download/v1.7.7/containerd-1.7.7-linux-amd64.tar.gz\"\n    arch: x86_64","handlingStrategy":"validation","validationCode":"if (cfg.Containerd.System != nil && *cfg.Containerd.System) || (cfg.Containerd.User != nil && *cfg.Containerd.User) {\n    if len(cfg.Containerd.Archives) == 0 {\n        return errors.New(\"containerd enabled but containerd.archives is empty\")\n    }\n}","typeGuard":"func containerdNeedsArchives(c *limatype.Containerd) bool {\n    return c != nil && ((c.System != nil && *c.System) || (c.User != nil && *c.User))\n}","tryCatchPattern":null,"preventionTips":["Only enable containerd.system/user in configs that also carry archives","Prefer letting limactl apply defaults instead of validating raw unmarshalled YAML","For air-gapped hosts, mirror the archives locally and point location at local paths"],"tags":["config-validation","containerd","lima-yaml"],"backgroundTag":"missing-required-argument","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}