Commit Graph

911 Commits

Author SHA1 Message Date
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
Christian Beer 833c877f3a BUILD: add example apps into the build process
- By default apps won't be built. In order to build the example apps use --enable-apps as option to ./configure. Not all apps are supported as some need further external libraries.
- Also fix a copy/paste error in the vboxmonitor Makefile
2015-02-12 16:58:14 +01:00
Rom Walton 1e5dc8b61b HTMLGFX: Completed the move of all platform independent code to source files that will be shared between platforms.
All that should be required for new platforms is to implement a 'run' function that creates a window that hosts an HTML control and queries determine_state_url() and determine_exit_state() once a second.
2015-01-17 17:05:09 -05:00
Rom Walton 96c0317f90 Merge branch 'master' of ssh://isaac.ssl.berkeley.edu/boinc-v2 2015-01-16 00:49:41 -05:00
Rom Walton 8bdf177e4e HTMLGFX: Checkpoint (Continuation of previous commit.)
* Custom IE Javascript interface is gone, it was replaced with a cross-browser Web RPC.
In the HTML doc you can add:
<script type='text/javascript' src='/api/static/boinc.js'></script>

In the JavaScript code you can:
var boinc = new BOINC();

From there you can get the username like:
var userName = boinc.getUserName();

* Default resources are embedded within the executable in much the same way XPM images are embedded in the manager.
  /api/static/index.html
  /api/static/boinc.png
  /api/static/boinc.js
2015-01-16 00:49:17 -05: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 82dbec6671 HTMLGFX: Checkpoint (Move most of the platform specific stuff to the HTTP server side of the house, it becomes cross-browser/cross-platform) 2015-01-12 15:47:34 -05:00
Rom Walton 38af455fa7 HTMLGFX: Remove the secret handling stuff, it would prevent loading static images and other resources from the slot directory. 2015-01-06 11:03:41 -05:00
Rom Walton 8168008631 WRAPPER: 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:53:50 -05: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 46f8b9232e HTMLGFX: When debugging, ignore the last update time in the graphics status file.
If the worker application hasn't been running for awhile we do not want to automatically close the graphics application.
2015-01-02 00:52:22 -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 ed431ced86 HTMLGFX: Implement a simple authentication scheme.
Using the formal HTTP authentication scheme was too cumbersome and I couldn't pre-fill out that information as part of the request.  IE11 emulation ignores any credentials as part of the URI.  The web browser control insists on displaying a credentials dialog when challenged.

So for now, look for a 'secret' header which just contains a thread identifier.

Authentication is skipped if the app was started with the --debug command line argument.  You'll be able to attach and debug your HTML application via the port number written in the Window title.
2014-12-30 23:20:48 -05:00
Rom Walton 2f3a8cb3ec HTMLGFX: Fix a bunch of potential cross-site scripting issues.
* Implement a mini HTTP server to service file requests from the slot
directory.  Have the browser control download the file(s) via the
HTTP protocol instead of the FILE protocol.

TODO: Lock down the authentication mechanism so that it is reasonably
protected even though it is only bound to the loopback adapter.

* Configure the browser emulation level for the executable to
Internet Explorer 11.
2014-12-30 18:03:12 -05:00
Rom Walton df7b112357 HTMLGFX: Remove unneeded files. 2014-12-30 01:05:15 -05:00
Rom Walton 9e1e50a4e7 HTMLGFX: Normalize the URLs configured by way of the configuration file. MSHTML would attempt to use HTTP when only a filename was given. 2014-12-29 23:09:54 -05:00
Rom Walton 33dbfbe975 HTMLGFX: It helps to actually put in the correct format specifier. 2014-12-29 00:28:32 -05:00
Rom Walton f8b223714b HTMLGFX: Minor comment fix 2014-12-29 00:26:55 -05:00
Rom Walton 9bf3be87ca HTMLGFX: Log any configured state urls 2014-12-29 00:25:39 -05:00
Rom Walton 3e11ed3b93 HTMLGFX: Bug fixes for running against stock T4T. 2014-12-29 00:15:49 -05:00
Rom Walton e1ab59eaee HTMLGFX: Finish up the embedded HTML file which is used as a last resort. 2014-12-28 22:49:41 -05:00
Rom Walton f305295f5b HTMLGFX: Remap the JavaScript methods and properties to camel case to match the JavaScript standards. 2014-12-28 20:38:15 -05:00
Rom Walton 28bd2b81b2 HTMLGFX: Do not overwrite the State URLs if a project also exposes a Web API port as well. A project may choose to have a running HTML page that makes JSON calls to a web server running within a VM or science application. 2014-12-28 14:53:21 -05:00
Rom Walton 9dab824fc3 HTMLGFX: Make sure we do not overwrite the default URL with an empty state URL. 2014-12-28 00:34:06 -05:00
Rom Walton fafbb9f27e HTMLGFX: Determine the real path of the graphics description file with boinc_resolve_filename API. 2014-12-27 13:09:23 -05:00
Rom Walton 29eaf3944b HTMLGFX: Streamline things a bit. 2014-12-27 11:28:43 -05:00
Rom Walton c47052fa92 HTMLGFX: parse a boinc_graphics.xml file for a list of optional urls the htmlgfx can use for various states (running, suspended, network suspended, exiting).
HTMLGFX: look for and use various vboxwrapper state files for extracting the remote desktop port number and the webapi port number.
2014-12-27 01:25:10 -05:00
Rom Walton bdd71e0129 HTMLGFX: Remove progress bar for now. It appears to be a bit too fancy and is distorting the page layout. 2014-12-26 21:36:51 -05:00
Rom Walton 19f680b8cf HTMLGFX: Add a javascript based progress control to show fraction done 2014-12-26 21:07:30 -05:00
Rom Walton 94c6360035 HTMLGFX: Prevent a memory leak with the project_preferences init_data entry 2014-12-26 19:32:42 -05:00
Rom Walton 37974055a8 HTMLGFX: When in screensaver mode, exit with any mouse or keyboard activity 2014-12-26 19:22:32 -05:00
Rom Walton e22d7b7b50 HTMLGFX: Hookup the graphics_status API polling. 2014-12-26 18:56:31 -05:00
Rom Walton 8963495ec4 WRAPPER: Use new graphics_status API to inform htmlgfx what is going on. 2014-12-26 17:43:00 -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
Rom Walton 8ecf54ae41 VBOX: Write console messages to stderrgfx.log 2014-12-26 13:19:09 -05:00
Rom Walton 345bc273b9 VBOX: Initialize the HTML Document with a blank page 2014-12-26 13:02:09 -05:00
Rom Walton cbda95ad3e VBOX: Prevent new windows from being displayed either from HTML or from script. 2014-12-26 12:59:49 -05:00
Rom Walton d43638c0e3 VBOX: Remove the Log() method from the HTML Document extension, hook into the console instead. 2014-12-26 12:58:58 -05:00
Rom Walton 24c5e2bdff HTMLGFX: Add some more infrastructure for passing APP_INIT_DATA stuff to the HTML web page via the DOM. 2014-12-24 20:30:19 -05:00
Rom Walton 58c5dd9676 HTMLGFX: Reintroduce the HTML DOM Extension, embed the typelib in the executable.
Force the COM libraries to look within the executable instead of going out to the registry for the typelib information.
2014-12-24 14:01:35 -05:00
Rom Walton 24ef08bbb6 HTMLGFX: Add a default HTML page that mimics the screen saver bouncing BOINC logo.
HTMLGFX: Remove attempt at using the 'window.external' DOM extension, it was requiring a typelib.
2014-12-24 01:59:37 -05:00
Rom Walton ad9616e143 HTMLGFX: Remove obsolete source files 2014-12-23 19:11:41 -05:00
Rom Walton 0c717ac635 VBOX: Decoupled the HTML Graphics application from vboxwrapper. 2014-12-23 16:54:03 -05:00
Rom Walton b5ff288693 VBOX: Add the ability to add trace statements to stderrgfx.txt from an HTML based application
VBOX: Prepare for another refactor job to make a generic HTML based graphics application
2014-12-23 16:11:22 -05:00
Rom Walton 275e385148 VBOX: Introducing a basic graphics application for vboxwrapper based on HTML rendering. Basic plumbing is done.
TODO:
* Add vbox job elements to point to various URLs for various states. (running/suspended/not running)
* Add window timer to poll for shared memory changes
* Exit if running in screen saver mode and keyboard/mouse activity is detected.
2014-12-22 23:49:10 -05:00
Rom Walton 0ca76008f1 VBOX: Juha pointed out that I took one line of code out to many on a code cleanup pass. I'm adding it back in. 2014-12-22 16:35:10 -05:00
Rom Walton 58fcffc859 VBOX: Refactor vboxwrapper to streamline logging and prepare for vboxhtmlgfx. 2014-12-19 09:55:48 -05:00
Rom Walton f2a7c28fc0 VBOX: Fix crash if DVD-ROM media had been ejected by some external event. Technically this shouldn't be happening, but something funky is going on with VirtualBox and we need to handle things that may cause a crash when cleaning up the VM. 2014-12-08 11:56:33 -05:00
Rom Walton cb6c328151 VBOX: Make the vboxmanage interface work on Windows again.
VBOX: Make the service install scenario work again.
2014-11-23 23:22:57 -05:00
Rom Walton 1e04a9f150 VBOX: Fix check-pointing. I broke it with my error path cleanup. 2014-11-23 12:47:38 -05:00
Rom Walton 18abc0db07 VBOX: Get rid of unneeded variables 2014-11-23 12:47:37 -05:00
Rom Walton a09b30353f VBOX: Cleanup error handling code, remove duplication. 2014-11-23 12:47:37 -05:00
Rom Walton 85f364485c VBOX: When checking for the existence of a VM registered to a given slot directory, also check for the ISO Contextualization image and cache disk image. If any type of media is registered to a given slot directory, close it regardless if it is attached to a VM or not. 2014-11-23 12:47:36 -05:00
Rom Walton cbf93cdc86 VBOX: Fix build breaks (Part 2) 2014-11-23 12:47:35 -05:00
Rom Walton 7d3bb4803c VBOX: Fix build breaks 2014-11-23 12:47:35 -05:00
Rom Walton 7713406f6f VBOX: Bug fix for previous commit. 2014-11-23 12:47:34 -05:00
Rom Walton 715e0b2bb8 VBOX: When starting a VM, include its name and slot number in the stderr text. 2014-11-23 12:47:34 -05:00
Rom Walton b2c9ab132b VBOX: Make the conditions for one type of error case a bit clearer. 2014-11-23 12:47:33 -05:00
Rom Walton 017ac68c55 VBOX: last_checkpoint_cpu_time != last_checkpoint_elapsed_time. When to checkpoint is based on elapsed time, what we reported to boinc is the cpu time. Keep track of both values. 2014-11-23 12:47:32 -05:00
Rom Walton 660ade42bb VBOX: When deregistering a VM, organize the medium list by most recent child first and then release as needed. 2014-11-23 12:47:32 -05:00
Rom Walton 56bfdd7ec9 VBOX: Use the same COM classes for consistency. 2014-11-23 12:47:31 -05:00
Rom Walton 3941d5153c VBOX: Hookup COM support for both VirtualBox 4.2 and VirtualBox 4.3. It appears to be working. 2014-11-23 12:47:30 -05:00
Rom Walton 62578717e4 VBOX: Duplicate symbols have been removed from the link step. 2014-11-23 12:47:29 -05:00
Rom Walton 58ba52954a VBOX: Source was a useful piece of information to dump. 2014-11-23 12:47:29 -05:00
Rom Walton bf0b56c073 VBOX: Introduce the notion of Virtualbox COM namespaces. We currently support VirtualBox 4.2 and VirtualBox 4.3. 2014-11-23 12:47:05 -05:00
Rom Walton 6fcf9cbb5f VBOX: Rename mscom to mscom43 to show that it contains VirtualBox 4.3 COM Interface files. 2014-11-23 12:47:03 -05:00
Rom Walton a08f521036 VBOX: Add VirtualBox 4.2 COM Interface files 2014-11-23 12:47:02 -05:00
Rom Walton 8d6d54434b VBOX: Do not attempt to restore the current snapshot if the VM hasn't been running long enough to generate one. 2014-11-23 12:47:01 -05:00
Rom Walton 31603fae79 VBOX: If something fails during create_vm(), we must release the write lock before deregister_vm() is called. Handle machine and session cleanup at the end if the routine. 2014-11-23 12:47:00 -05:00
Rom Walton 785c133882 VBOX: Actually wait for the VM to shutdown before doing anything drastic. 2014-11-23 12:46:59 -05:00
Rom Walton 7c0fa017ef VBOX: Update error dump function with ATL Wrapper classes. 2014-11-23 12:46:59 -05:00
Rom Walton e9acbfc8a8 VBOX: Cleanup some edge cases discovered while running T4T jobs with anon platform. 2014-11-23 12:46:58 -05:00
Rom Walton fa325188fe VBOX: Bug fixes related to running T4T jobs 2014-11-23 12:46:58 -05:00
Rom Walton 59152902b0 VBOX: Convert cleanup_snapshots() and various bug fixes 2014-11-23 12:46:57 -05:00
Rom Walton 56aeda1233 VBOX: Convert deregister_vm(), deregister_stale_vm() 2014-11-23 12:46:56 -05:00
Rom Walton 03a4fe3280 VBOX: Convert is_extpack_installed(), is_hdd_registered(), restore_snapshot(), create_snapshot() 2014-11-23 12:46:56 -05:00
Rom Walton 481a9fcb54 VBOX: Convert is_system_ready(), set_cpu_usage(), set_network_usage() 2014-11-23 12:46:55 -05:00
Rom Walton 78ca154407 VBOX: Fix get_default_network_interface() 2014-11-23 12:46:55 -05:00
Rom Walton 2f51aec2e2 VBOX: Convert create_vm() 2014-11-23 12:46:54 -05:00
Rom Walton bb0e905bd7 VBOX: Convert get_vm_network_bytes_sent() and get_vm_network_bytes_received() 2014-11-23 12:46:53 -05:00
Rom Walton 2f79a92b5c VBOX: Add a flag for GBAC functionality. 2014-11-23 12:46:53 -05:00
Rom Walton b739badb44 VBOX: Write a stderr message when BOINC is notified about a web application for a particular task. 2014-11-23 12:46:52 -05:00
Rom Walton fb98a4c644 VBOX: Guest additions may not be available on all hosts. If not found, skip it. 2014-11-23 12:46:52 -05:00
Rom Walton 5037444962 VBOX: Introduce the notion of a temporary exit trigger file.
When the file is detected, the wrapper will call boinc_temporary_exit() and restart the VM at a later date.
2014-11-23 12:46:51 -05:00
Rom Walton 810047d4eb VBOX: Move common code to VBOX_BASE class, VBOX_VM derives from it by extending virtual functions calling Vboxmanage or Native API functions. Use ATL on Windows to wrap COM Objects and data types. 2014-11-23 12:46:28 -05:00
Rom Walton 72fd80a203 VBOX: Move common code to VBOX_BASE class, VBOX_VM derives from it by extending virtual functions calling Vboxmanage or Native API functions. Use ATL on Windows to wrap COM Objects and data types. 2014-11-23 12:45:03 -05:00