abiosoft/colima · error
error stopping vm: %w
Error message
error stopping vm: %w
What it means
The final and only fatal stop step failed: limactl could not stop the guest VM (c.guest.Stop). Unlike the runtime stop warnings, this error is returned, so `colima stop` exits non-zero and the VM may still be running or wedged.
Source
Thrown at app/app.go:214
log := log.WithField("context", cont.Name())
log.Println("stopping ...")
if err := cont.Stop(ctx, force); err != nil {
// failure to stop a container runtime is not fatal
// it is only meant for graceful shutdown.
// the VM will shut down anyways.
log.Warnln(fmt.Errorf("error stopping %s: %w", cont.Name(), err))
}
}
} else if c.guest.Running(ctx) {
log.Warnln("vm not responsive, skipping runtime shutdown")
}
// stop vm
// no need to check running status, it may be in a state that requires stopping.
if err := c.guest.Stop(ctx, force); err != nil {
return fmt.Errorf("error stopping vm: %w", err)
}
log.Println("done")
if err := generateSSHConfig(false); err != nil {
log.Trace("error generating ssh_config: %w", err)
}
return nil
}
func (c colimaApp) Delete(data, force bool) error {
confirmContainerDestruction := func() bool {
return cli.Prompt("\033[31m\033[1mthis will delete ALL container data. Are you sure you want to continue")
}
s, _ := store.Load()
diskInUse := s.DiskFormatted
View on GitHub (pinned to c3a5f9184d)
Solutions
- Escalate to `colima stop --force` which kills the VM without graceful shutdown
- Drive lima directly: `limactl list` then `limactl stop colima`, reading ~/.lima/colima logs for the cause
- Kill a wedged hypervisor process (qemu-system-*) if it persists, then `colima stop --force`
- If the instance is unrecoverable: `colima delete --force && colima start`
Example fix
# before colima stop # error: error stopping vm: ... # after colima stop --force
Defensive patterns
Strategy: retry
Validate before calling
// confirm the instance is not wedged before stop
out, _ := exec.Command("limactl", "list", "--json").CombinedOutput()
// if the profile shows an invalid/running-though-crashed state, go straight to --force Try / catch
if err := a.Stop(false); err != nil {
if strings.Contains(err.Error(), "error stopping vm") {
return a.Stop(true) // escalate to force stop
}
} Prevention
- Use `colima stop` rather than killing the qemu process
- After host sleep issues, check `limactl list` state before stopping
- If stop fails twice, recreate the instance instead of retrying forever
When it happens
Trigger: limactl stop fails: QEMU/VZ process wedged after host sleep or crash, guest unreachable so lima cannot issue the shutdown, or the lima instance state file is inconsistent.
Common situations: Mac woke from sleep with the VM frozen; colima/lima upgraded while the old VM was running; VM stuck after a forced host reboot.
Related errors
- error starting vm: %w
- dependency check failed for VM: %w
- error stopping %s: %w
- error during teardown of vm: %w
- error stopping :%w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/2ffdbc629c736ce3.
Report an issue: GitHub.