abiosoft/colima · error

%s is not running

Error message

%s is not running

What it means

Every `colima kubernetes <sub>` command re-runs rootCmd's PersistentPreRunE and then requires newApp().Active() — the colima VM for the CURRENT profile must be running. This error means the VM is stopped (or was never created), so Kubernetes management commands are rejected before they reach their RunE. The %s is the profile's DisplayName.

Source

Thrown at cmd/kubernetes.go:27

	"github.com/abiosoft/colima/environment/container/kubernetes"

	"github.com/spf13/cobra"
)

// kubernetesCmd represents the kubernetes command
var kubernetesCmd = &cobra.Command{
	Use:     "kubernetes",
	Aliases: []string{"kube", "k8s", "k3s", "k"},
	Short:   "manage Kubernetes cluster",
	Long:    `Manage the Kubernetes cluster`,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		// cobra overrides PersistentPreRunE when redeclared.
		// re-run rootCmd's.
		if err := root.Cmd().PersistentPreRunE(cmd, args); err != nil {
			return err
		}
		if !newApp().Active() {
			return fmt.Errorf("%s is not running", config.CurrentProfile().DisplayName)
		}
		return nil
	},
}

// kubernetesStartCmd represents the kubernetes start command
var kubernetesStartCmd = &cobra.Command{
	Use:   "start",
	Short: "start the Kubernetes cluster",
	Long:  `Start the Kubernetes cluster.`,
	Args:  cobra.NoArgs,
	RunE: func(cmd *cobra.Command, args []string) error {
		app := newApp()
		k, err := app.Kubernetes()
		if err != nil {
			return err
		}

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Start the VM first: `colima start` (or `colima start --kubernetes` to enable the cluster in the same boot)
  2. Confirm state with `colima status`, then re-run the kubernetes subcommand
  3. If the profile name in the message is unexpected, check COLIMA_PROFILE / `colima --profile <name>` and target the right profile

Example fix

# before
$ colima kubernetes start
error: colima is not running

# after
$ colima start --kubernetes && colima kubernetes status
Defensive patterns

Strategy: validation

Validate before calling

# shell: gate kubernetes commands on a running VM
colima status >/dev/null 2>&1 || colima start --kubernetes
colima kubernetes start

Prevention

When it happens

Trigger: Running any `colima kubernetes ...` subcommand while the VM is stopped or deleted; targeting a profile that was never started (COLIMA_PROFILE env or --profile flag pointing at an inactive profile); issuing the command immediately after `colima stop` or before the first `colima start`.

Common situations: Fresh install where the user expects `colima kubernetes start` to boot everything; shell profile exporting COLIMA_PROFILE to a stale name; scripts assuming a prior `colima start` succeeded; VM still booting after host reboot without autostart.

Related errors


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