** UPDATE ** See my post on the next page for updated zip fix
There's a bug in the vmware vmmon-only/linux/hostif.c module file which doesn't read the CentOS 8 version number properly, breaking the compiler, preventing the install.
To work around this - click "Close" on the "Unable to install all modules" error, but keep the underlying install window open:
Extract the "hostif.c" file in the attached zip into your /tmp folder, remove any existing broken install folders by doing this:-
rmdir /tmp/modconfig-*
run the following perl 1-liner,
perl -e 'while(1){@f=`ls -d /tmp/modconfig-* 2>/dev/null`; chomp @f; if(-d $f[0]){`cp -a /tmp/hostif.c $_/vmmon-only/linux/` foreach(@f); print "$f\n";sleep(1);$i++}; print "."; exit(0) if($i>10);}'
then click the "Install" button again on the VMware Kernel Module Updater window.
For those interested - this is the fix that mitigates the problem:
*** hostif_original.c 2021-03-08 04:11:14.661421195 +0000
--- ../vmmon-only/linux/hostif.c 2021-03-08 04:10:33.060476174 +0000
***************
*** 1680,1684 ****
*/
! #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
extern unsigned long totalram_pages;
PageCnt totalPhysicalPages = totalram_pages;
--- 1680,1684 ----
*/
! #if 0 /* LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) */
extern unsigned long totalram_pages;
PageCnt totalPhysicalPages = totalram_pages;
***************
*** 1709,1713 ****
/* NR_SLAB_* moved from zone to node in 4.13. */
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
lockedPages += global_node_page_state_pages(NR_SLAB_UNRECLAIMABLE_B);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
--- 1709,1713 ----
/* NR_SLAB_* moved from zone to node in 4.13. */
! #if 1 /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0) */
lockedPages += global_node_page_state_pages(NR_SLAB_UNRECLAIMABLE_B);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
That's easy. That file is no longer there and the contents are in objtool.h, so all you need to do is to go to your kernel's directory in /usr/src/kernel, go to the include/linux directory from there, and do ln -s objtool.h frame.h :
[user@host linux]$ pwd
/usr/src/kernels/4.18.0-348.el8.x86_64/include/linux
[user@host linux]$ sudo ln -s objtool.h frame.h
[user@host linux]$ ls -al frame.h
lrwxrwxrwx 1 root root 9 Nov 15 10:57 frame.h -> objtool.h
Yes, this worked for me.
Many thanks! 👍
Thank you IMMENSELY for this fix!!!
hello can you helpe me please, whats its the "modconfig" because i try some times but doesnt work
Could I possibly ask why it is not a self install package? I mean VMware is meant to be convenient and attractive which it is in many ways However, having to pay $200 for a software not entirely designed first time as many others. It is a turn off...
Hi everyone
Apparently in the new version 16.2.x, some files have been deleted that makes the perl script not to work.
Thanks to @cndg6 and @mkubecek I want to give a brief explanation for our new-to-linux guys.
First go to https://github.com/mkubecek/vmware-host-modules/branches and download the version based on the version you want to install.
I solved my issue by doing these:
1- I'm on Kernel 5.14.0-124.el9.x86_64 so I edited these:
vmnet-only/compat_netdevice.h:201
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
to
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0)
vmnet-only/netif.c:88
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
to
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
2- Then make Tar vmmon-only and vmnet-only folders
tar -cf vmmon.tar vmmon-only
tar -cf vmnet.tar vmnet-only
3- Later copy the files to this path /usr/lib/vmware/modules/source/ :
sudo cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source/
This Path might vary based on distribution so just change it to match yours:
/usr/lib/gcc/x86_64-redhat-linux/11/include
4- Finally, run this command to compile headers manually:
sudo CPATH=/usr/lib/gcc/x86_64-redhat-linux/11/include vmware-modconfig --console --install-all
The most recent update now also needs the same fix applied to crosspage.c (see attached zip)
Instructions are similar:-
To work around this - click "Close" on the "Unable to install all modules" error, but keep the underlying install window open:
Extract the "hostif.c" and "crosspage.c" file in the attached zip into your /tmp folder, remove any existing broken install folders by doing this:-
rmdir /tmp/modconfig-*
run the following perl 1-liner,
perl -e 'while(1){@f=`ls -d /tmp/modconfig-* 2>/dev/null`; chomp @f; if(-d $f[0]){foreach(@f){`cp -a /tmp/hostif.c $_/vmmon-only/linux/; cp -a /tmp/crosspage.c $_/vmmon-only/common/`} ; print "$f\n";sleep(1);$i++}; print "."; exit(0) if($i>100);}'
then click the "Install" button again on the VMware Kernel Module Updater window.