MQ-Jr
MQ-Jr
unixcop Admin

Workstation Failed Install on Ubuntu/CentOS/RHEL (VMware Kernel Module Updater fails)

This post is about Workstation Failed Install. So, hope you like it.

Hi Guys, Sometimes you may have a trouble completing the VMware Installation on a newly installed Ubuntu or RHEL or even CentOS.  The base install succeed, but the “VMware Kernel Module Updater” ends with the following failure message:

“Workstation xx.x.x Failed Install on Ubuntu 19.04 Kernel 5.0.0-8-generic – VMware Kernel Module Updater fails”

Example:

Workstation 15.0.4 Failed Install on Ubuntu 19.04 Kernel 5.0.0-8-generic – VMware Kernel Module Updater fails

- Advertisement -

So in this small guide, we will discuss a small solution to solve this issue and start vmware workstation successfully.

Issue

VMware Kernel Module Updater fails when you tried to open or update vmware workstation

Workstation Failed Install – Solution

  • First, Loading vmware workstation (you can check which version you are running with ‘vmware –version’ when you can’t load the workstation GUI to see the version) results in a prompt that you need to update the kernel driver for VMware.
vmware --version
[AppLoader] Use shipped PC/SC Lite smart card framework.
An up-to-date "pcsc-lite-libs" or "libpcsclite1" package from your system is preferred.

(vmware:26424): Gtk-WARNING **: 17:08:30.683: Locale not supported by C library.
	Using the fallback 'C' locale.
VMware Workstation 16.2.0 build-18760230
  • We need a custom patch because Vmware sucks at staying on top of these things… so with the script below, the problem will be solved.
vim vmware.sh
  • Then add the following:
#!/bin/bash

VMWARE_VERSION=workstation-16.2.0
TMP_FOLDER=/tmp/patch-vmware
rm -fdr $TMP_FOLDER
mkdir -p $TMP_FOLDER
cd $TMP_FOLDER
git clone https://github.com/mkubecek/vmware-host-modules.git
cd $TMP_FOLDER/vmware-host-modules
git checkout $VMWARE_VERSION
git fetch
make
sudo make install
sudo rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
sudo ln -s /lib/x86_64-linux-gnu/libz.so.1
/usr/lib/vmware/lib/libz.so.1/libz.so.1
sudo /etc/init.d/vmware restart
  • Make the script executable
- Advertisement -
chmod +x vmware.sh

NOTE:

“Make sure that the VMWARE_VERSION value in the script is the version of your current workstation”

  • Run the script
./vmware.sh

Output:

[qadry@redhat-pc ~]$ ./vmware.sh 
Cloning into 'vmware-host-modules'...
remote: Enumerating objects: 3388, done.
remote: Counting objects: 100% (851/851), done.
remote: Compressing objects: 100% (701/701), done.
remote: Total 3388 (delta 403), reused 538 (delta 149), pack-reused 2537
Receiving objects: 100% (3388/3388), 1.70 MiB | 590.00 KiB/s, done.
Resolving deltas: 100% (2422/2422), done.
Branch 'workstation-16.2.0' set up to track remote branch 'workstation-16.2.0' from 'origin'.
Switched to a new branch 'workstation-16.2.0'
make -C vmmon-only 
make[1]: Entering directory '/tmp/patch-vmware/vmware-host-modules/vmmon-only'
Using kernel build system.
make -C /lib/modules/4.18.0-348.12.2.el8_5.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/kernels/4.18.0-348.12.2.el8_5.x86_64'
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/linux/driver.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/linux/hostif.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/memtrack.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/apic.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/statVarsVmmon.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/vmx86.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/sharedAreaVmmon.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/cpuid.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/task.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/moduleloop.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/crosspage.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/comport.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/phystrack.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/bootstrap/vmmblob.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/bootstrap/bootstrap.o
  LD [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/vmmon.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/patch-vmware/vmware-host-modules/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/vmmon.ko
make[2]: Leaving directory '/usr/src/kernels/4.18.0-348.12.2.el8_5.x86_64'
make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[2]: Entering directory '/tmp/patch-vmware/vmware-host-modules/vmmon-only'
make[2]: 'postbuild' is up to date.
make[2]: Leaving directory '/tmp/patch-vmware/vmware-host-modules/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make[1]: Leaving directory '/tmp/patch-vmware/vmware-host-modules/vmmon-only'
make -C vmnet-only 
make[1]: Entering directory '/tmp/patch-vmware/vmware-host-modules/vmnet-only'
Using kernel build system.
make -C /lib/modules/4.18.0-348.12.2.el8_5.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/kernels/4.18.0-348.12.2.el8_5.x86_64'
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/driver.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/hub.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/userif.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/netif.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/bridge.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/procfs.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/smac_compat.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/smac.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/vnetEvent.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/vnetUserListener.o
  LD [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/vmnet.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/patch-vmware/vmware-host-modules/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/vmnet.ko
make[2]: Leaving directory '/usr/src/kernels/4.18.0-348.12.2.el8_5.x86_64'
make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[2]: Entering directory '/tmp/patch-vmware/vmware-host-modules/vmnet-only'
make[2]: 'postbuild' is up to date.
make[2]: Leaving directory '/tmp/patch-vmware/vmware-host-modules/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make[1]: Leaving directory '/tmp/patch-vmware/vmware-host-modules/vmnet-only'
install -D -t /lib/modules/4.18.0-348.12.2.el8_5.x86_64/misc vmmon-only/vmmon.ko vmnet-only/vmnet.ko
strip --strip-debug /lib/modules/4.18.0-348.12.2.el8_5.x86_64/misc/vmmon.ko /lib/modules/4.18.0-348.12.2.el8_5.x86_64/misc/vmnet.ko
if test -z ""; then /sbin/depmod -a 4.18.0-348.12.2.el8_5.x86_64; fi
rm: 'https://1118798822.rsc.cdn77.org/usr/lib/vmware/lib/libz.so.1/libz.so.1'
Restarting vmware (via systemctl):                         [  OK  ]
 Workstation Failed Install
Workstation Failed Install

Followed this method (notice it’s updated from the original solution to include the updated ws version). Just stick the following in a script that you run after every kernel upgrade

  • Workstation fires right up successfully and works as it should without 3rd parties fixing basic kernel updates to their stuff

Conclusion

That’s it,

In this guide, we showed you how to fix the issue with VMware Kernel Module Updater which fails when you start Vmware workstation or even try to update it.

Thanks

3 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook