diff options
author | Volker Uhrig | 2009-06-03 16:23:38 +0200 |
---|---|---|
committer | Volker Uhrig | 2009-06-03 16:23:38 +0200 |
commit | 1648e95a78d2fc0c36f48d3b9d76e5ce3609ece9 (patch) | |
tree | a6beb493b2d981360467033be223f113b6854832 /os-plugins/plugins | |
parent | fix for gconf sanity check error; (diff) | |
download | core-1648e95a78d2fc0c36f48d3b9d76e5ce3609ece9.tar.gz core-1648e95a78d2fc0c36f48d3b9d76e5ce3609ece9.tar.xz core-1648e95a78d2fc0c36f48d3b9d76e5ce3609ece9.zip |
* different modification, including hostsystem and network
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2918 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins')
-rw-r--r-- | os-plugins/plugins/virtualbox/files/run-virt.include | 57 | ||||
-rw-r--r-- | os-plugins/plugins/virtualbox/files/runvbox.hints | 38 |
2 files changed, 61 insertions, 34 deletions
diff --git a/os-plugins/plugins/virtualbox/files/run-virt.include b/os-plugins/plugins/virtualbox/files/run-virt.include index 34793f5d..b4ecf2ff 100644 --- a/os-plugins/plugins/virtualbox/files/run-virt.include +++ b/os-plugins/plugins/virtualbox/files/run-virt.include @@ -30,15 +30,13 @@ if grep -qe "/dev/.* /tmp " /proc/mounts ; then # Hack, if more than 2,5G RAM use 40% of Ram and write vmem into Ram as well # (40% vmware | 40% confdir(vmem...) | 20% host # VMplayer 2+ issue - #if [ "${totalmem}" -ge "2500" ]; then - # permem=40 - # confdir=/dev/shm/vmware/$USER - # conffile=${confdir}/run-vmware.conf - # mkdir -p /dev/shm/vmware/$USER - #fi + if [ "${totalmem}" -ge "2500" ]; then + permem=40 + mkdir /dev/shm/vbox/${USER} + snapshotdir=/dev/shm/vbox/$USER + fi fi -#TODO: ... / 4 * 4 dont make sence -mem=$(expr ${totalmem} / 100 \* ${permem} / 4 \* 4) +mem=$(expr ${totalmem} / 100 \* ${permem}) if [ "${id44}" = "1" ]; then memhost=$(expr ${totalmem} - ${mem}) else @@ -128,12 +126,45 @@ VBoxManage -q modifyvm "${ID}" -audio oss # supress License and Message # TODO: Not clear if we are allowed to do this -VBoxManage setextradata global "GUI/LicenseAgreed" "7" -VBoxManage setextradata global "GUI/SuppressMessages" ",remindAboutAutoCapture" -VBoxManage setextradata global "GUI/RegistrationData" "triesLeft=0" +VBoxManage -q setextradata global "GUI/LicenseAgreed" "7" +VBoxManage -q setextradata global "GUI/SuppressMessages" ",remindAboutAutoCapture" +VBoxManage -q setextradata global "GUI/RegistrationData" "triesLeft=0" + +# if we have enough memory, we can put the snapshots (changes on immutable +# disk) there +if [ -n ${snapshotdir} ]; then + VBoxManage -q modifyvm "${ID}" --snapshotfolder "${snapshotdir}" +fi +# Operating system. Possible: VBoxManage list ostypes +# WindowsXP, WindowsVista, Windows7, Linux26 etc. +# keep compatibility to VMware +# Todo: maybe rewrite, to reduce checks, merge it with network option, +# so we can have a "compatibility to vmware config" section. Or include +# it into vmchooser? +if [ "${vmostype}" = "winxppro" -o "${vmostype}" = "WindowsXP" ]; then + VBoxManage -q modifyvm "${ID}" --ostype "WindowsXP" +elif [ "${vmostype}" = "winvista" -o "${vmostype}" = "WindowsVista" ]; then + VBoxManage -q modifyvm "${ID}" --ostype "WindowsVista" +elif [ "${vmostype}" = "Windows7" ]; then + VBoxManage -q modifyvm "${ID}" --ostype "Windows7" +elif [ "${vmostype}" = "linux" -o "${vmostype}" = "Linux26" ]; then + VBoxManage -q modifyvm "${ID}" --ostype "Linux26" +elif [ -n "${vmostype}" ]; then + VBoxManage -q modifyvm "${ID}" --ostype "${vmostype}" +fi +# Network Configuration +# only bridge differes to vmware +if [ "${network_kind}" = "bridge" ]; then + network_kind="bridged" +fi +VBoxManage -q modifyvm "${ID}" --nic1 "${network_kind}" + +# modify macaddress +mac=$(echo ${mac}|sed 's/://') # ${mac/:/} +VBoxManage -q modifyvm "${ID}" --macaddress1 "0050560D${mac}" # finally set env for run-virt.sh ################################################################################ @@ -142,3 +173,7 @@ VBoxManage setextradata global "GUI/RegistrationData" "triesLeft=0" #VIRTCMD=$(which virtualbox 2>/dev/null) VIRTCMD=$(which VBoxManage 2>/dev/null) VIRTCMDOPTS="startvm ${ID} -type gui" + +# todo: for debugging purpose during development +echo "\n export VBOX_USER_HOME=\"/tmp/vbox-${USER}-${ID}\"" +echo " VBoxManage $VIRTCMDOPTS\n\n" diff --git a/os-plugins/plugins/virtualbox/files/runvbox.hints b/os-plugins/plugins/virtualbox/files/runvbox.hints index b58c1f62..0a00afbd 100644 --- a/os-plugins/plugins/virtualbox/files/runvbox.hints +++ b/os-plugins/plugins/virtualbox/files/runvbox.hints @@ -1,29 +1,21 @@ -# Description: Old example script +# Description: Old example script, more a temporary todo/note list -################################################################################ -## -## Modify VM -## -################################################################################ +#Network: +#Intel PRO/1000 MT Server where added, because vista stoped supporting +#the old ones => 4.2.5 vista networking -# Network settings -VBoxManage modifyvm "${ID}" -nic1 ${network_kind} -#VBoxManage modifyvm "${ID}" -nictype1 Am79C970a|aM79c973|82540em -if [ "${network_kind}" = "hostif" ]; then - VBoxManage modifyvm "${ID}" -hostifdev1 eth0 -fi -# Per default each virtual network card is assigned a random address by -# VBox at VM creation, due of this we can be sure that every mac is -# unique -# else we should use -#VBoxManage modifyvm "${ID}" -macaddress1 <mac> - -#TODO -#VBoxManage modifyvm "${ID}" -#VBoxManage modifyvm "${ID}" ostype <ostype> +#TODO: check if setting the following parameters will improve the plugin #VBoxManage modifyvm "${ID}" vram <ram>_in_mb_of_virtual_graphic_card> #VBoxManage modifyvm "${ID}" acpi <on|off> # acpi and i/o apic support #VBoxManage modifyvm "${ID}" sata <on|off> # sata or ide #VBoxManage modifyvm "${ID}" dvdpassthrough <on|off> # burn support, unstable -#VBoxManage modifyvm "${ID}" -floppy empty|uuid|filename # yes we need it -#VBoxManage modifyvm "${ID}" -floppy empty|uuid|filename # yes we need it +#--vram, acpi, ioapic, pae, hwvirtex, nestedpaging, -vtxvpid, +#monitorcount, accelerate3d, bioslogofadein, bioslogfadeout, +#bioslogodisplaytime, bioslogoimagepath, biosbootmeu, biospxedebug, +#idecontroller, sata*, scsi, floppy, nic*, cableconnected, +#intnet, uart*, gueststatisticsinterval, kind of audio*, clipboard, +#vrdp* (should be unimportant), usbehci +# +#should be more important at the beginning: +#bridgeadapter, hostonlyadapter, floppy +#intnet, natnet, usb |