Created
March 29, 2022 17:38
-
-
Save ald3ns/1a26ff864efa23509dda0d7f8a682c36 to your computer and use it in GitHub Desktop.
Download and compile VMWare Workstation drivers for cutting edge kernels
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Version of the installed VMWare Workstation | |
VERSION="$(vmware-installer -l | awk 'FNR==3 {print $2}' | cut -n -d '.' -f 1-3)" | |
# Grab the zip from the github repo | |
wget "https://github.com/mkubecek/vmware-host-modules/archive/refs/heads/player-${VERSION}.zip" | |
# Unzip the zip file | |
unzip -q player-$VERSION.zip | |
# Get the build directory | |
BUILDDIR="$(zipinfo player-$VERSION.zip | sed -n 3p | awk '{print $NF}')" | |
cd $BUILDDIR | |
# Build components and then install | |
cd vmmon-only && sudo make | |
cd ../vmnet-only && sudo make | |
cd .. && sudo make install | |
# Return to the original directory and clean up | |
cd .. | |
rm player-$VERSION.zip* | |
rm -rf "$BUILDDIR" |
Reminder: update before running, reboot after script finish.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I run Pop!_OS 21.10 and since it runs a cutting edge kernel, my vmware install gets fucked up fairly frequently. With such, you have to compile your own kernel modules (vmmon and vmnet) but the built in tool fails for some reason. This script grabs the latest build from the repo and builds them for you.
<3