From 8f53d2c379218f155e645f9d1fd3f78073c2bf6c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 4 Sep 2014 15:26:39 +0200 Subject: [vanilla-kernel] New Module --- .../patches/vmnet__3.13-3.13__1.0-10.0.2.patch | 27 ++++++++++++++++++++++ .../patches/vmnet__3.13-9.9__1.0-10.0.2.patch | 27 ++++++++++++++++++++++ .../patches/vmnet__3.13-9.9__1.0-100.0.patch | 27 ---------------------- 3 files changed, 54 insertions(+), 27 deletions(-) create mode 100644 remote/modules/vmware/patches/vmnet__3.13-3.13__1.0-10.0.2.patch create mode 100644 remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-10.0.2.patch delete mode 100644 remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-100.0.patch (limited to 'remote/modules/vmware') diff --git a/remote/modules/vmware/patches/vmnet__3.13-3.13__1.0-10.0.2.patch b/remote/modules/vmware/patches/vmnet__3.13-3.13__1.0-10.0.2.patch new file mode 100644 index 00000000..54607506 --- /dev/null +++ b/remote/modules/vmware/patches/vmnet__3.13-3.13__1.0-10.0.2.patch @@ -0,0 +1,27 @@ +--- a/filter.c 2014-04-17 05:30:43.497846349 -0700 ++++ b/filter.c 2014-04-17 05:30:41.445846394 -0700 +@@ -203,7 +203,11 @@ + #endif + + static unsigned int ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + VNetFilterHookFn(unsigned int hooknum, // IN: ++#else ++VNetFilterHookFn(const struct nf_hook_ops *ops, // IN: ++#endif + #ifdef VMW_NFHOOK_USES_SKB + struct sk_buff *skb, // IN: + #else +@@ -252,7 +256,11 @@ + + /* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */ + /* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */ +- transmit = (hooknum == VMW_NF_INET_POST_ROUTING); ++ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) ++ transmit = (hooknum == VMW_NF_INET_POST_ROUTING); ++ #else ++ transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING); ++ #endif + + packetHeader = compat_skb_network_header(skb); + ip = (struct iphdr*)packetHeader; diff --git a/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-10.0.2.patch b/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-10.0.2.patch new file mode 100644 index 00000000..54607506 --- /dev/null +++ b/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-10.0.2.patch @@ -0,0 +1,27 @@ +--- a/filter.c 2014-04-17 05:30:43.497846349 -0700 ++++ b/filter.c 2014-04-17 05:30:41.445846394 -0700 +@@ -203,7 +203,11 @@ + #endif + + static unsigned int ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + VNetFilterHookFn(unsigned int hooknum, // IN: ++#else ++VNetFilterHookFn(const struct nf_hook_ops *ops, // IN: ++#endif + #ifdef VMW_NFHOOK_USES_SKB + struct sk_buff *skb, // IN: + #else +@@ -252,7 +256,11 @@ + + /* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */ + /* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */ +- transmit = (hooknum == VMW_NF_INET_POST_ROUTING); ++ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) ++ transmit = (hooknum == VMW_NF_INET_POST_ROUTING); ++ #else ++ transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING); ++ #endif + + packetHeader = compat_skb_network_header(skb); + ip = (struct iphdr*)packetHeader; diff --git a/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-100.0.patch b/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-100.0.patch deleted file mode 100644 index 54607506..00000000 --- a/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-100.0.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/filter.c 2014-04-17 05:30:43.497846349 -0700 -+++ b/filter.c 2014-04-17 05:30:41.445846394 -0700 -@@ -203,7 +203,11 @@ - #endif - - static unsigned int -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) - VNetFilterHookFn(unsigned int hooknum, // IN: -+#else -+VNetFilterHookFn(const struct nf_hook_ops *ops, // IN: -+#endif - #ifdef VMW_NFHOOK_USES_SKB - struct sk_buff *skb, // IN: - #else -@@ -252,7 +256,11 @@ - - /* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */ - /* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */ -- transmit = (hooknum == VMW_NF_INET_POST_ROUTING); -+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) -+ transmit = (hooknum == VMW_NF_INET_POST_ROUTING); -+ #else -+ transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING); -+ #endif - - packetHeader = compat_skb_network_header(skb); - ip = (struct iphdr*)packetHeader; -- cgit v1.2.3-55-g7522 From 37f931c37d49fad2ab570a413663ab7e0aac09b0 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 4 Sep 2014 15:31:38 +0200 Subject: [vmware] Support for 10.0.3 --- remote/modules/vmware/module.build | 10 +++++++- remote/modules/vmware/module.conf | 2 +- .../patches/vmnet__3.13-9.9__1.0-10.0.2.patch | 27 ---------------------- 3 files changed, 10 insertions(+), 29 deletions(-) delete mode 100644 remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-10.0.2.patch (limited to 'remote/modules/vmware') diff --git a/remote/modules/vmware/module.build b/remote/modules/vmware/module.build index 094d5271..71319d3c 100644 --- a/remote/modules/vmware/module.build +++ b/remote/modules/vmware/module.build @@ -69,7 +69,7 @@ build() { rm -rf -- "${SHORT}-only" touch ".${SHORT}.patched" fi - done + done cd "${MODULE_DIR}" || perror "Could not cd to '${MODULE_DIR}'" # now build modules inside the chroot @@ -103,6 +103,7 @@ post_copy() { parse_patch_name() { [ $# -ne 1 ] && perror "parse_patch_name: Wrong parameter count." local PATCH="$1" + # Kernel restriction MIN_KERN=$(echo "$PATCH" | sed -r 's/^[^_]+__([0-9\.]+)-[0-9\.]+__[^_]+\.patch$/\1/g') [[ "$MIN_KERN" == /* ]] && MIN_KERN=$(echo "$PATCH" | sed -r 's/^[^_]+__([0-9\.]+)__[^_]+\.patch$/\1/g') MAX_KERN=$(echo "$PATCH" | sed -r 's/^[^_]+__[0-9\.]+-([0-9\.]+)__[^_]+\.patch$/\1/g') @@ -110,5 +111,12 @@ parse_patch_name() { [[ "$MIN_KERN" == /* ]] && MIN_KERN= [[ "$MAX_KERN" == /* ]] && MAX_KERN= # TODO: Parse min and max vmplayer/workstation version + # vmware restriction + MIN_VMWARE=$(echo "$PATCH" | sed -r 's/^[^_]+__[^_]+__([0-9\.]+)-[^_]+\.patch$/\1/g') + [[ "$MIN_VMWARE" == /* ]] && MIN_VMWARE=$(echo "$PATCH" | sed -r 's/^[^_]+__[^_]+__([0-9\.]+)\.patch$/\1/g') + MAX_VMWARE=$(echo "$PATCH" | sed -r 's/^[^_]+__[^_]+__[^_]+-([0-9\.]+)\.patch$/\1/g') + [[ "$MAX_VMWARE" == /* ]] && MAX_VMWARE=$(echo "$PATCH" | sed -r 's/^[^_]+__[^_]+__([0-9\.]+)\.patch$/\1/g') + [[ "$MIN_VMWARE" == /* ]] && MIN_VMWARE= + [[ "$MAX_VMWARE" == /* ]] && MAX_VMWARE= } diff --git a/remote/modules/vmware/module.conf b/remote/modules/vmware/module.conf index 749a0838..34d16c94 100644 --- a/remote/modules/vmware/module.conf +++ b/remote/modules/vmware/module.conf @@ -1,4 +1,4 @@ -REQUIRED_DOWNLOAD_BASE="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/10.0.1/1379776/linux/core/" +REQUIRED_DOWNLOAD_BASE="http://softwareupdate.vmware.com/cds/vmw-desktop/ws/10.0.3/1895310/linux/core/" REQUIRED_TYPE="workstation" REQUIRED_MODULES="kernel" REQUIRED_DIRECTORIES=" diff --git a/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-10.0.2.patch b/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-10.0.2.patch deleted file mode 100644 index 54607506..00000000 --- a/remote/modules/vmware/patches/vmnet__3.13-9.9__1.0-10.0.2.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/filter.c 2014-04-17 05:30:43.497846349 -0700 -+++ b/filter.c 2014-04-17 05:30:41.445846394 -0700 -@@ -203,7 +203,11 @@ - #endif - - static unsigned int -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) - VNetFilterHookFn(unsigned int hooknum, // IN: -+#else -+VNetFilterHookFn(const struct nf_hook_ops *ops, // IN: -+#endif - #ifdef VMW_NFHOOK_USES_SKB - struct sk_buff *skb, // IN: - #else -@@ -252,7 +256,11 @@ - - /* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */ - /* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */ -- transmit = (hooknum == VMW_NF_INET_POST_ROUTING); -+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) -+ transmit = (hooknum == VMW_NF_INET_POST_ROUTING); -+ #else -+ transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING); -+ #endif - - packetHeader = compat_skb_network_header(skb); - ip = (struct iphdr*)packetHeader; -- cgit v1.2.3-55-g7522 From 022a4eaa948b8145401f74cdda282c18cfa82bda Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 29 Sep 2014 16:07:57 +0200 Subject: [vmware] Decouple volume controls of VM from host system --- .../opt/openslx/vmchooser/vmware/run-virt.include | 261 +++++++++++---------- 1 file changed, 131 insertions(+), 130 deletions(-) (limited to 'remote/modules/vmware') diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include index e867a888..ef54218e 100644 --- a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/run-virt.include @@ -16,6 +16,7 @@ ################################################################################ ### configuration writer functions +### This needs bash, not dash or ash! (indented HEREDOC) ################################################################################ vmostype=$(rv_clean_string "$vmostype") @@ -172,152 +173,152 @@ runvmwareconfheader () MAXCORES="1" ;; esac - - svga_autodetect="TRUE" real_core_count="$cpu_cores" [ "$cpu_cores" -gt "$MAXCORES" ] && cpu_cores="$MAXCORES" # It currently makes no sense to set the virtual number of cores # to a different value than the virtual number of cores per virtual CPU. cores_per_socket="$cpu_cores" - + if [ "x$shfolders" != "xFALSE" ]; then ENABLE_SHARE='sharedFolder.option = "alwaysEnabled"' else ENABLE_SHARE='' fi - + [ "$mem" -ge "$MAXMEM" ] && mem="$MAXMEM" [ "$hwver" -lt "7" -a "$mem" -gt "3500" ] && mem="3500" - + cap3d="WHAT IS THIS VAR USED FOR?" # helper var for loging output - - cat >> "$conffile" <> "$conffile" <<-HEREEND + .encoding = "UTF-8" + config.version = "8" + + # general hardware (ehci, 3d accel) + ehci.present = "TRUE" + $FORCE3D + mks.enable3d = "$enable3d" + + monitor.virtual_mmu = "automatic" + monitor.virtual_exec = "automatic" + floppy1.clientDevice = "FALSE" + floppy1.readonly = "TRUE" + + # id + virtualHW.version = "$hwver" + displayName = "$displayname" + guestOS = "$vmostype" + + # CPU/MEM + numvcpus = "$cpu_cores" + cpuid.coresPerSocket = "$cores_per_socket" + maxvcpus = "$real_core_count" + memsize = "$mem" + MemAllowAutoScaleDown = "FALSE" + MemTrimRate = "-1" + + # ide-disks + ide0:0.present = "$ide" + ide0:0.fileName = "$vm_diskfile" + ## Edited for persistent mode. + ide0:0.mode = "independent-${diskmode}" + ## + ide1:0.present = "$cdrom0" + ide1:0.autodetect = "TRUE" + ide1:0.fileName = "auto detect" + ide1:0.deviceType = "cdrom-raw" + ide1:1.present = "$cdrom1" + ide1:1.autodetect = "TRUE" + ide1:1.fileName = "auto detect" + ide1:1.deviceType = "cdrom-raw" + + # scsi-disks + scsi0.present = "$scsi" + scsi0:0.present = "$scsi" + scsi0:0.fileName = "$vm_diskfile" + scsi0.virtualDev = "$hddrv" + ## Edited for persistent mode. + scsi0:0.mode = "independent-${diskmode}"$stateFileConfiguration + ## + + # floppies + floppy0.present = "$floppy0" + floppy0.startConnected = "FALSE" + floppy0.autodetect = "TRUE" + floppy0.fileName = "auto detect" + + # we need floppy b: for the client configuration + floppy1.present = "$floppy1" + floppy1.startConnected = "TRUE" + floppy1.fileType = "file" + floppy1.fileName = "$floppy1name" + + # nics + ethernet0.present = "TRUE" + ethernet0.addressType = "static" + $network_virtualDev + ethernet0.connectionType = "hostonly" + #ethernet1.connectionType = "custom" + ethernet0.vnet = "$hostdev" + ethernet0.address = "00:50:56:$macaddrsuffix" + ethernet0.wakeOnPcktRcv = "FALSE" + + # sound + sound.present = "TRUE" + sound.fileName = "-1" + sound.autodetect = "TRUE" + sound.virtualdev = "$sound" + pciSound.enableVolumeControl = "FALSE" + sound.enableVolumeControl = "FALSE" + + # svga + svga.autodetect = "TRUE" + + # usb + usb.present = "TRUE" + usb.generic.autoconnect = "TRUE" + + # pci configuration + usb.pciSlotNumber = "16" + ethernet0.pciSlotNumber = "17" + sound.pciSlotNumber = "18" + ehci.pciSlotNumber = "19" + scsi0.pciSlotNumber = "20" + + # shared folders + $ENABLE_SHARE + sharedFolder0.present = "$shfolders" + sharedFolder0.enabled = "$shfolders" + sharedFolder0.expiration = "never" + sharedFolder0.guestName = "$sharename" + sharedFolder0.hostPath = "$sharepath" + sharedFolder0.readAccess = "TRUE" + sharedFolder0.writeAccess = "TRUE" + sharedFolder.maxNum = "1" + + # dirs/configs + tmpDirectory = "$redodir" + redoLogDir = "$redodir" + mainMem.useNamedFile = "TRUE" + snapshot.disabled = "TRUE" + tools.syncTime = "TRUE" + isolation.tools.hgfs.disable = "FALSE" + hgfs.mapRootShare = "TRUE" + isolation.tools.dnd.disable = "FALSE" + isolation.tools.copy.enable = "TRUE" + isolation.tools.paste.enabled = "TRUE" + + # serial port + serial0.present = "$serial" + $serialdev + + # parallel port + parallel0.present = "$parallel" + parallel0.bidirectional = "$paralbidi" + $paraldev + HEREEND -# shared folders -$ENABLE_SHARE -sharedFolder0.present = "$shfolders" -sharedFolder0.enabled = "$shfolders" -sharedFolder0.expiration = "never" -sharedFolder0.guestName = "$sharename" -sharedFolder0.hostPath = "$sharepath" -sharedFolder0.readAccess = "TRUE" -sharedFolder0.writeAccess = "TRUE" -sharedFolder.maxNum = "1" - -# dirs/configs -tmpDirectory = "$redodir" -redoLogDir = "$redodir" -mainMem.useNamedFile = "TRUE" -snapshot.disabled = "TRUE" -tools.syncTime = "TRUE" -isolation.tools.hgfs.disable = "FALSE" -hgfs.mapRootShare = "TRUE" -isolation.tools.dnd.disable = "FALSE" -isolation.tools.copy.enable = "TRUE" -isolation.tools.paste.enabled = "TRUE" - -# serial port -serial0.present = "$serial" -$serialdev - -# parallel port -parallel0.present = "$parallel" -parallel0.bidirectional = "$paralbidi" -$paraldev -HEREEND - # set the appropriate permissions for the vmware config file chmod u+rwx "${conffile}" >/dev/null 2>&1 } -- cgit v1.2.3-55-g7522