Virtual machines (**VMs**) are software versions of physical computers. VMs provide an additional layer of security for an organization because they can be *used to run code in an isolated environment*, preventing malicious code from affecting the rest of the computer or system. VMs can also be deleted and replaced by a pristine image after testing malware. VMs are useful when investigating potentially infected machines or running malware in a constrained environment. Using a VM may prevent damage to your system in the event its tools are used improperly. VMs also *give you the ability to revert to a previous state*. However, there are still some risks involved with VMs. There’s still a small risk that a malicious program can escape virtualisation and access the host machine. You can test and explore applications easily with VMs, and it’s easy to switch between different VMs from your computer. This can also help in streamlining many security tasks.