DigitalDude
Enthusiast
Enthusiast

Workstation 16.2.1: vmmon & vmnet not compiling on Pop!_OS 21.10, kernel 5.18.8

Jump to solution

Pop!_OS 21.10, kernel 5.15.8-76051508-generic, VMware Workstation Pro 16.2.1.

  1. Successfully installed VMware WS 16.2.1.
  2. Attempted to start the app, but VMware Kernel Module Updater failed to "install all modules ..."
  3. Per numerous tech support articles:
    1. Uninstalled VMware WS.
    2. Ran the following, to load required kernel headers & environment:
          sudo apt install build-essential linux-headers-$(uname -r)
  4. Command output reported:
        "linux-headers-5.15.8-76051508-generic is already the newest version
        (5.15.8-76051508.202112141040~1639505278~21.10~0ede46a).
        build-essential is already the newest version (12.9ubuntu2).
        build-essential set to manually installed.
        0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."
  5. Reinstalled VMware WS 16.2.1, with the unfortunate same result.

I can provide  logs, if actually needed; however, this is a problem which apparently continues to rear its ugly head.  Were this FOSS, it'd be one thing.  But, it's quite different, when one spends over $200 and installing on a mainstream distro.

Any ideas?

1 Solution

Accepted Solutions
DigitalDude
Enthusiast
Enthusiast

Here is a solution that worked on my system.  Essentially, it comments-out lines 65-70 & 72, in ./vmmon-only/include/vm_asm_x86.h.  After recompiling, it got VMware up & working on my system.

View solution in original post

16 Replies
mlizbeth
Contributor
Contributor

Take a look at this git repo and see if this helps https://github.com/mkubecek/vmware-host-modules/tree/workstation-16.2.1

I had to use it to compile vmmon and vmnet myself for Workstation 16.2.1 on Red Hat 8.5, and I am using kernel 4.18.0

ajgringo619
Hot Shot
Hot Shot

This is one of the unfortunate side effects of running the latest-and-greatest kernels with software that needs to build modules for it; it's one of the reasons why I ran QEMU for a long time before coming here. I do know that VMware Ws works with this kernel branch - currently using it on EndeavousOS (Arch-based) - but the package I use has been tweaked with the patches mentioned in @mlizbeth's post.

DigitalDude
Enthusiast
Enthusiast

Thanks! I was concerned that compiling the modules would require some programming chops, which I do not have. However, the INSTALL instructions seem very comprehensive & straightforward.  We'll see if the patches work on the Pop!_OS 5.18.8

The hell of it is VMware WS 16.2.1 was running fine in a Pop!_OS 20.04 > 21.10 OS. Unfortunately, an unrelated system crash required deleting the partitions and a clean reinstall.

0 Kudos
DigitalDude
Enthusiast
Enthusiast

Unfortunately, this didn't work.  There were numerous error codes associated with vmmon.  Afterwards, when running VMware Workstation Pro, it unsuccessfully attempts to compile vmmon and must be closed.

jvogtlab
Contributor
Contributor

https://kb.vmware.com/s/article/80807 technically they appear to only support LTS. That said, I ran into this. I restored to a backup with 5.15.5. It appears to function correctly (though technically officially unsupported). I'll try this update to 5.18.8 a later time.

0 Kudos
shibu_nyc
Enthusiast
Enthusiast

I was surprised to see that VMware WS 16.2.1 was running fine for you in  Pop!_OS 21.10. 

I was unable to boot up VMware Workstation Pro as soon as I updated to Pop!_OS 21.10. Made me wish I waited before upgrading.

When I attempt to launch WS Pro 16.2.1 the "VMware Kernal Module Updater" comes up with a message stating "Before you can run VMware, several modules must be compiled and loaded into the running kernel." When I click the "Install" button, the "VMware Kernal Module Updater" window pops up stating that it is "Compiling and installing following kernal modules..." 

vmmon

vmnet

Then I always get the same error window which states "Unable to installl all modules. See log for details (Exit code 1)

I was planning on just waiting for VMware to release a new version to fix the issue but if WS 16.2.1 was working fine for you under Pop!_OS 21.10, i guess we both have to figure this out on our own.

0 Kudos
PabloPlkg
Contributor
Contributor

hi i also updated pop os to 21.10 and had the same problem. i found a solution. i keep the last working kernel. using command

sudo kernelstub -v -k /boot/vmlinuz-5.15.5-76051505-generic -i /boot/initrd.img-5.15.5-76051505-generic

after reboot you will have the old kernel which works perfect with vmware.

now you can fix vmmon and vmnet from gui of vmware without any problems and wait for new updates which will fix the problem

good luck 🙂

DigitalDude
Enthusiast
Enthusiast

@shibu_nyc  ‎12-22-2021 01:37 PM
I was surprised to see that VMware WS 16.2.1 was running fine for you in Pop!_OS 21.10.

VMware was originally installed and running in Pop!_OS 21.04, subsequently upgraded to 21.10, where it also worked.  Unfortunately, an unrelated system crash required reformatting the drive and a clean reinstall.

DigitalDude
Enthusiast
Enthusiast

Here is a solution that worked on my system.  Essentially, it comments-out lines 65-70 & 72, in ./vmmon-only/include/vm_asm_x86.h.  After recompiling, it got VMware up & working on my system.

masterpier
Contributor
Contributor

This did not work for me in KDE NEON and kernel 5.15.  Errors out and does not create vmmon.ko file:

https://pastebin.com/VwBVMKqb

steps don't work unable to run make successfully.  Errors out: with following errors:

reggie@neon-lnx:/usr/lib/vmware/modules/source/vmmon-only$ make
Using kernel build system.
make -C /lib/modules/5.15.11-051511-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
 MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.11-051511-generic'
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21364’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21366’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21369’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21371’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21373’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21375’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21377’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21379’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21381’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21383’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21385’: Permission denied
arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21387’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21389’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21391’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21393’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21395’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21397’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21399’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21401’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21403’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21405’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21407’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21410’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21412’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21414’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21416’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21418’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21420’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21422’: Permission denied
mkdir: cannot create directory ‘/usr/lib/vmware/modules/source/vmmon-only/.tmp_21424’: Permission denied
 CC [M]  /usr/lib/vmware/modules/source/vmmon-only/linux/driver.o
In file included from /usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:49:
/usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm_x86.h:66:1: warning: multi-line comment [-Wcomment]
  66 | //#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr)                                \
     | ^
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:1452:1: fatal error: opening dependency file /usr/lib/vmwa
re/modules/source/vmmon-only/linux/.driver.o.d: Permission denied
1452 | MODULE_INFO(supported, "external");
     | ^~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:277: /usr/lib/vmware/modules/source/vmmon-only/linux/driver.o] Error 1
make[1]: *** [Makefile:1874: /usr/lib/vmware/modules/source/vmmon-only] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.11-051511-generic'
make: *** [Makefile:117: vmmon.ko] Error 2
reggie@neon-lnx:/usr/lib/vmware/modules/source/vmmon-only$

Tags (1)
0 Kudos
ajgringo619
Hot Shot
Hot Shot
If you're trying to build kernel modules from the source tree, you need to be root.
0 Kudos
vodkanaut
Contributor
Contributor

i was able to get this working today using steps listed in https://communities.vmware.com/t5/VMware-Workstation-Pro/VM-Workstation-16-1-gt-16-2-1-on-Ubuntu-21-...

 

there is a good breakdown by sabennett  in the post but for popOS make sure not to comment out line 71    -- i got carless the fist time and it failed.  after i update the file correctly the steps worked without issue.

 

im on VMware Workstation 16.2.1 build-18811642   and kernel  5.15.8-76051508-generic working now with no issues. 

masterpier
Contributor
Contributor

followed steps got errors when running make:

root@neon-lnx:/usr/lib/vmware/modules/source/vmmon-only# make VM_UNAME='5.15.11-051511-generic'
Using kernel build system.
make -C /lib/modules/5.15.11-051511-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
 MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.11-051511-generic'
 CC [M]  /usr/lib/vmware/modules/source/vmmon-only/common/task.o
In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm.h:44,
                from /usr/lib/vmware/modules/source/vmmon-only/common/task.c:52:
/usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm_x86.h:66:1: warning: multi-line comment [-Wcomment]
  66 | //#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr)                                \
     | ^
In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm.h:44,
                from /usr/lib/vmware/modules/source/vmmon-only/common/task.c:52:
/usr/lib/vmware/modules/source/vmmon-only/common/task.c: In function ‘TaskRestoreHostGDTTRLDT’:
/usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm_x86.h:263:7: error: implicit declaration of function ‘AS
SERT_ON_COMPILE_SELECTOR_SIZE’ [-Werror=implicit-function-declaration]
 263 |       ASSERT_ON_COMPILE_SELECTOR_SIZE(expr);                            \
     |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/vmware/modules/source/vmmon-only/common/task.c:724:7: note: in expansion of macro ‘SET_TR’
 724 |       SET_TR(tr);
     |       ^~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /usr/lib/vmware/modules/source/vmmon-only/common/task.o] Error 1
make[1]: *** [Makefile:1874: /usr/lib/vmware/modules/source/vmmon-only] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.11-051511-generic'
make: *** [Makefile:117: vmmon.ko] Error 2

0 Kudos
shibu_nyc
Enthusiast
Enthusiast

It took a while but once sabennett spelled out the steps line by line, I finally got WS Pro 16.2.1 up and running for the first time in nearly a month.  https://communities.vmware.com/t5/VMware-Workstation-Pro/VM-Workstation-16-1-gt-16-2-1-on-Ubuntu-21-...

This is a production machine. That was the last time I upgrade a kernal without verifying that WS Pro will work first. I am setting up a second popOS machine now.

Thanks again DigitalDude.

0 Kudos
neltnerb
Contributor
Contributor
For anyone running into issues, I'm not sure the best place to post this but after a few days struggling to get VMware to run on kernel 5.13.0 I discovered that I needed to manually sign them for it to function with secure boot. https://askubuntu.com/questions/1348250/skipping-btf-generation-xxx-due-to-unavailability-of-vmlunux... I only noticed because I saw that BTF warning during console compilation. If you run into the same message or otherwise find it odd that even the git repository with patches to make it compile for more modern kernels, it might be this. It seems particularly likely to happen when we're using workarounds that involve manually compiling our own modules.
0 Kudos
vodkanaut
Contributor
Contributor

Today i hesitantly updated to the new  v 16.2.3  and post update everything is working without issue 😄  no errors  

running Pop!_OS 21.10   

0 Kudos