Skip to content

Instantly share code, notes, and snippets.

@hieplpvip
Created May 16, 2021 17:29
Show Gist options
  • Save hieplpvip/08ee4aa4ce8b40a0294636c7957595de to your computer and use it in GitHub Desktop.
Save hieplpvip/08ee4aa4ce8b40a0294636c7957595de to your computer and use it in GitHub Desktop.
#!/bin/sh
vmware-hgfsclient | while read folder; do
vmwpath="/mnt/hgfs/${folder}"
echo "[i] Mounting ${folder} (${vmwpath})"
sudo mkdir -p "${vmwpath}"
sudo umount -f "${vmwpath}" 2>/dev/null
sudo vmhgfs-fuse -o allow_other -o auto_unmount ".host:/${folder}" "${vmwpath}"
done
sleep 2s
#!/bin/sh
systemctl stop run-vmblock\\x2dfuse.mount
killall -q -w vmtoolsd
systemctl start run-vmblock\\x2dfuse.mount
systemctl enable run-vmblock\\x2dfuse.mount
vmware-user-suid-wrapper vmtoolsd -n vmusr 2>/dev/null
vmtoolsd -b /var/run/vmroot 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment