From 9a95c0c2d4a6382683725d5be0ab9171f9aed828 Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Tue, 30 Mar 2010 20:11:25 +0200 Subject: diskless boot + minor modifications, virtualization.conf /w freemem --- .../plugins/virtualbox/files/machine.include | 2 +- .../plugins/virtualbox/files/run-virt.include | 61 ++++++++++------------ 2 files changed, 28 insertions(+), 35 deletions(-) (limited to 'os-plugins/plugins/virtualbox') diff --git a/os-plugins/plugins/virtualbox/files/machine.include b/os-plugins/plugins/virtualbox/files/machine.include index 125e45cd..78c4bee8 100644 --- a/os-plugins/plugins/virtualbox/files/machine.include +++ b/os-plugins/plugins/virtualbox/files/machine.include @@ -111,7 +111,7 @@ cat << EOF > "${machconfig}" - + /d" ${machconfig} +fi + # add ssh port if linux and NAT if [ "${vmostype}" = "Linux26" ] && [ "${network_kind}" = "NAT" ]; then vmsshport="220${VM_ID}" @@ -322,33 +331,17 @@ fi # wait for a certain command to settle # get the PID of the right process -# TODO: not very good! But seems to work -# TODO: not needed? KILL!!! +# kill PID, seems to work VBMANPID=$(pstree -p | grep VBoxXPCOMIPCD | grep -ivE "VirtualBox|VBoxHeadless"\ | sed -e "s/.*VBoxXPCOMIPCD(\(.*\)).*/\1/") for i in $(echo ${VBMANPID}); do kill -9 ${VBMANPID} >/dev/null 2>&1 done -# TODO: OLD Version, NOW: KILL process -#VBMANPID=$(pstree -p | grep VBoxXPCOMIPCD | grep -ivE "VirtualBox|VBoxHeadless"\ -# | sed -e "s/.*VBoxXPCOMIPCD(\(.*\)).*/\1/" | tail -n 1) -#for i in {0..999}; do -# ps aux | grep -v grep | grep VBoxXPCOMIPCD | grep -q " ${VBMANPID} " || break -# if [ $i -eq 999 ]; then -# kill -9 ${VBMANPID} >/dev/null 2>&1 -# writelog "Process ID ${VBMANPID} did not finish, killing!" -# fi -#done # set the variables appropriately (several interfaces with different names) VIRTCMD=$(which VirtualBox 2>/dev/null) VIRTCMDOPTS="--startvm ${machineuuid} --start-running" -# SDL tests -#VIRTCMDSDL=$(which VBoxSDL 2>/dev/null) -#VIRTCMDOPTSSDL="--startvm ${machineuuid} --fullscreen --hwvirtex --memory 1024 \ -# --fixedmode 1680 1050 24 --hostkey 302 0" - # set headless mode VIRTCMDHL=$(which VBoxHeadless 2>/dev/null) VIRTCMDOPTSHL="-s ${machineuuid}" -- cgit v1.2.3-55-g7522