summaryrefslogtreecommitdiffstats
path: root/remote/modules/vmware/data
diff options
context:
space:
mode:
authorSimon Rettberg2013-11-27 18:48:57 +0100
committerSimon Rettberg2013-11-27 18:48:57 +0100
commit5a587d02294c2216fc7ad6bf5a1ac9059ae5c595 (patch)
tree5c71c614d6323aaab1769006e3d6f6b4710c1f5e /remote/modules/vmware/data
parent[vmware] vmware_env: add slxlog, fix mknod call I broke yesterday (diff)
downloadtm-scripts-5a587d02294c2216fc7ad6bf5a1ac9059ae5c595.tar.gz
tm-scripts-5a587d02294c2216fc7ad6bf5a1ac9059ae5c595.tar.xz
tm-scripts-5a587d02294c2216fc7ad6bf5a1ac9059ae5c595.zip
[vmware] Add slxlog to run-virt.include
Diffstat (limited to 'remote/modules/vmware/data')
-rw-r--r--remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include16
1 files changed, 10 insertions, 6 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 2e7aeaf5..2de41d77 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
@@ -543,6 +543,9 @@ case "${hddrv}" in
ide="FALSE"
scsi="TRUE"
;;
+ *)
+ slxlog "virt-vmware-hdd" "vmware: Unknown HDD adapter type $hddrv"
+ ;;
esac
# write configuration files
@@ -564,12 +567,13 @@ runvmwareconfheader
ln -s "$conffile" "$redodir/run-vmware.conf" >/dev/null 2>&1
# sync is needed to ensure that data is really written to virtual disk
+# TODO: Move to general run-virt, right before exec of vm
sync
# own nvram. We need it for floppy drive b, default nvram has just drive a
-# TODO: optimize, currently kinda inefficient, too much copys, but we
-# don't know which one is installed...
-cp "/opt/openslx/vmchooser/vmware/nvram" "$confdir/nvram" 2>/dev/null
+if ! cp "/opt/openslx/vmchooser/vmware/nvram" "$confdir/nvram"; then
+ slxlog "virt-vmware-nvram" "Could not copy nvram from '/opt/openslx/vmchooser/vmware/nvram' '$confdir/nvram'"
+fi
# logging and stdout
@@ -588,11 +592,10 @@ writelog "\tConfdir:\t${confdir}"
writelog "\tConffile:\t${conffile}"
writelog "\tRedodir:\t${redodir}"
writelog "\tVMhome:\t\t${vmhome}"
-writelog "\t/tmp info: \
-$(grep "/tmp " /proc/mounts) $(df -h | grep " /tmp$" | awk '{print $2}')"
+writelog "\t/tmp info: $(grep "/tmp " /proc/mounts) $(df -h | grep " /tmp$" | awk '{print $2}')"
# hw setup
writelog "Hardware:"
-writelog "\tMAC:\t\t00:50:56:${VM_ID}:${machostpart}"
+writelog "\tMAC:\t\t00:50:56:$macaddrsuffix" # TODO: Make var at top for this, it's hard coded twice
if [ -n "${network_card}" ]; then
writelog "\tNet Adaptor:\t${network_card}"
fi
@@ -642,3 +645,4 @@ cp "$conffile" "/tmp/vmware-last-config"
VIRTCMD="/opt/openslx/bin/vmplayer"
VIRTCMDOPTS="${vmopt} ${conffile}"
RMDIRS="${redodir} ${conffile}"
+