In VirtualBox I have been using the command:
VBoxManage.exe modifymedium disk disk.vdi --compact
In order to reduce the size of .vdi files after running zerofree. I'd like to do the same for vSphere virtual disks using pyVmomi. I've seen you can use the command
vmkfstools --punchzero disk.vmdk
But this seems to require ESXi host shell access which I don't have.