{"record":{"id":"aa63200977860c41","repo":"abiosoft/colima","slug":"error-loading-instance-config-w","errorCode":null,"errorMessage":"error loading instance config: %w","messagePattern":"error loading instance config: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"model/runner.go","lineNumber":103,"sourceCode":"\t// VM must be running\n\tif !a.Active() {\n\t\treturn fmt.Errorf(\"%s is not running\", config.CurrentProfile().DisplayName)\n\t}\n\n\t// check runtime is docker\n\tr, err := a.Runtime()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif r != docker.Name {\n\t\treturn fmt.Errorf(\"'colima model' requires docker runtime, current runtime is %s\\n\"+\n\t\t\t\"Start colima with: colima start --runtime docker --vm-type krunkit\", r)\n\t}\n\n\t// check VM type is krunkit (required for GPU access)\n\tconf, err := configmanager.LoadInstance()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error loading instance config: %w\", err)\n\t}\n\tif conf.VMType != limaconfig.Krunkit {\n\t\treturn fmt.Errorf(\"'colima model' requires krunkit VM type for GPU access, current VM type is %s\\n\"+\n\t\t\t\"Start colima with: colima start --runtime docker --vm-type krunkit\", conf.VMType)\n\t}\n\n\t// check krunkit binary exists on host\n\tif err := util.AssertKrunkit(); err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// dockerRunner implements Runner for Docker Model Runner.\ntype dockerRunner struct{}\n\nfunc (d *dockerRunner) Name() RunnerType {","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/model/runner.go#L85-L121","documentation":"validateCommonPrerequisites loads the instance configuration with configmanager.LoadInstance to inspect the VM type; this error means that load itself failed, so the colima instance config file is missing, unreadable, or not parseable. %w chains the underlying config error.","triggerScenarios":"The instance config was deleted or truncated (interrupted start, crashed write); the colima config directory has wrong permissions (often after sudo usage); HOME or the profile is misdirected so the file simply is not there.","commonSituations":"Corrupted colima config state after an interrupted colima start; CI containers with redirected HOME; manual edits that broke the config file.","solutions":["Check what colima sees: colima list — if the profile is broken, recreate it (colima delete, then colima start --runtime docker --vm-type krunkit)","Verify permissions and ownership of the colima config directory and fix with chown","If the config file is truncated or corrupt, restore from backup or delete it so colima regenerates on next start"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := runner.ValidatePrerequisites(a); err != nil {\n\tif strings.Contains(err.Error(), \"error loading instance config\") {\n\t\t// colima-level config is broken: repair via colima list / colima delete + start, not a blind retry\n\t}\n}","preventionTips":["Avoid killing colima start mid-write","Keep the colima config dir user-owned and backed up","Do not hand-edit generated instance configs"],"tags":["configuration","yaml","filesystem","go"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}