VMware Communities
rgadsdon
Enthusiast
Enthusiast

Linux Host: Kernel 4.13-rc1 Breaks vmnet..

Tested VMware 12.5.7 with Kernel 4.13-rc1 (Fedora 26, GCC 7.1.1) and vmmon compiles OK, but vmnet fails:

/home/rgadsdon/kernel/vmnet-only/bridge.c: In function ‘VNetBridgeReceiveFromVNet’:

/home/rgadsdon/kernel/vmnet-only/bridge.c:639:14: error: passing argument 1 of ‘atomic_inc’ from incompatible pointer type [-Werror=incompatible-pointer-types]

   atomic_inc(&clone->users);

              ^

In file included from ./include/linux/atomic.h:4:0,

                 from ./include/linux/rcupdate.h:38,

                 from ./include/linux/rculist.h:10,

                 from ./include/linux/pid.h:4,

                 from ./include/linux/sched.h:13,

                 from /home/rgadsdon/kernel/vmnet-only/bridge.c:25:

./arch/x86/include/asm/atomic.h:89:29: note: expected ‘atomic_t * {aka struct <anonymous> *}’ but argument is of type ‘refcount_t * {aka struct refcount_struct *}’

static __always_inline void atomic_inc(atomic_t *v)

                             ^~~~~~~~~~

cc1: some warnings being treated as errors

make[2]: *** [scripts/Makefile.build:303: /home/rgadsdon/kernel/vmnet-only/bridge.o] Error 1

make[1]: *** [Makefile:1511: _module_/home/rgadsdon/kernel/vmnet-only] Error 2

make[1]: Leaving directory '/usr/src/linux-4.13-rc1'

make: *** [Makefile:120: vmnet.ko] Error 2

Robert Gadsdon.

rglinuxtech.com

32 Replies
ukos0vm
Contributor
Contributor

> Forgive be but can somebody "for dummies" the fix?

The scripts on https://github.com/mkubecek/vmware-host-modules are already very straight forward. If it is not simple enough, try the following script from my gist:

cd ~/Downloads

wget https://gist.githubusercontent.com/ukos-git/e656c47025dd55b4836a980a34811637/raw/21533798c550a12ba6b...

sudo bash ./patch-vmware12.sh

joaquin386
Contributor
Contributor

Awsome this small change on my bridge.c (/usr/lib/vmware/modules/source/vmnet.tar) make VMware work with kernel 4.13

Reply
0 Kudos
diegobem2
Contributor
Contributor

Thank you so much ukos0vm for the script, it worked like a charm on ubuntu 16.04 kernel 4.13.0.32, i've researched for a many days applying a lot of solutions but only this solved the Vmnet issue.

cdoublejj
Enthusiast
Enthusiast

Reply
0 Kudos
pablogrs
Contributor
Contributor

You have to apply the patch to vmnet.tar

   mkdir ~/vmnet-fix

   cd ~/vmnet-fix

   cp /usr/lib/vmware/modules/source/vmnet.tar ./vmnet-12.5.7.tar

   tar xf vmnet-12.5.7.tar

   patch -p0 < ~/Downloads/VMware-Workstation-12.5.7-kernel4.13-atomic-inc.patch

   tar cf vmnet.tar vmnet-only/

   sudo cp vmnet.tar /usr/lib/vmware/modules/source/vmnet.tar

   sudo vmware-modconfig --console --install-all

Reply
0 Kudos
cuerty
Contributor
Contributor

work perfect for me. mint 18.3 kernel 4.13.0-37

Thank you

Reply
0 Kudos
gpneph
Contributor
Contributor

I can confirm it works with kernel 4.13.37 on ubuntu 16.04 with workstation 12.5.9,

and I+m thankful for that !

Reply
0 Kudos
ukos0vm
Contributor
Contributor

@pablogrs

you missed the part where you downloaded the patch from. Other than that your solution is probably nothing more than using mcubeks repo and executing the ‘make tarballs‘. I can not see the benefit of your solution. It only makes things complicated.

Reply
0 Kudos
repomon
Contributor
Contributor

This is the easiest way to fix the error. No need to edit anything.

From your folder of choice...

wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-12.5.9.tar.gz

tar -zxvf workstation-12.5.9.tar.gz

cd vmware-host-modules-workstation-12.5.9/

make

make install

depmod -a

/etc/init.d/vmware restart

or systemctl restart vmware

Note: This works on latest kernel 4.15.11

Assuming you are running VMware Workstation version 12.5.9

Reply
0 Kudos
travi9s
Contributor
Contributor

Thanks!  The change to vmmon-only/linux/hostif.c and the atomic patch in vmnet-only got me 99% of the way there.

I then had this problem: Workstation 11 critical error with certain OSes

After switching the processor of my state-of-the-art Windows 2000 VM to "Intel VT-x/EPT or AMD-V/RVI", I was able to boot.

There are a couple applications on that machine that I use...I could replace them, but why? 🙂

Reply
0 Kudos
neogeek83
Contributor
Contributor

Just a quick update for this... the method I outlined before no longer works for me... I'm up to kernel 4.15.0-29 and so started using this method instead:

linux - VMWare Workstation vmmon broken on Ubuntu 18.04 - Super User

Reply
0 Kudos
neogeek83
Contributor
Contributor

Another quick update, this method continues to work through 4.15.0-32-generic for me

Reply
0 Kudos
travi9s
Contributor
Contributor

I used mkucebek's github sources as well.  Works great.  This guy saved me hours of work.

Reply
0 Kudos