Skip to content

Instantly share code, notes, and snippets.

@misuchiru03
Last active July 13, 2023 08:17
Show Gist options
  • Save misuchiru03/d94909d937a3cab70e2868a6800c3000 to your computer and use it in GitHub Desktop.
Save misuchiru03/d94909d937a3cab70e2868a6800c3000 to your computer and use it in GitHub Desktop.
Fix for vmware installs on voidlinux runit and vmmon module
#!/bin/bash
# must run as root
if [ $UID != 0 ]; then
echo "You must be root."
exit 0
fi
# soft link vmware's init.d scripts to void's runit directory
ln -s /etc/init.d/vmware* /etc/runit/
# create runit service for vmware and vmware-workstation-server
echo -e '#!/bin/bash\nexec /etc/runit/vmware start' > /etc/sv/vmware
echo -e '#!/bin/bash\nexec /etc/runit/vmware-workstation-server start' > /etc/sv/vmware-workstation-server
# soft link the service to /var
ln -s /etc/sv/vmware* /var/service
# start the vmware services to populate the proper files
sv start vmware
sv start vmware-workstation-server
# fix vmmon
cd /tmp
cp /usr/lib/vmware/modules/source/vmmon.tar .
tar xf vmmon.tar
rm vmmon.tar
wget https://raw.githubusercontent.com/mkubecek/vmware-host-modules/fadedd9c8a4dd23f74da2b448572df95666dfe12/vmmon-only/linux/hostif.c
mv -f 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
vmware-modconfig --console --install-all
exit 0
@Animeshz
Copy link

Also you seem to be contributor to the void-packages, would you like adding vmware as a restricted package into it, so can be easily installed using the xbps-src script?

Package request: void-linux/void-packages#33557

@rilysh
Copy link

rilysh commented Jan 1, 2023

This isn't the correct approach at all. vmware-modconfig will still look for systemctl and Void doesn't have SystemD. Instead, create a symbolic link in /usr/bin with systemctl name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment