A slightly easier method - the shrink functionality is built into the VMware Tools command-line utility:
sudo /Library/Application\ Support/VMware\ Tools/vmware-tools-cli disk shrink /
This will first do a wipe of empty space one the file system (same as creating a zero-filled file) and show a progress in the guest Terminal. When that's done, the VMDK shrink will be invoked without shutting down the VM, and show up as a progress bar over the VM window.
The / is a path to the file system to wipe empty space on. If you have multiple partitions, you can wipe them individually and do a final shrink at the end:
vmware-tools-cli disk list to see the available locations for wipe
vmware-tools-cli disk wipe <location> to wipe each location (repeat multiple times), without the shrink operation
vmware-tools-cli disk shrinkonly to do the final shrink operation.
This is also explained by vmware-tools-cli help disk