diff options
| author | Simon Rettberg | 2018-10-26 13:57:18 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2018-10-26 13:57:18 +0200 |
| commit | 4d8ce22e08a89f68699eb25a3891ae57648bba19 (patch) | |
| tree | 36df5c0a5aa5a7eaeffef3a65997b1bad3731422 /core/modules/vbox/data/opt/openslx | |
| parent | Get rid of old lightdm modules (diff) | |
| download | mltk-4d8ce22e08a89f68699eb25a3891ae57648bba19.tar.gz mltk-4d8ce22e08a89f68699eb25a3891ae57648bba19.tar.xz mltk-4d8ce22e08a89f68699eb25a3891ae57648bba19.zip | |
[vbox] Remove old module
Diffstat (limited to 'core/modules/vbox/data/opt/openslx')
8 files changed, 0 insertions, 592 deletions
diff --git a/core/modules/vbox/data/opt/openslx/scripts/systemd-vbox_env b/core/modules/vbox/data/opt/openslx/scripts/systemd-vbox_env deleted file mode 100755 index 64e138e4..00000000 --- a/core/modules/vbox/data/opt/openslx/scripts/systemd-vbox_env +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/ash -# ----------------------------------------------------------------------------- -# -# Copyright (c) 2016..2018 bwLehrpool-Projektteam -# -# This program/file is free software distributed under the GPL version 2. -# See https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html -# -# If you have any feedback please consult https://bwlehrpool.de and -# send your feedback to bwlehrpool@hs-offenburg.de. -# -# General information about bwLehrpool can be found at https://bwlehrpool.de -# -# ----------------------------------------------------------------------------- -# systemd-vbox_env -# - This is the preparation script for the configuration of VirtualBox. -################################################################################ - -export PATH="$PATH":/opt/openslx/bin:/opt/openslx/sbin -VBOX_CONF_DIR=/opt/openslx/etc/vbox -VBOXMANAGE=$(which vboxmanage) - -# create required standard directories -mkdir -p "/tmp/virt/virtualbox" -m 1777 - -# load required Vbox modules -for module in vboxdrv.ko vboxnetadp.ko vboxnetflt.ko vboxpci.ko ; do - insmod /lib/modules/vbox/${module} || slxlog "vbox-systemd" "Loading of ${module} failed." -done - -# unload modules if proper systemd shutdown is provided -#unload_modules () { -# rmmod vboxpci vboxnetflt vboxnetadp vboxdrv -#} - -# Should be done by udev rule - no mknod needed. -# mknod -m 0660 /dev/vboxdrv c 10 59 - -chown root:vboxusers /dev/vboxdrv -chmod 666 /dev/vboxdrv -chown root:vboxusers /dev/vboxdrvu -chmod 666 /dev/vboxdrvu -chown root:vboxusers /dev/vboxusb -chmod 755 /dev/vboxusb - -# pretty dumb you can just create host-only interfaces, but not assign a specific -# name/number -vboxmanage hostonlyif create -ip link set dev vboxnet0 up -brctl addif br0 vboxnet0 -vboxmanage hostonlyif create -ip link set dev vboxnet1 up -brctl addif nat1 vboxnet1 -vboxmanage hostonlyif create -ip link set dev vboxnet2 up -brctl addif vsw2 vboxnet2 diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/README b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/README deleted file mode 100644 index 549d0037..00000000 --- a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/README +++ /dev/null @@ -1 +0,0 @@ -Not tested since refactoring! (January 2017) diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/empty-diff.vdi.gz b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/empty-diff.vdi.gz Binary files differdeleted file mode 100644 index c6abbd57..00000000 --- a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/empty-diff.vdi.gz +++ /dev/null diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/machine.include b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/machine.include deleted file mode 100644 index 532160d1..00000000 --- a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/machine.include +++ /dev/null @@ -1,200 +0,0 @@ -# ----------------------------------------------------------------------------- -# -# Copyright (c) 2010..2018 bwLehrpool-Projektteam -# -# This program/file is free software distributed under the GPL version 2. -# See https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html -# -# If you have any feedback please consult https://bwlehrpool.de and -# send your feedback to bwlehrpool@hs-offenburg.de. -# -# General information about bwLehrpool can be found at https://bwlehrpool.de -# -# ----------------------------------------------------------------------------- -# Include file (general template) for run-virt.include of the virtualbox plugin - -# TODO: Move this server side (just like vmware) -# !! A lot of variable names have changed and are NOT updated here !! -# Oh and for the love of god remove the above comment when this works again - -cat << EOF > "${machconfig}" -<?xml version="1.0"?> -<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.14-linux"> - <Machine uuid="{${machineuuid}}" name="${VM_DISPLAYNAME}" OSType="${VM_OS_TYPE}"> - <MediaRegistry> - <HardDisks> - <HardDisk uuid="{${diskuuid}}" location="${diskfile}" format="${imgfmt}" type="${imgtype}"/> - </HardDisks> - <FloppyImages/> - </MediaRegistry> -<!-- - <ExtraData> - <ExtraDataItem name="GUI/LastGuestSizeHint" value="1024,768"/> - <ExtraDataItem name="GUI/LastNormalWindowPosition" value="2393,123,1024,809"/> - </ExtraData> ---> - <Hardware version="2"> - <CPU count="${CPU_CORES}" hotplug="false"> - <HardwareVirtEx enabled="${enablevt}"/> - <HardwareVirtExNestedPaging enabled="${npaging}"/> - <HardwareVirtExVPID enabled="true"/> - <HardwareVirtExUX enabled="true"/> - <PAE enabled="true"/> - <LongMode enabled="false"/> - <HardwareVirtExLargePages enabled="false"/> - <HardwareVirtForce enabled="false"/> - </CPU> - <Memory RAMSize="${VM_MEM}" PageFusion="false"/> - <HID Pointing="USBTablet" Keyboard="PS2Keyboard"/> - <HPET enabled="false"/> - <Chipset type="ICH9"/> - <Boot> - <Order position="1" device="${boot}"/> <!-- HardDisk, DVD, Network, Floppy --> - <Order position="2" device="None"/> - <Order position="3" device="None"/> - <Order position="4" device="None"/> - </Boot> - <Display VRAMSize="${vram}" monitorCount="1" accelerate3D="${enable3d}" accelerate2DVideo="${enable2d}"/> - -<!-- <VideoCapture enabled="false" screens="18446744073709551615" horzRes="1024" vertRes="768" rate="512" fps="25"/> --> - - <RemoteDisplay enabled="false" port="${vrdpport}" authType="Null" authTimeout="5000"/> - <BIOS> - <ACPI enabled="true"/> - <IOAPIC enabled="true"/> - <Logo fadeIn="false" fadeOut="false" displayTime="0"/> - <BootMenu mode="MessageAndMenu"/> - <TimeOffset value="0"/> - <PXEDebug enabled="false"/> - </BIOS> -<!-- ehci ussw. noch prüfen! --> - <USB> - <Controllers> - <Controller name="OHCI" type="OHCI"/> - <Controller name="EHCI" type="EHCI"/> - </Controllers> - <DeviceFilters> - <DeviceFilter name="Leerfilter" active="true" remote="0"/> - </DeviceFilters> - </USB> - <Network> - <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="${VM_VDE_MAC_ADDR}" cable="true" speed="0" type="${vb_network_card}"> - <GenericInterface driver="VDE"> - <Properties name="network" value="/tmp/vde-switch"/> - </GenericInterface> - </Adapter> - <Adapter slot="2" enabled="false" MACAddress="080027CB8CD8" cable="true" speed="0" type="82540EM" /> - <Adapter slot="3" enabled="false" MACAddress="080027424034" cable="true" speed="0" type="82540EM" /> - <Adapter slot="4" enabled="false" MACAddress="0800272CD0EA" cable="true" speed="0" type="82540EM" /> - <Adapter slot="5" enabled="false" MACAddress="080027ED7227" cable="true" speed="0" type="82540EM" /> - <Adapter slot="6" enabled="false" MACAddress="080027B77757" cable="true" speed="0" type="82540EM" /> - <Adapter slot="7" enabled="false" MACAddress="0800272267D8" cable="true" speed="0" type="82540EM" /> - <Adapter slot="8" enabled="false" MACAddress="080027573BF5" cable="true" speed="0" type="Am79C973" /> - </Network> - <UART> - <Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/> - <Port slot="1" enabled="false" IOBase="0x2f8" IRQ="3" hostMode="Disconnected"/> - </UART> - <LPT> - <Port slot="0" enabled="false" IOBase="0x378" IRQ="7"/> - <Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/> - </LPT> -<!-- <AudioAdapter controller="${guestaudio}" driver="Pulse" enabled="true"/> --> - <AudioAdapter controller="${guestaudio}" driver="Alsa" enabled="${audio}"/> - <RTC localOrUTC="UTC"/> - <!-- should be configured depending on the chosen operating system --> - $sharelist -<!-- <SharedFolders> - <SharedFolder name="${sharename}" hostPath="${sharepath}" writable="true"/> - <SharedFolder name="${homesharename}" hostPath="${homesharepath}" writable="true"/> - <SharedFolder name="${commonsharename}" hostPath="${commonsharepath}" writable="true"/> - </SharedFolders> --> -<!-- <Clipboard mode="Disabled"/> --> - <Clipboard mode="Bidirectional"/> - <DragAndDrop mode="Disabled"/> - <IO> - <IoCache enabled="true" size="5"/> - <BandwidthGroups/> - </IO> - <HostPci> - <Devices/> - </HostPci> - <EmulatedUSB> - <CardReader enabled="false"/> - </EmulatedUSB> - <Guest memoryBalloonSize="0"/> - <GuestProperties> -<!-- <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxControl.exe" value="4.3.26r98988" timestamp="1430324928738330000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxCredProv.dll" value="-" timestamp="1430324928808993000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxDisp.dll" value="4.3.26r98988" timestamp="1430324928752750000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxGINA.dll" value="-" timestamp="1430324928808417000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxGuest.sys" value="4.3.26r98988" timestamp="1430324928908144000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxHook.dll" value="4.3.26r98988" timestamp="1430324928750553000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxMMR.exe" value="-" timestamp="1430324928809525000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxMMRHook.dll" value="-" timestamp="1430324928809992000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxMRXNP.dll" value="4.3.26r98988" timestamp="1430324928777003000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxMouse.sys" value="4.3.26r98988" timestamp="1430324928909743000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxOGL.dll" value="4.3.26r98988" timestamp="1430324928901186000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxOGLarrayspu.dll" value="4.3.26r98988" timestamp="1430324928823307000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxOGLcrutil.dll" value="4.3.26r98988" timestamp="1430324928837623000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxOGLerrorspu.dll" value="4.3.26r98988" timestamp="1430324928846343000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxOGLfeedbackspu.dll" value="4.3.26r98988" timestamp="1430324928884750000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxOGLpackspu.dll" value="4.3.26r98988" timestamp="1430324928865359000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxOGLpassthroughspu.dll" value="4.3.26r98988" timestamp="1430324928872533000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxSF.sys" value="4.3.26r98988" timestamp="1430324928911340000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxService.exe" value="4.3.26r98988" timestamp="1430324928784233000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxTray.exe" value="4.3.26r98988" timestamp="1430324928807478000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Components/VBoxVideo.sys" value="4.3.26r98988" timestamp="1430324928913222000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/HostVerLastChecked" value="4.3.26" timestamp="1430324950071952000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/InstallDir" value="C:/Program Files/Oracle/VirtualBox_Guest_Additions" timestamp="1430324928718085000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Revision" value="98988" timestamp="1430324928712396000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/Version" value="4.3.26" timestamp="1430324928711533000" flags=""/> - <GuestProperty name="/VirtualBox/GuestAdd/VersionExt" value="4.3.26" timestamp="1430324928711988000" flags=""/> - <GuestProperty name="/VirtualBox/GuestInfo/Net/0/MAC" value="080027CAF695" timestamp="1430324954369734000" flags=""/> - <GuestProperty name="/VirtualBox/GuestInfo/Net/0/Status" value="Up" timestamp="1430324954369295000" flags=""/> - <GuestProperty name="/VirtualBox/GuestInfo/Net/0/V4/Broadcast" value="255.255.255.255" timestamp="1430324954368391000" flags=""/> - <GuestProperty name="/VirtualBox/GuestInfo/Net/0/V4/IP" value="10.0.2.15" timestamp="1430324954367074000" flags=""/> - <GuestProperty name="/VirtualBox/GuestInfo/Net/0/V4/Netmask" value="255.255.255.0" timestamp="1430324954368890000" flags=""/> - <GuestProperty name="/VirtualBox/GuestInfo/Net/Count" value="1" timestamp="1430324984558751000" flags=""/> ---> -<!-- - <GuestProperty name="/VirtualBox/GuestInfo/OS/LoggedInUsers" value="1" timestamp="1430324933845802000" flags="TRANSIENT, TRANSRESET"/> ---> - <GuestProperty name="/VirtualBox/GuestInfo/OS/LoggedInUsersList" value="student" timestamp="1430324933844717000" flags="TRANSIENT, TRANSRESET"/> -<!-- - <GuestProperty name="/VirtualBox/GuestInfo/OS/NoLoggedInUsers" value="false" timestamp="1430324933847595000" flags="TRANSIENT, TRANSRESET"/> ---> - <GuestProperty name="/VirtualBox/GuestInfo/OS/Product" value="Windows 7" timestamp="1430324928709396000" flags=""/> - <GuestProperty name="/VirtualBox/GuestInfo/OS/Release" value="6.1.7601" timestamp="1430324928710175000" flags=""/> -<!-- - <GuestProperty name="/VirtualBox/GuestInfo/OS/ServicePack" value="1" timestamp="1430324928711029000" flags=""/> - <GuestProperty name="/VirtualBox/GuestInfo/User/student@student-PC/UsageState" value="Idle" timestamp="1430324979531817000" flags="TRANSIENT, TRANSRESET"/> - <GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="de_DE" timestamp="1430324985485377000" flags=""/> ---> - </GuestProperties> - </Hardware> - <StorageControllers> - <StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true"> - <AttachedDevice type="HardDisk" port="0" device="0"> - <Image uuid="${imageuuid}"/> - </AttachedDevice> <!-- PLEASE DO NOT REMOVE THIS COMMENT (HD)!!! --> - <AttachedDevice passthrough="false" type="DVD" port="0" device="1"> - <HostDrive src="${CDROM_0}"/> -<!-- <Image uuid="{849a61c7-ad64-4594-b0c8-fbe17dc3d2a6}"/> --> - </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> - <AttachedDevice type="Floppy" port="0" device="1"> - <Image uuid="{288d5452-2dd3-44f2-bfc8-78e205a4fa87}"/> - </AttachedDevice> - </StorageController> - </StorageControllers> - </Machine> -</VirtualBox> -EOF - diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/run-virt.include b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/run-virt.include deleted file mode 100755 index df7772e8..00000000 --- a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/run-virt.include +++ /dev/null @@ -1,274 +0,0 @@ -# ----------------------------------------------------------------------------- -# -# Copyright (c) 2009..2018 bwLehrpool-Projektteam -# -# This program/file is free software distributed under the GPL version 2. -# See https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html -# -# If you have any feedback please consult https://bwlehrpool.de and -# send your feedback to bwlehrpool@hs-offenburg.de. -# -# General information about bwLehrpool can be found at https://bwlehrpool.de -# -# ----------------------------------------------------------------------------- -# run-virt.include -# - component for virtualbox of the vmchooser plugin vmchooser-run_virt -################################################################################ - -[ -r /run/hwinfo ] && source /run/hwinfo - -################################################################################ -### declaration of default variables -################################################################################ - -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" - writelog "Incomplete variable set passed from main run-virt" - error_user "Wichtige variablen, die das VBox Plugin benötigt, wurden nicht -gesetzt. Kann die VM nicht starten." - cleanexit 1 -fi - -# 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_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_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 -snapshotuuid="34f617be-192a-46b3-a8ae-bce1029e093f" # snapshot UUID is static - -# link to image, determine extension (type) -imgfmt=$(echo ${SRC_IMG_ABSOLUTE##*.} | tr '[a-z]' '[A-Z]') -if [ -n "$VM_DISKFILE_RW" ]; then - ln -sf "${VM_DISKFILE_RW}" "${VBOX_HDD_LINK}" -else - ln -sf "${VM_DISKFILE_RO}" "${VBOX_HDD_LINK}" - # image is RO, we only support VDI? - if [ "$imgfmt" != "VDI" ]; then - writelog "Image is not VDI, cannot create snapshot.." - error_log "Die gewählte VM nutzt VBox, hat aber kein VDI image (sondern '$imgfmt'), kann VM nicht starten." - cleanexit 1 - fi -fi - - -# Setting some default variables -SHARED_FOLDERS="TRUE" -enablevt="true" - -# set some base configuration depending on the guest operating system -case "${VM_OS_TYPE}" in - Windows31) - VM_MEM="32" - vram="16" - CPU_CORES=1 - enablevt="false" - SHARED_FOLDERS="FALSE" - ;; - WindowsNT) - VM_MEM="4096" - vram="16" - CPU_CORES=4 - enablevt="false" - SHARED_FOLDERS="FALSE" - ;; - Windows95) - VM_MEM="128" - vram="32" - CPU_CORES=1 - enablevt="false" - SHARED_FOLDERS="FALSE" - ;; - Windows98) - VM_MEM="256" - vram="64" - CPU_CORES=1 - SHARED_FOLDERS="FALSE" - ;; - WindowsMe) - VM_MEM="256" - vram="64" - CPU_CORES=1 - SHARED_FOLDERS="FALSE" - ;; - WindowsXP) - ;; - WindowsVista) - ;; - Windows7) - ;; - Windows8) - ;; - OS2eCS) - VM_MEM="256" - CPU_CORES=1 - enable2d="false" - ;; - MacOS) - enable2d="false" - ;; - Linux*) - ;; - *) - VM_OS_TYPE="Other" - enable2d="false" - ;; -esac - -if [ "$HW_KVM" != "ENABLED" ]; then - enablevt="false" - CPU_CORES=1 # check for VT, if not available only 1 cpu supported -fi - -writelog "Directories:" -writelog "\tConfig dir:\t\t$VBOX_ROOT" -writelog "\tMachines dir:\t\t$VBOX_MACHINES_DIR" -writelog "\tMachine config:\t\t$VBOX_MACHINE_CONFIG" - -################################################################################ -### Hardware checks -################################################################################ - -# remove ':' from MAC addr for vbox and generate a VDE (virtual device ethernet) -# MAC addr from the first one (put in prefix 00DE) -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-${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 -diskuuid=$(VBoxManage -q showvdiinfo ${VBOX_HDD_LINK} \ - | grep UUID | grep -v "Parent UUID" | awk '{print $2}' \ - | grep -v use ) # nec. for VBox >= 4 - - -if [ -n "$VM_DISKFILE_RW" ]; then - # Image is already RW - easy - imgtype="Normal" - imageuuid=${diskuuid} -else - # use temp disk as snapshot to get CoW - imgtype="Immutable" # make disk immutable - imageuuid=${snapshotuuid} - < "${VMCHOOSERVBOX}/empty-diff.vdi.gz" gunzip > "${VBOX_SNAPSHOT_DIR}/{${snapshotuuid}}.vdi" - # patch the disk file uuid into the snapshot vdi file: - # We read from offset 424 in the source HDD and write to offset 392 in out prepared - # CoW container. 16 bytes will be copied, which is the binary UUID - # TODO: This requires the image to be a vdi/vdh; Afaik, vbox supports vmdk, - # so this code would break in that case. Can we use the diskuuid we got via - # VBoxManage, convert to binary, and patch it - dd if=${VBOX_HDD_LINK} of="${VBOX_SNAPSHOT_DIR}/{${snapshotuuid}}.vdi" seek=424 \ - skip=392 bs=16 count=1 conv=notrunc -fi - -# translate network kinds (nat, bridged, host-only) -# TODO: Server should prepare this in returned xml -case "${network_kind}" in - bridge*) - network_kind='HostOnlyInterface name="vboxnet0"' - ;; - host*) - network_kind='HostOnlyInterface name="vboxnet2"' - ;; - *) - network_kind='HostOnlyInterface name="vboxnet1"' -esac - -boot="HardDisk" - -writelog "\tSnapshots dir:\t\t$VBOX_SNAPSHOT_DIR" -writelog "Diskimage:" -writelog "\tDisk file:\t\t$VBOX_HDD_LINK" -writelog "\tDisk type:\t\t$imgtype" -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 "" -[ "$HW_KVM" = "ENABLED" ] && writelog " (VT enabled CPU)" -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 "\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}" - -################################################################################ -### Pepare and configure virtual machine and disk image -################################################################################ - -# create Virtualbox.xml - -# Shares given? -if [ "x$SHARED_FOLDERS" != "xFALSE" ]; then - sharelist="<SharedFolders> - <SharedFolder name=\"${homesharename}\" hostPath=\"${homesharepath}\" writable=\"true\"/> - <SharedFolder name=\"${commonsharename}\" hostPath=\"${commonsharepath}\" writable=\"true\"/> - </SharedFolders>" -else - sharelist='' -fi - -source "${VMCHOOSERVBOX}/virtualbox.include" # create Virtualbox.xml - -# remove snapshot disk when using rw images -if [ "${imgtype}" != "Immutable" ]; then - sed -i "/${snapshotuuid}/d" "${VBOX_ROOT}/VirtualBox.xml" -fi - -# TODO: add rawdisk if requested -#"raw.vmdk" format="VMDK" type="Writethrough"/> - -source "${VMCHOOSERVBOX}/machine.include" # create machine.xml - -# remove CD-ROM if not available -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}" -fi - -################################################################################ -### Set env for vmchooser-run_virt -################################################################################ - -# wait for a certain command to settle -# get the PID of the right process -# 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 - -# set the variables appropriately (several interfaces with different names) -VIRTCMD=$(which VirtualBox 2>/dev/null) -VIRTCMDOPTS="--startvm ${machineuuid} --start-running --fullscreen" - -# set headless mode (-v off to disable vrdp) -VIRTCMDHL=$(which VBoxHeadless 2>/dev/null) -VIRTCMDOPTSHL="-s ${machineuuid}" - diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/rwimg.vdi.gz b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/rwimg.vdi.gz Binary files differdeleted file mode 100644 index e2133d6d..00000000 --- a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/rwimg.vdi.gz +++ /dev/null diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.conf b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.conf deleted file mode 100644 index 8a7a58e4..00000000 --- a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Todo: Good setting -export VBOX_USER_HOME="" diff --git a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.include b/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.include deleted file mode 100644 index 5da82b10..00000000 --- a/core/modules/vbox/data/opt/openslx/vmchooser/plugins/virtualbox/virtualbox.include +++ /dev/null @@ -1,59 +0,0 @@ -# ----------------------------------------------------------------------------- -# -# Copyright (c) 2010..2018 bwLehrpool-Projektteam -# -# This program/file is free software distributed under the GPL version 2. -# See https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html -# -# If you have any feedback please consult https://bwlehrpool.de and -# send your feedback to bwlehrpool@hs-offenburg.de. -# -# General information about bwLehrpool can be found at https://bwlehrpool.de -# -# ----------------------------------------------------------------------------- -# Include file (general template) for run-virt.include of the virtualbox plugin - -cat << EOF > "${VBOX_ROOT}/VirtualBox.xml" -<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.12-linux"> - <Global> - <ExtraData> - <ExtraDataItem name="GUI/Input/AutoCapture" value="true"/> - <ExtraDataItem name="GUI/Input/HostKey" value="65300"/> <!-- scroll lock / Rollen --> - <ExtraDataItem name="GUI/LastVMSelected" value="${machineuuid}"/> - <ExtraDataItem name="GUI/HostScreenSaverDisabled" value="false"/> - <ExtraDataItem name="GUI/LicenseAgreed" value="1,2,3,4,5,6,7,8,9"/> - <ExtraDataItem name="GUI/MaxGuestResolution" value="any"/> <!-- auto, width,height --> - <ExtraDataItem name="GUI/UpdateCheckCount" value="2"/> - <ExtraDataItem name="GUI/UpdateDate" value="never"/> - <ExtraDataItem name="GUI/SuppressMessages" value=",remindAboutAutoCapture,confirmInputCapture,remindAboutWrongColorDepth,confirmGoingFullscreen,remindAboutMouseIntegrationOn,remindAboutMouseIntegrationOff,showRuntimeError.warning.DevATA_DISKFULL,remindAboutPausedVMInput,confirmVMReset,showRuntimeError.warning.HostAudioNotResponding,showRuntimeError.warning.ExtPackNoEhci,remindAboutMouseIntegration"/> - <ExtraDataItem name="GUI/TrayIcon/Enabled" value="false"/> - </ExtraData> - <MachineRegistry> - <MachineEntry uuid="{${machineuuid}}" src="Machines/${VM_CLEANNAME}/${VM_CLEANNAME}.xml"/> - </MachineRegistry> - <MediaRegistry> - <HardDisks> - <HardDisk uuid="{${diskuuid}}" location="${diskfile}" format="${imgfmt}" type="${imgtype}"> - <HardDisk uuid="{${snapshotuuid}}" location="${snapshotdir}/{${snapshotuuid}}.vdi" format="VDI" autoReset="true"/> - </HardDisk> - </HardDisks> - <!-- - <DVDImages/> - --> - <FloppyImages> - <Image uuid="{288d5452-2dd3-44f2-bfc8-78e205a4fa87}" location="${floppy1name}"/> - </FloppyImages> - </MediaRegistry> - <NetserviceRegistry> - <DHCPServers> - <DHCPServer networkName="HostInterfaceNetworking-vboxnet0" IPAddress="0.0.0.0" networkMask="0.0.0.0" lowerIP="0.0.0.0" upperIP="0.0.0.0" enabled="0"/> - <!-- - <DHCPServer networkName="HostInterfaceNetworking-vboxnet1" IPAddress="0.0.0.0" networkMask="0.0.0.0" lowerIP="0.0.0.0" upperIP="0.0.0.0" enabled="0"/> - --> - </DHCPServers> - </NetserviceRegistry> - <SystemProperties defaultMachineFolder="${machfolder}" defaultHardDiskFolder="${diskfolder}" defaultHardDiskFormat="VDI" remoteDisplayAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3"/> - <USBDeviceFilters/> - </Global> -</VirtualBox> -EOF |
