Installing VMware and Kernel Modules for Fedora

When I installed vmware-player on my Fedora 33 with kernel 5.14.18-100.fc33.x86_64, I got this error after I tried starting virtual machine:

Could not open /dev/vmmon: No such file or directory.
Please make sure that the kernel module `vmmon' is loaded.

To install the required modules, I followed this post and did:

vmware-modconfig --console --install-all

However, as I’m using secure boot, I got this error during installation:

[AppLoader] GLib does not have GSettings support.
Stopping vmware (via systemctl):                           [  OK  ]
make: Entering directory '/tmp/modconfig-aXhuVj/vmmon-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/5.14.18-100.fc33.x86_64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/kernels/5.14.18-100.fc33.x86_64'
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/cpuid.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/crosspage.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/moduleloop.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/sharedAreaVmmon.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/statVarsVmmon.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/task.o
/tmp/modconfig-aXhuVj/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Free() falls through to next function PhysTrack_Add()
/tmp/modconfig-aXhuVj/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Add() falls through to next function PhysTrack_Remove()
/tmp/modconfig-aXhuVj/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Remove() falls through to next function PhysTrack_Test()
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/bootstrap/vmmblob.o
/tmp/modconfig-aXhuVj/vmmon-only/common/task.o: warning: objtool: .text: unexpected end of section
  LD [M]  /tmp/modconfig-aXhuVj/vmmon-only/vmmon.o
  MODPOST /tmp/modconfig-aXhuVj/vmmon-only/Module.symvers
  CC [M]  /tmp/modconfig-aXhuVj/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/modconfig-aXhuVj/vmmon-only/vmmon.ko
  BTF [M] /tmp/modconfig-aXhuVj/vmmon-only/vmmon.ko
Skipping BTF generation for /tmp/modconfig-aXhuVj/vmmon-only/vmmon.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/kernels/5.14.18-100.fc33.x86_64'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-aXhuVj/vmmon-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-aXhuVj/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory '/tmp/modconfig-aXhuVj/vmmon-only'
make: Entering directory '/tmp/modconfig-aXhuVj/vmnet-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/5.14.18-100.fc33.x86_64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/kernels/5.14.18-100.fc33.x86_64'
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/netif.o
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/smac.o
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/smac_compat.o
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/vnetEvent.o
/tmp/modconfig-aXhuVj/vmnet-only/driver.c: In function ‘VNetFileOpUnlockedIoctl’:
/tmp/modconfig-aXhuVj/vmnet-only/driver.c:966:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
  966 |       {
      |       ^
/tmp/modconfig-aXhuVj/vmnet-only/driver.c:976:4: note: here
  976 |    case SIOCGETAPIVERSION:
      |    ^~~~
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/vnetUserListener.o
  LD [M]  /tmp/modconfig-aXhuVj/vmnet-only/vmnet.o
  MODPOST /tmp/modconfig-aXhuVj/vmnet-only/Module.symvers
  CC [M]  /tmp/modconfig-aXhuVj/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/modconfig-aXhuVj/vmnet-only/vmnet.ko
  BTF [M] /tmp/modconfig-aXhuVj/vmnet-only/vmnet.ko
Skipping BTF generation for /tmp/modconfig-aXhuVj/vmnet-only/vmnet.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/kernels/5.14.18-100.fc33.x86_64'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-aXhuVj/vmnet-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-aXhuVj/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory '/tmp/modconfig-aXhuVj/vmnet-only'
Starting vmware (via systemctl):  Job for vmware.service failed because the control process exited with error code.
See "systemctl status vmware.service" and "journalctl -xe" for details.
                                                           [FAILED]
Unable to start services

Checking the journalctl output:

Jun 23 23:28:43 yenizombicanavari kernel: Loading of unsigned module is rejected
Jun 23 23:28:43 yenizombicanavari vmware[7772]:    Virtual machine monitor[FAILED]
Jun 23 23:28:43 yenizombicanavari vmware[7772]:    Virtual machine communication interface[  OK  ]
Jun 23 23:28:43 yenizombicanavari vmware[7772]:    VM communication interface socket family[  OK  ]
Jun 23 23:28:43 yenizombicanavari kernel: Loading of unsigned module is rejected
Jun 23 23:28:43 yenizombicanavari vmware[7772]:    Virtual ethernet[FAILED]
Jun 23 23:28:43 yenizombicanavari vmware[7772]:    VMware Authentication Daemon[  OK  ]
Jun 23 23:28:43 yenizombicanavari systemd[1]: vmware.service: Control process exited, code=exited, status=1/FAILURE

I signed the modules manually(using /usr/src/kernels/$(uname -r)/scripts/sign-file) and put them into /lib/modules/$(uname -r)/misc but this also didn’t work. I still get the same error.

Solution

Solution was to download the host kernel modules and compile them manually. I cloned this repository and checked out to the correct branch and compiled and installed. Finally, I signed the modules manually and loaded the kernel modules manually. Basically I did:

# download and compile the source
git clone https://github.com/mkubecek/vmware-host-modules.git
cd vmware-host-modules
git checkout player-16.2.3
make
sudo make install

# sign modules
# note that this key is already authorized before!
cd /lib/modules/$(uname -r)/misc
/usr/src/kernels/$(uname -r)/scripts/sign-file 'sha256' /root/module-signing/MOK.priv /root/module-signing/MOK.der vmmon.ko
/usr/src/kernels/$(uname -r)/scripts/sign-file 'sha256' /root/module-signing/MOK.priv /root/module-signing/MOK.der vmnet.ko

# load kernel modules
modprobe -v vmmon
modprobe -v vmnet

Leave a Reply

Your email address will not be published. Required fields are marked *