What’s wrong with VMWare Workstation on Ubuntu?! ** updated for Secure Boot **

Spread the love
Ubuntu Authentic Logo - Ubuntu Linux - Pin | TeePublic
Ubuntu logo

I’m not really sure why, but every time I install VMWare Workstation on Ubuntu, I can never get it to run right away. There’s another step to the setup after running the installer that might as well be documented as part of the installation process.

It’s compiling kernel extensions for vmmon and vmnet – and Workstation tries to compile them out of the box, but it never works. It’s missing some essential kernel extensions that are only available from GitHub (not exactly a professional look…)

I had to write a post about it since after doing it for the umpteenth time I realized this might be a problem for a lot of people that isn’t well documented and might be exceedingly confusing for first-time users.

Make sure you have the headers and modules for your kernel – this oneliner will refresh your package cache and install them if you don’t have them:

$ sudo apt update && sudo apt install -y linux-headers-$(uname -r) linux-modules-$(uname -r)

First, you’ll have to download the kernel extensions. Here’s where they’re available:

https://github.com/mkubecek/vmware-host-modules/releases

You’ll see filenames available for download that look like w15.5.5-k5.7 – you want to match the first 3 numbers to your Workstation version, and the last two to your kernel – this example would be for Workstation 15.5.5 and an OS with 5.7 kernel.

Thankfully there’s plenty of releases to find one that’ll work for your setup. At the time of writing there is nearly 700 releases to choose from (indicating that this has probably been a major issue for a long, long time… )

After downloading the release, unzip it and it’ll create a folder called:

vmware-host-modules-<release version>

cd into this folder and create two .tars:

$ tar -cf vmmon.tar vmmon-only/
$ tar -cf vmnet.tar vmnet-only/

Then copy them to the modules source directory for Workstation (as root):

$ sudo cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source/

After copying the .tar files to /usr/lib/vmware/modules/source/ run this command:

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

If all goes as planned, you should be able to run Workstation now.

Note: Keep in mind that if you update your kernel you’ll absolutely have to go through this process all over again. Sometimes, but not always, updates to Workstation will require it, too.

You’re sure to get just as familiar with the process as I am before long.

*Update* For systems using secure boot, there’s a few more steps:

Generate a key pair using the openssl to sign vmmon and vmnet modules:

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

Sign the modules using the generated key:

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

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

Import the public key to the system’s MOK list:

$ sudo mokutil --import MOK.der

Choose a password you’ll remember for the MOK key enrollment, since the next step is rebooting and enrolling it in your UEFI firmware.

Reboot your machine. Follow the instructions to enroll the MOK key in your firmware from the UEFI console, and go back to your Ubuntu terminal and run:

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

That should take care of it for you.

Now just make sure you bookmark this page and the Github releases page so you can come back when you upgrade your kernel and do this all over again!

Good luck!

References:

https://github.com/mkubecek/vmware-host-modules/releases

https://askubuntu.com/questions/1135343/ubuntu-19-04-vmware-kernel-modules-updater

https://kb.vmware.com/s/article/2146460

Leave a Reply

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