From ed93bc6a8904b14a867ee53e6b93f909b040a5d1 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 4 Dec 2013 14:44:14 -0500 Subject: [PATCH] VBOX: Special case session lock errors when we attempt to start the VM, temp exit, give BOINC the pid and let it clean up. WINBUILD: Update vboxwrappers version to 26050 --- samples/vboxwrapper/vbox.cpp | 2 +- samples/vboxwrapper/vboxwrapper.cpp | 13 ++++++++++++- win_build/vboxwrapper.vcxproj | 8 ++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index 1f6d8a8db4..f1e482e024 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -1045,7 +1045,7 @@ int VBOX_VM::start() { if (headless) { command += " --type headless"; } - retval = vbm_popen(command, output, "start VM"); + retval = vbm_popen(command, output, "start VM", true, false, 0); if (retval) return retval; // Wait for up to 5 minutes for the VM to switch states. A system diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp index 5687352e35..8772eb8288 100644 --- a/samples/vboxwrapper/vboxwrapper.cpp +++ b/samples/vboxwrapper/vboxwrapper.cpp @@ -703,7 +703,18 @@ int main(int argc, char** argv) { } else if (ERR_NOT_EXITED == retval) { fprintf( stderr, - "%s NOTE: VM was already running. BOINC will be notified that it needs to clean up the environment.\n" + "%s NOTE: VM was already running.\n" + " BOINC will be notified that it needs to clean up the environment.\n" + " This might be a temporary problem and so this job will be rescheduled for another time.\n", + vboxwrapper_msg_prefix(buf, sizeof(buf)) + ); + unrecoverable_error = false; + temp_reason = (char*)"VM environment needed to be cleaned up."; + } else if (vm.is_virtualbox_error_recoverable(retval)) { + fprintf( + stderr, + "%s NOTE: VM session lock error encountered.\n" + " BOINC will be notified that it needs to clean up the environment.\n" " This might be a temporary problem and so this job will be rescheduled for another time.\n", vboxwrapper_msg_prefix(buf, sizeof(buf)) ); diff --git a/win_build/vboxwrapper.vcxproj b/win_build/vboxwrapper.vcxproj index 2fd919571f..7ccbff0eba 100644 --- a/win_build/vboxwrapper.vcxproj +++ b/win_build/vboxwrapper.vcxproj @@ -128,12 +128,12 @@ libcmt.lib;libcpmt.lib;kernel32.lib;user32.lib;gdi32.lib;ole32.lib;wsock32.lib;psapi.lib;%(AdditionalDependencies) - .\Build\$(Platform)\$(Configuration)\vboxwrapper_26049_windows_intelx86.exe + .\Build\$(Platform)\$(Configuration)\vboxwrapper_26050_windows_intelx86.exe true true %(DelayLoadDLLs) true - .\Build\$(Platform)\$(Configuration)\vboxwrapper_26049_windows_intelx86.pdb + .\Build\$(Platform)\$(Configuration)\vboxwrapper_26050_windows_intelx86.pdb Windows MachineX86 @@ -177,12 +177,12 @@ libcmt.lib;libcpmt.lib;kernel32.lib;user32.lib;gdi32.lib;ole32.lib;wsock32.lib;psapi.lib;%(AdditionalDependencies) - .\Build\$(Platform)\$(Configuration)\vboxwrapper_26049_windows_x86_64.exe + .\Build\$(Platform)\$(Configuration)\vboxwrapper_26050_windows_x86_64.exe true true %(DelayLoadDLLs) true - .\Build\$(Platform)\$(Configuration)\vboxwrapper_26049_windows_x86_64.pdb + .\Build\$(Platform)\$(Configuration)\vboxwrapper_26050_windows_x86_64.pdb Windows MachineX64