lima-vm/lima · error
did not receive an event with the `running` status
Error message
did not receive an event with the `running` status
What it means
watchHostAgentEvents tracks whether at least one event with Status.Running was received before the watcher ended without another error. If the event stream ends (or times out) without a running event, limactl returns this sentinel error. It is the generic 'startup never completed' outcome when the hostagent neither failed loudly nor reported running.
Source
Thrown at pkg/instance/start.go:445
}
}
_ = ShowMessage(inst)
err = nil
return true
}
return false
}
if xerr := hostagentevents.Watch(ctx, haStdoutPath, haStderrPath, begin, true, onEvent); xerr != nil {
return xerr
}
if err != nil {
return err
}
if !receivedRunningEvent {
return errors.New("did not receive an event with the `running` status")
}
return nil
}
type watchHostAgentEventsTimeoutKey = struct{}
// WithWatchHostAgentTimeout sets the value of the timeout to use for
// watchHostAgentEvents in the given Context.
func WithWatchHostAgentTimeout(ctx context.Context, timeout time.Duration) context.Context {
return context.WithValue(ctx, watchHostAgentEventsTimeoutKey{}, timeout)
}
type launchingShellKey = struct{}
// WithLaunchingShell marks the context as launching a shell after start,
// suppressing the "READY. Run ... to open the shell" message.
func WithLaunchingShell(ctx context.Context) context.Context {View on GitHub (pinned to dd909d0973)
Solutions
- Increase the timeout: `limactl start --timeout <duration>` (or set via the watch timeout context key)
- Check ha.stderr.log and instance logs for silent hangs
- Kill hung provisioning steps in lima.yaml or add timeouts to them
- Retry the start; if repeated, recreate the instance
Example fix
// before limactl start my-instance // after limactl start --timeout 30m my-instance
Defensive patterns
Strategy: retry
Validate before calling
// give slow first boots enough time limactl start --timeout 30m my-instance
Try / catch
err := start()
if err != nil && strings.Contains(err.Error(), "did not receive an event with the `running` status") {
time.Sleep(5 * time.Second)
return start() // retry once with a larger timeout
} Prevention
- Always pass an explicit generous --timeout for first boots
- Avoid blocking provisioning scripts (add timeouts inside them)
- Monitor ha.stderr.log for hangs
- Pre-download images before `limactl start`
When it happens
Trigger: Hostagent event watch ends (context timeout or stream close) with receivedRunningEvent still false — e.g. hostagent hangs during provisioning, watchHostAgentTimeout elapses, or event delivery is interrupted.
Common situations: Very slow first boot (large image download, slow disk) exceeding the default watch timeout, hung provisioning scripts, or guestagent never registering.
Related errors
- host agent process has exited: %w
- hostagent (%#q) did not start up in %v (hint: see %#q)
- exiting, status=%+v (hint: see %#q)
- failed to get Info from %#q: %w
- timed out waiting for external driver to create socket file
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/dbb58b1e7e1ccd68.
Report an issue: GitHub.