abiosoft/colima · error

%s not running

Error message

%s not running

What it means

App.SSH refuses to run when the guest VM is not running; the message includes the profile display name. It is a precondition failure, not a crash: the VM must be started first.

Source

Thrown at app/app.go:308

		}

		if err := store.Reset(); err != nil {
			log.Trace("error resetting store: %w", err)
		}
	}

	log.Println("done")

	if err := generateSSHConfig(false); err != nil {
		log.Trace("error generating ssh_config: %w", err)
	}
	return nil
}

func (c colimaApp) SSH(args ...string) error {
	ctx := context.Background()
	if !c.guest.Running(ctx) {
		return fmt.Errorf("%s not running", config.CurrentProfile().DisplayName)
	}

	workDir, err := os.Getwd()
	if err != nil {
		return fmt.Errorf("error retrieving current working directory: %w", err)
	}
	// peek the current directory to see if it is mounted to prevent `cd` errors
	// with limactl ssh
	if err := func() error {
		conf, err := configmanager.LoadInstance()
		if err != nil {
			return err
		}
		pwd, err := util.CleanPath(workDir)
		if err != nil {
			return err
		}
		for _, m := range conf.MountsOrDefault() {

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Start the VM: `colima start`, then retry `colima ssh`
  2. Confirm state first with `colima status`
  3. Check the profile: `colima list` and set COLIMA_PROFILE correctly
  4. If it should be running but is not, inspect `limactl list` for a wedged instance

Example fix

# before
colima ssh
# error: colima not running

# after
colima status || colima start
colima ssh
Defensive patterns

Strategy: validation

Validate before calling

// gate ssh on a running VM
if err := exec.Command("colima", "status").Run(); err != nil {
    if serr := exec.Command("colima", "start").Run(); serr != nil {
        return serr
    }
}
return a.SSH(args...)

Type guard

func isVMNotRunning(err error) bool {
    return err != nil && strings.Contains(err.Error(), "not running")
}

Try / catch

if err := a.SSH("echo", "ok"); err != nil {
    if isVMNotRunning(err) {
        // start the VM and retry once
        if serr := exec.Command("colima", "start").Run(); serr != nil {
            return serr
        }
        return a.SSH("echo", "ok")
    }
    return err
}

Prevention

When it happens

Trigger: Running `colima ssh` while the VM is stopped, still starting, or gone after a crash/host reboot that killed the VM.

Common situations: New shell after a Mac reboot without `colima start`; VM stopped in another terminal; COLIMA_PROFILE pointing at a stopped or non-existent profile.

Related errors


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