{"record":{"id":"42e70d27ef7579ca","repo":"lima-vm/lima","slug":"inspect-status-command-failed-w","errorCode":null,"errorMessage":"inspect status command failed: %w","messagePattern":"inspect status command failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driverutil/vm.go","lineNumber":112,"sourceCode":"\t}\n\tstdin.Close()\n\n\tdecoder := json.NewDecoder(stdout)\n\tvar response []byte\n\tif err := decoder.Decode(&response); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tvar respInst limatype.Instance\n\tif err := respInst.UnmarshalJSON(response); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to unmarshal instance response: %w\", err)\n\t}\n\n\tif err := cmd.Wait(); err != nil {\n\t\tif stderrBuf.Len() > 0 {\n\t\t\treturn \"\", fmt.Errorf(\"inspect status command failed: %w; stderr: %s\", err, stderrBuf.String())\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"inspect status command failed: %w\", err)\n\t}\n\n\tif stderrBuf.Len() > 0 {\n\t\tlogrus.Debugf(\"external driver stderr: %s\", stderrBuf.String())\n\t}\n\n\t*inst = respInst\n\tlogrus.Debugf(\"Inspecting instance status action completed successfully for %#q\", extDriverPath)\n\treturn inst.Status, nil\n}\n","sourceCodeStart":94,"sourceCodeEnd":123,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driverutil/vm.go#L94-L123","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before calling InspectStatus\nif _, err := exec.LookPath(driverBinary); err != nil {\n    return fmt.Errorf(\"driver %q not installed\", driverBinary)\n}","typeGuard":null,"tryCatchPattern":"status, err := lima.InspectStatus(inst)\nif err != nil {\n    if strings.Contains(err.Error(), \"stderr: \") {\n        // surface driver stderr to the user / log it\n        log.Errorf(\"driver inspect failed: %v\", err)\n    }\n    return err\n}","preventionTips":["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"],"tags":["driver","subprocess","external-command"],"backgroundTag":"external-command-failed","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}