abiosoft/colima · error
error retrieving current runtime: empty value
Error message
error retrieving current runtime: empty value
What it means
Thrown by colimaApp.currentRuntime (app/app.go:513) when the Lima VM reports as running but the guest returns an empty string for the 'runtime' key (environment.ContainerRuntimeKey, environment/vm.go:21). It means colima cannot determine which container runtime the active profile was provisioned with, so runtime-dependent operations (Runtime(), Update(), containers()) cannot proceed.
Source
Thrown at app/app.go:513
}
if kube != nil && kube.Version(ctx) != "" {
fmt.Println()
fmt.Println(kubernetes.Name)
fmt.Println(kube.Version(ctx))
}
return nil
}
func (c colimaApp) currentRuntime(ctx context.Context) (string, error) {
if !c.guest.Running(ctx) {
return "", fmt.Errorf("%s is not running", config.CurrentProfile().DisplayName)
}
r := c.guest.Get(environment.ContainerRuntimeKey)
if r == "" {
return "", fmt.Errorf("error retrieving current runtime: empty value")
}
return r, nil
}
func (c colimaApp) setRuntime(runtime string) error {
err := store.Set(func(s *store.Store) {
// update runtime if runtime disk is in use
if s.DiskFormatted {
s.DiskRuntime = runtime
}
})
if err != nil {
log.Traceln(fmt.Errorf("error persisting store: %w", err))
}
return c.guest.Set(environment.ContainerRuntimeKey, runtime)View on GitHub (pinned to c3a5f9184d)
Solutions
- Run `colima status -p <profile>` and `colima list`, wait ~10s for the guest agent to settle, then retry the command
- Restart the VM so provisioning records the runtime: `colima stop -p <profile> && colima start -p <profile>`
- Check guest/SSH logs under the Lima instance dir (~/.colima/_lima/<profile>/*.log) for provisioning failures
- If the profile is incomplete or corrupted, `colima delete -p <profile>` and recreate with `colima start --runtime docker`
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check VM state before any runtime-dependent call
if !app.Active() {
return fmt.Errorf("profile not running; start it before querying runtime")
}
// optionally wait for the guest agent to publish the runtime key
// (simple retry with timeout around app.Runtime()) Try / catch
if _, err := app.Runtime(); err != nil {
if strings.Contains(err.Error(), "error retrieving current runtime: empty value") {
// guest agent still settling or provisioning incomplete:
// wait briefly, restart the VM, or prompt recreation
time.Sleep(10 * time.Second)
if _, err2 := app.Runtime(); err2 != nil {
return fmt.Errorf("runtime unavailable after retry: %w", err2)
}
} else {
return err
}
} Prevention
- Always complete `colima start` successfully (watch for provisioning failures) before running `colima update` or querying the runtime
- Never start colima profiles directly with limactl — the guest runtime key is only recorded by colima provisioning
- After upgrading colima, restart the profile once so guest state is refreshed
When it happens
Trigger: Calling app.Runtime(), app.Update(), or app.containers() while c.guest.Running(ctx) is true but c.guest.Get("runtime") returns "". This happens when the VM is up yet provisioning never stored the runtime: a first start that failed midway, the guest agent not yet responsive after boot, or a Lima VM created/started outside colima (e.g. limactl start).
Common situations: Running `colima update` immediately after a start that failed during provisioning; interrupting the very first `colima start`; using a profile created by an older colima version whose guest state lacks the runtime key; querying runtime while the guest agent is still booting.
Related errors
- dependency check failed for VM: %w
- error starting %s: %w
- error stopping %s: %w
- error initiating container runtime: %w
- runtime cannot be updated, %s is not running
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/66c1126add3e001e.
Report an issue: GitHub.