The notion of stopping a ransomware attack doesn’t really fit the scenario unless you manage to disconnect the storage from the VMware ESXi hosts during the encryption which is highly unlikely. The question should rather be, can you recover from a ransomware attack. And most of the time, the answer is to restore from backups.