Unable to run VMware - Failed to build vmnet
I was able to fix the issue for 3.13 kernel using this solution.
Author advises to patch vmnet sources:
Create file vmnet313.patch
in your home directory with the following content:
205a206
> #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
206a208,210
> #else
> VNetFilterHookFn(const struct nf_hook_ops *ops, // IN:
> #endif
255c259,263
< 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
Alternatively download this patch to your home directory and rename it to vmnet313.patch
. For example:
wget "http://pastebin.com/raw.php?i=p3bkbAMu" -O vmnet313.patch
Next, execute following commands:
# Change directory into the vmware module source directory
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 < ~/vmnet313.patch
# re-tar the modules
tar -uvf vmnet.tar vmnet-only
# delete the previous working directory
rm -r vmnet-only
# run the vmware module build program. (alternatively just run the GUI app)
/usr/lib/vmware/bin/vmware-modconfig --console --install-all
The last command (or vmplayer
) should now run successfully.
Using this vmnet313.patch including a couple of typo corrections (see @nonsleepr's answer), resolved my issue with upgrading with the 9.0.2 to 9.02.4 upgrade on Ubuntu 14.04.4 LTS 64-bit Desktop.
This snippet is the content of pastebin.com/raw.php?i=p3bkbAMu; but with 2 corrected typos at the very end.
--- vmnet-only/filter.c 2013-10-18 23:11:55.000000000 +0400
+++ vmnet-only/filter.c 2013-12-03 04:16:31.751352170 +0400
@@ -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,14 @@
/* 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;