
VMware Workstation on Ubuntu: Fix vmmon and vmnet Errors
Originally illustrated with Workstation 15/16 and Ubuntu 18.04/20.04. Those combinations are historical; check support for your current Workstation and kernel.
โCould not open /dev/vmmonโ does not always mean the same thing. A module may have failed to compile, may not exist for the running kernel, or may be rejected by Secure Boot. Signing a module cannot repair source-code incompatibility or missing kernel headers.

Check the running kernel and build result
uname -r
mokutil --sb-state
sudo apt update
sudo apt install build-essential "linux-headers-$(uname -r)" mokutil openssl
sudo vmware-modconfig --console --install-all
modinfo vmmon
modinfo vmnet
If the build fails, read its log and verify that the Workstation release supports the host/kernel combination. Upgrade through the official distribution channel where necessary. Do not ignore a failed build, use a random kernel patch or assume disabling Secure Boot is the only fix.
Use a protected signing key when Secure Boot is the cause
Only continue if the modules were built successfully and signature enforcement is what prevents loading. Where an approved module-signing mechanism already exists, use it. Otherwise, this example creates a local key restricted to module signing. Run the following in a root shell in a private directory:
sudo -i
install -d -m 0700 /root/vmware-module-signing
cd /root/vmware-module-signing
umask 077
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 3650 -subj '/CN=Local VMware module signing/' -addext 'basicConstraints=critical,CA:FALSE' -addext 'keyUsage=digitalSignature' -addext 'extendedKeyUsage=1.3.6.1.4.1.2312.16.1.2'
chmod 0600 MOK.priv
The private key can authorize kernel code; protect and back it up appropriately. Do not publish it. The public DER certificate is used for enrollment. This fixes the inconsistent certificate filenames in the earlier version of the article.
Sign the modules and enroll the public key
Check the paths returned by modinfo -n. These commands assume ordinary uncompressed .ko files. If the paths end in .xz or .zst, follow the supported build/sign/compression workflow rather than signing a compressed archive.
/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 MOK.priv MOK.der "$(modinfo -n vmmon)"
/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 MOK.priv MOK.der "$(modinfo -n vmnet)"
modinfo -F signer vmmon
modinfo -F signer vmnet
mokutil --import MOK.der
exit
Complete the prompted MOK enrollment through the physical or VM console at the next reboot, checking the certificate identity. The temporary enrollment password is entered locally; it is not the private key or a password to place in a script. Verify that the import command succeeded rather than assuming enrollment is complete before reboot.
Verify loading and repeat only the required steps
sudo mokutil --test-key /root/vmware-module-signing/MOK.der
sudo modprobe vmmon
sudo modprobe vmnet
lsmod | grep -E 'vmmon|vmnet'
sudo journalctl -k -b --no-pager | grep -Ei 'vmmon|vmnet|verification|key'
A subsequent kernel or Workstation update may require rebuilding and re-signing the new module files. Reusing an already enrolled valid key does not normally require re-enrolling it every time. Test a VM after the modules load and retain a supported kernel/recovery route in case an update exposes a compatibility issue.
References
- Broadcom: vmmon failures on Linux hosts
- Ubuntu: Secure Boot and MOK handling
- Ubuntu: signing modules for Secure Boot