summaryrefslogtreecommitdiffstats
path: root/remote/modules/vmware/data/opt/openslx/vmchooser
diff options
context:
space:
mode:
authorDirk2013-12-13 20:52:00 +0100
committerDirk2013-12-13 20:52:00 +0100
commitefd86cc8b5b138e4076bf1657ea888dc52e62901 (patch)
treedde241d9c0041f10584415e97c6b6f326e03cd3f /remote/modules/vmware/data/opt/openslx/vmchooser
parentMerge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff)
downloadtm-scripts-efd86cc8b5b138e4076bf1657ea888dc52e62901.tar.gz
tm-scripts-efd86cc8b5b138e4076bf1657ea888dc52e62901.tar.xz
tm-scripts-efd86cc8b5b138e4076bf1657ea888dc52e62901.zip
Heavily reworked the networking for the various virtual machines:
There will be three types of network interfaces for virtual machines available all will be configured for every type of virtualization tool a) br0 is the direct host bridge into the local LAN (br0 already exists) vmnet0 for VMware vboxnet0 for VirtualBox kvmnet0* for Qemu/KVM b) nat1 is an internal bridge which "NATes" into the local LAN (with DHCP) vmnet1 for VMware vboxnet1 for VirtualBox kvmnet1* for Qemu/KVM c) vsw2 is an internal host bridge to connect software defined LANs to vmnet2 for VMware vboxnet2 for VirtualBox kvmnet2* for Qemu/KVM
Diffstat (limited to 'remote/modules/vmware/data/opt/openslx/vmchooser')
-rw-r--r--remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include39
1 files changed, 23 insertions, 16 deletions
diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include
index a4e03b7f..3f24e9d5 100644
--- a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include
+++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include
@@ -1,4 +1,3 @@
-# run-virt.include
# -----------------------------------------------------------------------------
# Copyright (c) 2009..2012 - RZ Uni Freiburg
# Copyright (c) 2009..2013 - OpenSLX GmbH
@@ -12,10 +11,11 @@
# 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
+# - component for vmware/player of the vmchooser plugin vmchooser-run_virt
################################################################################
-# configuration writer functions
+################################################################################
+### configuration writer functions
################################################################################
function clean_string ()
@@ -258,9 +258,9 @@ floppy1.fileName = "$floppy1name"
ethernet0.present = "TRUE"
ethernet0.addressType = "static"
$network_virtualDev
-ethernet0.connectionType = "$network_kind"
+ethernet0.connectionType = "hostonly"
#ethernet1.connectionType = "custom"
-#ethernet1.vnet = "/dev/vmnet2"
+ethernet0.vnet = "$hostdev"
ethernet0.address = "00:50:56:$macaddrsuffix"
ethernet0.wakeOnPcktRcv = "FALSE"
@@ -396,7 +396,6 @@ HEREEND
# declaration of default variables
################################################################################
-
[ "$mem" -gt 3800 -a "$(uname -m)" != "x86_64" ] && mem=3800
# VM-ID static (0D), remove if changed to 00
@@ -409,9 +408,9 @@ else
VM_ID=$[ $$ % 100 ]
fi
# temporary disk space for logs, etc...
-redodir=/tmp/vmware/${USER}.$$
+redodir=/tmp/virt/vmware/${USER}.$$
# dir for configs and vmem file
-confdir=/tmp/vmware/${USER}.$$
+confdir=/tmp/virt/vmware/${USER}.$$
# configfile
conffile="${confdir}/run-vmware.conf"
# diskfile
@@ -439,6 +438,20 @@ else
network_virtualDev='# using default virtualDev for ethernet0'
fi
+# use different network card (default e1000, vlance, vmxnet)
+hostdev="/dev/vmnet1"
+case "${network_kind}" in
+ bridge)
+ hostdev="/dev/vmnet0"
+ ;;
+ nat)
+ hostdev="/dev/vmnet1"
+ ;;
+ hostonly|host-only)
+ hostdev="/dev/vmnet2"
+ ;;
+esac
+
# set standard sound card, overwrite depending on OS (options sb16, es1371, hdaudio)
sound="es1371"
@@ -617,15 +630,9 @@ fi
writelog ""
-# finally set env for run-virt.sh
################################################################################
-
-# configure and start samba service to provide user's home directory
-#if [ -f /usr/sbin/smbd ] ; then
-# sudo /opt/openslx/bin/sed -i /etc/vmware/smb.conf -e "s,USER,$USER,"
-# sudo /usr/sbin/nmbd -s /etc/vmware/smb.conf
-# sudo /usr/sbin/smbd -s /etc/vmware/smb.conf
-#fi
+### Set env for vmchooser-run_virt
+################################################################################
# For debugging
cp "$conffile" "/tmp/vmware-last-config"