A virtual machine user downloaded a malicious software onto his virtual machine (VM). It started to infect the whole VM and prevented the user from doing anything as the keyboard seemed to be disabled by the malicious software. What would be the best way to solve the problem?
This is a guest OS security issue, therefore the answer depends on whatever OS you have running in the VM - your only hope from a VMware perspective is that you have a backup or snapshot of the VM from before when the software was downloaded.
If this is a VM running on VMware Fusion then it could also be something else as malware.
Down there macOS has to allow you to use the keyboard and pass it to the guest OS.