Commit Graph

663 Commits

Author SHA1 Message Date
Rom Walton c01f534595 VBOX: Formatting changes to stderr log 2016-06-14 10:02:51 -07:00
Rom Walton 0ad323997a VBOX: Explicitly use GetSafeArrayPtr() on the CComSafeArray object instead of relying on a cast, it might be what is causing the screen shot corruption. 2016-06-14 09:39:28 -07:00
Rom Walton 855a1066af VBOX: Treat ERR_INVALID_PARAM from create_vm() as an unrecoverable error.
Since most everyone is running something more recent that BOINC 7.2.16, we can assume that the hardware just does not support hardware acceleration.  Inform BOINC that the VM Extensions have been disabled so that the server can either assign a 32-bit VM which can use software emulation, or just not assign future work to the host.
2016-06-13 19:44:14 -07:00
Rom Walton 5480ff4a9d VBOX: Screen shots can only be taken while the VM is running and we hold the session lock. Make sure we take them before attempting to clean-up. 2016-06-13 09:49:07 -07:00
Rom Walton d5c3142993 VBOX: Bug fixes for previous commit. 2016-06-12 22:02:10 -07:00
Rom Walton 9dad26fefb VBOX: Take a screen shot on failure and dump the base64 encoded image to stderr.
Report the MD5 signature in the stderr output as well so that duplicate screen shots can be quickly identified.  Of course this assumes that the exact same PNG is generated across different machine types and video cards.  Currently I believe that it should given the hardware in question is virtualized.
2016-06-12 19:20:55 -07:00
Rom Walton 732f2e01a8 VBOX: Dump Vbox logs when the heartbeat fails. 2016-06-10 07:50:31 -07:00
Rom Walton 36044d51ab VBOX: Code cleanup - streamline the hypervisor initialization code a bit. 2016-06-09 23:08:03 -07:00
Rom Walton 0fe214038c VBOX: Adjust the startup logic to support Vbox 5.1 (MSCOM) 2016-06-03 23:07:16 -07:00
Rom Walton 1784d67843 VBOX: Disable explicitly disabling LPT ports on Macs.
It isn't clear that this is causing the startup failure of VM(s) on MacOS X, but it is unsightly to see in the error log.

See:
https://github.com/BOINC/boinc/issues/1526
2016-06-03 22:07:55 -07:00
Rom Walton 0f3b0ccc8f VBOX: Add support for VirtualBox 5.1 (MSCOM) 2016-06-03 21:47:43 -07:00
Rom Walton 1184f279e6 VBOX: Cap the maximum number of CPUs to 32.
Virtualbox has a hard cap of 32 processors per VM.
2016-04-12 13:08:05 -04:00
funkydude 71831ee639 Expand usage of HTTPS and fix a few URLs 2016-03-08 20:04:28 +00:00
Rom Walton 301b191b70 VBOX: Ugh, fix another typo.
I'm beginning to not like my new keyboard and mouse.
2016-02-10 15:58:41 -05:00
Rom Walton 79184c6103 VBOX: Fix a typo 2016-02-10 15:56:33 -05:00
Rom Walton c61e3090ea VBOX: Add some text about detecting the heartbeat configuration parameters 2016-02-10 15:03:39 -05:00
Rom Walton 01503278af VBOX: Look for the heartbeat file in the shared directory. 2016-02-10 14:58:39 -05:00
Rom Walton 46cac65e83 VBOX: Introduce the notion of a heartbeat file.
Basically the VM periodically 'touches' the file to let the wrapper know that it is still alive.  If the wrapper does not detect a change to the mod time of the file at the specified interval it assumes the worst and aborts the job.

Requested by CMS.
2016-02-07 17:06:52 -05:00
marius 8f7df2a7f0 VBOX: fixed error code not being reported 2016-02-04 02:50:57 +01:00
Charlie Fenton f707a7e983 VBOX: Fix recursive header error in Mac Xcode project 2016-01-30 19:45:21 -08:00
Rom Walton 070db37d2a VBOX: Add missing code to dump log files even for known error types. 2016-01-30 13:56:35 -05:00
Juha Sointusalo 80135f9c95 vbox: fix use-after-free bug in FloppyIOException 2015-11-23 00:11:59 +02:00
Juha Sointusalo 6ced9a08a6 vbox: fix memory leak in FloppyIO 2015-11-22 22:50:08 +02:00
Christian Beer 38205527dd Merge pull request #1435 from BOINC/fix_defects_apps
Fix defects in example apps
2015-11-19 22:59:42 +01:00
Rom Walton ce0e2dab0f vboxwrapper: reclassify the vboxwrapper as a console application on Windows.
This was a hold over from the Win9x days when a console application window could not be hidden by the processed that launched it.  Since we no longer need to support Win9x we can get rid of this hack.
2015-11-19 13:41:02 -05:00
Christian Beer bbc4cf5751 VboxWrapper: prevent use after free in FloppyIOException
see http://blog.sensecodons.com/2013/04/dont-let-stdstringstreamstrcstr-happen.html for details
fixes CID 34536 found by Coverity
2015-11-10 16:56:44 +01:00
Christian Beer 155b35a3a2 VboxWrapper: prevent resource leak in FloppyIO::receive(string*)
fixes CID 34512 found by Coverity
2015-11-10 16:34:46 +01:00
Christian Beer 8e9948e5d9 VboxWrapper: prevent resource leak in FloppyIO::send()
fixes CID 34511 found by Coverity
2015-11-10 16:29:02 +01:00
Rom Walton 2f1bce3064 VBOX: Make sure we are processing the vm log file, even if it is not online. 2015-10-16 11:46:58 -04:00
Rom Walton d0fb1e64c2 VBOX: Fix search path detection code introduced in caf5255. 2015-10-16 11:12:52 -04:00
Rom Walton 0d7ecc6a16 VBOX: Move detection of errors reported by VirtualBox to a little later in the start up process. It may take the VM process a few moments to figure out if it will be able to run.
TODO: Remove some duplicated code.
2015-10-16 10:32:58 -04:00
Charlie Fenton c86e8f97fb VBOX: Fix Mac Xcode project which somehow was corrupted. 2015-10-13 15:21:14 -07:00
Rom Walton caf5255735 VBOX: Add code to handle search path modification for Linux and Mac.
Something has changed on OS X that prevents /usr/local/bin from being in the default search path.  It is when launched from a terminal window, but not when BOINC launches vboxwrapper.  I think recent versions of VirtualBox changed where it stores VboxManage on install.  bbad0d9d recently addressed this in the CC.
2015-10-13 14:34:23 -04:00
Rom Walton f0998b64ef VBOX: On a hypervisor detection failure failure dump all the logs to stderr, it would have quickly exposed a search path change on Mac OS X. 2015-10-13 14:17:01 -04:00
Rom Walton 8f1c767593 Revert "VBOX: Fix a crashing bug on Windows. If we fail to acquire a machine state lock, just report a VM start failure instead of crashing."
This reverts commit 7efd4b474b.
2015-10-11 16:18:55 -04:00
Rom Walton fbb8e0dc09 VBOX: Attempt to read VirtualBox logs in-place to cut down on disk I/O. 2015-10-11 13:27:03 -04:00
Rom Walton 0ee90d7995 VBOX: Update CPU VMX/SVM usage detection code with the latest error messages returned by VirtualBox 5.x 2015-10-09 12:38:28 -04:00
Rom Walton 7efd4b474b VBOX: Fix a crashing bug on Windows. If we fail to acquire a machine state lock, just report a VM start failure instead of crashing. 2015-10-06 16:12:23 -04:00
Rom Walton f9279627f9 VBOX: Fix build break when building a debug version of vboxwrapper 2015-09-29 16:57:23 -04:00
Rom Walton eaf9cb817d VBOX: Only perform the printf format string sanitize functionality on those strings that are going to be consumed by vbox_log(). 2015-08-28 17:24:00 -04:00
Rom Walton 6736f5958e VBOX: Add additional comments 2015-08-28 17:16:13 -04:00
Rom Walton 54a2715e8f VBOX: Possible fix for endless loop. 2015-08-28 16:01:48 -04:00
Rom Walton 38d8041523 VBOX: Bug fix for previous commit. 2015-08-28 14:25:37 -04:00
Rom Walton bbd94c4b7d VBOX: Sanitize 'Guest Log' entries before attempting to write them to stderr. 2015-08-28 14:23:45 -04:00
Rom Walton 95084cee60 VBOX: Make sure the scratch directory value is populated at start up when using the COM interface. 2015-08-24 15:05:23 -04:00
Rom Walton 1b3adf33ae VBOX: When a fraction done file is specified and it has not been created yet, report a non-zero fraction done to prevent BOINC from attempt to calculate it itself. 2015-08-20 19:06:56 -04:00
Rom Walton f86e2dacd1 Merge pull request #1367 from marius311/master
vboxwrapper ncpus -> nthreads bug
2015-07-10 12:00:55 -04:00
Rom Walton 3513922f43 VBOX: Update to support VirtualBox 5.0 RTW. 2015-07-09 11:56:00 -04:00
marius 945afadc2b vboxwrapper ncpus -> nthreads bug 2015-07-07 14:24:32 -07:00
Rom Walton 647511d990 VBOX: Bug Fix 2015-07-05 14:39:47 -04:00
Rom Walton 3ee10705e8 VBOX: Clean-up the VirtualBox version detection mess. 2015-07-05 14:35:48 -04:00
Rom Walton cbe876f3e4 VBOX: Add support for VirtualBox 5.0 RC 3.
Adjust to the changes in the object model when dealing with snapshots and saved state.
2015-07-04 16:33:35 -04:00
Rom Walton a232766d01 VBOX: Bug fix. 2015-07-04 12:45:43 -04:00
Rom Walton 9f42c5dc00 VBOX: Attempt to gracefully fallback to using vboxmanage when the COM interface cannot be successfully created. 2015-07-04 12:31:23 -04:00
Rom Walton 86598c9c6e VBOX: Check for the cache disk configuration flag before attempting to query for the vm_image virtual disk. There will be no vm_image virtual disk to unregister when cache disks are used with isocontextualization. 2015-07-03 16:46:30 -04:00
Rom Walton fa44b3c169 VBOX: Create a new job file flag for dealing with the scratch directory feature. 2015-06-28 15:18:17 -04:00
Rom Walton d57ba52623 VBOX: Introduce the notion of a scratch directory when shared folders are used.
The scratch directory is created under the project folder.
2015-06-25 19:16:10 -04:00
Rom Walton 91a50a4b97 VBOX: Explicitly check the return value if CreateProcess fails while attempting to launch vboxsvc.exe. 2015-05-04 20:28:55 -04:00
Rom Walton 699f22d051 VBOX: Make sure vboxsvc is launched outside the slot directory in sandbox mode on Windows. 2015-05-04 19:44:00 -04:00
Rom Walton 8bdac717eb VBOX: Add a system ready check for incompatible dependencies. 2015-05-01 15:24:46 -04:00
Rom Walton 5ac080b207 VBOX: Tighten up how the version information is displayed on systems falling back to vboxmanage. 2015-05-01 15:11:44 -04:00
Rom Walton 119237594d VBOX: Latest versions of VirtualBox changed the kernel drivers missing error message. 2015-05-01 14:57:58 -04:00
Rom Walton d9ecce24d4 VBOX: Add error trap for COM errors raised by the MSVC compiler stubs. Dump the contents of the error to stderr and halt the wrapper. 2015-04-20 16:11:07 -04:00
Rom Walton 1432538891 VBOX: If <disable_automatic_checkpoints/> is specified, automatically report completed checkpoints to the client as soon as the API requests them. 2015-04-16 18:48:38 -04:00
Rom Walton b109e0a3a7 VBOX: Make sure to include the startup log in stderr instead of just repeating the trace log. 2015-04-15 12:47:54 -04:00
Charlie Fenton 9849b0005a Samples: Add Macintosh build instructions for example app (uppercase), VBoxWrapper and Wrapper 2015-04-14 07:34:42 -07:00
Charlie Fenton 7a41744466 VBoxWrapper: fixes for compatibility with Xcode 6 2015-04-14 07:28:11 -07:00
Rom Walton 28254563da VBOX: Always show the VboxStartup.log on error. 2015-04-13 13:05:11 -04:00
Charlie Fenton fd13d09dd4 VBOX: Update Makerfile_mac Xcode project.to remove deleted files vboxlog.cpp and vboxlog.h 2015-04-10 00:20:31 -07:00
Charlie Fenton eb5b175f76 VBOX: Update Mac Xcode project.to remove deleted files vboxlog.cpp and vboxlog.h 2015-04-08 15:43:37 -07:00
Rom Walton 19b3dd982b VBOX: Add VboxStartup.log to the list of partial log dumps to stderr when something goes wrong. 2015-04-08 12:52:59 -04:00
Rom Walton 3c43cfab6a VBOX: Remove unneeded files. 2015-04-08 12:45:03 -04:00
Rom Walton 8433264ed2 VBOX: cut down on some of the noise with spurious 'Status Report' messages when we attempt to launch the VM. 2015-04-07 19:58:39 -04:00
Rom Walton 30c23d28f3 VBOX: Check for a valid Console pointer before attempting to pause/resume the VM.
get_Console() is not returning an error, bit the returning IConsole interface is NULL.  Just return an ERR_EXEC instead of crash.
2015-04-07 18:28:18 -04:00
Rom Walton 1faf8abf3f VBOX: After adding in a new VirtualBox COM interface, you must hook up the plumbing. 2015-04-04 09:33:44 -04:00
Rom Walton f7df3c380a VBOX: Only add the guest additions ISO to the VM if the file has actually been detected on the file system.
Some Linux systems separate the VirtualBox packages so that the guest additions ISO is in a separate package.  We were attempting to add a DVD device for a file that did not exist.
2015-04-02 16:55:57 -04:00
Rom Walton fc621bf1c8 VBOX: Clean-up Vbox 4.2/4.3/5.0 support. 2015-04-01 15:29:18 -04:00
Rom Walton 228e82a4b7 VBOX: Add COM support for VirtualBox 5.0 Beta 1. 2015-04-01 14:53:43 -04:00
Rom Walton 3a399ea0f5 VBOX: If polling for the current VM state fails for any reason, like vboxsvc crashing, do a temp exit for 24 hours.
Before COM, polling for the current state wasn't as critical.  If the poll operation failed, we would try again in one second anyway.

After COM, it is used as a test to see if the communication channel between the wrapper and VirtualBox is still operational.  If not, temp exit and hope things work the next attempt.
2015-03-27 16:34:09 -04:00
Rom Walton 70def08644 VBOX: Add additional check for a valid pointer to prevent crash condition. 2015-03-26 17:32:52 -04:00
Rom Walton 46648d0d38 VBOX: Add better error checks when handling COM error conditions. 2015-03-26 17:22:17 -04:00
Rom Walton 07752ba4dd VBOX: Remove unneeded error string 2015-03-26 08:55:32 -04:00
Rom Walton a8a9f23ae9 VBOX: Add option to use 'savestate' instead of 'poweroff' during graceful VM shutdown. 2015-03-25 16:54:22 -04:00
Rom Walton 04285a19df VBOX: Add a configuration option to turn-off automatic check-pointing.
Projects may want to handle check-pointing within their own application and skip the disk intensive requirements of a VM snapshot.
2015-03-25 16:09:07 -04:00
Rom Walton 16ae8d57c9 VBOX: Enable/Disable network after the network type has been specified. 2015-03-22 15:19:08 -04:00
Rom Walton 32fe92acd0 VBOX: When attempting to deregister the VM, if we are unable to acquire the session lock, exit the routine with an error. Avoid a crash. 2015-03-20 10:08:06 -04:00
Rom Walton 1901b2bc7e VBOX: Same with the temporary exit trigger file 2015-03-20 09:58:37 -04:00
Rom Walton f0293098d3 VBOX: Take care of a false positive. The completion file string size must be greater than zero. 2015-03-20 09:56:08 -04:00
Rom Walton 8b997f0cfe VBOX: If we experience a timeout when attempting to start the VM, dump the log files. 2015-03-20 09:49:42 -04:00
Charlie Fenton 8cac4bd2b5 VBOX: Update Xcode project for building vboxwrapper on Mac OS X 2015-01-15 15:51:00 -08:00
Rom Walton e31d3c86b4 VBOX: Add missing header 2015-01-15 18:16:59 -05:00
Rom Walton 9dc2161436 VBOX: Configure a bunch of virtual functions to be purely abstract to avoid a bunch of compiler warnings in gcc 2015-01-15 18:14:35 -05:00
Rom Walton 9784669271 VBOX: Fix makefiles for building vboxwrapper on Linux and Mac OS X 2015-01-15 17:19:45 -05:00
Rom Walton 725982c7eb VBOX: Add missing header on *nix based builds 2015-01-15 16:31:01 -05:00
Julien Nabet d75222ebf3 cppcheck: Prefer prefix ++/-- operators for non-primitive types 2015-01-14 21:18:29 +01:00
Rom Walton 106ef1e837 VBOX: Make creating/writing the graphics status file part of the job file configuration. No need to write it if there is not going to be a running graphics application. 2015-01-05 22:45:37 -05:00
Rom Walton f082889e85 WINBUILD: Fix build breaks introduced with graphics status function changes. 2015-01-05 20:37:51 -05:00
Rom Walton d28247589e VBOX: Always report the web graphics port to the client except when a 'graphics_app' is defined 2014-12-31 10:53:17 -05:00
Rom Walton 91bb400ce1 VBOX: Bug fix for persisting remote desktop/web api port information 2014-12-31 03:11:21 -05:00
Rom Walton f8be188baf VBOX: Use new graphics_status API to inform htmlgfx what is going on. 2014-12-26 17:32:05 -05:00