vbox6: print error in case machine powerup fails

Retrieve error message (best effort and might fail) from progress
information.

issue #4666
This commit is contained in:
Sebastian Sumpf 2022-11-10 09:56:42 +01:00 committed by Christian Helmuth
parent 8bd548416d
commit 852d21db14

View File

@ -335,6 +335,15 @@ struct Main : Event_handler
if (state != MachineState_Running) { if (state != MachineState_Running) {
error("machine could not enter running state"); error("machine could not enter running state");
/* retrieve and print error information */
IVirtualBoxErrorInfo *info;
progress->COMGETTER(ErrorInfo)(&info);
PRUnichar *text = (PRUnichar *)malloc(4096);
info->GetText((PRUnichar **)&text);
Genode::log("Error: ", Utf8Str(text).c_str());
throw Fatal(); throw Fatal();
} }
} }