lima-vm/lima · error
inspect status command failed: %w
Error message
inspect status command failed: %w
What it means
limactl wraps the exit error of an external driver's status/inspect helper command, appending the command's stderr output when present. The library throws it because the subprocess implementing driver status inspection exited non-zero, and the underlying stderr is needed to diagnose why.
Source
Thrown at pkg/driverutil/vm.go:112
}
stdin.Close()
decoder := json.NewDecoder(stdout)
var response []byte
if err := decoder.Decode(&response); err != nil {
return "", err
}
var respInst limatype.Instance
if err := respInst.UnmarshalJSON(response); err != nil {
return "", fmt.Errorf("failed to unmarshal instance response: %w", err)
}
if err := cmd.Wait(); err != nil {
if stderrBuf.Len() > 0 {
return "", fmt.Errorf("inspect status command failed: %w; stderr: %s", err, stderrBuf.String())
}
return "", fmt.Errorf("inspect status command failed: %w", err)
}
if stderrBuf.Len() > 0 {
logrus.Debugf("external driver stderr: %s", stderrBuf.String())
}
*inst = respInst
logrus.Debugf("Inspecting instance status action completed successfully for %#q", extDriverPath)
return inst.Status, nil
}
View on GitHub (pinned to dd909d0973)
Solutions
- Read the `stderr: ...` suffix of the wrapped error to see the driver's own failure message
- Verify the external driver binary exists, is executable, and matches the expected driver version
- Re-run with --debug (logrus) for more context on the command invoked
- Recreate or repair the instance state if the driver reports corrupted/stale state
Defensive patterns
Strategy: try-catch
Validate before calling
// before calling InspectStatus
if _, err := exec.LookPath(driverBinary); err != nil {
return fmt.Errorf("driver %q not installed", driverBinary)
} Try / catch
status, err := lima.InspectStatus(inst)
if err != nil {
if strings.Contains(err.Error(), "stderr: ") {
// surface driver stderr to the user / log it
log.Errorf("driver inspect failed: %v", err)
}
return err
} Prevention
- Ensure the external driver binary is installed and on PATH
- Keep driver version in sync with lima
- Run limactl with --debug when diagnosing driver issues
- Validate instance state before invoking inspect
When it happens
Trigger: Calling InspectStatus (handleInspectStatusAction) when the external driver binary is missing, not executable, exits with an error, or writes a failure to stderr during status inspection.
Common situations: Driver plugin not installed or wrong PATH; driver version mismatch with lima; the driver crashed or rejected the instance state; stale/partially-deleted VM state causing the driver to fail.
Related errors
- failed to get boot scripts: %w
- invalid boot script filename %#q: must be in format 'boot.<O
- unimplemented by the krunkit driver
- could not execute editor %#q for a file %#q: %w
- failed to create driver instance: %w
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/42e70d27ef7579ca.
Report an issue: GitHub.