linuxdesktop:ubuntu_vmware_workstation_pro_fix
Ubuntu VMware Workstation 17.5 Fix
On Ubuntu 22.04 if you get the message “Could not open /dev/vmmon” you can use this fix for it until VMware comes around to fix it. Which will probably be never since this is going to happen every time there is a new kernel update.
Continue with caution This will modify your kernel and can make your life miserable.
Run the folowing script to fix the virtual network. Bweare I had some issues getting the below script to run as Ubuntu 22.04 did now have gcc-12 installed. You can install gcc-12 like this.
apt install gcc-12
Script for the virtual network.
#!/bin/bash cd /usr/lib/vmware/modules/source git clone https://github.com/mkubecek/vmware-host-modules cd vmware-host-modules git checkout workstation-17.5.0 make tar -cf vmnet.tar vmnet-only tar -cf vmmon.tar vmmon-only mv vmnet.tar /usr/lib/vmware/modules/source/ mv vmmon.tar /usr/lib/vmware/modules/source/ vmware-modconfig --console --install-all
But hey we are not done. You need so sign those drivers as well. So here is a script that does exactly that.
#!/bin/bash rm vmware17.priv rm vmware17.der PRIV_FILE=vmware17.priv DER_FILE=vmware17.der echo "Problems with vmmon and vmnet modules, it's normal" sudo vmware-modconfig --console --install-all if [ -f "$PRIV_FILE" ]; then echo "$PRIV_FILE present, no need to regenerated" else echo "$PRIV_FILE missing, generating a new one" openssl req -new -x509 -newkey rsa:2048 -keyout $PRIV_FILE -outform DER -out $DER_FILE -nodes -days 36500 -subj "/CN=VMWARE/" fi echo "Now sign the two kernel modules (monitor and net)" echo "This step is need when kernel is updated" sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 $PRIV_FILE $DER_FILE $(modinfo -n vmmon) sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 $PRIV_FILE $DER_FILE $(modinfo -n vmnet) echo "Check modules signed" tail $(modinfo -n vmmon) | grep "Module signature appended" echo "Test if certs is already enrolled if not we need to import it in mok" sudo mokutil --test-key vmware17.der echo "Importing the trusted key in our MOK" echo "Enter a bit long password like vmware1717" sudo mokutil --import vmware17.der printf "Now it's time for reboot...\n\n" printf "Important remember the password.\n" printf "You will get a blue screen after reboot here choose:\n\n" printf "Enroll MOK\n" printf "Continue\n" printf "YES\n" printf "Enter Password\n" printf "OK or REBOOT\n"
linuxdesktop/ubuntu_vmware_workstation_pro_fix.txt · Last modified: 11/01/2024 22:41 by Allan