{"record":{"id":"a26901f24c235e5a","repo":"abiosoft/colima","slug":"runtime-cannot-be-updated-s-is-not-running","errorCode":null,"errorMessage":"runtime cannot be updated, %s is not running","messagePattern":"runtime cannot be updated, (.+?) is not running","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/app.go","lineNumber":598,"sourceCode":"\treturn env, nil\n}\n\nfunc (c colimaApp) Runtime() (string, error) {\n\treturn c.currentRuntime(context.Background())\n}\n\nfunc (c colimaApp) Kubernetes() (environment.Container, error) {\n\treturn c.containerEnvironment(kubernetes.Name)\n}\n\nfunc (c colimaApp) Active() bool {\n\treturn c.guest.Running(context.Background())\n}\n\nfunc (c *colimaApp) Update() error {\n\tctx := context.Background()\n\tif !c.guest.Running(ctx) {\n\t\treturn fmt.Errorf(\"runtime cannot be updated, %s is not running\", config.CurrentProfile().DisplayName)\n\t}\n\n\truntime, err := c.currentRuntime(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcontainer, err := c.containerEnvironment(runtime)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\toldVersion := container.Version(ctx)\n\n\tupdated, err := container.Update(ctx)\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":580,"sourceCodeEnd":616,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/app/app.go#L580-L616","documentation":"Returned by colimaApp.Update (app/app.go:598) when c.guest.Running(ctx) is false. Updating the in-VM container runtime requires the VM to be up, so colima refuses with the profile's display name instead of attempting a doomed update.","triggerScenarios":"Calling app.Update() (the `colima update` command) while the profile's Lima VM is stopped, was created but never started, or belongs to a different profile than the one selected (wrong -p flag).","commonSituations":"Running `colima update` after a host reboot where the VM is not auto-started; using the default profile when the intended runtime lives in another profile; VM stopped by `colima stop` and forgotten.","solutions":["Start the profile first: `colima start -p <profile>`, then rerun `colima update -p <profile>`","List profiles with `colima list` and confirm you are targeting the running one with `-p`","If `colima start` itself fails, fix that first (logs under ~/.colima/_lima/<profile>) before updating"],"exampleFix":"# before\ncolima update -p myprofile   # runtime cannot be updated, 'myprofile' is not running\n\n# after\ncolima start -p myprofile && colima update -p myprofile","handlingStrategy":"validation","validationCode":"// Ensure the VM is up before updating\nif !app.Active() {\n    if err := startCmd(); err != nil { // colima start -p <profile>\n        return fmt.Errorf(\"cannot start profile for update: %w\", err)\n    }\n}\nreturn app.Update()","typeGuard":null,"tryCatchPattern":"if err := app.Update(); err != nil {\n    if strings.Contains(err.Error(), \"is not running\") {\n        // precondition failure: start the profile and retry once\n    }\n    return err\n}","preventionTips":["Chain lifecycle commands in scripts: `colima start -p X && colima update -p X`","Check `colima list` output for the running column before update flows","Always pass -p explicitly in scripts to avoid acting on the wrong profile"],"tags":["update","lifecycle","vm","colima"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}