summaryrefslogtreecommitdiffstats
path: root/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc
diff options
context:
space:
mode:
authorJonathan Bauer2018-04-19 12:31:00 +0200
committerJonathan Bauer2018-04-19 12:31:00 +0200
commit389196f0a398e49591df8ba1796a9442fa9a4927 (patch)
treec0696d5163824a6ee7b67791d222c9dc4f074851 /core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc
parent[rfs-stage31] Force loading acpi_ipmi for nvidia, doesn't handle dependencies... (diff)
downloadmltk-389196f0a398e49591df8ba1796a9442fa9a4927.tar.gz
mltk-389196f0a398e49591df8ba1796a9442fa9a4927.tar.xz
mltk-389196f0a398e49591df8ba1796a9442fa9a4927.zip
[vbox-src] support SHARE_REMAP_MODE
and moved some variables
Diffstat (limited to 'core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc')
-rwxr-xr-xcore/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc21
1 files changed, 12 insertions, 9 deletions
diff --git a/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc b/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc
index def5280c..44640710 100755
--- a/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc
+++ b/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc
@@ -3,10 +3,9 @@
################################################################################
set_hardware_limits() {
- #SHARED_FOLDERS="TRUE"
- #enablevt="true"
- #enable2d
- #enable3d
+
+ # support shared folders by default, disable it if guest OS doesn't support it
+ declare -g SHARED_FOLDERS="TRUE"
# set some base configuration depending on the guest operating system
# NOTE: list supported OS type with: VBoxManage list ostypes
@@ -33,19 +32,16 @@ set_hardware_limits() {
MAXCORES="1"
MAXMEM="256"
MAXVRAM="64"
- SHARED_FOLDERS="FALSE"
;;
WindowsMe)
MAXCORES="1"
MAXMEM="384"
MAXVRAM="64"
- SHARED_FOLDERS="FALSE"
;;
Windows2000|Windows2003)
MAXCORES="4"
MAXMEM="4000"
MAXVRAM="128"
- SHARED_FOLDERS="FALSE"
;;
Windows2003_64|WindowsXP_64)
MAXCORES="4"
@@ -108,8 +104,6 @@ set_hardware_limits() {
# TODO: FreeBSD, NetBSD, MacOS*, Solaris, Oracle, ...
esac
- declare -rg GUESTVRAM=$MAXVRAM
-
# check /run/hwinfo for CORE not THREADS
# vbox seems to only want maximum cores = number of
# physical cores of the cpu, so use that
@@ -120,6 +114,15 @@ set_hardware_limits() {
[ "${CPU_CORES}" -gt "{MAXCORES}" ] && CPU_CORES="${MAXCORES}"
[ "${VM_MEM}" -gt "${MAXMEM}" ] && VM_MEM="${MAXMEM}"
+ # currently not used, keep the VRAMSize setting from the uploaded configuration
+ declare -rg GUESTVRAM=$MAXVRAM
+
+ # check if shared folders should be activated according
+ # to SHARE_REMAP_MODE set by /opt/openslx/inc/shares
+ VBOX_SHARED_FOLDERS=
+ if [ "x$SHARED_FOLDERS" != "xFALSE" ] && [ "$SHARE_REMAP_MODE" -gt 1 ]; then
+ declare -rg VBOX_SHARED_FOLDERS="1"
+ fi
return 0
}