Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save imShakil/acf71b4e5fd3f7e1b2d1100031f931d1 to your computer and use it in GitHub Desktop.

Select an option

Save imShakil/acf71b4e5fd3f7e1b2d1100031f931d1 to your computer and use it in GitHub Desktop.
fix vmware vmmon vmnet module in ubuntu 24 with secure boot enabled

Fix VMWare module with Secure Boot [Ubuntu]

Failed to initialize monitor device.
Could not open /dev/vmmon: No such file or directory.
Please make sure that the kernel module vmmon is loaded.

This happens when Secure Boot blocks VMware’s vmmon and vmnet kernel modules because they are not signed.

Update linux headers and vmware config

sudo vmware-modconfig --console --install-all
sudo apt install build-essential linux-headers-$(uname -r)

Install required packages

sudo apt update
sudo apt install mokutil openssl

Create signing key

mkdir -p ~/vmware-signing
cd ~/vmware-signing
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VMware Module Signing/"

Enroll key with Secure Boot (MOK)

sudo mokutil --import MOK.der

👉 Set a password.

Reboot

sudo reboot

👉 In the blue MOK Manager screen: Enroll MOK → Continue → Yes → Enter password → Reboot (Don't delay)

NB: If you miss the blue screen then import the key and reboot again

Find VMware module locations

modinfo -n vmmon
modinfo -n vmnet

Sign the modules

sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 MOK.key MOK.crt $(modinfo -n vmmon)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 MOK.key MOK.crt $(modinfo -n vmnet)

Reload modules

sudo modprobe -r vmmon vmnet
sudo modprobe vmmon
sudo modprobe vmnet

Verify modules are loaded

lsmod | grep vmmon
lsmod | grep vmnet

✅ With this fix, VMware will run perfectly on Ubuntu or Lubuntu without turning off Secure Boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment