Created
January 16, 2022 18:13
-
-
Save token0/249431a94e071c3b61d221a4c32edcb8 to your computer and use it in GitHub Desktop.
patch vmware to work on modern linux distro
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
#!/bin/bash | |
VMWARE_VERSION=`vmware-installer -l |grep workstat|awk '{print $2}' |awk 'BEGIN {FS="."}{print "workstation-"$1"."$2"."$3}'` | |
echo $VMWARE_VERSION | |
TMP_FOLDER=/tmp/patch-vmware | |
rm -fdr $TMP_FOLDER | |
mkdir -p $TMP_FOLDER | |
mkdir -p /etc/init.d | |
cd $TMP_FOLDER | |
git clone https://github.com/mkubecek/vmware-host-modules.git | |
cd $TMP_FOLDER/vmware-host-modules | |
git checkout $VMWARE_VERSION | |
git fetch | |
sed -i 's/->state/->__state/g' vmmon-only/linux/hostif.c | |
make | |
sudo make install | |
sudo rm /usr/lib/vmware/lib/libz.so.1/libz.so.1 | |
sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 | |
/usr/lib/vmware/lib/libz.so.1/libz.so.1 | |
sudo /etc/init.d/vmware restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment