A virtual machine (or "VM") is an emulated computer system created using software. It uses physical system resources, such as the CPU, RAM, and disk storage, but is isolated from other software on the computer. It can easily be created, modified, or destroyed without affecting the host computer.
Virtual machines provide similar functionality to physical machines, but they do not run directly on the hardware. Instead, a software layer exists between the hardware and the virtual machine. The software that manages one or more VMs is called a "hypervisor" and the VMs are called "guests" or virtualized instances. Each guest can interact with the hardware, but the hypervisor controls them. The hypervisor can start up and shut down virtual machines and also allocate a specific amount of system resources to each one.
You can create a virtual machine using virtualization software. Examples include Microsoft Hyper-V Manager, VMware Workstation Pro, and Parallels Desktop. These applications allow you to run multiple VMs on a single computer. For example, Parallels Desktop for Mac allows you to run Windows, Linux, and macOS virtual machines on your Mac.
VMs are ideal for testing software since developers can install one or more applications and revert to a saved state (or "snapshot") whenever needed. Testing software on a regular operating system can cause unexpected crashes and may leave some files lingering behind after the software is uninstalled. It is safer to test software on a virtual machine that is isolated from the operating system and can be fully reset as needed.
Cloud-Based Virtual Machines
As cloud services have grown in popularity, cloud-based VMs have become increasingly popular as well. "Cloud instances," as they are often called, run on a computer that is accessed over the Internet. The VM is often controlled through a web browser or a remote access utility. Cloud-based VMs are a common way for companies to test software deployments since they can test on dozens of machines without hosting the VMs locally.
Updated: September 21, 2018