Commit Graph

367 Commits

Author SHA1 Message Date
Rom Walton 4dda6f53e1 VBOX: Start success is when both vm_pid and vm_pid_handle are non-zero values. 2014-01-23 07:30:16 -05:00
Rom Walton 4115e9a454 VBOX: Only look for the VM pid if no error code was returned from vbm_popen(). 2014-01-22 19:55:14 -05:00
Rom Walton 52258d9359 VBOX: Bring back the method of using vboxmanage to launch the VM.
We are getting some funky results launching the VM directly and the next update window for RNAWorld is this Friday.  So using the old method for that release is the right thing to do.
2014-01-22 19:52:26 -05:00
Rom Walton b8b768fbf6 VBOX: Vboxsvc doesn't return error codes in the same format as vboxmanage. Special case vboxsvc error code RPC_S_SERVER_UNAVAILABLE. 2014-01-22 16:33:21 -05:00
Rom Walton f3f9a19d23 VBOX: Do not retry the closemedium commands when unregistering stale VMs. VirtualBox has probably deleted the files. This is kept around for older versions of VirtualBox. 2014-01-22 16:12:38 -05:00
Rom Walton d32dfbb63d VBOX: Make the guest log feature function correctly with less than 16k worth of output. 2014-01-22 15:21:58 -05:00
Rom Walton b9e2af9c14 VBOX: It is also useful to know whether commands had to be retried after a timeout 2014-01-22 14:38:42 -05:00
Rom Walton 6cfdbf88f1 VBOX: Introducing the replay and trace logs for vboxwrapper.
The replay log stores the commands that were executed in a near shell script state.  Ideally we should be able to use this to pass bugs back upstream to VirtualBox.

The trace log shows the date, time, thread id, command, return value, and output of the above commands.
2014-01-22 14:34:20 -05:00
Rom Walton 5778cd653f VBOX: Unify the code that strips the carriage returns from various output of VirtualBox commands 2014-01-22 11:52:06 -05:00
Rom Walton a09e6f145b VBOX: Only consider launch_vboxvm() a success if the VM process is still running after our read output buffer loop 2014-01-22 11:32:06 -05:00
Rom Walton 5f2fbe9dfc VBOX: Fortify the launch_vboxvm() function and print out any error information if virtualbox/vboxheadless fails wthin the first second of execution.
VBOX: Rework the delete stale snapshot mechanism to avoid the 'multiple child hard drive' errors.
VBOX: Treat the RPC_S_SERVER_UNAVAILABLE error when restoring the current snapshot as unrecoverable (vboxsvc has crashed) and exit without attempting to cleaning up. Other VMs running and being monitored by BOINC will crash as well.
2014-01-22 10:44:38 -05:00
Rom Walton d189767b0e VBOX: Fix the guest log parser 2014-01-21 11:29:13 -05:00
David Anderson 04327eb7e7 vboxwrapper: fix VM-launch code for UNIX 2014-01-20 23:34:35 -08:00
Rom Walton 8c0139937c VBOX: Fix another formatting issue 2014-01-21 00:47:10 -05:00
Rom Walton ce48f695f4 VBOX: Fix format issue 2014-01-21 00:26:25 -05:00
Rom Walton 87f6f0c2ea VBOX: Change how we launch the VirtualBox VM process. Directly execute virtualbox.exe or vboxheadless.exe depending on configuration. 2014-01-21 00:18:56 -05:00
Rom Walton 0bd9e49f87 Revert "VBOX: Remove unneeded function"
This reverts commit 52f7103e82.
2014-01-20 16:32:35 -05:00
Rom Walton 52f7103e82 VBOX: Remove unneeded function 2014-01-20 16:06:36 -05:00
Rom Walton b6b0d6224d VBOX: Detect vboxsvc's process id by using the PROC_INFO facilities in libboinc. Depending on how long vboxsvc has been running, it may not list the process id if the log has been cycled. 2014-01-20 14:51:17 -05:00
Rom Walton b99a504d45 VBOX: Fix comment 2014-01-20 14:16:23 -05:00
Rom Walton c977364f51 VBOX: Formatting fix 2014-01-20 14:14:52 -05:00
Rom Walton e0b0b58149 VBOX: Add missing feature that allows the volunteer to run VirtualBox in headfull mode when not running as a service. 2014-01-20 14:13:32 -05:00
Rom Walton 9ad318d0bd VBOX: Remove extra line feed. 2014-01-16 23:34:31 -05:00
Rom Walton b8db18d5ee VBOX: Dump the guest log on completion. It may contain useful information whether the VM completed successfully or not. 2014-01-16 23:32:42 -05:00
Rom Walton be4c61140e VBOX: Treat ERR_TIMEOUT in is_registered() as an explicit case and do not log additional error output. 2014-01-16 12:32:38 -05:00
Rom Walton d93d565b2f VBOX: Gracefully handle the ERR_TIMEOUT error when attempting to detect the VM. is_registered() is no longer a bool where a ERR_TIMEOUT is treated as a false by default. Reschedule the job to be re-run in 5 minutes. 2014-01-16 11:54:06 -05:00
Rom Walton 2bef903f90 VBOX: When extracting the tail end of logs, only grab the last 8k of the RAW data before fixing it up instead of the whole thing. Fixes a CPU util issue. 2014-01-15 23:14:51 -05:00
Rom Walton 1bb1c517bc VBOX: Choose a reasonable default VM state for when vboxwrapper starts to monitor the VM state changes. 2014-01-15 16:24:30 -05:00
Rom Walton 493f49eeca VBOX: Restore code that was prematurely removed. I need to remove it when I start manually launching vboxheadless.exe/virtualbox.exe. 2014-01-15 15:17:44 -05:00
Rom Walton 13442e2fe1 VBOX: Remove unneeded error message from the log. 2014-01-15 14:48:05 -05:00
Rom Walton 68b01e4101 VBOX: Only print the process priority messages if we actually tweak them. 2014-01-15 14:27:44 -05:00
Rom Walton 5e4743b086 VBOX: Give a visual indication when we tweak the VM process priority for one reason or another. 2014-01-15 14:24:50 -05:00
Rom Walton 6466368c17 VBOX: Revise the get_vm_process_id() function to use the get_vm_log() function instead of vboxmanage.exe. 2014-01-15 14:11:37 -05:00
Rom Walton 35a71524e6 VBOX: Read the VM log file directly instead of relying on vboxmanage.exe to read the log file. Vboxmanage.exe can take awhile to establish a connection to vboxsvc.exe when the machine is under load. 2014-01-15 13:55:38 -05:00
Rom Walton 64f4b80700 VBOX: If we fail to successfully restore from snapshot, end the currently executing vbox job.
A temp exit will just leave the VM in an inconsistent state and we do not know what the checkpoint and drive configuration will be the next time the VM is successfully started.
2014-01-15 13:36:45 -05:00
Rom Walton e937368db7 VBOX: Check for the error condition in is_registered() before the success condition. 2014-01-15 13:25:53 -05:00
Rom Walton 932cdbf84f VBOX: When checking to see if a VM is registered, take into account the return value of vboxmanage. 2014-01-15 12:59:27 -05:00
Rom Walton 652107692d VBOX: Fix the message prefix for some of the newly created log messages. 2013-12-16 16:27:55 -05:00
Rom Walton 27d3762f7f VBOX: If neither of the two cases we expect to see when we look to see if the VM is registered exists, we should dump out the input, output, and return value of vboxmanage. 2013-12-16 13:22:10 -05:00
Rom Walton 78e0641598 VBOX: Add text descriptions for the VM states we know about. Previously we only logged unknown states. 2013-12-16 12:54:37 -05:00
Rom Walton 31f0b89e55 VBOX: If we fail to successfully launch the VM, log out the VM state that VboxSvc believes it is before exiting entirely. 2013-12-16 12:49:09 -05:00
Rom Walton a90215ab50 VBOX: Attempt to prevent out of control checkpointing by temporarily exiting the task and letting BOINC clean-up the environment. When BOINC restarts the task it should be able to restore from a previously good snapshot and resume execution. 2013-12-16 12:44:05 -05:00
Rom Walton b85054c78e VBOX: Change the VM CPU extension error back to ERR_EXEC, it was changed to ERR_TIMEOUT after the previous update. 2013-12-16 12:32:12 -05:00
Rom Walton a54597d91d VBOX: Spelling police. 2013-12-12 16:14:16 -05:00
Rom Walton 87e2bf135d VBOX: Add a wait loop to the stop()/poweroff() functions that wait for the desired VM state change before leaving the function. 2013-12-12 14:48:29 -05:00
Rom Walton f3b2e977ef VBOX: If another hypervisor locks the CPU Acceleration extensions, temp delay for a day instead of aborting the task. 2013-12-12 11:14:26 -05:00
Rom Walton a01aec4ffb VBOX: Increase the task reschedule interval for communication failures from 5 minutes to 1 day. 2013-12-12 11:03:52 -05:00
Rom Walton 5ee889071d VBOX: Add explicit log entries for reasons why is_system_ready() returned false instead of just bubbling up the message to the BOINC Manager. 2013-12-12 10:57:52 -05:00
Rom Walton 0994a59c93 VBOX: Remove previous commit, it wasn't going to work as intended. 2013-12-12 10:50:55 -05:00
Rom Walton 3bbac4ed94 VBOX: Wait for up to 5 minutes for restoring from checkpoint to complete before continuing on. 2013-12-12 10:45:51 -05:00