From e0b0b5814957d052407a75492b3e8fd07f0f8858 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 20 Jan 2014 14:13:32 -0500 Subject: [PATCH] VBOX: Add missing feature that allows the volunteer to run VirtualBox in headfull mode when not running as a service. --- samples/vboxwrapper/vboxwrapper.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp index 4344e1e614..291268ad5d 100644 --- a/samples/vboxwrapper/vboxwrapper.cpp +++ b/samples/vboxwrapper/vboxwrapper.cpp @@ -513,6 +513,29 @@ int main(int argc, char** argv) { ); } + // Record if the sandboxed configuration is going to be used. + // + if (aid.vbox_window) { + fprintf( + stderr, + "%s Detected: Headless Mode Disabled\n", + vboxwrapper_msg_prefix(buf, sizeof(buf)) + ); + vm.headless = false; + } + + // Check for invalid confgiurations. + // + if (aid.using_sandbox && aid.vbox_window) { + fprintf( + stderr, + "%s Invalid configuration detected.\n" + " NOTE: BOINC cannot be installed as a service and run VirtualBox in headfull mode at the same time.\n", + vboxwrapper_msg_prefix(buf, sizeof(buf)) + ); + boinc_temporary_exit(86400, "Incompatible confgiuration detected."); + } + // Check against known incompatible versions of VirtualBox. // NOTE: Incompatible in this case means that VirtualBox 4.2.6 crashes during snapshot operations // and 4.2.18 fails to restore from snapshots properly.