Kernel 4.7 and VMWare Workstation 12.1.
# cd/usr/lib/vmware/modules/source# Tar XF vmnet.tar# mv Vmnet.tar vmnet.old.tar# sed-i-e ' S/dev->trans_start = Jiff Ies/netif_trans_update\ (dev\)/g ' vmnet-only/netif.c# tar cf vmnet.tar vmnet-only# vmware-modconfig--console-- Install-all
3.13 Kernel vmnet fails to build
$ Curl Http://pastie.org/pastes/8672356/download-o/tmp/vmware-netfilter.patch$ cd/usr/lib/vmware/modules/source# TAR-XVF vmnet.tar# patch-p0-i/tmp/vmware-netfilter.patch# tar-cf vmnet.tar vmnet-only# rm-r vmnet-only# Vmware-modco Nfig--console--install-all
3.17 Kernel vmnet fails to build
#-as root user$ cd/usr/lib/vmware/modules/source$ tar-xvf vmnet.tar#-Edit the file vmnet-only/netif.c and replace th E line this looks like dev = alloc_netdev (sizeof *netif, devicename, vnetnetifsetup); to dev = Alloc_netdev (sizeof *n Etif, DeviceName, Net_name_unknown, Vnetnetifsetup); $ tar-cvf vmnet.tar vmnet-only/$ rm-rf vmnet-only/$ vmware-modconfi G--console--install-all
Kernel–4.9-rc3
Edit the VMNET-ONLY/USERIF.C and modify the following:
#if linux_version_code >= kernel_version (4, 6, 0) retval = get_user_pages (addr, 1, 1, 0, &page, NULL); #else R Etval = Get_user_pages (current, current->mm, addr, 1, 1, 0, &page, NULL); #endif
Switch
#if linux_version_code >= kernel_version (4, 9, 0) retval = get_user_pages (addr, 1, 0, &page, NULL); #else # if LIN Ux_version_code >= kernel_version (4, 6, 0) retval = get_user_pages (addr, 1, 1, 0, &page, NULL); #else retval = Get_user_pages (current, current->mm, addr, 1, 1, 0, &page, NULL); #endif #endif
Edit VMMON-ONLY/LINUX/HOSTIF.Cand modify the following:
#if linux_version_code >= kernel_version (4, 6, 0) retval = get_user_pages ((unsigned long) uvaddr, numpages, 0, 0, Ppag ES, NULL); #else retval = Get_user_pages (Current, current->mm, (unsigned long) uvaddr, Numpag ES, 0, 0, ppages, NULL); #endif
Switch
#if linux_version_code >= kernel_version (4, 9, 0) retval = get_user_pages ((unsigned long) uvaddr, numpages, 0, Ppages, NULL); #else # if Linux_version_code >= kernel_version (4, 6, 0) retval = get_user_pages ((unsigned long) uvaddr, numpages , 0, 0, ppages, NULL); #else retval = Get_user_pages (Current, current->mm, (unsigned long) uvaddr, NumPages, 0, 0, ppages, NULL); #endif #endif
Repackaging files
Tar cf vmnet.tar Vmnet-onlytar CF Vmmon.tar Vmmon-only
Execute command:
Vmware-modconfig--console--install-all
Execution Result:
[[email protected] source]# vmware-modconfig --console --install-allstopping vmware (VIA SYSTEMCTL): [ ok ]make: Entering directory '/tmp/modconfig-vbvnzr/vmmon-only ' using kernel build system./bin/make -c /lib/modules/4.9.5-200.fc25.x86_64/build/include/. subdirs= $PWD srcroot= $PWD/. modulebuilddir= modulesmake[1]: entering directory '/usr/src/kernels/4.9.5-200.fc25.x86_64 ' cc [m] /tmp/ modconfig-vbvnzr/vmmon-only/linux/driverlog.o cc [m] /tmp/modconfig-vbvnzr/ Vmmon-only/linux/driver.o cc [m] /tmp/modconfig-vbvnzr/vmmon-only/linux/hostif.o cc [m] /tmp/modconfig-vbvnzr/vmmon-only/common/memtrack.o cc [m] /tmp/modconfig-vbvnzr/vmmon-only/common/apic.o CC [M] /tmp/modconfig-vbVNzr/vmmon-only/common/vmx86.o CC [M] /tmp/modconfig-vbvnzr/vmmon-only/common/cpuid.o cc [m] /tmp/modconfig-vbvnzr/ Vmmon-only/common/task.o/tmp/modconfig-vbvnzr/vmmon-only/linux/driver.c:1283:1: warning: always_ inline function might not be inlinable [-wattributes] Linuxdriversyncreadtscs (Uint64 *delta) // OUT: TSC max - TSC min ^~~~~~~~~~~~~~~~~~~~~~~ cc [m] /tmp/modconfig-vbvnzr/vmmon-only/common/hashfunc.o/ tmp/modconfig-vbvnzr/vmmon-only/common/task.o: warning: objtool: .text: unexpected End of section cc [m] /tmp/modconfig-vbvnzr/vmmon-only/common/comport.o cc [m] /tmp/modconfig-vbvnzr/vmmon-only/common/phystrack.o cc [m] /tmp/modconfig-vbvnzr/vmmon-only/ vmcore/moduleloop.o/tmp/modconfig-vbvnzr/vmmon-only/common/phystrack.o: warning: objtool: Phystrack_free () falls through to next function phystrack_add ()/tmp/ Modconfig-vbvnzr/vmmon-only/common/phystrack.o: warning: objtool: phystrack_add () falls through to next function phystrack_remove ()/tmp/modconfig-vbvnzr/vmmon-only/common/ Phystrack.o: warning: objtool: phystrack_remove () falls through to next function phystrack_test () ld [m] /tmp/modconfig-vbvnzr/vmmon-only/ vmmon.o building modules, stage 2. modpost 1 modules cc /tmp/modconfig-vbvnzr/vmmon-only/vmmon.mod.o ld [m ] /tmp/modconfig-vbvnzr/vmmon-only/vmmon.komake[1]: leaving directory '/usr/src/kernels/4.9.5-200.fc25.x86_64 '/bin/make -C $ pwd srcroot= $PWD/. modulebuilddir= postbuildmake[1]: entering directory '/tmp/modconfig-vbvnzr/vmmon-only ' make[1]: ' PostBuild ' is up to date.make[1]: Leaving directory '/tmp/modconfig-vbvnzr/vmmon-only ' cp -f vmmon.ko ./. /vmmon.omake: leaving directory '/tmp/modconfig-vbvnzr/vmmon-only ' make: Entering directory '/tmp/modconfig-vbvnzr/vmnet-only ' using kernel build system./bin/make -c /lib/modules/4.9.5-200.fc25.x86_64/build/include/. subdirs= $PWD srcroot= $PWD/. modulebuilddir= modulesmake[1]: entering directory '/usr/src/kernels/4.9.5-200.fc25.x86_64 ' cc [m] /tmp/ Modconfig-vbvnzr/vmnet-only/driver.o cc [m] /tmp/modconfig-vbvnzr/vmnet-only/hub.o cc [m] /tmp/modconfig-vbvnzr/vmnet-only/userif.o cc [m] /tmp/modconfig-vbvnzr/vmnet-only/netif.oin file included from ./include/ linux/pci.h:35:0, from /tmp/modconfig-vbVNzr/vmnet-only/compat_netdevice.h:27, from /tmp/modconfig-vbvnzr/ vmnet-only/netif.c:43:./include/linux/pci_ids.h:2253:0: warning: "PCI_VENDOR_ID_VMWARE" redefined #define pci_vendor_id_vmware 0x15ad in file included from /tmp/modconfig-vbVNzr/vmnet-only/net.h:38:0, from /tmp/modconfig-vbVNzr/vmnet-only/vnetInt.h:26, &nbsP; from /tmp/modconfig-vbvnzr/vmnet-only/netif.c:42 :/tmp/modconfig-vbvnzr/vmnet-only/vm_device_version.h:56:0: note: this is the location of the previous definition #define PCI_VENDOR_ID_VMWARE 0x15ad cc [m] /tmp/modconfig-vbvnzr/vmnet-only/bridge.o cc [m ] /tmp/modconfig-vbvnzr/vmnet-only/procfs.o cc [m] /tmp/modconfig-vbvnzr /vmnet-only/smac_compat.o cc [m] /tmp/modconfig-vbvnzr/vmnet-only/smac.o cc [m] /tmp/modconfig-vbvnzr/vmnet-only/vnetevent.o cc [m] / tmp/modconfig-vbvnzr/vmnet-only/vnetuserlistener.oin file included from /tmp/ Modconfig-vbvnzr/vmnet-only/net.h:38:0, from / tmp/modconfig-vbvnzr/vmnet-only/vnetint.h:26, from /tmp/modconfig-vbvnzr/vmnet-only/bridge.c:52:/tmp/ modconfig-vbvnzr/vmnet-only/vm_device_version.h:56:0: warning: "Pci_vendor_id_vmware" redefined #define PCI_VENDOR_ID_VMWARE 0x15ad in file included from ./ include/linux/pci.h:35:0, from /tmp/modconfig-vbVNzr/vmnet-only/compat_netdevice.h:27, from /tmp/modconfig-vbvnzr/ vmnet-only/bridge.c:51:./include/Linux/pci_ids.h:2253:0: note: this is the location of the previous definition #define PCI_VENDOR_ID_VMWARE 0x15ad LD [M] /tmp/modconfig-vbVNzr/vmnet-only/vmnet.o Building modules, stage 2. modpost 1 modules cc /tmp/modconfig-vbvnzr/ VMNET-ONLY/VMNET.MOD.O  LD [M]  /TMP/MODCONFIG-VBVNZR/VMNET-ONLY/VMNET.KOMAKE[1]: Leaving directory '/usr/src/kernels/4.9.5-200.fc25.x86_64 '/bin/make -c $PWD srcroot= $PWD/. modulebuilddir= postbuildmake[1]: entering directory '/tmp /modconfig-vbvnzr/vmnet-only ' make[1]: ' PostBuild ' is up to date.make[1]: leaving directory '/tmp/modconfig-vbvnzr/vmnet-only ' cp -f vmnet.ko ./. /vmnet.omake: leaving directory '/tmp/mOdconfig-vbvnzr/vmnet-only ' starting vmware (via systemctl):    [  OK  ]
This article from "Lonely No Worry" blog, please be sure to keep this source http://jlnetc.blog.51cto.com/10920149/1894518
Linux:vmware kernel update causes VMware to not open, resolve