Commit Graph

663 Commits

Author SHA1 Message Date
Vitalii Koshura 7b3a683f68
Merge pull request #3168 from BOINC/cb_fix_small_issues
Quality: fix small issues
2019-06-27 15:32:02 +02:00
Adam Radocz ea00ec75e3
Merge pull request #3181 from BOINC/dpa_vboxwrapper
vboxwrapper: if control op fails, exit for 5 min instead of 1 day
2019-06-20 20:25:04 +02:00
Kevin Reed 58b44085f1
Merge pull request #3141 from BOINC/dpa_vbox60
update vboxwrapper (COM version) for Vbox 6.0
2019-06-20 11:55:12 -05:00
David Anderson 3271148607 vboxwrapper: fix shadowed-var compile warnings.
No need to pass a member variable to a member function.

Also: fix confused variable names: "current_cpu_time" is just this episode.
"total_cpu_time" is total since start of job.

Also: fix code formatting.
2019-06-09 23:19:48 -07:00
David Anderson 0dadd51733 vboxwrapper: if control operation (suspend, resume, snapshot) fails,
restart after 5 minutes rather than 1 day.
Also fix message to say what operation failed.
2019-06-09 23:00:46 -07:00
Christian Beer 24c307a1c4 Vboxwrapper: initialize class members
found by Coverity (CIDs 278299 34531)
2019-05-28 21:21:13 +02:00
Christian Beer 7cfd7296f8 Vboxwrapper: ignore coverity defect
The function vbm_popen() already logs an error in those cases and it is non critical.
2019-05-28 21:05:37 +02:00
David Anderson 97ab812169 Add COM interface for VBox 6.0.
This was complicated by the fact that VBox changed the API a little:
GetChildrenCount() is now get_ChildrenCount(),
and CreateSharedFolder() takes a new AutoMountPoint argument
(where the folder goes in the guest system) which I'm assuming should be /.

I handled these using #ifdefs in vbox_mscom_impl.cpp.
2019-05-10 01:42:00 -07:00
Rytis Slatkevičius eb829b65d9
Typo fix in vbox_common.cpp
Just a typo in one word
2019-05-07 10:26:48 +03:00
Juha Sointusalo 3fd0e8b116 update copyright year 2019-04-08 21:50:03 +03:00
David Anderson c1bdf2b673 Remove VS2010 compiler warnings. A few remain. 2018-08-02 12:18:15 -07:00
Vitalii Koshura 44164f3cc0
Fix copyright symbol
This fxes #2493

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-04-30 23:29:15 +03:00
Vitalii Koshura a9d5b8ef1a
Fix copyright year
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-02-26 16:49:02 +02:00
Rom Walton 190fa4133d
Merge pull request #1946 from nikolasgianna/prod_version
Modifications that have been included in the version that is currently used by LHC@home.
2017-11-06 07:25:21 -08:00
nikolasgianna 841e4f2b90 Implementation of changes requested 2017-11-06 14:59:59 +01:00
Rom Walton 5f05650952 Vboxwrapper: Update COM Interface file to the released version of 5.2.0 2017-10-28 21:39:58 -07:00
Rom Walton 805a3374b3 Vboxwrapper: Fix issue with not being able to create a Vbox 5.2 COM instance to vboxsvc
Also update VS2013 project file.
2017-10-08 09:53:37 -07:00
Rom Walton aaf6499f54 Vboxwrapper: Add support for VirtualBox 5.2 via the published COM Interface 2017-10-07 11:36:10 -07:00
nikolasgianna 2cc8aa1715 Declare state variable within respective function 2017-09-28 09:22:39 +02:00
nikolasgianna 3e9b731f17 Update online and saving in stop() and poweroff(), fix CamelCase 2017-09-27 10:45:49 +02:00
nikolasgianna 1c582cc35b Merge branch 'prod_version' of https://github.com/nikolasgianna/boinc into prod_version 2017-09-26 13:55:50 +02:00
nikolasgianna e8777ff60b Transform state from vm log to lowercase and fix never reached if 2017-09-26 13:53:35 +02:00
nikolasgianna 79c0e75f0c fix indentation, pointers, sscanf, get_vm_process_id, dump_vmguestlog_entries 2017-06-21 16:22:46 +02:00
nikolasgianna ef759ed7f1 fix _VBOX_COMMON_H_ 2017-06-21 15:26:09 +02:00
nikolasgianna 19f3823902 Update vbox_vboxmanage.cpp 2017-06-21 15:03:43 +02:00
nikolasgianna 8ac79a370c Merge branch 'master' into prod_version 2017-06-21 14:53:48 +02:00
nikolasgianna 9d8abbb5f0 fix indentation, pointers, sscanf, get_vm_process_id, dump_vmguestlog_entries 2017-06-21 14:24:01 +02:00
nikolasgianna 945035d3f1 version and error displaying improvements 2017-06-20 17:18:07 +02:00
Rom Walton 9d1972aba6 Merge pull request #1860 from nikolasgianna/COM_OFF
Give choice between COM and VboxManage interface
2017-06-20 06:46:15 -07:00
nikolasgianna 906481fb64 modifications that have been included in the version that is currently
used by LHC@home

modifications that have been included in the version that is currently used from LHC@home

fix compatibility issue caused by C++98 compiler used by travis
2017-06-20 13:25:04 +02:00
nikolasgianna 8fe5b5fe0f Since the machine is going to be deleted as a whole
there is no real reason to delete it piece by piece
first. VirtualBox takes care of deleting everything.
Mentioning something that is already deleted results in
unexpected behavior (ghost mediums)

remove ghost mediums from the media registry

deleted comments and commands
2017-06-20 08:39:33 +02:00
Vitalii Koshura 78613e4326
vboxwrapper: Remove unused variables
From PVS Studio:
V808
'vm_machine_uuid' object of 'CComBSTR' type was created but was not utilized.
'clean_mediums' object of 'vector' type was created but was not utilized.
https://www.viva64.com/en/w/V808/print

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2017-04-30 08:59:49 +03:00
nikolasgianna 2b4605c5cb Fix indentation 2017-04-18 09:58:21 +02:00
nikolasgianna 2420c31902 Give choice between COM and VboxManage interface 2017-04-10 10:50:42 +02:00
David Anderson 13a5b9bf3e change multiple-inclusion guard names to BOINC_FILENAME_H 2017-04-07 23:54:49 -07:00
Vitalii Koshura f8d7c1742d
vboxwrapper: Fix double check of the same flag.
From PVS Studio:
V501:
'There are identical sub-expressions 'enable_isocontextualization' to the left and to the right of the '&&' operator.'
https://www.viva64.com/en/w/V501/print/

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2017-04-02 06:12:20 +03:00
David Anderson 176e819c42 Vbox wrapper: if write shared/cmdline, don't end with \n
... it writes \r\n on Win.  Also, just to make sure, open file "wb".
2017-02-02 11:38:57 -08:00
David Anderson ca80cac75a Win build: manage compiler warnings better:
VS lets you choose the compiler warning level, 0 to 4.
Higher is good because compiler warnings often indicate bugs.
However, some warnings are noise, and having a lot of them is bad
because they conceal the important ones.
As an example, a recent update to VS2010 causes it to spew warnings of the form
"function _strdup() is deprecated; use _strdup() instead.

So the new policy is:
- everything compiles with warning level 4
- in boinc_win.h we use #pragmas to suppress 3 specific warnings
  that occur a lot in our code, and are not bugs:
  - the _function names as described above
  - constant conditional expression (like while(1))
  - conversion from int to char

And the goal is to build everything with zero warnings
except from outside code like zip.
We're pretty close to that.

The project files for other VS versions should be modified
to also use level 4 everywhere.
2017-01-27 01:27:32 -08:00
David Anderson d626dfd8d5 client/wrappers, Win: consolidate defines for _getcwd etc in boinc_win.h
They belong here, not in .cpp files
2017-01-26 20:59:11 -08:00
David Anderson 4b9a55b438 vboxwrapper: add <copy_cmdline_to_shared> option to job file
Tells vboxwrapper to copy its cmdline args to shared/cmdline.

This lets you use the cmdline mechanism as a way to pass
info to the VM that would otherwise have to go in a file.

Note: the cmdline can be fairly large.
It shares the wu.xml_doc field with file descriptions.
This field can be up to 64KB (MySQL blob size)
2017-01-26 20:08:35 -08:00
Rom Walton 527ce4cb67 VBOX: Update COM interface file to 5.1.2 version. It looks like something changed and now all 5.1.2 clients are failing with older vboxwrappers. 2016-08-08 08:00:36 -07:00
Rom Walton c9fcd4e356 VBOX: Make the screen shot feature optional. It is now turned on via a vbox_job.xml flag.
We assume it is causing errors within VirtualBox after use based on OPS error reports.
2016-08-08 07:59:01 -07:00
marius 5aa676ebb0 VBOX: added boot_iso option 2016-07-19 11:37:14 +02:00
Rom Walton 4c5b9eb9f4 VBOX: Fix build break. 2016-07-12 23:13:43 -07:00
Rom Walton db94233cc4 VBOX: Attempt to wake the console before attempting to take a screenshot, to work around a VirtualBox bug. 2016-07-12 20:34:18 -07:00
Rom Walton aacc8a5924 VBOX: Upgrade to the RTM build of the VirtualBox 5.1 COM interface file. 2016-07-12 20:00:07 -07:00
Rom Walton c8ae1d8439 VBOX: Fix check pointing code in the vboxmanage interface.
I apparently broke it when I implemented the screen shot code.
2016-07-04 15:46:33 -07:00
David Anderson 56d59a7780 vboxwrapper: fix bugs in cmdline memory size spec; fix compile warnings 2016-07-01 12:06:55 -07:00
Rom Walton 7d0b8a59ad VBOX: Only attempt to take a screen shot if VirtualBox is greater than 5.0 (VboxManage Interface) 2016-06-15 22:29:59 -07:00
Rom Walton fe7f919519 VBOX: Only attempt to take a screen shot if the VM is online. 2016-06-14 19:20:26 -07:00