Skip to content

Instantly share code, notes, and snippets.

@moozer
Created January 9, 2018 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moozer/831ee13acec17dfc9a35d32caafe067f to your computer and use it in GitHub Desktop.
Save moozer/831ee13acec17dfc9a35d32caafe067f to your computer and use it in GitHub Desktop.
An install script to install vmware workstation with modules on debian
#!/bin/sh
echo Download the latest vmware workstation from here:
echo https://my.vmware.com/web/vmware/info?slug=desktop_end_user_computing%2Fvmware_workstation_pro%2F12_0
echo Installing latest bundle from current dir
BUNDLEFILE=$(ls -1tr VMware-Workstation-Full-*| tail -n 1)
if [ "x$BUNDLEFILE" == "x" ];
then
echo unable to get bundlefilename
exit 1
fi
echo "Installing $BUNDLEFILE"
VERSION=$(echo $BUNDLEFILE | cut -d '-' -f4)
echo "- VMware workstation version: $VERSION"
KERNEL=$(uname -r | cut -c1-4)
echo "- kernel version: $KERNEL"
echo "--"
echo
chmod +x $BUNDLEFILE
./$BUNDLEFILE --eulas-agreed
echo "--"
echo
echo "fetching and extracting patches"
wget https://github.com/mkubecek/vmware-host-modules/archive/w${VERSION}-k${KERNEL}.tar.gz
tar xzf w${VERSION}-k${KERNEL}.tar.gz
echo "--"
echo
echo "Building modules..."
cd vmware-host-modules-w${VERSION}-k${KERNEL}/
echo "build vmmon"
cd vmmon-only
make
cd ..
echo "build vmnet"
cd vmnet-only
make
cd ..
echo "Installing modules"
mkdir -p /lib/modules/`uname -r`/misc
cp -p vmmon.o /lib/modules/`uname -r`/misc
cp -p vmnet.o /lib/modules/`uname -r`/misc
depmod -a
echo "license probably not installed"
echo "use"
echo " /usr/lib/vmware/bin/vmware-vmx-debug --new-sn XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
echo "to set"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment