When PopOS, updates the kernel on a System76. VMWare workstation 16.2.1 will fail to load vmmon and vmnet kernel modules, On boot, a popup will attempt to install them. but it will fail.
Running sudo vmware-modconfig --console --install-all
will show the following errors:
[AppLoader] GLib does not have GSettings support.
Stopping VMware services:
VMware Authentication Daemon done
Virtual machine monitor done
Starting VMware services:
Virtual machine monitor failed
Virtual machine communication interface done
VM communication interface socket family done
Virtual ethernet failed
VMware Authentication Daemon done
Unable to start services
Running sudo systemctl status vmware
will also show the errors.
Running sudo /etc/init.d/vmware status
will show vmmon and vmnet as not loaded
Module vmmon not loaded
Module vmnet not loaded
The fix is to perform the following steps from a shell:
# Install kernel headers
apt update && apt -y install linux-headers-$(uname -r)
# Download patch
wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-16.2.1.tar.gz
tar -xzf workstation-16.2.1.tar.gz
cd vmware-host-modules-workstation-16.2.1
tar -cf vmmon.tar vmmon-only
tar -cf vmnet.tar vmnet-only
cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source/
# Make kernel modules
cd /usr/lib/vmware/modules/source/
sudo tar xvf vmmon.tar
cd vmmon-only/include/
# Comment out lines 65-70 and 72. Do not comment outline 71. Comment = // in front of line
sudo vim vm_asm_x86.h
Your modification should look like the following:
65 //#ifndef USE_UBSAN
66 //#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr) \
67 // ASSERT_ON_COMPILE(sizeof(Selector) == 2 && \
68 // ((__builtin_constant_p(expr) && ((expr) >> 16) == 0) || \
69 // sizeof(expr) <= 2))
70 //#else
71 #define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr) <<<---- DO NOT COMMENT OUT this line
72 //#endif
Once complete compile, move, and load vmmon and vmnet:
cd ..
sudo make
cd ..
sudo tar xvf vmnet.tar
cd vmnet-only
sudo make
cd ..
# You should be in /usr/lib/vmware/modules/source
sudo cp vmmon.o /lib/modules/`uname -r`/kernel/drivers/misc/vmmon.ko
sudo cp vmnet.o /lib/modules/`uname -r`/kernel/drivers/misc/vmnet.ko
sudo depmod -a
sudo systemctl restart vmware.service
Done. Now click the VMware button and it should load correctly. This will have to be done for each future kernel upgrade.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.