Skip to content

Instantly share code, notes, and snippets.

@takase1121
Created May 31, 2020 13:47
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takase1121/57bfa9ca3fffff33408dde08b0e6269a to your computer and use it in GitHub Desktop.
Save takase1121/57bfa9ca3fffff33408dde08b0e6269a to your computer and use it in GitHub Desktop.
Universal* service script for open-vm-tools (based on corresponding systemd service file)

This is my attempt of making open-vm-tools work on Artix (based on runit). After a lot of failures I came out with these.

Dependencies

  • dmidecode to read the machine info (so that script don't run when not running with VMware)

You can adapt this to whatever init system (or script) you want.

#!/usr/bin/env sh
# this is translated from the systemd file, there may be errors
# check if os is virtualized on vmware
if [ "$(dmidecode -s system-product-name)" != "VMware Virtual Platform" ]; then exit 0; fi
# create runtime directory
if [ ! -d "/run/vmblock-fuse" ]
then
mkdir -p "/run/vmblock-fuse"
chmod 755 "/run/vmblock-fuse"
fi
# start the service
/usr/bin/vmware-vmblock-fuse -d -f -o subtype=vmware-vmblock,default_permissions,allow_other /run/vmblock-fuse
#!/usr/bin/env sh
/usr/bin/vmtoolsd # well, what do you expect?
@Maxz963
Copy link

Maxz963 commented May 8, 2021

thanks for the script!

@WillOfSprings
Copy link

Could you please guide me what to do with these scripts? I can't seem to get open-vm-tools to work on my artix installation.
Thanks

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