After looking around, you need to run this script:
#!/bin/bash
cat << EOF > /tmp/filter.c.patch
--- vmnet-only/filter.c 2013-10-18 15:11:55.000000000 -0400
+++ vmnet-only/filter.c 2013-12-21 20:15:15.000000000 -0500
@@ -27,6 +27,7 @@
#include "compat_module.h"
#include <linux/mutex.h>
#include <linux/netdevice.h>
+#include <linux/version.h>
#if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
# include <linux/module.h>
#else
@@ -203,7 +204,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 +257,12 @@
/* 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;
EOF
cd /usr/lib/vmware/modules/source
# untar the vmnet modules
tar -xvf vmnet.tar
#run a the patch you should have just saved earlier
patch vmnet-only/filter.c < /tmp/filter.c.patch
# re-tar the modules
tar -uvf vmnet.tar vmnet-only
#delete the previous working directory
rm -rf vmnet-only
You run it with root privileges.
Thanks to this website: http://fazlearefin.blogspot.ca/2014/03/vmware-workstation-10-not-working-on.html
You need to upgrade to VMWare Workstation 14. Workstation 12 will not run with the kernel (4.13) in Ubuntu 17.10 unless you patch it. Patch available here: https://github.com/mkubecek/vmware-host-modules/commit/b50848c985f1
Run the following commands in Terminal to Patch (there are two ways to do this):
Patch Procedure 1:
Gain root user access:
sudo su
tar xvf vmmon.tar
tar xvf vmnet.tar
wget -O ./vmmon-only/linux/hostif.c https://raw.githubusercontent.com/mkubecek/vmware-host-modules/b50848c985f1a6c0a341187346d77f0119d0a835/vmmon-only/linux/hostif.c
vim vmnet-only/bridge.c
cd vmmon-only/
make
cd ../vmnet-only/
make
cd ..
mkdir /lib/modules/4.13.0-16-generic/misc
cp *.o /lib/modules/4.13.0-16-generic/misc
insmod /lib/modules/4.13.0-16-generic/misc/vmmon.o
insmod /lib/modules/4.13.0-16-generic/misc/vmnet.o
rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
ln -s /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/vmware/lib/libz.so.1/libz.so.1
vmware-networks --start
exit
Run VMWare as a normal user:
/usr/lib/vmware/bin/vmware
OR
Patch Procedure 2:
Get into your home directory, or somewhere you can store files temporarily:
cd ~ [YOUR DIRECTORY]
Copy the vmmon source tar ball to your temporary location:
cp /usr/lib/vmware/modules/source/vmmon.tar
Extract the tar ball:
tar xf vmmon.tar
Download the modified file and overwrite the one from the tar ball:
wget -O ./vmmon-only/linux/hostif.c https://raw.githubusercontent.com/mkubecek/vmware-host-modules/b50848c985f1a6c0a341187346d77f0119d0a835/vmmon-only/linux/hostif.c
Wrap up the newly modified files into a tar ball replacing the original one:
sudo tar cf /usr/lib/vmware/modules/source/vmmon.tar vmmon-only
Rebuild the VMware kernel modules:
sudo vmware-modconfig --console --install-all
Reboot your system:
sudo reboot
Sources to patch:
https://communities.vmware.com/thread/571370?start=0&tstart=0
AND
Ubuntu 17.10 Upgrade Broke VMWare Workstation 12.5
EVEN BETTER, I recommend upgrading to Workstation 14, which will remove Workstation 12.
Run the following commands in Terminal to install VMware Workstation Player 14:
mkdir ~/vmware
cd ~/vmware
wget -c https://download3.vmware.com/software/player/file/VMware-Player-14.1.1-7528167.x86_64.bundle
OR
Download it here:
https://my.vmware.com/en/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/14_0
Give the package permissions:
sudo chmod u+x VMware-Player-14.1.1-7528167.x86_64.bundle
Finally, install:
sudo ./VMware-Player-14.1.1-7528167.x86_64.bundle
As soon as the installer starts, please follow on screen instructions to complete the installation.
Select I accept the terms in the license agreement and then Click on Next.
Update on startup; select yes (if you want).
Feedback; select yes or no.
License Key is optional (can be left blank).
Click Install on next screen.
Close when finished.
UNINSTALLATION
sudo vmware-installer -u vmware-player
Hope this helps.
Best Answer
I was able to get this working. I had similar errors as you using Workstation 9.0.2. I then installed 9.0.3, and the only module that failed to build was Virtual ethernet. I then used the patch for the vmnet module found here: VMware modules & kernel 3.13
It is intended for Workstation 10, but it also worked for me using 9.0.3. I actually used the patch linked near the bottom of the page: vmware 3.13. The patching actually failed (I'm not sure why, I didn't dig into it) but I was able to manually make the changes from the patch and that worked fine.