Ubuntu – VMWare player and Ubuntu 15.04: net driver does not compile anymore, how to fix

15.04compilingvmware-player

I use VMWare Player on Ubuntu and run a different number of virtual machines on it.

It worked fine until 14.10, when the kernel was upgraded I would be asked to recompile the modules etc; but it doesn't work with Ubuntu 15.04 anymore.

The problem is that it fails when trying to recompile the "virtual network adapter". How can I fix that?

Best Answer

Use this commands (need root access):

$ wget http://pastie.org/pastes/9934018/download -O /tmp/vmnet-3.19.patch
$ cd /usr/lib/vmware/modules/source
$ tar -xf vmnet.tar
$ patch -p0 -i /tmp/vmnet-3.19.patch
$ tar -cf vmnet.tar vmnet-only
$ rm -r *-only
$ vmware-modconfig --console --install-all

for vmware-player 9 you also need to change:

  • vmnet-only/netif.c line 152 from:

    dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);
    

    to

    dev = alloc_netdev(sizeof *netIf, deviceName, NET_NAME_UNKNOWN, VNetNetIfSetup);
    
  • vmnet-only/filter.c line 207 from:

    VNetFilterHookFn(unsigned int hooknum, // IN:

    to:

    VNetFilterHookFn(const struct nf_hook_ops *ops, // IN:

  • vmnet-only/filter.c line 255 from:

    transmit = (hooknum == VMW_NF_INET_POST_ROUTING);

    to:

    transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);