abiosoft/colima · error

error loading instance config: %w

Error message

error loading instance config: %w

What it means

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.

Source

Thrown at model/runner.go:103

	// VM must be running
	if !a.Active() {
		return fmt.Errorf("%s is not running", config.CurrentProfile().DisplayName)
	}

	// check runtime is docker
	r, err := a.Runtime()
	if err != nil {
		return err
	}
	if r != docker.Name {
		return fmt.Errorf("'colima model' requires docker runtime, current runtime is %s\n"+
			"Start colima with: colima start --runtime docker --vm-type krunkit", r)
	}

	// check VM type is krunkit (required for GPU access)
	conf, err := configmanager.LoadInstance()
	if err != nil {
		return fmt.Errorf("error loading instance config: %w", err)
	}
	if conf.VMType != limaconfig.Krunkit {
		return fmt.Errorf("'colima model' requires krunkit VM type for GPU access, current VM type is %s\n"+
			"Start colima with: colima start --runtime docker --vm-type krunkit", conf.VMType)
	}

	// check krunkit binary exists on host
	if err := util.AssertKrunkit(); err != nil {
		return err
	}

	return nil
}

// dockerRunner implements Runner for Docker Model Runner.
type dockerRunner struct{}

func (d *dockerRunner) Name() RunnerType {

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Check what colima sees: colima list — if the profile is broken, recreate it (colima delete, then colima start --runtime docker --vm-type krunkit)
  2. Verify permissions and ownership of the colima config directory and fix with chown
  3. If the config file is truncated or corrupt, restore from backup or delete it so colima regenerates on next start
Defensive patterns

Strategy: try-catch

Try / catch

if err := runner.ValidatePrerequisites(a); err != nil {
	if strings.Contains(err.Error(), "error loading instance config") {
		// colima-level config is broken: repair via colima list / colima delete + start, not a blind retry
	}
}

Prevention

When it happens

Trigger: 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.

Common situations: Corrupted colima config state after an interrupted colima start; CI containers with redirected HOME; manual edits that broke the config file.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/aa63200977860c41. Report an issue: GitHub.