summaryrefslogtreecommitdiffstats
path: root/os-plugins
diff options
context:
space:
mode:
authorMichael Janczyk2010-05-26 22:59:18 +0200
committerMichael Janczyk2010-05-26 22:59:18 +0200
commit3254c82af147c5ccbd06fbd225ff1988af699f0e (patch)
treed45bde9a707533cd741cf174abdd26c20ddd8d58 /os-plugins
parentnice level added to vmgrid (diff)
downloadcore-3254c82af147c5ccbd06fbd225ff1988af699f0e.tar.gz
core-3254c82af147c5ccbd06fbd225ff1988af699f0e.tar.xz
core-3254c82af147c5ccbd06fbd225ff1988af699f0e.zip
host.conf stuff added
Diffstat (limited to 'os-plugins')
-rw-r--r--os-plugins/plugins/vmchooser/files/run-virt.sh2
-rw-r--r--os-plugins/plugins/vmchooser/init-hooks/80-after-plugins/virtualization.sh11
-rw-r--r--os-plugins/plugins/vmgrid/files/run-vmgrid.sh6
-rw-r--r--os-plugins/plugins/vmgrid/init-hooks/80-after-plugins/virtualization.sh11
4 files changed, 24 insertions, 6 deletions
diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh
index 771ebef4..df2a7404 100644
--- a/os-plugins/plugins/vmchooser/files/run-virt.sh
+++ b/os-plugins/plugins/vmchooser/files/run-virt.sh
@@ -132,7 +132,7 @@ mem=$(expr ${totalmem} / 100 \* ${permem} / 4 \* 4)
# last two bytes are taken from the bridge of the host
# define one MAC per guest
macguestpart="00:50:56:${VM_ID}"
-machostpart=$(echo ${machostaddr} | awk -F ":" '{print $(NF-1)":"$NF}')
+machostpart=$(echo ${hostmacaddr} | awk -F ":" '{print $(NF-1)":"$NF}')
macaddr=$(echo "${macguestpart}:${machostpart}" | tr [a-z] [A-Z])
#TODO: remove when vmware modified
mac=${machostpart}
diff --git a/os-plugins/plugins/vmchooser/init-hooks/80-after-plugins/virtualization.sh b/os-plugins/plugins/vmchooser/init-hooks/80-after-plugins/virtualization.sh
index 37576331..23095abf 100644
--- a/os-plugins/plugins/vmchooser/init-hooks/80-after-plugins/virtualization.sh
+++ b/os-plugins/plugins/vmchooser/init-hooks/80-after-plugins/virtualization.sh
@@ -109,7 +109,11 @@ EOF
fi
# write mac
- echo "machostaddr=${macaddr}" >> ${PLUGINCONFDIR}/virtualization.conf
+ echo "hostmacaddr=${macaddr}" >> ${PLUGINCONFDIR}/virtualization.conf
+ # ip addr
+ echo "hostip=${clientip}" >> ${PLUGINCONFDIR}/virtualization.conf
+ # hostname
+ echo "hostname=${host_name}" >> ${PLUGINCONFDIR}/virtualization.conf
# get further hw information
waitfor /etc/hwinfo.cdrom
@@ -126,6 +130,11 @@ EOF
j=$(expr $j + 1)
done
+ # copy host information to rwshare of vmgrid plugin
+ if [ "x${vmgrid_active}" = "x1" ]; then
+ cp ${PLUGINCONFDIR}/virtualization.conf ${vmgrid_rwmnt}/host.conf
+ fi
+
# finished ...
[ $DEBUGLEVEL -gt 0 ] \
&& echo "ok"
diff --git a/os-plugins/plugins/vmgrid/files/run-vmgrid.sh b/os-plugins/plugins/vmgrid/files/run-vmgrid.sh
index b4830dc9..3bbb789d 100644
--- a/os-plugins/plugins/vmgrid/files/run-vmgrid.sh
+++ b/os-plugins/plugins/vmgrid/files/run-vmgrid.sh
@@ -366,7 +366,7 @@ mem=$(expr ${totalmem} / 100 \* ${permem} / 4 \* 4)
# last two bytes are taken from the bridge of the host
# define one MAC per guest
macguestpart="00:50:56:${VM_ID}"
-machostpart=$(echo ${machostaddr} | awk -F ":" '{print $(NF-1)":"$NF}')
+machostpart=$(echo ${hostmacaddr} | awk -F ":" '{print $(NF-1)":"$NF}')
macaddr=$(echo "${macguestpart}:${machostpart}" | tr [a-z] [A-Z])
# ide is expected default, test for the virtual disk image type should
@@ -414,12 +414,12 @@ if [ ${headless} -eq 0 ]; then
writelog "Grapical mode not available, exiting!"
cleanexit 1
fi
- writelog "Starting ${vmgrid_virt} in graphical mode..."
+ writelog "Starting ${vmgrid_virt} in graphical mode /w nice level ${unice}..."
# start /w low nice level
nice -n ${unice} ${VIRTCMD} ${VIRTCMDOPTS} 2>/dev/null
# start headless
elif [ -n "${VIRTCMDHL}" ]; then
- writelog "Starting ${vmgrid_virt} in headless mode..."
+ writelog "Starting ${vmgrid_virt} in headless mode /w nice level ${unice}..."
# start /w low nice level
nice -n ${unice} ${VIRTCMDHL} ${VIRTCMDOPTSHL} 2>/dev/null
else
diff --git a/os-plugins/plugins/vmgrid/init-hooks/80-after-plugins/virtualization.sh b/os-plugins/plugins/vmgrid/init-hooks/80-after-plugins/virtualization.sh
index 37576331..23095abf 100644
--- a/os-plugins/plugins/vmgrid/init-hooks/80-after-plugins/virtualization.sh
+++ b/os-plugins/plugins/vmgrid/init-hooks/80-after-plugins/virtualization.sh
@@ -109,7 +109,11 @@ EOF
fi
# write mac
- echo "machostaddr=${macaddr}" >> ${PLUGINCONFDIR}/virtualization.conf
+ echo "hostmacaddr=${macaddr}" >> ${PLUGINCONFDIR}/virtualization.conf
+ # ip addr
+ echo "hostip=${clientip}" >> ${PLUGINCONFDIR}/virtualization.conf
+ # hostname
+ echo "hostname=${host_name}" >> ${PLUGINCONFDIR}/virtualization.conf
# get further hw information
waitfor /etc/hwinfo.cdrom
@@ -126,6 +130,11 @@ EOF
j=$(expr $j + 1)
done
+ # copy host information to rwshare of vmgrid plugin
+ if [ "x${vmgrid_active}" = "x1" ]; then
+ cp ${PLUGINCONFDIR}/virtualization.conf ${vmgrid_rwmnt}/host.conf
+ fi
+
# finished ...
[ $DEBUGLEVEL -gt 0 ] \
&& echo "ok"