Fedora 20 with kernel 3.13 fail to install vmplayer module
Just upgrade my fedora to Fedora 20 and found that vmware player not able to install the module.
It end with this error.
Here is the solution, I didn't manage to patch it using command patch, it keep saying malformed patch, so at the end I edit filter.c manually. But if you manage to figure out to format this patch correctly, please let me know.
Here is the steps
# tar xf /usr/lib/vmware/modules/source/vmnet.tar
# cd vmnet-only
# patch -p1 < patch.patch (If you manage to format the patch correctly)
# vim filter.c (Edit the file manually and modify accordingly)
# cd ..
# tar -cvf vmnet.tar vmnet-only/
# cp vmnet.tar /usr/lib/vmware/modules/source/
then issue this command to compile and install the vmware player module
# sudo vmware-modconfig --console --install-all
This should be able to solve the issue and your vmware player will be launch successfully.
---
It end with this error.
...
/tmp/modconfig-rHN4Kj/vmnet-only/filter.c:206:1: error: conflicting types for ‘VNetFilterHookFn’
VNetFilterHookFn(unsigned int hooknum, // IN:
^
/tmp/modconfig-rHN4Kj/vmnet-only/filter.c:64:18: note: previous declaration of ‘VNetFilterHookFn’ was here
static nf_hookfn VNetFilterHookFn;
^
/tmp/modconfig-rHN4Kj/vmnet-only/filter.c:64:18: warning: ‘VNetFilterHookFn’ used but never defined [enabled by default]
/tmp/modconfig-rHN4Kj/vmnet-only/filter.c:206:1: warning: ‘VNetFilterHookFn’ defined but not used [-Wunused-function]
VNetFilterHookFn(unsigned int hooknum, // IN:
^
make[2]: *** [/tmp/modconfig-rHN4Kj/vmnet-only/filter.o] Error 1
...After google, some say this error cause by the Nefilter selected with the kernel compilation options. And I believe most of the distro kernel will have this option selected.
Here is the solution, I didn't manage to patch it using command patch, it keep saying malformed patch, so at the end I edit filter.c manually. But if you manage to figure out to format this patch correctly, please let me know.
--- 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
#include
+#include
#if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
# include
#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;
Here is the steps
# tar xf /usr/lib/vmware/modules/source/vmnet.tar
# cd vmnet-only
# patch -p1 < patch.patch (If you manage to format the patch correctly)
# vim filter.c (Edit the file manually and modify accordingly)
# cd ..
# tar -cvf vmnet.tar vmnet-only/
# cp vmnet.tar /usr/lib/vmware/modules/source/
then issue this command to compile and install the vmware player module
# sudo vmware-modconfig --console --install-all
This should be able to solve the issue and your vmware player will be launch successfully.
---
Comments
Post a Comment
Feel free to leave your question or comment here, we will reply you as soon as possible.