Skip to content

Instantly share code, notes, and snippets.

@ald3ns
Created March 29, 2022 17:38
Show Gist options
  • Save ald3ns/1a26ff864efa23509dda0d7f8a682c36 to your computer and use it in GitHub Desktop.
Save ald3ns/1a26ff864efa23509dda0d7f8a682c36 to your computer and use it in GitHub Desktop.
Download and compile VMWare Workstation drivers for cutting edge kernels
#!/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"
@ald3ns
Copy link
Author

ald3ns commented Mar 29, 2022

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

@ald3ns
Copy link
Author

ald3ns commented Apr 13, 2022

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