abiosoft/colima · error

error starting vm: %w

Error message

error starting vm: %w

What it means

Returned from Start when the Lima guest machine itself fails to boot; c.guest.Start wraps the limactl start error. This happens before any container runtime provisioning, so nothing inside the VM is the cause yet. The underlying limactl error plus the QEMU/VZ console output under ~/.lima/<profile>/ carry the real reason.

Source

Thrown at app/app.go:124

	log.Println("starting", config.CurrentProfile().DisplayName)
	// print the full path of current profile being used
	log.Tracef("starting with config file: %s\n", config.CurrentProfile().File())

	var containers []environment.Container
	if !environment.IsNoneRuntime(conf.Runtime) {
		cs, err := c.startWithRuntime(conf)
		if err != nil {
			return err
		}
		containers = cs
	}

	// the order for start is:
	//   vm start -> container runtime provision -> container runtime start

	// start vm
	if err := c.guest.Start(ctx, conf); err != nil {
		return fmt.Errorf("error starting vm: %w", err)
	}

	// run after-boot provision scripts
	c.runProvisionScripts(conf, config.ProvisionModeAfterBoot)

	// provision and start container runtimes
	for _, cont := range containers {
		log := log.WithField("context", cont.Name())
		log.Println("provisioning ...")
		if err := cont.Provision(ctx); err != nil {
			return fmt.Errorf("error provisioning %s: %w", cont.Name(), err)
		}
		log.Println("starting ...")
		if err := cont.Start(ctx); err != nil {
			return fmt.Errorf("error starting %s: %w", cont.Name(), err)
		}
	}

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Rerun with `colima start --verbose` and read the logs in ~/.lima/colima/ (ha.stderr.log and friends) for the hypervisor-level cause
  2. Recreate the VM: `colima delete && colima start`
  3. Lower requested resources (`colima start --cpu 2 --memory 2`) and free host disk space
  4. If using VZ confirm macOS 13+, otherwise use the QEMU driver; if using QEMU ensure `brew install qemu` is current

Example fix

# before
colima start
# error: error starting vm: ...

# after
colima delete
colima start --verbose
cat ~/.lima/colima/ha.stderr.log
Defensive patterns

Strategy: retry

Validate before calling

// avoid booting on top of a wedged instance
out, _ := exec.Command("limactl", "list", "--json").CombinedOutput()
if strings.Contains(string(out), "colima") {
    // clean up first (colima delete) or confirm the instance is stopped cleanly
}

Try / catch

if err := a.Start(ctx, conf); err != nil {
    if strings.Contains(err.Error(), "error starting vm") {
        // first retry after cleanup; recreate the instance on repeated failure
        _ = a.Delete(false, true)
        err = a.Start(ctx, conf)
    }
    if err != nil {
        return err
    }
}

Prevention

When it happens

Trigger: colima start with a virtualization driver the host cannot provide (VZ on an unsupported macOS build, missing/outdated QEMU); requested CPU/memory larger than the host can allocate; a leftover locked or corrupted VM instance after a crash or forced shutdown; insufficient host disk space.

Common situations: macOS upgrade breaking the Virtualization.framework; qemu removed or downgraded by brew; VM wedged after the host slept or force-rebooted; `--cpu 8 --memory 16` on a small machine; full disk.

Related errors


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