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.
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
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
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
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
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
- 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
- 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
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
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
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
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
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
- 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
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
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
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
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
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
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
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
<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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
environment and they suspend/resume the VM by the VirtualBox application.
samples/vboxwrapper/
vbox.cpp, .h
vboxwrapper.cpp
svn path=/trunk/boinc/; revision=24878
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
<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
- 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
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
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
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
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
- 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
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
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
- 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
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
get a bunch of flicking windows when we preform and operation against
VirtualBox.
samples/vboxwrapper/
vbox.cpp,
svn path=/trunk/boinc/; revision=23501
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
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
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
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