Commit Graph

107 Commits

Author SHA1 Message Date
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
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 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 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 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 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
Rom Walton 9d47e0a87f Quick Updates
svn path=/trunk/boinc/; revision=24864
2011-12-22 03:34:09 +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 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 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
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 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
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
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 c94af43ea3 Quick Updates
svn path=/trunk/boinc/; revision=24194
2011-09-14 00:15:25 +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
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
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
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
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
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
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
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
Rom Walton 2ea990b9a1 Quick Updates
svn path=/trunk/boinc/; revision=23521
2011-05-10 16:39:55 +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 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 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 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