Ubuntu – VMWare 15 Error on Ubuntu 18.4 – Could not open dev vmmon

围巾🧣 2021年09月17日 960次浏览

错误

用Ubuntu 安装VMware跑Windows,启动时遇到如下报错:

VM	Ware Error 1

解决办法

This problem essentially happens because of secure boot which does not allow kernel modules to load without being digitally signed with a trusted certificate. So we need to create a trusted key and use it to sign the newly compiled modules vmmon and vmnet.

These instructions have been tested for VMWare 15 and Ubuntu 18.04 up to 19.04.

  1. Install VMWare

  2. Run this

    sudo vmware-modconfig --console --install-all
    

    You'll see that there are issues with monitor and net, thas ok.

  3. Generate a key

    openssl req -new -x509 -newkey rsa:2048 -keyout VMWARE15.priv -outform DER -out VMWARE15.der -nodes -days 36500 -subj "/CN=VMWARE/"
    

    You'll see info that it did it ok.

  4. Use this key we just generated to sign the two kernel modules.

    sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./VMWARE15.priv ./VMWARE15.der $(modinfo -n vmmon)
    sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./VMWARE15.priv ./VMWARE15.der $(modinfo -n vmnet)
    

    This does not give any feedback

  5. Check that signatures are applied correctly.

    tail $(modinfo -n vmmon) | grep "Module signature appended"
    

    You should get Binary file (standard input) matches

  6. Now we make this key trusted by importing it to machine owner key (MOK) management system with the command below.

    sudo mokutil --import VMWARE15.der
    

    This will ask you for a password, enter some new password a bit long like 1515vmware. Reenter same password.

  7. Reboot, When reboot you should be presented with a menu with blue screen background, you have to make your way to enroll the key and enter the password you just created, this happens only once, then continue to boot.

  8. To test the driver / module installed correctly enter the command

    mokutil --test-key VMWARE15.der
    

    You should get VMWARE15.der is already enrolled and that means VMWare should be working.

All credits to OP.

Notice: I've found out that after some Linux updates which involves the kernel (or something like that) this fix stops working and you have to do all the steps again to get it working again. (No need to re-install vmware)

vmware player 15.5.6 Ubuntu 可用秘钥

AU558-D0G0Q-M84HZ-UEM5E-Q3RXA

UV3H2-8ZX5K-M81HP-14YN9-XLRCA

YZ5E2-DQFE5-M8DLQ-VPPQX-NPHAA

VG3E0-6JX8K-480QQ-QXW5E-XKUA6

GC7RK-01G53-H854Q-7DWGZ-MPRZ8