diff options
Diffstat (limited to 'core/modules/vbox/data/opt/openslx/vmchooser')
-rw-r--r-- | core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/README | 1 | ||||
-rw-r--r-- | core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/empty-diff.vdi.gz (renamed from core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/empty-diff.vdi.gz) | bin | 285 -> 285 bytes | |||
-rw-r--r-- | core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/machine.include (renamed from core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/machine.include) | 10 | ||||
-rwxr-xr-x | core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/run-virt.include (renamed from core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include) | 79 | ||||
-rw-r--r-- | core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/rwimg.vdi.gz (renamed from core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/rwimg.vdi.gz) | bin | 268 -> 268 bytes | |||
-rw-r--r-- | core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.conf (renamed from core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/virtualbox.conf) | 0 | ||||
-rw-r--r-- | core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.include (renamed from core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/virtualbox.include) | 2 |
7 files changed, 48 insertions, 44 deletions
diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/README b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/README new file mode 100644 index 00000000..549d0037 --- /dev/null +++ b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/README @@ -0,0 +1 @@ +Not tested since refactoring! (January 2017) diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/empty-diff.vdi.gz b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/empty-diff.vdi.gz Binary files differindex c6abbd57..c6abbd57 100644 --- a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/empty-diff.vdi.gz +++ b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/empty-diff.vdi.gz diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/machine.include b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/machine.include index 344ccc48..bd14cdb0 100644 --- a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/machine.include +++ b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/machine.include @@ -32,7 +32,7 @@ cat << EOF > "${machconfig}" </ExtraData> --> <Hardware version="2"> - <CPU count="${cpu_cores}" hotplug="false"> + <CPU count="${CPU_CORES}" hotplug="false"> <HardwareVirtEx enabled="${enablevt}"/> <HardwareVirtExNestedPaging enabled="${npaging}"/> <HardwareVirtExVPID enabled="true"/> @@ -42,7 +42,7 @@ cat << EOF > "${machconfig}" <HardwareVirtExLargePages enabled="false"/> <HardwareVirtForce enabled="false"/> </CPU> - <Memory RAMSize="${mem}" PageFusion="false"/> + <Memory RAMSize="${VM_MEM}" PageFusion="false"/> <HID Pointing="USBTablet" Keyboard="PS2Keyboard"/> <HPET enabled="false"/> <Chipset type="ICH9"/> @@ -76,10 +76,10 @@ cat << EOF > "${machconfig}" </DeviceFilters> </USB> <Network> - <Adapter slot="0" enabled="true" MACAddress="${macaddr}" cable="true" speed="0" type="${vb_network_card}"> + <Adapter slot="0" enabled="true" MACAddress="${VM_MAC_ADDR}" cable="true" speed="0" type="${vb_network_card}"> <${network_kind}/> </Adapter> - <Adapter slot="1" enabled="false" MACAddress="${vdemacaddr}" cable="true" speed="0" type="${vb_network_card}"> + <Adapter slot="1" enabled="false" MACAddress="${VM_VDE_MAC_ADDR}" cable="true" speed="0" type="${vb_network_card}"> <GenericInterface driver="VDE"> <Properties name="network" value="/tmp/vde-switch"/> </GenericInterface> @@ -180,7 +180,7 @@ cat << EOF > "${machconfig}" <Image uuid="${imageuuid}"/> </AttachedDevice> <!-- PLEASE DO NOT REMOVE THIS COMMENT (HD)!!! --> <AttachedDevice passthrough="false" type="DVD" port="0" device="1"> - <HostDrive src="${cdrom_0}"/> + <HostDrive src="${CDROM_0}"/> <!-- <Image uuid="{849a61c7-ad64-4594-b0c8-fbe17dc3d2a6}"/> --> </AttachedDevice> <!-- PLEASE DO NOT REMOVE THIS COMMENT (CD)!!! --> </StorageController> diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/run-virt.include index 59dd712d..8bec8446 100755 --- a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/run-virt.include +++ b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/run-virt.include @@ -1,6 +1,6 @@ # ----------------------------------------------------------------------------- -# Copyright (c) 2009..2011 - RZ Uni Freiburg -# Copyright (c) 2009..2013 - OpenSLX GmbH +# Copyright (c) 2009..2016 - RZ Uni Freiburg +# Copyright (c) 2009..2016 - OpenSLX GmbH # # This program/file is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -20,7 +20,7 @@ ### declaration of default variables ################################################################################ -if ! isset VM_NAME_CLEAN IMG_BASENAME SRC_IMG_ABSOLUTE VM_OS_TYPE; then +if ! isset VM_CLEANNAME IMG_BASENAME SRC_IMG_ABSOLUTE VM_OS_TYPE; then env=$(mktemp) env > "$env" slxlog -d "virt-vbox-init" "A required variable is not set." "$env" @@ -30,17 +30,20 @@ gesetzt. Kann die VM nicht starten." cleanexit 1 fi -declare -rg VMCHOOSERVBOX="/opt/openslx/vmchooser/${self}" +# Define which features the VMware plugin supports +declare -rg PLUGIN_FEATURES="TODO" + +declare -rg VMCHOOSERVBOX="/opt/openslx/vmchooser/${PLUGIN_ID}" declare -rg VBOX_ROOT="${TMPDIR}/vbox" # dir for configs declare -rg VBOX_MACHINES_DIR="${VBOX_ROOT}/Machines" -declare -rg VBOX_SNAPSHOT_DIR="${VBOX_MACHINES_DIR}/${VM_NAME_CLEAN}/Snapshots" +declare -rg VBOX_SNAPSHOT_DIR="${VBOX_MACHINES_DIR}/${VM_CLEANNAME}/Snapshots" declare -rg VBOX_HDD_DIR="${VBOX_ROOT}/HardDisks" declare -rg VBOX_HDD_LINK="${VBOX_HDD_DIR}/${IMG_BASENAME}" export VBOX_USER_HOME="${VBOX_ROOT}" # instead of $HOME/.VirtualBox -# use VM_NAME_CLEAN for dir and config names since VM_DISPLAYNAME can be very long -VBOX_MACHINE_CONFIG="${VBOX_MACHINES_DIR}/${VM_NAME_CLEAN}/${VM_NAME_CLEAN}.xml" +# use VM_CLEANNAME for dir and config names since VM_DISPLAYNAME can be very long +VBOX_MACHINE_CONFIG="${VBOX_MACHINES_DIR}/${VM_CLEANNAME}/${VM_CLEANNAME}.xml" mkdir -p "${VBOX_HDD_DIR}" "${VBOX_SNAPSHOT_DIR}" 2>/dev/null enable2d="true" # default setting for accelerated 2D grapics (OS dependent) vram="128" # set default graphics ram @@ -62,43 +65,43 @@ fi # Setting some default variables -shfolders="TRUE" +SHARED_FOLDERS="TRUE" enablevt="true" # set some base configuration depending on the guest operating system case "${VM_OS_TYPE}" in Windows31) - mem="32" + VM_MEM="32" vram="16" - cpu_cores=1 + CPU_CORES=1 enablevt="false" - shfolders="FALSE" + SHARED_FOLDERS="FALSE" ;; WindowsNT) - mem="4096" + VM_MEM="4096" vram="16" - cpu_cores=4 + CPU_CORES=4 enablevt="false" - shfolders="FALSE" + SHARED_FOLDERS="FALSE" ;; Windows95) - mem="128" + VM_MEM="128" vram="32" - cpu_cores=1 + CPU_CORES=1 enablevt="false" - shfolders="FALSE" + SHARED_FOLDERS="FALSE" ;; Windows98) - mem="256" + VM_MEM="256" vram="64" - cpu_cores=1 - shfolders="FALSE" + CPU_CORES=1 + SHARED_FOLDERS="FALSE" ;; WindowsMe) - mem="256" + VM_MEM="256" vram="64" - cpu_cores=1 - shfolders="FALSE" + CPU_CORES=1 + SHARED_FOLDERS="FALSE" ;; WindowsXP) ;; @@ -109,8 +112,8 @@ case "${VM_OS_TYPE}" in Windows8) ;; OS2eCS) - mem="256" - cpu_cores=1 + VM_MEM="256" + CPU_CORES=1 enable2d="false" ;; MacOS) @@ -126,7 +129,7 @@ esac if [ "$HW_KVM" != "ENABLED" ]; then enablevt="false" - cpu_cores=1 # check for VT, if not available only 1 cpu supported + CPU_CORES=1 # check for VT, if not available only 1 cpu supported fi writelog "Directories:" @@ -140,10 +143,10 @@ writelog "\tMachine config:\t\t$VBOX_MACHINE_CONFIG" # remove ':' from MAC addr for vbox and generate a VDE (virtual device ethernet) # MAC addr from the first one (put in prefix 00DE) -macaddr=$(echo ${macaddr} | sed 's/://g') -vdemacaddr=$(echo ${macaddr} | sed 's/^..../00DE/g') +VM_MAC_ADDR=$(echo ${VM_MAC_ADDR} | sed 's/://g') +VM_VDE_MAC_ADDR=$(echo ${VM_MAC_ADDR} | sed 's/^..../00DE/g') -machineuuid="00000000-0000-0000-0000-${macaddr}" # machine UUID, MAC addr part of it +machineuuid="00000000-0000-0000-0000-${VM_MAC_ADDR}" # machine UUID, MAC addr part of it machineuuid=$(echo ${machineuuid} | tr "[A-Z]" "[a-z]") # cosmetical, since UUID in lower case # get UUID of VBox image @@ -194,19 +197,19 @@ writelog "\tVMostype:\t\t$VM_OS_TYPE" writelog "\tMachine UUID:\t\t$machineuuid" writelog "\tDisk UUID:\t\t$diskuuid" writelog "Virtual Hardware:" -writelog "\tCPU cores:\t\t${cpu_cores}\c" +writelog "\tCPU cores:\t\t${CPU_CORES}\c" writelog "" [ "$HW_KVM" = "ENABLED" ] && writelog " (VT enabled CPU)" -writelog "\tGuest RAM:\t\t${mem} MB" -# echo nur wenn hostmem gesetzt -[ -n "${hostmem}" ] && writelog "\tHost RAM:\t\t${hostmem} MB" -writelog "\tMAC address:\t\t$macaddr" +writelog "\tGuest RAM:\t\t${VM_MEM} MB" +# echo nur wenn HOST_MEM_REMAINING gesetzt +[ -n "${HOST_MEM_REMAINING}" ] && writelog "\tHost RAM:\t\t${HOST_MEM_REMAINING} MB" +writelog "\tMAC address:\t\t$VM_MAC_ADDR" writelog "\tNetwork card:\t\t${vb_network_card}" writelog "\tNetwork kind:\t\t${network_kind}" writelog "\tBooting from:\t\t${boot}\c" writelog "" -writelog "\tCD-ROM1:\t\t${cdrom0}" -#writelog "\tCD-ROM2:\t\t${cdrom1}" +writelog "\tCD-ROM1:\t\t${CDROM0}" +#writelog "\tCD-ROM2:\t\t${CDROM1}" writelog "\tFloppy_A:\t\t${floppy0}" writelog "\tFloppy_B:\t\t${floppy1}" # defined in run-virt.sh and run-vmgrid.sh @@ -219,7 +222,7 @@ writelog "\tShared Folders '${sharename}':\t${sharepath}" # create Virtualbox.xml # Shares given? -if [ "x$shfolders" != "xFALSE" ]; then +if [ "x$SHARED_FOLDERS" != "xFALSE" ]; then sharelist="<SharedFolders> <SharedFolder name=\"${homesharename}\" hostPath=\"${homesharepath}\" writable=\"true\"/> <SharedFolder name=\"${commonsharename}\" hostPath=\"${commonsharepath}\" writable=\"true\"/> @@ -241,7 +244,7 @@ fi source "${VMCHOOSERVBOX}/machine.include" # create machine.xml # remove CD-ROM if not available -if [ "${cdrom0}" != "TRUE" ]; then +if [ "${CDROM0}" != "TRUE" ]; then sed -i "/HostDrive/d" "${VBOX_MACHINE_CONFIG}" sed -i '/AttachedDevice.*type="DVD"/d' "${VBOX_MACHINE_CONFIG}" sed -i "/<!-- PLEASE DO NOT REMOVE THIS COMMENT (CD)!!! -->/d" "${VBOX_MACHINE_CONFIG}" diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/rwimg.vdi.gz b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/rwimg.vdi.gz Binary files differindex e2133d6d..e2133d6d 100644 --- a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/rwimg.vdi.gz +++ b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/rwimg.vdi.gz diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/virtualbox.conf b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.conf index 8a7a58e4..8a7a58e4 100644 --- a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/virtualbox.conf +++ b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.conf diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/virtualbox.include b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.include index 70a036a8..b4bb38e3 100644 --- a/core/modules/vbox/data/opt/openslx/vmchooser/virtualbox/virtualbox.include +++ b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.include @@ -27,7 +27,7 @@ cat << EOF > "${VBOX_ROOT}/VirtualBox.xml" <ExtraDataItem name="GUI/TrayIcon/Enabled" value="false"/> </ExtraData> <MachineRegistry> - <MachineEntry uuid="{${machineuuid}}" src="Machines/${VM_NAME_CLEAN}/${VM_NAME_CLEAN}.xml"/> + <MachineEntry uuid="{${machineuuid}}" src="Machines/${VM_CLEANNAME}/${VM_CLEANNAME}.xml"/> </MachineRegistry> <MediaRegistry> <HardDisks> |