diff options
author | Michael Janczyk | 2012-12-17 17:56:33 +0100 |
---|---|---|
committer | Michael Janczyk | 2012-12-17 17:56:33 +0100 |
commit | 9d38d5a411160637eedd997e14ccb520b41421c0 (patch) | |
tree | ab38b46f60a9738740ec65830eb74188b959008e /src | |
parent | Follow links in modprobe.d when copying to stage3. (diff) | |
parent | Use zram if available (assign a quarter for compressed ram swap) (diff) | |
download | core-9d38d5a411160637eedd997e14ccb520b41421c0.tar.gz core-9d38d5a411160637eedd997e14ccb520b41421c0.tar.xz core-9d38d5a411160637eedd997e14ccb520b41421c0.zip |
Merge branch 'master' of git.openslx.org:openslx/core
Diffstat (limited to 'src')
5 files changed, 54 insertions, 12 deletions
diff --git a/src/initramfs/scripts/bin/hwautocfg b/src/initramfs/scripts/bin/hwautocfg index 482c9f9a..3548abaa 100755 --- a/src/initramfs/scripts/bin/hwautocfg +++ b/src/initramfs/scripts/bin/hwautocfg @@ -1,6 +1,6 @@ #!/bin/sh # Copyright (c) 2003..2006 - RZ Uni Freiburg -# Copyright (c) 2006..2011 - OpenSLX GmbH +# Copyright (c) 2006..2012 - OpenSLX GmbH # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -277,12 +277,18 @@ case $1 in # disk setup part (detecting general id82,83 and slx id44,45,46, formatting # if required and mounting) disk) - # try to enable compressed RAM SWAP + # try to enable compressed RAM SWAP / ZRAM if modprobe ${MODPRV} ramzswap 2>/dev/null && [ -f /usr/bin/rzscontrol ] ; then mdev -s rzscontrol /dev/ramzswap0 --init - swapon /dev/ramzswap0 + swapon /dev/ramzswap0 2>/dev/null #hdswap="# disk swap disabled because of enabled compressed ramswap" + elif modprobe ${MODPRV} zram 2>/dev/null ; then + mdev -s + # assign a quarter of total mem to zram + echo $(( $(free -k | awk '/^Mem:/ { print $2 }') * 256 )) > /sys/block/zram0/disksize + mkswap /dev/zram0 2>/dev/null + swapon /dev/zram0 2>/dev/null fi # if disk action is not disabled if [ "x${hw_local_disk}" != "xno" ] ; then diff --git a/src/os-plugins/plugins/virtualbox/files/machine.include b/src/os-plugins/plugins/virtualbox/files/machine.include index e77ab1e3..6367d3d9 100644 --- a/src/os-plugins/plugins/virtualbox/files/machine.include +++ b/src/os-plugins/plugins/virtualbox/files/machine.include @@ -1,4 +1,16 @@ -# Include file (machine template) for run-virt.include of the OpenSLX virtualbox plugin +# ----------------------------------------------------------------------------- +# Copyright (c) 2010..2012 - OpenSLX GmbH +# +# This program/file is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org +# ----------------------------------------------------------------------------- +# Include file (machine template) for run-virt.include of the OpenSLX virtual- +# box plugin cat << EOF > "${machconfig}" <?xml version="1.0"?> <VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.12-linux"> @@ -88,10 +100,14 @@ cat << EOF > "${machconfig}" <HostDrive src="${cdrom_0}"/> </AttachedDevice> <!-- PLEASE DO NOT REMOVE THIS COMMENT (CD)!!! --> </StorageController> - <!-- <StorageController name="Floppy Controller" type="I82078" PortCount="1"> - <AttachedDevice type="Floppy" port="0" device="0"/> + <AttachedDevice type="Floppy" port="0" device="0"> + </AttachedDevice> + <AttachedDevice type="Floppy" port="0" device="1"> + <Image uuid="{288d5452-2dd3-44f2-bfc8-78e205a4fa87}"/> + </AttachedDevice> </StorageController> + <!-- <StorageController name="SCSI Controller" type="LsiLogic" PortCount="16"> <AttachedDevice type="HardDisk" port="0" device="0"> <Image uuid="{812c82bf-bd1a-4f59-a5b6-b54ae2f6c669}"/> diff --git a/src/os-plugins/plugins/virtualbox/files/run-virt.include b/src/os-plugins/plugins/virtualbox/files/run-virt.include index 4f07d8d6..cd5329a1 100644 --- a/src/os-plugins/plugins/virtualbox/files/run-virt.include +++ b/src/os-plugins/plugins/virtualbox/files/run-virt.include @@ -50,8 +50,8 @@ snapshotdir=${machfolder}/${vm_shortname}/Snapshots mkdir -p ${diskfolder} ${snapshotdir} 2>/dev/null # check if diskless var empty? [ -z "${diskless}" ] && diskless=0 -# default guest audio controller -guestaudio="AC97" +# default guest audio controller (SB16, AC97, HDA) +guestaudio="HDA" # default guest network adaptor vb_network_card="Am79C973" # default setting for accelerated 2D grapics (OS dependent) @@ -97,27 +97,33 @@ case "${vmostype}" in mem="32" vram="16" cpu_cores=1 + enablevt="false" ;; win95*) vmostype="Windows95" + guestaudio="SB16" mem="92" vram="32" cpu_cores=1 + enablevt="false" ;; win98*) vmostype="Windows98" + guestaudio="SB16" mem="256" vram="64" cpu_cores=1 ;; winme*) vmostype="WindowsMe" + guestaudio="AC97" mem="256" vram="64" cpu_cores=1 ;; winxp*|windowsxp*) vmostype="WindowsXP" + guestaudio="AC97" ;; winvista*|windowsvista*) vmostype="WindowsVista" @@ -345,8 +351,8 @@ writelog "\tBooting from:\t\t${boot}\c" #writelog "\tGuest VRDP port:\t${vrdpport}" writelog "\tCD-ROM1:\t\t${cdrom0}" #writelog "\tCD-ROM2:\t\t${cdrom1}" -#writelog "\tFloppy_A:\t\t${floppy0}" -#writelog "\tFloppy_B:\t\t${floppy1}" +writelog "\tFloppy_A:\t\t${floppy0}" +writelog "\tFloppy_B:\t\t${floppy1}" # defined in run-virt.sh and run-vmgrid.sh writelog "\tShared Folders '${sharename}':\t${sharepath}" diff --git a/src/os-plugins/plugins/virtualbox/files/virtualbox.include b/src/os-plugins/plugins/virtualbox/files/virtualbox.include index 0c7ba3ee..70ca394c 100644 --- a/src/os-plugins/plugins/virtualbox/files/virtualbox.include +++ b/src/os-plugins/plugins/virtualbox/files/virtualbox.include @@ -1,3 +1,14 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) 2010..2012 - OpenSLX GmbH +# +# This program/file is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org +# ----------------------------------------------------------------------------- # Include file (general template) for run-virt.include of the virtualbox plugin cat << EOF > "${confdir}/VirtualBox.xml" <?xml version="1.0"?> @@ -26,7 +37,9 @@ cat << EOF > "${confdir}/VirtualBox.xml" <!-- <DVDImages/> --> - <FloppyImages/> + <FloppyImages> + <Image uuid="{288d5452-2dd3-44f2-bfc8-78e205a4fa87}" location="${floppy1name}"/> + </FloppyImages> </MediaRegistry> <NetserviceRegistry> <DHCPServers> diff --git a/src/os-plugins/plugins/vmware/files/run-virt.include b/src/os-plugins/plugins/vmware/files/run-virt.include index 14b57316..698bd60e 100644 --- a/src/os-plugins/plugins/vmware/files/run-virt.include +++ b/src/os-plugins/plugins/vmware/files/run-virt.include @@ -82,7 +82,7 @@ config.version = \"8\"" >>${conffile} esac case "$vmversion" in 2.*|3.*|4.*|6.*|7.*|8.*|9.*) - echo " + [ ${shfolders} == FALSE ] || echo " # version specific stuff - ver. 2.*|3.*|6.*|7.*|8.*|9.* sharedFolder.option = \"alwaysEnabled\"" >>${conffile} ;; @@ -192,6 +192,7 @@ usb.pciSlotNumber = "16" ethernet0.pciSlotNumber = "17" sound.pciSlotNumber = "18" ehci.pciSlotNumber = "19" +scsi0.pciSlotNumber = "20" # shared folders sharedFolder0.present = \"${shfolders}\" |