How to shrink os x .vmdk in vmware workstation 12
As most people probably notice is that .vmdk file expands and never shrinks down back again it just gets bigger and bigger.
The solution to fix this in vmware workstation 12 is this:
Open terminal on your guest os OS X machine and run this command:
Macintosh\ HD is the name of your harddrive so it might not be Macinthosh \HD for you so check that you type the correct name for your HardDrive.
Use "sudo" instead of "su" if its yosemite or newer
su diskutil secureErase freespace 0 Macintosh\ HD
It will take some time and when it goes 90+% it will give you an error message that it ran out space and failed just ignore that and let it finish.
When it has finished shutdown the Guest os and run this command in CMD (command prompt) as administrator on the main OS.
path-of-vmware-folder\ vmware-vdiskmanager.exe -k path-of-virtual-machine\guest-name.vmdk
Exampel of the one i had to use and dont forget the " " or you will get an error message and it wont start.
C:\"Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe" -k "E:\Virtual Machines\OS X 10.9 Mavericks\OS X 10.9 Mavericks.vmdk"
This will take some time also so but when its done your .vmdk will now be shrinked down to its real and correct size.