VMWare – Fixing Ubuntu 17.10 Upgrade Breaking VMWare Workstation 12.5

17.10gccupgradevmwarevmware-workstation

Hi after upgrading to Ubuntu 17.10, vmware is now not starting.

I get the message:

/usr/lib/vmware/bin/vmware-modconfig: Relink `/lib/x86_64-linux-gnu/libbsd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'

I am aware that there are patches available and I am attempting to apply these and recompile. I have run from the solution at https://communities.vmware.com/thread/571370:

cd ~  
#Copy the vmmon source tar ball to your temporary location
cp /usr/lib/vmware/modules/source/vmmon.tar .   
#Extract the tar ball
tar xf vmmon.tar  

#Download the modified file that mkubecek posted and overwrite the one from the tar ball for VMware Workstation 12.5:
wget -O ./vmmon-only/linux/hostif.c https://raw.githubusercontent.com/mkubecek/vmware-host-modules/b50848c985f1a6c0a341187346d77f0119d0a835/vmmon-only/linux/hostif.c   

#Wrap up the newly modified files into a tar ball replacing the original one
sudo tar cf /usr/lib/vmware/modules/source/vmmon.tar vmmon-only  

#Rebuild the VMware kernel modules
sudo vmware-modconfig --console --install-all  
Failed to get gcc information. 
gcc --version
gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0 ...

Unforunately, vmware-modconfig is failing because of a dependency it seems on a particular gcc version. Am I on the right track?
Any help with this issue would be much appreciated.

EDIT
Thank you Steve, the below has gotten vmware going again. I've included minor correction. Tested and confirmed I could run a virtual machine.

sudo su
# do all below as root
cd /usr/lib/vmware/modules/source
tar xvf vmmon.tar 
tar xvf vmnet.tar
wget -O ./vmmon-only/linux/hostif.c https://raw.githubusercontent.com/mkubecek/vmware-host-modules/b50848c985f1a6c0a341187346d77f0119d0a835/vmmon-only/linux/hostif.c
vim vmnet-only/bridge.c
cd vmmon-only/
make
cd ../vmnet-only/
make
cd ..
mkdir /lib/modules/4.13.0-16-generic/misc
cp *.o /lib/modules/4.13.0-16-generic/misc
insmod /lib/modules/4.13.0-16-generic/misc/vmmon.o
insmod /lib/modules/4.13.0-16-generic/misc/vmnet.o
rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
ln -s /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/vmware/lib/libz.so.1/libz.so.1
vmware-networks --start
exit

# run vmware as normal user
/usr/lib/vmware/bin/vmware

Best Answer

I've managed to get VMWare Workstation 12.5.7 working on Kubuntu 17.10.

In /usr/lib/vmware/modules/source:

  1. Extract vmmon.tar and vmnet.tar

    sudo tar -xf vmmon.tar
    sudo tar -xf vmnet.tar
    

    This will create vmmon-only and vmnet-only directories.

  2. Fetch the patched hostif.c

    sudo wget -O vmmon-only/linux/hostif.c https://raw.githubusercontent.com/mkubecek/vmware-host-modules/b50848c985f1a6c0a341187346d77f0119d0a835/vmmon-only/linux/hostif.c
    

    (note: https://communities.vmware.com/thread/571370 - also contains a similar fix for VMWare Workstation 14)

  3. Edit vmnet-only/bridge.c:

    639c639
    <        atomic_inc(&clone->users);
    ---
    >        atomic_inc((atomic_t*)&clone->users);
    
  4. Run

    make -C vmmon-only
    make -C vmnet-only
    cp -t /lib/modules/4.13.0-16-generic/misc *.ko
    modprobe -r vmmon
    insmod /lib/modules/4.13.0-16-generic/misc/vmmon.ko
    rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
    ln -s /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/vmware/lib/libz.so.1/libz.so.1  # see https://communities.vmware.com/thread/572259
    vmware-networks --start  # see https://forum.chakralinux.org/viewtopic.php?id=8579
    
  5. As user:

    /usr/lib/vmware/bin/vmware
    

    (to prevent it running vmware-modconfig)

Related Question