{"record":{"id":"68c71842286b60c2","repo":"lima-vm/lima","slug":"errors-inspecting-instance-v","errorCode":null,"errorMessage":"errors inspecting instance: %+v","messagePattern":"errors inspecting instance: %\\+v","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/limactl/start.go","lineNumber":576,"sourceCode":"\t\tif !strings.HasPrefix(f.Name, \"_\") {\n\t\t\tfiltered = append(filtered, f)\n\t\t}\n\t}\n\treturn filtered, nil\n}\n\nfunc createAction(cmd *cobra.Command, args []string) error {\n\tif exit, err := createStartActionCommon(cmd, args); err != nil {\n\t\treturn err\n\t} else if exit {\n\t\treturn nil\n\t}\n\tinst, err := loadOrCreateInstance(cmd, args, true)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif len(inst.Errors) > 0 {\n\t\treturn fmt.Errorf(\"errors inspecting instance: %+v\", inst.Errors)\n\t}\n\tif _, err = instance.Prepare(cmd.Context(), inst, \"\"); err != nil {\n\t\treturn err\n\t}\n\tserver.Stop(inst.Dir, true)\n\tlogrus.Infof(\"Run `limactl start %s` to start the instance.\", inst.Name)\n\treturn nil\n}\n\nfunc startAction(cmd *cobra.Command, args []string) error {\n\tif exit, err := createStartActionCommon(cmd, args); err != nil {\n\t\treturn err\n\t} else if exit {\n\t\treturn nil\n\t}\n\tinst, err := loadOrCreateInstance(cmd, args, false)\n\tif err != nil {\n\t\treturn err","sourceCodeStart":558,"sourceCodeEnd":594,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/cmd/limactl/start.go#L558-L594","documentation":"createAction loads or creates the instance and then inspects it; the Instance.Errors field collects errors encountered while reading the instance's on-disk state (lima.yaml, disk files, etc.). If any inspection errors accumulated, createAction aborts with this aggregated error before preparing the instance.","triggerScenarios":"`limactl create` on an existing instance directory whose stored lima.yaml or other state files fail to load/validate, populating inst.Errors.","commonSituations":"Hand-edited or truncated ~/.lima/<instance>/lima.yaml; instance dir copied from another machine or LIMA_HOME; schema changes after a Lima version upgrade leaving obsolete fields.","solutions":["Read the wrapped errors (%+v output) to see which field/file failed","Fix or restore ~/.lima/<instance>/lima.yaml to pass limayaml validation","Remove and recreate the instance with `limactl delete <name>` then `limactl create`"],"exampleFix":"// before: broken stored yaml\n// after\nlimactl delete myinstance\nlimactl create template://default --name myinstance","handlingStrategy":"validation","validationCode":"// validate stored instance config before create\nlimactl validate ~/.lima/myinstance/lima.yaml || limactl delete myinstance","typeGuard":null,"tryCatchPattern":"if ! limactl create --name myinstance template://default 2>&1; then\n  case \"$?\" in *errors\\ inspecting*) limactl delete myinstance && limactl create --name myinstance template://default;;\n  esac\nfi","preventionTips":["Don't hand-edit ~/.lima/<inst>/lima.yaml; use limactl edit","Validate YAML with `limactl validate` after manual changes","Recreate instances after major Lima upgrades"],"tags":["cli","instance-inspection","config-validation"],"backgroundTag":"instance-state-corrupted","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}