Commit Graph

663 Commits

Author SHA1 Message Date
Rom Walton db00158cb0 - VBOX: Increase elapsed_time if we were forced to sleep after executing the main loop 2013-03-01 16:08:52 +01:00
Rom Walton 14948c99f6 VBOX: Change the way elapsed_time is calculated in vboxwrapper.
Previously: elapsed_time was just incremented with the value of the polling
          period each iteraction through the main loop.  This introduced issues
          when vboxmanage lagged for whatever reason.  This lag could go as high as 5
          seconds.  Over the timespan of a day this could increase the wall clock time
          of a task a great deal.

        Now: elapsed_time is incremented with the time it took to execute the main
          loop.
2013-03-01 16:05:09 +01:00
Rom Walton e613459377 - VBOX: Do not perform the hardware virtualization check when the
guest VM is 64-bit.  64-bit guest vms require hardware virtualization
        and should fail without it.
    - VBOX: Implement the <copy_to_shared/> directive in the vbox_job.xml file.
        if <copy_to_shared>init_data.xml</copy_to_shared> is set, the wrapper will
        copy the init_data.xml file to the shared directory before the VM is launched.

svn path=/trunk/boinc/; revision=25973
2012-08-03 16:24:12 +00:00
Charlie Fenton d059de100f Mac: update sample code to allow building with Xcode 4.4 GM seed under OS 10.8 GM seed
svn path=/trunk/boinc/; revision=25866
2012-07-12 11:51:21 +00:00
Charlie Fenton 72007821b7 Mac: update sample code to allow building with Xcode 4.3 and to eliminate compiler warnings
svn path=/trunk/boinc/; revision=25862
2012-07-11 10:32:09 +00:00
Charlie Fenton cc3942131e VBOX: Fix Mac compiler warnings
svn path=/trunk/boinc/; revision=25698
2012-05-19 01:12:33 +00:00
David Anderson c8c85f4a75 - vboxwrapper: don't run headful if client is sandboxed (it won't work).
svn path=/trunk/boinc/; revision=25695
2012-05-18 18:24:58 +00:00
David Anderson b2a4cd4d91 svn path=/trunk/boinc/; revision=25691 2012-05-18 17:38:16 +00:00
Rom Walton 63483b5bb7 - VBOX: When the system confirms our port number request or assigns us a
new port number to work with convert it from network byte order 
        (big endian) to the host byte order (little endian on x86/x64 processors).

    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=25671
2012-05-11 18:53:36 +00:00
David Anderson f022b566de - Win compile fixes
svn path=/trunk/boinc/; revision=25665
2012-05-09 20:06:54 +00:00
Rom Walton d2155c4488 - VBOX: Do not treat the timeout error as a fatal error when attempting
to delete stale snapshots.  Slower machines can take longer than
        45 seconds to complete the deletion of old snapshots.

    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=25474
2012-03-22 19:00:37 +00:00
Rom Walton fc818a027f - VBOX: Detect another form of out of memory error from VirtualBox.
Reschedule the job for some time in the future when there might
        be enough memory.
    - VBOX: Resume the VM's execution after the creation of the snapshot
        but before we attempt to delete the previous, now stale, snapshot.
    - VBOX: Treat the 'livesnapshotting', 'deletingsnapshotlive', and
        'deletingsnapshotlivepaused' states as online states.
        
    samples/vboxwrapper/
        vbox.cpp
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25473
2012-03-22 18:10:42 +00:00
Rom Walton 97fe7c2667 - VBOX: Before attempting to take the snapshot for a VM, pause it first.
This changes the snapshot type from a live snapshot to an online
        snapshot.  Presumably difference might make it easier to do and
        prevent the VM from asserting.
        
    samples/vboxwrapper/
        vbox.cpp, .h

svn path=/trunk/boinc/; revision=25472
2012-03-21 23:17:07 +00:00
Rom Walton 7710c0cfc8 - VBOX: We don't need to display the state of the VM before startup.
- VBOX: Change the snapshot naming scheme by removing the quotes and
        prefixing the checkpoint time with 'boinc_'.  Hopefully this will
        prevent the VM from asserting during the snapshot process.

    samples/vboxwrapper/
        vbox.cpp, .h

svn path=/trunk/boinc/; revision=25471
2012-03-21 22:13:06 +00:00
Rom Walton f7e7a065de - VBOX: Introduce the use of VM snapshots as a form of checkpoint.
- Perform snapshots at most once every ten minutes.
        - Client suspend/resume messages behave the same.
        - Client no heartbeat/quit messages cause the wrapper to just
          poweroff the VM.
        
        On startup check to see if the last checkpoint time is greater than 0,
        if so, start from the most recent snapshot.
    - VBOX: If we receieve the status message of no heartbeat or quit, set
        the temporary delay to 5 minutes.  If the wrapper is terminated during
        the middle of a snapshot, hopefully this will give VirtualBox enough
        time to complete the snapshot.  Restarting the BOINC job should then
        poweroff the VM and restore from the last snapshot.
    
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25469
2012-03-21 20:03:47 +00:00
Rom Walton 7bbdb288ed Quick Updates
svn path=/trunk/boinc/; revision=25464
2012-03-20 18:25:43 +00:00
Rom Walton 5972bf2c8f - VBOX: On successful completion, create the same output file that
the CernVMWrapper would.  This allows both wrapppers to work with
        the same BOINC job generation system.

    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=25463
2012-03-20 18:19:56 +00:00
Rom Walton 64bdde4745 - VBOX: Make it explicily clear what the result of a start/stop
request was.  Hopefully this will give us insight into whether
        the core client is terminating the wrapper or something else is
        going on.
    - VBOX: Shorten the command execution timeout to 45 seconds.
    - VBOX: Don't attempt to re-execute the close/savestate commands.

    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=25462
2012-03-20 17:55:56 +00:00
Rom Walton 25142dda02 - VBOX: Give the VM process a short priority boost when responding
to a quit request.  On older XP machines it might speed up the memory
        dump to disk.
    - client: Increase the quit request timeout from 10 seconds to 60 seconds for
        machines running VMs and slow disk drives.  It should give the VM enough
        time to gracefully shutdown and not give boinc reason to kill the wrapper.

    client/
        app.h
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25433
2012-03-16 01:04:43 +00:00
Rom Walton a52651bf56 - VBOX: Use the boinc_temporary_exit API properly. Wait for 5 minutes
before allowing another attempt to start the VM when the hypervisor
       cannot allocate enough memory.
    - VBOX: Print out a trace statement about the suspend/resume directive
       from the vboxwrapper perspective.  This in conjuction with the
       BOINC API trace statements should provide a better idea with
       what is going on.
       
    samples/vboxwrapper
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25424
2012-03-14 18:54:03 +00:00
Charlie Fenton e46189a816 VBOX: Fix typo in Mac wrapper name (1686 -> i686)
svn path=/trunk/boinc/; revision=25412
2012-03-13 02:07:32 +00:00
Rom Walton f52ce7153e - VBOX: If a VM fails to start because the machine is low on memory,
temporarily exit so BOINC can reschedule it for a later time.
        If the problem doesn't go away it'll just time out eventually anyway.
        
    samples/vboxsamples/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25404
2012-03-12 17:16:51 +00:00
Rom Walton 85fce1d29a - VBOX: Only attempt to reset throttle values if the VM is in
a running state, otherwise controlvm throws an error.
        
    samples/vboxsamples/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25403
2012-03-12 15:45:09 +00:00
Rom Walton 8f8caec6e7 - VBOX: Allow the CPU execution cap to be set back to 100% after it had
alreadly been set lower.

    samples/vboxwrapper/
        vbox.cpp
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25399
2012-03-09 22:56:19 +00:00
Rom Walton f2f9ec8dc3 - VBOX: Setting the CPU Execution Cap should be done with the controlvm
command after the VM has entered a running state instead of using
        modifyvm.
        
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=25397
2012-03-09 19:53:34 +00:00
David Anderson dfacf7d1c1 - API: remove BOINC_STATUS::suspend_request;
it's an implementation thing, not intended for export.
    Fix a related bug.


svn path=/trunk/boinc/; revision=25396
2012-03-09 19:46:49 +00:00
Rom Walton 702c78d8c8 - VBOX: Parse the vboxmanage error code for *nix as well.
- VBOX: Switch to using status.suspend_request instead of status.suspend
        when determining when to suspend/resume a VM.  status.suspended is
        now only changed when direct_process_action is set to true.

    samples/vboxwrapper/
        vboxwrapper.cpp
        vbox.cpp

svn path=/trunk/boinc/; revision=25394
2012-03-09 03:05:48 +00:00
Rom Walton 8887a01904 Quick Updates
svn path=/trunk/boinc/; revision=25369
2012-03-02 19:17:12 +00:00
Rom Walton 2030f3ca23 - VBOX: Implement an exponential backoff scheme of sleeping between
commands if a session lock error has been detected.  Cap the overall
        delay to 30 seconds total for a single command.
    
        Experiments performed by jujube(T4T) suggest changing the sleep interval
        to an exponential style backoff would increase our chances of recovering in
        situations where the previous lock is held by a previous instance of
        vboxmanage whos instance data hasn't been cleaned up within vboxsvc yet.
    
    client/
        vbox.cpp

svn path=/trunk/boinc/; revision=25359
2012-03-01 04:23:08 +00:00
Rom Walton 594ab7a80d - Vbox: Include date component in log messages to ease debugging long
running VM tasks.
        
    samples/vboxwrapper/
        vbox.cpp
        vboxwrapper.cpp, .h

svn path=/trunk/boinc/; revision=25308
2012-02-21 22:31:50 +00:00
Rom Walton 8397db8a9e - VBOX: Remove the renaming of the vm disk image code. It isn't needed
and it complicates things in the CC.
        
    samples/vboxwrapper/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25220
2012-02-08 20:31:03 +00:00
Charlie Fenton 94b6094a35 VBOX: Fix compiler warnings on Mac
svn path=/trunk/boinc/; revision=25146
2012-01-25 09:09:35 +00:00
Rom Walton dbe896f3cb - VBOX: Fix build breaks for Linux and Mac.
samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=25143
2012-01-24 23:36:10 +00:00
Rom Walton bd1d4e5fe8 - VBOX: Demote the priority level of the VM process to try and prevent
latency issues for volunteers.
    - VBOX: If the port forwarding preferred port isn't usable, try asking
        the OS for one.
    - VBOX: On a failure, get the VM process exit code and report it with
        the rest of the stderr spew.

    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25133
2012-01-24 04:13:00 +00:00
Rom Walton 5eb81e7311 - VBOX: Enable the wrapper to handle fractional CPU usage. If
the server specifies 1.1 CPUs used, allocate 2 CPUs to be used
        in VirtualBox.
        
    samples/vboxwrapper
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25119
2012-01-21 17:57:50 +00:00
Rom Walton d5327641fb - VBOX: Use the documented way to reset the UUID of a virtual hard
disk.  Thanks Daniel.
        
     samples/vboxwrapper
        vbox.cpp

svn path=/trunk/boinc/; revision=25102
2012-01-19 00:09:06 +00:00
Rom Walton f2ceca49c1 - VBOX: Fix another issue that was a result of Saturdays commit. Make
sure that the vm_name variable is populated with something useful if
        resuming from a different execution.
 
     samples/vboxwrapper
        vbox.cpp

svn path=/trunk/boinc/; revision=25098
2012-01-18 17:23:45 +00:00
Rom Walton bb448074b0 - VBOX: Fix a regression I introduced on Saturday, is_vm_registered shouldn't
be called when vm_name is empty.  Change it so that is references
        vm_master_name instead to get the correct name of the VM.
    - VBOX: Fix the logic that scan for the CR character and removes it.  Also fix
        the partial line inclusion when the various log files are greater than 16k.
        string.erase returns what the iterator value should be.
 
     samples/vboxwrapper
        vbox.cpp

svn path=/trunk/boinc/; revision=25086
2012-01-17 18:17:01 +00:00
Rom Walton 346eff699c - VBOX: Add User ID and Host ID to the CERN data format.
samples/vboxwrapper
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25068
2012-01-15 07:08:27 +00:00
Rom Walton 0c33c456ec - VBOX: Fix regression where the vm_name wasn't reset back to the
current wu name after deregistering a stale VM.

    samples/vboxwrapper
        vbox.cpp, .h
        vboxwrapper.cpp,

svn path=/trunk/boinc/; revision=25067
2012-01-15 04:35:13 +00:00
Rom Walton 5e0fbe8dc7 Quick Updates
svn path=/trunk/boinc/; revision=25047
2012-01-13 19:33:27 +00:00
David Anderson 81b29b0cc9 - API: fix queueing problem for graphics-related messages
(web graphics URL and remote desktop addr)
- GUI RPC and API:
    change "remote_desktop_connection" to "remote_desktop_addr" everywhere.
    It's an address, not a connection.
- vboxwrapper: log message cleanup


svn path=/trunk/boinc/; revision=25044
2012-01-13 19:00:16 +00:00
Rom Walton fda0d55ac2 Quick Updates
svn path=/trunk/boinc/; revision=25043
2012-01-13 16:03:23 +00:00
Rom Walton 97bdbee73e - VBOX: It helps to remove the older send msg routines. Oooops.
samples/vboxwrapper
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25042
2012-01-13 15:56:40 +00:00
Rom Walton ce4650ecbb - VBOX: Cleanup a few messages stating port numbers in the stderr spew.
- VBOX: Send configuration settings in one message instead of piece meal.
    
    api/
        boinc_api.cpp, .h
    samples/vboxwrapper
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25041
2012-01-13 15:21:00 +00:00
Rom Walton 4538282220 - VBOX: Make sure the configured port numbers persist across
restarts of the client software.  Remote desktop stopped
        working if the client software was restarted.

    samples/vboxwrapper
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25037
2012-01-13 03:12:00 +00:00
Rom Walton 2c54c9735a - VBOX: Report the remote desktop connection information to the
core client.  Next commit will create an extra "VM Console"
        button in the manager when detected.  Volunteers will just have
        to click the button to see what is going on with the VM.

    api/
        boinc_api.cpp, .h
    samples/vboxwrapper
        vbox.cpp, .h
        vboxwrapper.cpp, .h

svn path=/trunk/boinc/; revision=25035
2012-01-12 20:57:23 +00:00
Rom Walton fea602b6e6 - VBOX: Enable remote desktop functionality for a VM that has
<enable_remotedesktop/> specified in its vbox_job.xml file.
        
      NOTE: It does require the VirtualBox extension pack, but that
        is freely available on the VirtualBox download page.
        
    samples/vboxwrapper
        vbox.cpp, .h
        vboxwrapper.cpp, .h

svn path=/trunk/boinc/; revision=25034
2012-01-12 15:54:28 +00:00
David Anderson 125ad03a54 - vboxwrapper: add <pf_host_port> element to config file.
Specifies host port # for port forwarding.
    If absent or zero, assign a port.


svn path=/trunk/boinc/; revision=25030
2012-01-11 23:21:17 +00:00
Rom Walton 3f8ca51110 - VBOX: Fix one last regression related to failed start detection. If
only one CPU is allocated, manually disable VM hardware acceleration.
        
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=25016
2012-01-09 15:37:26 +00:00
Rom Walton 4a92463a25 Quick Updates
svn path=/trunk/boinc/; revision=25012
2012-01-08 21:12:06 +00:00
Rom Walton 69366367c3 Quick Updates
svn path=/trunk/boinc/; revision=25011
2012-01-08 21:11:52 +00:00
Rom Walton 6d731ccc6d - VBOX: Fix regression where the ERR_CPU_VM_EXTENSIONS_DISABLED error
message wasn't being written to stderr when the VM extensions
        were disabled via the BIOS.
        
    samples/vboxwrapper/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25010
2012-01-08 20:18:14 +00:00
Rom Walton ba1169107e - VBOX: Sleep for the remainder of the polling period and not the
whole poll period.

    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp, .h

svn path=/trunk/boinc/; revision=25008
2012-01-07 20:36:48 +00:00
Rom Walton 9faee707fa - VBOX: Use sscanf instead of strtol to convert a hex string.
- VBOX: Use new FloppyIO implementation that reports image
        creation errors.


    samples/vboxwrapper/
        floppyio.cpp, .h
        vbox.cpp

svn path=/trunk/boinc/; revision=25003
2012-01-06 18:44:34 +00:00
Rom Walton f9a0ba4759 - VBOX: Extract the various logs before attempting to cleanup if the
registration process fails.
        
    samples/vboxwrapper/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24996
2012-01-05 06:34:22 +00:00
Rom Walton a6f030beb4 - VBOX: Fix a crash bug if multiple virtual VICs are defined for a VM.
I'm not sure what the heck happened.  It probably has something to
        do with my \r removal code on Windows.  Bugs hidden by other bugs
        I suppose.

    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24994
2012-01-04 21:59:44 +00:00
Rom Walton 449cd6a1b4 - VBOX: Move start state change detection code from run() function to
start() function and use similar code to handle stop as well.
        
        Weird stuff happens when people start/stop BOINC quickly,
        it looks as though the previous VM instance isn't shutdown before we
        attempt to start it again.  Hopefully enough of a wait is in there
        for the VM to fully halt before the wrapper is terminated.
        
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24993
2012-01-04 21:09:58 +00:00
Rom Walton ea726d4985 - VBOX: Use strtol instead of atol to parse Vbox error codes from
stderr/stdout output.
    - VBOX: Undo my reorg yesterday with regards to report_vm_pid and
        report_net_usage.
    - VBOX: Only report network usage in the status report if
        aid.global_prefs.daily_xfer_limit_mb is non-zero
    - VBOX: Add the VM log to the list of things reported on a start
        failure.  Hypervisor log suggests that it launched the VM but
        it failed unexpectedly.  So there might be cases where it
        actually exists.

    samples/vboxwrapper/
        vbox.cpp
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24992
2012-01-04 18:21:40 +00:00
Rom Walton 3bfd0a145f - VBOX: Restore the elapsed time from the checkpoint file instead of
aid.starting_elapsed_time.  It appears some older client versions
        are giving erratic results.
        
    samples/vboxwrapper/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24991
2012-01-03 21:46:57 +00:00
Rom Walton d2784ffc4b - VBOX: Per tester feedback, at an hourly status report to track
network usage.
    - VBOX: For errors where an error code is specified in the output,
        use that value when returning from vbm_open().  Make it easier
        to track failure rates by problem type in the ops pages.
        (Windows Only)
    - VBOX: Try making the process of extracting the hypervisor system
        log more robust, make a temp copy of it in the slot directory.
        Avoid exclusive file lock issues since VboxSvc will still be
        logging to it.
    - VBOX: Change the session lock text to make it clearer that the
        use of other VirtualBox management tools can cause a problem.

        
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24990
2012-01-03 19:06:39 +00:00
Rom Walton b90837d6a5 Quick Updates
svn path=/trunk/boinc/; revision=24978
2012-01-02 17:07:39 +00:00
Rom Walton 5691f06dd6 - VBOX: Fix crashing issue I introduced last night attempting to
extract the hypervisor system log.
    - VBOX: Report the hypervisor system log with any failed vboxmanage
        command that happens during the phase where we setup the VM.
        
    samples/vboxwrapper/
        vbox.cpp, .h

svn path=/trunk/boinc/; revision=24977
2012-01-02 16:58:11 +00:00
Rom Walton 945267b14e - VBOX: If VirtualBox reports an error snag both the hypervisor system
log as well as the VM execution log.  Maybe the hypervisor log
        will tell us what is up with the virtual floppy device.
    - VBOX: Don't retry commands that are expected to fail in normal use
        cases.  It slows down getting the VM up and running.
    - VBOX: After starting the VM, use a timed loop waiting for the initial
        VM state change instead of just waiting for 5 seconds.  Older
        machines can take longer than 5 seconds to switch from poweroff
        to starting.  If we hit the main poll loop in that state the wrapper
        thinks we have crashed.
    - VBOX: Strip carriage returns from all the vboxmanage output on
        Windows.
        
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24967
2012-01-02 04:30:42 +00:00
Rom Walton 0320e95637 - VBOX: Add ERR_CPU_VM_EXTENSIONS_DISABLED string to the error case where
the VM extensions for the CPU have been disabled via the BIOS.  This
        allows the core-client to parse the response and disable future
        request for multi-core VM jobs.
        
    samples/vboxwrapper/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24940
2011-12-30 05:02:37 +00:00
Rom Walton 6fd1fa0cdb Quick Updates
svn path=/trunk/boinc/; revision=24923
2011-12-28 04:25:11 +00:00
Rom Walton d2de5056eb - VBOX: For hosts who do not have processors with VM extensions try
and disable the use of them at VM creation time.  Certain actions
        within VirtualBox will force enabling them at runtime and cause
        an error (like SMP support) but it should reduce confusion between
        volunteers and projects when a VM configuration change now causes
        a class of machine that used to work suddenly stop working.
    - VBOX: Add some more helpful text notes for error conditions that
        the volunteer might be able to address.  For instance other
        hypervisors locking the VM CPU features for exclusive use.
    - VBOX: If we have to dump out the VM execution log on Windows, remove
        excess carriage returns from the spew.
        
    samples/vboxwrapper/
        vbox.cpp
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24907
2011-12-26 16:27:24 +00:00
Rom Walton 63607c070c - VBOX: If a host has been assigned a single-core job and the
processor doesn't support hardware acceleration for VMs,
        manually turn off the hardware acceleration support in the VMs
        configuration.
        
        NOTE: The latest server scheduler should not be assigning
        multi-core jobs to hosts that do not have hardware acceleration.

    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24905
2011-12-26 14:09:03 +00:00
David Anderson 4e50e4b852 - update_versions: support <needs_network> flag in version.xml
svn path=/trunk/boinc/; revision=24901
2011-12-26 06:03:50 +00:00
David Anderson 17e2cedefe - API/client/manager:
allow applications to supply a "web graphics URL",
    in which case the manager's "Show Graphics" button
    opens a browser at that URL.
    This typically would used for applications that
    implement a web server that serves pages showing
    job information in HTML.
- vboxwrapper: if <pf_guest_port> is specified in the config file,
    set up port forwarding to that port
    and use the above API call with URL "http://localhost:port"


svn path=/trunk/boinc/; revision=24898
2011-12-26 03:10:42 +00:00
Rom Walton 2e09c7d9a1 Quick Updates
svn path=/trunk/boinc/; revision=24897
2011-12-26 00:53:46 +00:00
Rom Walton 90db1ed0fd - VBOX: Disable hardware virtualization acceleration support by default. There
is a certain class of machines where the processor supports hardware
        acceleration but it is disabled in the computers BIOS.  Asking the volunteer
        to tweak settings in the computers BIOS isn't a good idea.  We might be able
        to turn it on as an advanced preference thing in the future.

    samples/vboxwrapper/
        vbox.cpp
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24896
2011-12-26 00:52:43 +00:00
Rom Walton 0f17e81554 - VBOX: For projects that use vboxwrapper to control how long a VM should run,
treat premature events as failures.  Avoids false positive results.
    - VBOX: Log the VM Execution log if a premature shutdown event has happened.
    - VBOX: Rename config option max_elapsed_time to job_duration.  Choosing
        max_elapsed_time turned out to be a bad choice in that its purpose
        became intermixed with the credit issue(s).

    samples/vboxwrapper/
        vbox.cpp,.h
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24894
2011-12-25 20:17:53 +00:00
Rom Walton 427688417b - VBOX: Richard Mitnick's VM didn't crash according to the latest build.
So what state did it enter?
        
    samples/vboxwrapper/
        vbox.cpp,.h

svn path=/trunk/boinc/; revision=24893
2011-12-25 14:49:21 +00:00
Rom Walton beb97b765f - VBOX: Extract and dump the VM log before attempting to delete the VM.
What was I thinking last night?
        
    samples/vboxwrapper/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24892
2011-12-25 14:18:19 +00:00
David Anderson 7f9fc64274 - vboxwrapper: for port-forwarding feature,
allow specification of guest port only.
    Change tag to <pf_guest_port>.
    Separate getting port from registering firewall rule


svn path=/trunk/boinc/; revision=24891
2011-12-25 13:18:51 +00:00
Rom Walton 2ddd89cef3 Quick Updates
svn path=/trunk/boinc/; revision=24890
2011-12-25 06:11:36 +00:00
Rom Walton b6a188c250 - VBOX: If an error occurs only log the error once if log_error is true.
samples/vboxwrapper/
        vbox.cpp, .h
    

svn path=/trunk/boinc/; revision=24889
2011-12-25 06:04:24 +00:00
Rom Walton da28282041 Quick Updates
svn path=/trunk/boinc/; revision=24888
2011-12-25 05:25:54 +00:00
Rom Walton 59f2739cc5 - VBOX: Remove attempts to remove the floppy image from the media registry.
Apparently when the VM is removed from the VirtualBox server process
        it automatically deletes the floppy image from the media registry.
    - VBOX: If a VM crashes for one reason or another, append the VM execution
        log file to the stderr.txt file.  I believe this is what is going on with
        Richard Mitnick's computer.  At the very least we should be able to give
        this to the VirtualBox guys.
    - VBOX: Introduce a way to re-execute commands when a session lock
        event is detected.  A session lock event happens when a volunteer is
        tweaking something about the VM while vboxwrapper is attempting to query
        state information.
        
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp, .h

svn path=/trunk/boinc/; revision=24887
2011-12-25 03:57:56 +00:00
Charlie Fenton 8bc68b6a85 VBOX: Fix "unused variable" warning
svn path=/trunk/boinc/; revision=24881
2011-12-24 00:18:25 +00:00
Rom Walton 96deec1f03 - VBOX: Rework the unique naming scheme for floppys and disk images so that the slot
id is appended after the name instead of after the extension. Avoid problems
        with the VirtualBox interface.
        
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp, .h

svn path=/trunk/boinc/; revision=24880
2011-12-23 20:14:42 +00:00
Rom Walton 15343f23ed Quick Updates
svn path=/trunk/boinc/; revision=24879
2011-12-23 19:50:52 +00:00
Rom Walton d8efeb76c0 - VBOX: handle the case where the volunteer has not installed BOINC in the sandboxed
environment and they suspend/resume the VM by the VirtualBox application.
        
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24878
2011-12-23 18:21:48 +00:00
Rom Walton 1524a7dd7d - VBOX: Append the slot number to the end of the floppy disk image name like we do
for virtual hard disks.
    - VBOX: Execute closemedium against the virtual floppy disks when the VM is being
        deleted.
        
    samples/vboxwrapper/
        vbox.cpp
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24877
2011-12-23 17:45:09 +00:00
Rom Walton 68568b400a - VBOX: Write the firewall rules once, after creation. If the job was suspended
and restarted it would null out the host port information.
    - VBOX: Try to make the CERN compatible datatype for FloppyIO more JSON friendly
        by following the advice of issue:
          https://github.com/stig/json-framework/issues/48
    - VBOX: Support both the old style and new style of determining assigned threads
        of execution (aka core counts).  6.12 and the early versions of 7.x support
        the old style.
        
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp, .h

svn path=/trunk/boinc/; revision=24876
2011-12-23 17:24:28 +00:00
Rom Walton 10781f7776 - VBOX: Remove code that was meant to force the CC to reschedule jobs. There was
a bug that was fixed last night which prevented the wrapper from properly
        reporting its checkpoint time to the CC.  The lack of checkpoint information
        for the job would have prevented the CC from rescheduling the job and removing
        it from memory.  Now it can so the extra shutdown each scheduling period
        should not be needed.
        
    samples/vboxwrapper/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24874
2011-12-22 23:30:03 +00:00
Rom Walton 9d14b4b425 - VBOX: Try a new approach to dealing with the Windows sandbox issue. Under Windows
VboxSVC.exe is normally launched by svchost.exe which only contains environment
        variables defined by the system.  In the BOINC sandbox environment we want to
        add VBOX_USER_HOME to redirect reading/writing configuration files to a
        different directory.  What happens if we launch it ahead of making any calls to
        VBoxManage which would cause the OS to launch it?  If we launch it, it should
        inherit our environment block and work just like it works on Linux and the Mac.
        
        This is such a simple solution, why didn't I think of it sooner?
        
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24873
2011-12-22 19:39:38 +00:00
Rom Walton f9aff67af3 Quick Updates
svn path=/trunk/boinc/; revision=24872
2011-12-22 14:31:02 +00:00
Rom Walton dd7c904e0e Quick Updates
svn path=/trunk/boinc/; revision=24871
2011-12-22 14:29:44 +00:00
Rom Walton 4337e5d091 Quick Updates
svn path=/trunk/boinc/; revision=24870
2011-12-22 14:27:12 +00:00
Rom Walton a0f0c30fd4 Quick Updates
svn path=/trunk/boinc/; revision=24869
2011-12-22 04:57:02 +00:00
Rom Walton 62d8ba1ed3 Quick Updates
svn path=/trunk/boinc/; revision=24868
2011-12-22 04:22:01 +00:00
Rom Walton 7cffd8be9a - VBOX: Add missing code for progress complete and check-pointing.
samples/vboxwrapper/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24867
2011-12-22 04:16:47 +00:00
Charlie Fenton b4b1c6b809 VBOX: Update XCode project for OS 10.7 and XCode 4.2.1
svn path=/trunk/boinc/; revision=24866
2011-12-22 03:55:32 +00:00
Rom Walton d016c1d56e Quick Updates
svn path=/trunk/boinc/; revision=24865
2011-12-22 03:35:43 +00:00
Rom Walton 9d47e0a87f Quick Updates
svn path=/trunk/boinc/; revision=24864
2011-12-22 03:34:09 +00:00
Rom Walton 1642299a73 - VBOX: It turns out that once you set the firewall rules, you cannot reset the
rules for a VM until the VM is in a powered off state.  I guess the VM will
        just have to fail starting up if it cannot allocate the assigned port.
        
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24863
2011-12-22 01:01:37 +00:00
Rom Walton 86d5915342 - VBOX: If vm.run() fails, it turns out the VM is parked in some kind of saved
state, deregistering the VM would fail all commands because the VM was not
        mutable.  The first thing we should do when deregistering is discard
        any saved state.
        
    samples/vboxwrapper/
        vbox.cpp
        

svn path=/trunk/boinc/; revision=24862
2011-12-22 00:15:06 +00:00
Rom Walton e73736a01a Quick Updates
svn path=/trunk/boinc/; revision=24861
2011-12-21 23:21:18 +00:00
Rom Walton 95ebc8f6da - VBOX: If vm.cleanup() can be called when a VM hasn't been fully initialized,
then all the deregister commands have to be optional. Go ahead and log errors
        to stderr but continue to run through the various commands anyway.

    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24860
2011-12-21 23:19:55 +00:00
Rom Walton 6948658af5 - VBOX: If vm.run() fails, call vm.cleanup() to unregister the VM before exiting
vboxwrapper.  Not doing so leaves the drive reference around and the VM in a
        saved state.  The next attempt to delete it from another instance of
        vboxwrapper fails with a complaint about the old unnamed vm(all files have
        been cleaned up by BOINC) being in an non-mutable state.

    samples/vboxwrapper/
        vbox.cpp
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24859
2011-12-21 22:57:44 +00:00
Rom Walton febac394aa - VBOX: Don't log all vbm_popen errors, we expect certain commands to fail when we
are looking at the existing state of the host.
    - VBOX: Reset the output buffer for every command execution.
    - VBOX: Remove the teleporting and snapshotting states from the list of running
        states.
    - VBOX: Remove the '--type floppy' typo when mounting the floppy disk image.
    
    samples/vboxwrapper/
        vbox.cpp, .h

svn path=/trunk/boinc/; revision=24858
2011-12-21 21:58:01 +00:00
Rom Walton 88ae2c43df - VBOX: Create the FloppyIO image via the FloppyIO constructor before attempting
to link the VM to it.
        
    samples/vboxwrapper/
        floppyio.cpp
        vbox.cpp

svn path=/trunk/boinc/; revision=24856
2011-12-21 14:24:50 +00:00
Rom Walton 34867cc6f8 - VBOX: Implement a basic mechanism for port forwarding through to the VM.
Some more work will be required if there is ever a need for more than
        one port.  But this should work for now.  This should successfully
        handle running multiple instances of the same job, port information is
        stored in a file called "vbox_firewall.txt" which is updated for each
        execution of the wrapper.
    
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp
    win_build/
        vboxwrapper.vcproj

svn path=/trunk/boinc/; revision=24843
2011-12-21 05:55:08 +00:00
Rom Walton 31aaf4bf85 Quick Updates
svn path=/trunk/boinc/; revision=24841
2011-12-21 00:08:36 +00:00
Rom Walton 7091523e91 Quick Updates
svn path=/trunk/boinc/; revision=24840
2011-12-21 00:07:03 +00:00
Rom Walton c5e98777ef Quick Updates
svn path=/trunk/boinc/; revision=24839
2011-12-21 00:01:38 +00:00
Rom Walton c6d97ca554 Quick Updates
svn path=/trunk/boinc/; revision=24838
2011-12-20 23:05:58 +00:00
Rom Walton 6c1dd9e555 - VBOX: Create a configuration item that specifies the maximum amount of
wall clock time a VM is allowed, if exceeded shutdown gracefully and tell
        BOINC that the job is finished.
        
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24837
2011-12-20 22:59:06 +00:00
Rom Walton 2b463218ed - VBOX: Implement CERN's FloppyIO IPC technology for the VirtualBox wrapper.
samples/vboxwrapper/
        floppyio.cpp, .h
        vbox.cpp, .h
        vboxwrapper.cpp
    win_build/
        vboxwrapper.vcproj

svn path=/trunk/boinc/; revision=24836
2011-12-20 22:12:07 +00:00
Rom Walton 36ef681e28 - VBOX: Use the same mechanism as the multi-threaded apps to determine desired CPU
count for the VM.  VM(s) can now be multi-core.

    samples/vboxwrapper/
        vboxwrapper.cpp
        vbox.cpp, .h

svn path=/trunk/boinc/; revision=24825
2011-12-19 19:10:24 +00:00
David Anderson c164349afc - vboxwrapper: if shared dir is specified and it doesn't exist on startup,
that's not necessarily an error.
    Try to create it.
    If it exists and is a file, show appropriate error message.


svn path=/trunk/boinc/; revision=24824
2011-12-19 19:00:19 +00:00
Rom Walton d121e6cbb6 - VBOX: Attempt to detect the condition where a Virtual HD image has already been
registered with VirtualBox during the RegisterVM phase.  If we detect the
        already exists error message run the unsupported internal command to reset
        the HD UUID which then allows us to attach the HD to the VM.  This should allow
        us to run multiple jobs with the same base VM HD image.

    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24822
2011-12-17 18:10:07 +00:00
David Anderson 4e95e690f8 - client: tweak parameters of file xfer backoff to
reduce backoff intervals somewhat
- vboxwrapper: fix buffer size typo (from Attila)
- scheduler: fix crash if using homogeneous app version,
    and a WU is committed to an old or deprecated app version.
    From Kevin Reed.


svn path=/trunk/boinc/; revision=24775
2011-12-12 22:07:37 +00:00
Rom Walton a635b075ef - VBOX: Add the ability for the wrapper to know if vboxmanage has hung or is stuck
in a loop.  If so, terminate the process and return an error to the calling
      function.
      
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24767
2011-12-09 16:30:13 +00:00
Rom Walton 4e54344742 Quick Updates
svn path=/trunk/boinc/; revision=24766
2011-12-09 16:17:51 +00:00
Rom Walton 7622cd57db Quick Updates
svn path=/trunk/boinc/; revision=24765
2011-12-09 16:16:56 +00:00
Rom Walton a1129b9b9c Quick Updates
svn path=/trunk/boinc/; revision=24764
2011-12-09 15:56:55 +00:00
Rom Walton e1b7db05e1 Quick Updates
svn path=/trunk/boinc/; revision=24763
2011-12-09 15:33:42 +00:00
Rom Walton 5dfa3ec5c7 - VBOX: Remove the guru meditation state, apparently that is when the vbox host
process for the vm crashes.
      
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24762
2011-12-09 15:13:56 +00:00
Rom Walton 17f11cc577 - VBOX: Remove unused function, I don't remember what I was going to use that
hook for.
      
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24761
2011-12-09 15:05:47 +00:00
Rom Walton 687195e7f0 Quick Updates
svn path=/trunk/boinc/; revision=24510
2011-11-03 02:35:04 +00:00
Rom Walton dbbd2a3ff9 - VBOX: Don't redirect VirtualBox to a different directory structure for
the root configuration file when the client is NOT in sandbox mode.
        Doing so could cause confusion if the volunteer uses VirtualBox for
        any of their own work.  If BOINC started up first it would have appeared
        that their own VM's no longer existed.
        
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24449
2011-10-21 16:34:45 +00:00
Rom Walton b7f4b13342 - vbox: Move the destination of the VBOX_USER_HOME environment variable to
<boinc_data_dir>/projects/virtualbox so that the virtualbox configuration
        can remain consistent across one or more projects.

    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24380
2011-10-11 20:01:32 +00:00
Rom Walton 654a187178 - VBOX: More environment variable tweaks.
samples/vboxwrapper/
        vbox.cpp, .h

svn path=/trunk/boinc/; revision=24259
2011-09-22 15:39:08 +00:00
Charlie Fenton 312fc10918 vboxwrapper: fix code which sets environment variables
svn path=/trunk/boinc/; revision=24258
2011-09-22 08:42:26 +00:00
David Anderson d8f20bceea - vboxwrapper: report network usage to the client
- client: include the above in enforcing network quota preferences


svn path=/trunk/boinc/; revision=24227
2011-09-16 19:16:12 +00:00
David Anderson 2bd5b194b2 - vboxwrapper: code cleanup
- use double for potentially large quantities
    - factor out repetitive code, rather than copy and paste


svn path=/trunk/boinc/; revision=24226
2011-09-16 17:25:36 +00:00
Rom Walton 7d9384075d Quick Updates
svn path=/trunk/boinc/; revision=24224
2011-09-15 23:05:43 +00:00
Rom Walton e27ee6f152 - VBOX: Add a way to track overall network utilization of a VM.
samples/vboxwrapper/
        vbox.cpp, .h

svn path=/trunk/boinc/; revision=24223
2011-09-15 23:04:10 +00:00
Charlie Fenton 9ea1f2156d vboxwrapper: update XCode project for easier access to built executables and symbol tables under XCode 4.1
svn path=/trunk/boinc/; revision=24221
2011-09-15 10:33:04 +00:00
Charlie Fenton 6314930e4f vboxwrapper: fix compiler warning
svn path=/trunk/boinc/; revision=24219
2011-09-15 09:02:05 +00:00
Rom Walton 3d9e3097ee Quick Updates
svn path=/trunk/boinc/; revision=24214
2011-09-14 23:33:11 +00:00
David Anderson f6cd51fe72 - vboxwrapper: we don't seem to be getting the VM PID.
Add some printfs.


svn path=/trunk/boinc/; revision=24211
2011-09-14 23:22:08 +00:00
Rom Walton 6a0d6088a3 Quick Updates
svn path=/trunk/boinc/; revision=24207
2011-09-14 21:02:42 +00:00
Rom Walton 6c0a8d9035 - VBOX: Add a register_only command line argument to help debug VM related issues.
- VBOX: Add some suggestions to the source on how to debug VM related issues.
    - VBOX: Add a quick sanity check when the enable_shared_directory option is
        enabled.

    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=24203
2011-09-14 04:16:00 +00:00
Rom Walton a2c40ce0b6 Quick Updates
svn path=/trunk/boinc/; revision=24202
2011-09-14 03:17:13 +00:00
Rom Walton 9c20f59c15 - VBOX: Increase the pipe buffer on Windows from the default to 128k. Despite what
the docs say, if the buffer isn't large enough VboxManage hangs attempting to
        write the VM log file to it.  Luckly the VM log file is only 64k.
    - VBOX: Fix a couple of parsing errors.
        
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24201
2011-09-14 03:15:17 +00:00
Rom Walton 62ef962134 Quick Updates
svn path=/trunk/boinc/; revision=24200
2011-09-14 01:19:35 +00:00
Rom Walton 6ebadb3085 Quick Updates
svn path=/trunk/boinc/; revision=24199
2011-09-14 01:11:31 +00:00
Rom Walton cc5da892c7 Quick Updates
svn path=/trunk/boinc/; revision=24198
2011-09-14 00:51:06 +00:00
Rom Walton cedd8dfbd1 Quick Updates
svn path=/trunk/boinc/; revision=24197
2011-09-14 00:41:13 +00:00
Rom Walton fafb8a9bbf Quick Updates
svn path=/trunk/boinc/; revision=24196
2011-09-14 00:30:42 +00:00
Rom Walton 54c27ff947 Quick Updates
svn path=/trunk/boinc/; revision=24195
2011-09-14 00:20:17 +00:00
Rom Walton c94af43ea3 Quick Updates
svn path=/trunk/boinc/; revision=24194
2011-09-14 00:15:25 +00:00
Rom Walton d9de7596e6 Quick Updates
svn path=/trunk/boinc/; revision=24193
2011-09-13 23:59:19 +00:00
Rom Walton 4dcb0a5859 Quick Updates
svn path=/trunk/boinc/; revision=24192
2011-09-13 23:58:18 +00:00
Rom Walton 0dd791ad69 Quick Updates
svn path=/trunk/boinc/; revision=24190
2011-09-13 23:41:32 +00:00
Rom Walton 65fb6c7e0e Quick Updates
svn path=/trunk/boinc/; revision=24189
2011-09-13 23:38:56 +00:00
Rom Walton c2f1855be3 - VBOX: Make is_running() a bit smarter about detecting the running state
of a virtual machine.
        
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24187
2011-09-13 22:52:28 +00:00
Rom Walton 8ce3da18ce Quick Updates
svn path=/trunk/boinc/; revision=24186
2011-09-13 22:04:49 +00:00
Rom Walton 8f3249720f - VBOX: Don't attempt to stop a VM that is already shut down.
samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24185
2011-09-13 21:49:42 +00:00
Rom Walton 98efec4538 - VBOX: Properly trap stderr output from vboxmanage by redirecting it to
stdout.  Error messages should now be properly detected on Linux and
        Mac.
        
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24184
2011-09-13 21:43:58 +00:00
Rom Walton 26fdc9b1f7 Quick Updates
svn path=/trunk/boinc/; revision=24181
2011-09-13 20:59:01 +00:00
Rom Walton 0ebb45cc14 Quick Updates
svn path=/trunk/boinc/; revision=24180
2011-09-13 19:48:32 +00:00
Rom Walton 273327044b - VBOX: Add more trace messages to the wrapper to help resolve
issues.
        
    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24179
2011-09-13 19:43:52 +00:00
David Anderson 4e946854c1 - client/API/vboxwrapper:
add a mechanism so that apps can report sub-processes
    that are not descendants (e.g., virtual machines)
    These processes are then counted as part of the app,
    not as "non-BOINC CPU time".
    This fixes a bug where processing was incorrectly suspended
    because CPU usage by VM apps exceeded the "CPU usage limit" pref.

    Implementation:
    - the PIDs of the processes in question
        are passed from app to client via shared-memory,
        in the app_status channel.
        A new variant of boinc_report_app_status() supports this.
    - the VBox wrapper queries the PID of the VM,
        and reports it in this way.
    - procinfo_app() includes a new argument: a list of PIDs
        that are part of the app, although not ancestrally
        related to the main process.
    - in the client, ACTIVE_TASK now includes a vector "other_pids".
        If this is nonempty, it's passed to procinfo_app().


svn path=/trunk/boinc/; revision=24123
2011-09-02 20:47:05 +00:00
Rom Walton a6de614071 - VboxWrapper: Add a way to extract the VM process id from the VM's
log file.
        
    samples/vboxwrapper/
        vbox.cpp, .h

svn path=/trunk/boinc/; revision=24112
2011-09-02 00:19:05 +00:00
Rom Walton 60b4546c75 - VboxWrapper: Specify a configuration directory under the slot directory to
try and avoid permission errors on multiple platforms when BOINC
        is installed as a daemon.

    samples/vboxwrapper/
        vbox.cpp

svn path=/trunk/boinc/; revision=24100
2011-08-31 22:51:33 +00:00
Charlie Fenton a761294166 Vbox wrapper: create XCode project
svn path=/trunk/boinc/; revision=24089
2011-08-31 03:04:15 +00:00
David Anderson 8b409fffa2 svn path=/trunk/boinc/; revision=24087 2011-08-30 21:51:28 +00:00
David Anderson aa4ba885e9 - vbox wrapper: check for boinc_status.reread_init_data_file,
and if set reread the file, set throttles, and clear flag


svn path=/trunk/boinc/; revision=24086
2011-08-30 21:50:08 +00:00
Charlie Fenton 7975f0b6ed Vbox wrapper: create XCode project
svn path=/trunk/boinc/; revision=24075
2011-08-30 12:42:23 +00:00
David Anderson 3d9b1fa6ae - Vbox wrapper: deal with checkpointing.
Current: wrapper reports frequent checkpointing to client,
        but actually checkpoints only when the VM is stopped
    Problem: large amounts of work would be wasted if
        BOINC stops in an ungraceful way (e.g., power failure)
    Solution:
        Don't report frequent checkpointing.
        Every CPU scheduling period (typically once/hour)
        stop the VM (creating a checkpoint)
        and call boinc_temporary_exit(0).
        If the client wants to keep running this job,
        it will start us immediately.


svn path=/trunk/boinc/; revision=24068
2011-08-29 20:31:55 +00:00
David Anderson 1eed0db2ec - VirtualBox wrapper:
- change names of CPU and network-limiting functions
        to express their units (always do this).
    - wrapper monitors status.suspend_network
        and suspends/resumes network accordingly
    - wrapper sets CPU and network bandwidth limits on startup
        (Rom: should this be done before run() rather than after?)
Note: App versions using this wrapper should always have
    <dont_throttle/> in their version.xml,
    to tell the client that the app throttles itself.


svn path=/trunk/boinc/; revision=24054
2011-08-27 04:13:50 +00:00
Rom Walton 49b9c1bb64 - VboxWrapper: Add functions for enable/disable network and throttling
the CPU and network activity.

    samples/vboxwrapper/
        vbox.cpp, .h

svn path=/trunk/boinc/; revision=24051
2011-08-26 19:19:28 +00:00
David Anderson 8fda6c0497 - Vbox wrapper: add --trickle x option; sends a trickle-up message
reporting incremental runtime exery x seconds of runtime.
- client: more XML parsing cleanup
- credit trickle handler: do sanity checks on CPU speed


svn path=/trunk/boinc/; revision=24017
2011-08-21 11:18:08 +00:00
Daniel Lombraña González 6d104573c6 Fixed performance in Windows.
Additionally, the VM can be throttled by parsing in the wrapper the <max_vm_cpu_pct> specific project preference.

svn path=/trunk/boinc/; revision=23976
2011-08-10 12:48:29 +00:00
Rom Walton d91ddfae0f - vbox wrapper: initialize xml parser with the correct starting tag.
samples/vboxwrapper/
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=23934
2011-08-04 16:34:03 +00:00
Rom Walton 7c14104e20 Quick Updates
svn path=/trunk/boinc/; revision=23931
2011-08-04 01:06:58 +00:00
David Anderson 306f42e7bc - vbox wrapper: hardwire logical name of image file to "vm_image.vdi".
- vbox wrapper: on startup, rename image file to "vm_image_SLOT.vdi",
    where SLOT is the slot number.
    Vbox requires unique names for VM image files.


svn path=/trunk/boinc/; revision=23930
2011-08-04 00:24:42 +00:00
Rom Walton 4e2968f71f match spec
svn path=/trunk/boinc/; revision=23929
2011-08-03 23:12:36 +00:00
David Anderson 241e6eaf35 - vbox wrapper: fix parsing of job file
- vbox wrapper: fix code structure
    - merge vm and vbox
    - no global vars


svn path=/trunk/boinc/; revision=23928
2011-08-03 22:36:29 +00:00
Rom Walton 13930f65c3 Quick Updates
svn path=/trunk/boinc/; revision=23926
2011-08-03 21:02:58 +00:00
Daniel Lombraña González 5210798d61 VBoxManage unregistervm works with version 4.1.
The new VirtualBox 4.1 supports VBoxManage unregisterVM in all the platforms. There was a bug that didn't allow to run that
command to remove the VM, affecting only Windows 64 bits, but this new version has fixed it.

svn path=/trunk/boinc/; revision=23883
2011-07-27 08:39:58 +00:00
Daniel Lombraña González fcd9a94810 Suspend mode enabled again.
The removed suspend code has been added again.


svn path=/trunk/boinc/; revision=23741
2011-06-17 07:37:50 +00:00
Rom Walton c1e447560f make vboxwrapper.cpp compile again
svn path=/trunk/boinc/; revision=23730
2011-06-15 23:44:03 +00:00
David Anderson 94e8c48220 - client: change --detach_phase_two (??) to --detach_console
- eliminate compiler warnings (e.g. shadowed vars)
    in various places, mostly in client


svn path=/trunk/boinc/; revision=23710
2011-06-12 20:58:43 +00:00
Daniel Lombraña González 4ea940aecf VM CPU throttling enabled.
VM CPU time is changed according to BOINC preferences.


svn path=/trunk/boinc/; revision=23683
2011-06-08 12:24:12 +00:00
Daniel Lombraña González 4d74982131 Flush ProgressFile updates added.
This new feature prevents from losing progress data from an unexpected reboot.


svn path=/trunk/boinc/; revision=23642
2011-06-06 10:55:01 +00:00
Daniel Lombraña González a2135d4cfb Empty error buffers in Windows pause the wrapper.
The empty buffers have been removed. This only happens on Windows machines.

svn path=/trunk/boinc/; revision=23534
2011-05-13 10:01:31 +00:00
Daniel Lombraña González 12559ef91e New measures to released virtual hard disks.
svn path=/trunk/boinc/; revision=23533
2011-05-13 08:39:33 +00:00
Daniel Lombraña González b67f9b6e4f Fixed the running CPU time report in Windows.
svn path=/trunk/boinc/; revision=23530
2011-05-12 12:52:15 +00:00
Rom Walton 2ea990b9a1 Quick Updates
svn path=/trunk/boinc/; revision=23521
2011-05-10 16:39:55 +00:00
David Anderson 318b40b368 - vbox wrapper: updates
svn path=/trunk/boinc/; revision=23520
2011-05-10 16:30:00 +00:00
Daniel Lombraña González b41590f9ef Fixed elapsed time and added critical sections.
svn path=/trunk/boinc/; revision=23518
2011-05-10 10:50:03 +00:00
Rom Walton 9958851129 - VBOX: Implement basic cpu time accounting and checkpointing
for VMs.

    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp
        vm.cpp, .h

svn path=/trunk/boinc/; revision=23517
2011-05-09 21:11:37 +00:00
Rom Walton 28c5b0a6d1 - VBOX: Switch to using CreateProcess and CreatePipe on Windows, otherwise we
get a bunch of flicking windows when we preform and operation against
        VirtualBox.
        
    samples/vboxwrapper/
        vbox.cpp,

svn path=/trunk/boinc/; revision=23501
2011-05-04 20:54:50 +00:00
Rom Walton 2db7322d3f Quick Updates
svn path=/trunk/boinc/; revision=23500
2011-05-04 17:17:43 +00:00
Rom Walton aa0dffdf05 - VBOX: Add function for a host being able to execute tasks within
guest VMs.
        
    samples/vboxwrapper/
        vbox.cpp, .h
        vm.cpp, .h

svn path=/trunk/boinc/; revision=23499
2011-05-04 16:00:12 +00:00
David Anderson f45681c48b - vbox wrapper: add Makefile
- notices: fix bug where the URL in "friend request" notices
    doesn't work if you're not already logged in.


svn path=/trunk/boinc/; revision=23498
2011-05-04 15:37:09 +00:00
Rom Walton a32054a434 - VBOX: Handle both abort scenarios
samples/vboxwrapper/
        vbox.cpp, .h
        vm.cpp, .h

svn path=/trunk/boinc/; revision=23493
2011-05-03 17:52:55 +00:00
Rom Walton 602f972292 - VBOX: Checkpoint, Re-implement the registering and un-registering of the
vm using the vboxmanage app.

    samples/vboxwrapper/
        vbox.cpp, .h
        vm.cpp, .h

svn path=/trunk/boinc/; revision=23485
2011-04-30 00:26:05 +00:00
Rom Walton f8c1049335 - VBOX: Checkpoint, Re-implement the start/stop/suspend/resume/is_running
and is_registered functions using the vboxmanage app.
    - VBOX: Simplify the virtualbox_vbm_popen function and remove a buffer
        copy operation.

    samples/vboxwrapper/
        vbox.cpp, .h

svn path=/trunk/boinc/; revision=23483
2011-04-29 17:15:34 +00:00
Rom Walton a285dfd44b - VBOX: Begin merging the two different vbox wrappers (COM vs. Daniel's from
CERN).  Where possible stick with the POSIX API set and remove Windows
        specific code. (Example vbm_popen).
        
      NOTE: Not usable at the moment.
      
    samples/vboxwrapper/cernvm
        cernvmwrapper.cpp
    samples/vboxwrapper/
        vbox.cpp, .h
        vboxwrapper.cpp
    samples/vboxwrapper/
        vm.cpp, .h
    win_build/
        vboxwrapper.vcproj

svn path=/trunk/boinc/; revision=23458
2011-04-26 17:41:10 +00:00
Rom Walton c4e8e186c1 Quick Updates
svn path=/trunk/boinc/; revision=23454
2011-04-26 15:30:19 +00:00
Rom Walton 4b543f8d32 svn path=/trunk/boinc/; revision=23453 2011-04-26 15:28:48 +00:00
Rom Walton 4f7e4e90bd svn path=/trunk/boinc/; revision=23452 2011-04-26 15:28:21 +00:00
Rom Walton 6ce8facb09 svn path=/trunk/boinc/; revision=23451 2011-04-26 15:27:25 +00:00
Rom Walton c66c35e500 svn path=/trunk/boinc/; revision=23450 2011-04-26 15:27:01 +00:00
Rom Walton e33d410176 svn path=/trunk/boinc/; revision=23449 2011-04-26 15:26:35 +00:00
Rom Walton 45a8418b36 svn path=/trunk/boinc/; revision=23448 2011-04-26 15:26:10 +00:00
Rom Walton b4d0aff42a svn path=/trunk/boinc/; revision=23446 2011-04-26 15:25:17 +00:00
Rom Walton e9f144ae18 Quick Updates
svn path=/trunk/boinc/; revision=23444
2011-04-26 15:20:54 +00:00
Rom Walton d6749af703 Quick Updates
svn path=/trunk/boinc/; revision=23248
2011-03-23 03:02:09 +00:00
Rom Walton 57d7883c35 Quick Updates
svn path=/trunk/boinc/; revision=23247
2011-03-23 03:01:18 +00:00
Rom Walton 3622966641 - VBox: Checkpoint for Windows
* Creates/registers virtual machine
        * Starts/Stops virtual machine
        * Suspends/Resumes virtual machine
        * Deletes/deregisters virtual machine
      
      TODO:
        * Fraction done properly
        * Standard error streams from virtualized applications
        * Find a way to hide the VBoxHeadless application window (It can be minimized manually)

    samples/vboxwrapper/
        vbox.cpp, .h
        vbox_win.cpp
        vboxwrapper.cpp
        vm.cpp, .h

svn path=/trunk/boinc/; revision=23246
2011-03-23 02:43:28 +00:00
Rom Walton 0ea0fd6037 - VBOX: Implement stubs for starting/stopping/suspending/resuming VMs
TODO: create/delete.
        
    samples/vboxwrapper/
        vbox.cpp, .h
        vbox_win.cpp
        vboxwrapper.cpp
        vm.cpp, .h
    win_build/
        vboxwrapper.vcproj

svn path=/trunk/boinc/; revision=22833
2010-12-08 16:02:10 +00:00
Rom Walton 3fa1f8d94d Quick Updates
svn path=/trunk/boinc/; revision=22783
2010-12-01 16:06:31 +00:00
David Anderson 55eca25ed5 - Rappture stuff
svn path=/trunk/boinc/; revision=22777
2010-11-30 05:27:05 +00:00
Rom Walton 36c95249bf - vboxwrapper: Remove unneeded cruft. Vbox can report how long a
VM has been running since the last state change, we'll use that
        instead.
    - vboxwrapper: provide basic stub functions for starting/stopping/
        suspending/resuming a VM.  Leave wrapper functionality in
        vboxwrapper, and VM specific functionality in vbox_*.  Ideally
        only the stub functions would have to change for other VM
        implementations.
        
    samples/vboxwrapper/
        vbox.cpp, .h
        vbox_win.cpp
        vboxwrapper.cpp
    win_build/
        vboxwrapper.vcproj

svn path=/trunk/boinc/; revision=22753
2010-11-29 16:48:31 +00:00
Rom Walton 650ede61c5 - vbox: Create a new VirtualBox wrapper using the VirtualBox COM
API set.  Use the existing wrapper as the baseline.  Current
        wrapper just dumps the existing VMs defined on the machine.
        More to follow.
        
    samples/vboxwrapper/mscom/
        VirtualBox.h
        VirtualBox.tlb
        VirtualBox_i.c
    samples/vboxwrapper/
        vbox.h
        vbox_win.cpp
        vboxwrapper.cpp
    win_build/
        boinc.sln
        vboxwrapper.vcproj

svn path=/trunk/boinc/; revision=22745
2010-11-24 20:15:11 +00:00