I have read some threads talking about the safety of running malware in a VM. I found out that it may not be safe and there is still a risk. I would like to know specifically if running Wanna Cry, a ransomware, actually mess up my real computer. Is this virus made that way? I want to know about one other. Will running MEMZ, a trojan, harm my computer? Any answer to either of these will help.
First and foremost I would say that if you don't know how the malware works, running it in a VM is "a very bad idea™". The people who do this professionally are experienced malware analysts and reverse engineers who have quite a lot of knowledge and capability with the various virtualization and segmentation concepts that are required to actively run malicious code without letting it escape the sandbox.
There is a plethora of information and analysis available online.
These resources should give you a basic understanding of how the malware appears to execute and spread.
If you were to build a VM and manage to introduce (infect) the malware into the guest system, it is entirely possible your host system could be compromised if you do not protect against the attack vectors and distribution mechanisms.
These are malicious weapons, by definition you cannot trust them to react in any way.
Once a malware becomes quite old and its code has been thoroughly studied in every direction and all lead to very well defined scope and behavior, then yes it may be safe.
But appart from that, either because the malware is too recent and not very well known, or because it is too advanced and complex to be fully reverse engineered, then you should prepare yourself (and your environment) to any possibility.
MEMZ: If you run a 'regular' VM, then no, but if you run a VM sharing the host computer's files, then yes.
WannaCry: Also safe as long as you use a 'regular' VM. You don't need to worry about the internet connection anymore as no OS has the security issue allowing it to control your system any longer!