From cb34bf23f8ba7aa596cc658e149442c2c6cca6cb Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Thu, 26 Feb 2009 13:20:14 +0000 Subject: Further improvements for run-virt.sh ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2643 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/vmchooser/files/run-virt.sh | 1 - os-plugins/plugins/vmware/files/run-virt.include | 245 ++++++++++++----------- 2 files changed, 125 insertions(+), 121 deletions(-) diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index 4792d5e8..759709e2 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -213,7 +213,6 @@ cp ${xml} /var/lib/virt/vmchooser/fd-loop/config.xml # check if virtual machine container file exists filecheck -echo ${virt_mach} # get all virtual machine specific stuff from the respective include file if [ -e /etc/opt/openslx/run-${virt_mach}.include ] ; then diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include index 001691ce..c9430098 100644 --- a/os-plugins/plugins/vmware/files/run-virt.include +++ b/os-plugins/plugins/vmware/files/run-virt.include @@ -12,118 +12,12 @@ # General information about OpenSLX can be found at http://openslx.org/ # ----------------------------------------------------------------------------- # run-virt.include -# - +# - component for vmware/player of the vmchooser plugin run-virt.sh # ----------------------------------------------------------------------------- -# declaration of default variables +# configuration writer functions ################################################################################ -# temporary disk space for logs, etc... -redodir=/tmp/vmware/${USER} -# dir for configs and vmem file -confdir=${redodir} -# configfile -conffile="${confdir}/run-vmware.conf" -# users vmware config folder -vmhome="${HOME}/.vmware" - -# percentage of memory to use for vmwares in standard case -permem=60 - -# serial port defined (e.g. "ttyS0" or "autodetect") -serial=$(grep -i "${conffile} +case "$vmversion" in + 1.0|5.5|2.0|6.0) + echo " +# version specific stuff +config.version = \"8\" +virtualHW.version = \"4\" +usb.present = \"TRUE\" +usb.generic.autoconnect = \"TRUE\" +svga.maxWidth = \"${xres}\" +svga.maxHeight = \"${yres}\" +svga.autodetect = \"TRUE\" +pref.hotkey.shift = \"TRUE\" +pref.hotkey.control = \"TRUE\" +pref.hotkey.alt = \"TRUE\"" >>${conffile} + ;; + 2.5|6.5) + echo " +# version specific stuff +config.version = \"8\" +virtualHW.version = \"7\" +usb.present = \"TRUE\" +ehci.present= \"TRUE\" +svga.autodetect = \"TRUE\" +mks.enable3d = \"TRUE\"" >>${conffile} + ;; +esac + # set the appropriate permissions for the vmware config file chmod u+rwx ${conffile} >/dev/null 2>&1 } - -### creates user configurationfile in ${vmhome} ################################ preferencesheader () { echo ".encoding = \"UTF-8\" @@ -271,6 +180,102 @@ pref.eula.1.buildNumber = \"${vmbuild}\"" \ >${vmhome}/preferences } +# declaration of default variables +################################################################################ + +# temporary disk space for logs, etc... +redodir=/tmp/vmware/${USER} +# dir for configs and vmem file +confdir=${redodir} +# configfile +conffile="${confdir}/run-vmware.conf" +# users vmware config folder +vmhome="${HOME}/.vmware" + +# percentage of memory to use for vmwares in standard case +permem=60 + +# serial port defined (e.g. "ttyS0" or "autodetect") +serial=$(grep -i "