Eu segui a resposta de Ogheneneovie Ralph Otutu, que costumava trabalhar em kernels anteriores, mas parece não funcionar em novos kernels. Eu estava tentando compilar os módulos para vmware 12.5.9
no kernel 4.15.0-kali3-amd64
quando recebi alguns erros:
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c: In function ‘LinuxDriverInitTSCkHz’:
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:268:22: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
tscTimer.function = LinuxDriverEstimateTSCkHzDeferred;
^
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:270:12: error: ‘struct timer_list’ has no member named ‘data’
tscTimer.data = 0;
^
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c: In function ‘init_module’:
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:312:4: error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’? [-Werror=implicit-function-declaration]
init_timer(&linuxState.pollTimer);
^~~~~~~~~~
...
Aparentemente, as alterações no kernel do Linux tornaram as fontes do módulo VMware incompatíveis.
Para fazer esse trabalho, fiz o download dos arquivos de origem corrigidos da minha versão do VMware de link e segui os mesmos passos descritos por Ogheneneovie Ralph Otutu, ou seja:
cd /usr/lib/vmware/modules/source
wget https://github.com/mkubecek/vmware-host-modules/archive/player-12.5.9.zip
unzip player-12.5.9.zip
cd vmware-host-modules-player-12.5.9/vmmon-only/
make
cd ../vmnet-only/
make
cd ..
mkdir /lib/modules/'uname -r'/misc
cp vmmon.o /lib/modules/'uname -r'/misc/vmmon.ko
cp vmnet.o /lib/modules/'uname -r'/misc/vmnet.ko
depmod -a
/etc/init.d/vmware restart