Adventures in Installation: VMware Workstation 17.5.2 on Ubuntu 24.04
As part of my continued efforts to upgrade to Ubuntu 24.04 I encountered an issue while installing VMware Workstation. Specifically, the kernel modules would not compile... I've encountered this issue before, and have had to apply out-of-band patches to address this issue. Those did not appear to work this time and I had to do some investigating.
References
- Supported host operating systems for Workstation Pro 16.x, 17.x and Workstation Player 16.x, 17.x [knowledge.broadcom.com]
- Has anyone had success installing this on the newer Ubuntu (24.04)? [reddit.com/r/vmware]
- Install VMware Workstation Player in Ubuntu 24.04 [Fix Module Issue] [ubuntuhandbook.org]
- Issue #250 - VMware Workstation 17.5.2 Pro has been released [github.com/mkubecek/vmware-host-modules]
- Issue #250 - VMware Workstation 17.5.2 Pro has been released - Kr0ff [github.com/mkubecek/vmware-host-modules]
- Skipping BTF generation xxx. due to unavailability of vmlinux on Ubuntu 21.04 [askubuntu.com]
- Not able install Vmware Workstation on new Ubuntu 24.04 [reddit.com/r/vmware]
- Did you enable secureboot on your linux system? [reddit.com/r/linuxquestions]
- VMWare Workstation Pro - vmmon not found [askubuntu.com]
- VMmon and VMnet not loading Workstation 17 - How do I register those modules for secure boot? [reddit.com/r/linuxquestions]
- VmWare not working after ubuntu upgrade to 24.04 LTS [ubuntuforums.org]
- VMware vmmon & vmnet 17.5.1 and Linux kernel 6.8.0 won't compile [unix.stackexchange.com]
- Quick & Easy: VMware Workstation Pro on Ubuntu 24.04 [nwgat.ninja]
Remediation
Due to Secure Boot, I was unable to apply the vmware-host-modules from mkubecek. After disabling Secure Boot, I am able to install and use them with my system purely in UEFI mode (secure boot disabled). While there is a path forward to sign/install the modules while leaving Secure Boot enabled, that isn't a very convenient option and my threat model doesn't require this step.
Steps:
- Disable Secure Boot via BIOS/Firmware
- Boot into Ubuntu 24.04
- mkdir -p tmp/vmware && cd tmp/vmware
- wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-17.5.1.tar.gz
- tar -xzf workstation-17.5.1.tar.gz && cd vmware-host-modules-workstation-17.5.1
- tar -cf vmmon.tar vmmon-only && tar -cf vmnet.tar vmnet-only
- sudo cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source/
- sudo vmware-modconfig --console --install-all
After following these steps, I see that VMware services start successfully:
Starting VMware services:
Virtual machine monitor done
Virtual machine communication interface done
VM communication interface socket family done
Virtual ethernet done
VMware Authentication Daemon done
Shared Memory Available done
A note on Secure Boot
If you require Secure Boot, there is a way for you to sign the kernel modules using your own key by following the process described here: VMWare Workstation Pro - vmmon not found
Extracted for clarity - warning, I haven't tried the steps... presenting for completeness:
- Generate a key pair using the
openssl
to signvmmon
andvmnet
modules:
$ sudo openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VMware/"
Replace MOK
with the name of the file you want for the key.
- Sign the modules using the generated key by running these commands:
$ 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 by running this command:
$ sudo mokutil --import MOK.der
- Confirm a password for this
MOK
enrollment request. - Reboot your machine and complete the enrollment from the UEFI console.