diff --git a/internal/vm/lifecycle.go b/internal/vm/lifecycle.go index 1fb6acd..35b6fa9 100644 --- a/internal/vm/lifecycle.go +++ b/internal/vm/lifecycle.go @@ -111,12 +111,14 @@ func Start(cfg *config.Config, reg *workspace.Registry) mo.Result[struct{}] { logging.Info(fmt.Sprintf("Starting QEMU with %d mounts...", len(mounts))) cmd := exec.Command("qemu-system-x86_64", args...) - cmd.Stdout = nil - cmd.Stderr = nil cmd.Stdin = nil - if err := cmd.Run(); err != nil { + output, err := cmd.CombinedOutput() + if err != nil { vfsManager.StopAll() + if len(output) > 0 { + return mo.Err[struct{}](fmt.Errorf("failed to start QEMU: %w\n\nQEMU output:\n%s", err, string(output))) + } return mo.Err[struct{}](fmt.Errorf("failed to start QEMU: %w\n\nTry running 'qvm doctor' to diagnose the issue.", err)) }