Easy Fix for VMWare: cannot open /dev/vmmon

How to solve a problem with VMWare complaining about vmmon and vmnet when trying to start a VM.

3611 views
d

By. Jacob

Edited: 2021-11-09 18:26

Cannot open /dev/vmmon: No such file or directory

Users might encounter this error message when starting a VM in VMWare on a Linux system with UEFI and and secure boot enabled, and to make matters worse, it even looks like the problem reoccurs whenever VMWare is updated.

The recommended solution is to follow the instructions, as provided in this article:

"Cannot open /dev/vmmon: No such file or directory" error when powering on a VM (2146460)

This is because your system is more secure with secure boot enabled.

Disabling secure boot in your BIOS will also solve the problem, but it leaves your system less secure and vulnerable to certain types of attacks; just to give an example, if some malware was to override the bootloader on your hard drive, secure boot would still prevent it from running.

Solution

The instructions provided are as follows:

1. Generate a new key with OpenSSL:

jacob@desktop:~$ openssl req -new -x509 -newkey rsa:2048 -keyout VMWare.priv -outform DER -out VMWare.der -nodes -days 36500 -subj "/CN=VMware/"

2. Sign the modules with the new key:

jacob@desktop:~$ sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 ./VMWare.priv ./VMWare.der $(modinfo -n vmmon)
jacob@desktop:~$ sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 ./VMWare.priv ./VMWare.der $(modinfo -n vmnet)

3. Import the public key to the system's MOK list:

jacob@desktop:~$ sudo mokutil --import MOK.der

You will be asked to enter a password, which you must use when applying the key in your BIOS.

4. Reboot the system, and apply the key.

Note. On my Lenovo laptop, I was automatically prompted to install the new key doing boot. I am not sure if that will be the case for other systems, but you should be able to apply the key from some place within the BIOS.

I tested this with Ubuntu 21.10 (Impish Indri), but it should work with older versions as well.

After updating the problem reemerges.

Unfortunately, it looks like we have to repeat this process whenever VMWare is updated.

I tried re-using the same key, but the system would not let me, saying that the key was already enrolled, so I generated a new key by overwriting the old files.

This situation is bad because a lot of users will not know what to do. Hopefully there will be an easier fix in the future.

Tell us what you think:

    More in: VMWare