summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initramfs/stage3-stuff/etc/functions2
-rw-r--r--os-plugins/plugins/vmchooser/files/run-virt.sh20
-rw-r--r--os-plugins/plugins/vmware/files/run-virt.include6
3 files changed, 26 insertions, 2 deletions
diff --git a/initramfs/stage3-stuff/etc/functions b/initramfs/stage3-stuff/etc/functions
index bd9a112d..647ba2dc 100644
--- a/initramfs/stage3-stuff/etc/functions
+++ b/initramfs/stage3-stuff/etc/functions
@@ -198,7 +198,7 @@ local mntpnt=$2
local fs
local path
[ -f /lib/ld-linux.so.2 ] || ln -s /mnt/lib/ld-linux.so.2 /lib/ld-linux.so.2
-for fs in xfs ext2 reiserfs ; do
+for fs in xfs reiserfs ext2 ; do
if strinfile "$fs" /proc/filesystems || modprobe ${MODPRV} $fs ; then
unset $found
for path in /sbin /bin /usr/sbin /usr/bin ; do
diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh
index c195e7c1..f206af8c 100644
--- a/os-plugins/plugins/vmchooser/files/run-virt.sh
+++ b/os-plugins/plugins/vmchooser/files/run-virt.sh
@@ -51,6 +51,23 @@ displayname=${short_description}
virt_mach=$(grep "virtualmachine param=\"" ${xml} | \
sed -e "s/&.*;/; /g" | awk -F "\"" '{print $2}')
+echo "x${virt_mach}x"
+
+# make a guess from the filename extension if ${virt_mach}
+if [ -z ${virt_mach} ] ; then
+ case "${imagename#*.}" in
+ vmdk|VMDK)
+ virt_mach="vmware"
+ ;;
+ img|IMG|qcow*|QCOW*)
+ virt_mach="qemukvm"
+ ;;
+ vbox|VBOX)
+ virt_mach="qemukvm"
+ ;;
+ esac
+fi
+
# definition of the client system
vmostype=$(grep -i "<os param=\"" ${xml} | awk -F "\"" '{ print $2 }')
@@ -75,6 +92,7 @@ totalmem=$(expr $(grep -i "memtotal" /proc/meminfo | awk '{print $2}') / 1024)
mac=$(/sbin/ifconfig eth0 | grep eth0 | sed -e "s/ //g" \
| awk -F ":" '{print $(NF-1)":"$NF}')
+echo "$totalmem, $mac"
# virtual fd/cd/dvd and drive devices, floppy b: for configuration
#floppya is always false, if we have a floppy device or not isn't
@@ -154,6 +172,8 @@ 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
. /etc/opt/openslx/run-${virt_mach}.include
diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include
index d384b0b2..f8312395 100644
--- a/os-plugins/plugins/vmware/files/run-virt.include
+++ b/os-plugins/plugins/vmware/files/run-virt.include
@@ -27,6 +27,9 @@ 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 "<serial port=\"" ${xml} | awk -F "\"" '{ print $2 }')
case "$serial" in
@@ -56,6 +59,7 @@ elif grep -qe "ramfs /tmp " /proc/mounts ; then
permem=30
fi
mem=$(expr ${totalmem} / 100 \* ${permem} / 4 \* 4)
+echo "BLa $mem, ${totalmem}, ${permem}"
# check memory range
memtest=${totalmem}-128
if [ "${mem}" -lt "128" ] || [ "${mem}" -gt "${totalmem}" ]; then
@@ -81,7 +85,7 @@ scsi="FALSE"
hddrv="ide"
# get version info
-. /etc/vmware/config
+. /etc/vmware/slxvmconfig
# VMplayer buildversion
vmbuild=$buildversion