From 0a5c88d206128069f2bdf2f6d4ff6a4ff3976f87 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Mon, 22 Dec 2008 22:28:39 +0000 Subject: Adding the feature to add serial ports to a VMware/Player configuration via XML configuration file. Evaluating the parameter ", allowing values like "ttyS0" or "autodetect" ... If a client is running completely diskless (/tmp on RamFS) the amount of memory assigned to a guest is set to 30% (because of the redicilous vmware vmem file). git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2449 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm | 2 + .../plugins/vmware/files/runvmware-player-v25 | 51 +++++++++++++--------- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm b/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm index 099c3e72..e2394f27 100644 --- a/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm +++ b/os-plugins/plugins/vmware/OpenSLX/Distro/Suse.pm @@ -168,6 +168,8 @@ sub fillRunlevelScript echo -n "Starting vmware background services ..." # load the configuration file . /etc/vmware/slxvmconfig + # hack to access the first serial port + chmod a+rw /dev/ttyS0 load_modules setup_vmnet0 setup_vmnet1 diff --git a/os-plugins/plugins/vmware/files/runvmware-player-v25 b/os-plugins/plugins/vmware/files/runvmware-player-v25 index 6f4021f3..51349d0b 100644 --- a/os-plugins/plugins/vmware/files/runvmware-player-v25 +++ b/os-plugins/plugins/vmware/files/runvmware-player-v25 @@ -37,7 +37,22 @@ vmostype=$(grep -i "${conffile} +gui.restricted = \"TRUE\" + +# serial port +serial0.present = \"${serial}\" +${serialdev}" >${conffile} # set the appropriate permissions for the vmware config file chmod u+rwx ${conffile} >/dev/null 2>&1 @@ -411,10 +420,6 @@ writelog () } - - - - ### MAIN SECTION ############################################################### ## ## Main part of the script... @@ -472,6 +477,9 @@ if [ "${totalmem}" -ge "2500" ]; then confdir=/dev/shm/vmware/$USER conffile=${confdir}/run-vmware.conf mkdir -p /dev/shm/vmware/$USER +# if there is no scratch space on disk you have to waste your mem +elif grep -qe "ramfs /tmp " /proc/mounts ; then + permem=30 fi # calculate memory for vmplayer @@ -572,9 +580,12 @@ if [ $(which vmplayer 2>/dev/null) ]; then writelog "Starting ..." writelog "... vmplayer ${vmopt} ${conffile}\n" # start fvwm for player 2+ # problems with windows opening in background - which fvwm2 >/dev/null 2>&1 && \ - ( echo "EdgeScroll 0 0" > ${redodir}/fvwm - fvwm2 -f ${redodir}/fvwm >/dev/null 2>&1 & ) + if which fvwm2 >/dev/null 2>&1 ; then + ( echo "EdgeScroll 0 0" > ${redodir}/fvwm + fvwm2 -f ${redodir}/fvwm >/dev/null 2>&1 & ) + else + kwin & + fi vmplayer ${vmopt} ${conffile} >/dev/null 2>&1 else writelog "No VMware/VMPlayer found!\n" -- cgit v1.2.3-55-g7522