Siduction Forum

Siduction Forum => Software - Support => Topic started by: jaegermeister on 2017/10/15, 14:38:29

Title: FIX to run Vmware Workstation 14 under 4.13 kernel "unable to reserve memory"
Post by: jaegermeister on 2017/10/15, 14:38:29
Hello,

both changes in recent kernels and low coding quality/responsiveness from vmware cause this last pain in the ass to brave souls running latest vmware workstation under latest 4.13 kernel.

After long browsing, some fix emerged from vmware forums and here is a script I adapted and checked to solve the issue under Siduction.

Have phun!

Code: [Select]
#!/bin/sh
# vm2fix.sh - fix vmware workstation under kernel 4.13

PWD=$(pwd)
PATCH=/usr/src/hostif.c

plain=$(echo '\033[0m')
redfg=$(echo '\033[1;31m')
greenfg=$(echo '\033[1;32m')
yellowfg=$(echo '\033[01;33m')
bluefg=$(echo '\033[1;34m')
magentafg=$(echo '\033[1;35m')
cyanfg=$(echo '\033[1;36m')
whitefg=$(echo '\033[1;37m')


UTENTE=`whoami`
if [ $UTENTE = root ]; then
        echo $magentafg"\n----> VMware Workstation 14 against kernel 4.13 compile FIX \n"$plain
else
        echo $redfg"\nYou gotta be root to run this script!!!\n"$plain
        exit 1
fi



echo $yellowfg"\nFetch hostif.c and pack it into vmmon.tar\n"$plain
cd /usr/src

if [ ! -f "$PATCH" ]
then
wget https://raw.githubusercontent.com/mkubecek/vmware-host-modules/fadedd9c8a4dd23f74da2b448572df95666dfe12/vmmon-only/linux/hostif.c
else
echo "File already exists."
fi

cd /tmp
cp /usr/lib/vmware/modules/source/vmmon.tar .
tar xf vmmon.tar
rm vmmon.tar
cp -f /usr/src/hostif.c vmmon-only/linux/hostif.c
tar cf vmmon.tar vmmon-only
rm -fr vmmon-only
mv -f vmmon.tar /usr/lib/vmware/modules/source/vmmon.tar


echo $yellowfg"\nRecompiling libraries\n"$plain
vmware-modconfig --console --install-all
depmod -a
/etc/init.d/vmware restart
echo $yellowfg"\nJob done :)\n"$plain

cd $PWD