If you use VMWare Workstation as frequent as me, you will probably encounter error when you try to install VMWare Workstation 11 in for Linux Kernel 4.8 in any distributions. There are some changes in the linux headers such that the modules couldn’t compile anymore.

Hopefully, this can help random strangers who are also searching for a solution to this problem.

First, go to the following folder in a terminal. This will be our working directory.

$ cd /usr/lib/vmware/modules/source

You will need sudo for the rest of the commands:

$ sudo su

Now, download the patch from Github (many thanks to jiml8) and save it to the working directory.

# wget https://raw.githubusercontent.com/jiml8/vmware-workstation-11.0-linux-kernel-4.4.patch/master/workstation11-kern4.4.patch

Create two directories in the working directory.

mkdir new && mkdir orig

Untar the following files in the working directory:

tar xf vmci.tar && tar xf vmmon.tar && tar xf vmnet.tar

Copy all the directories (vmci, vmmon, vmnet) into orig and new. Remove the directories in the working directory.

cp -rv *-only ./orig && cp -rv *-only ./new && rm -r *-only

Next, add executable permission for the patch and apply it in the working directory using diff.

# chmod +x workstation11-kern4.4.patch
# patch -p0 < workstation11-kern4.4.patch

Unfortunately from this point onwards, you will have apply manual patch:

  • In new/vmnet-only/netif.c, replace trans_start to mem_start at line 468.

  • In new/vmmon-only/linux/hostif.c, replace NR_ANON_PAGES to NR_ANON_MAPPED at line 1633. Replace all get_user_pages to get_user_pages_remote.

  • In new/vmnet-only/userif.c, replace all get_user_pages to get_user_pages_remote.

Before you replace the tar files, do a back up.

# mv vmci.tar vmci.tar.bak
# mv vmmon.tar vmmon.tar.bak
# mv vmnet.tar vmnet.tar.bak

Now, tar the files in new and move them to the working folder.

# cd new && tar cf vmci.tar vmci-only && mv vmci.tar ..
# cd new && tar cf vmnet.tar vmnet-only && mv vmnet.tar ..
# cd new && tar cf vmmon.tar vmmon-only && mv vmmon.tar ..

In the same terminal, compile the modules again.

# vmware-modconfig --console --install-all

Now start your VMWare Workstation and it should work perfectly :)