Commit Graph

302 Commits

Author SHA1 Message Date
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