Many of today’s cutting-edge technologies such as cloud computing, edge computing, and microservices owe their start to the concept of the virtual machine – separating operating systems and software instances from a physical computer.

What is a virtual machine?

A Virtual Machine (VM) is a compute resource that uses software instead of a physical computer to run programs and deploy apps. One or more virtual “guest” machines run on a physical “host” machine.  Each virtual machine runs its operating system and functions separately from the other VMs, even when they are all running on the same host. This means that, for example, a virtual macOS virtual machine can run on a physical PC.

VM technology is used for many use cases across on-premises and cloud environments. More recently, public cloud services are using virtual machines to provide virtual application resources to multiple users at once, for even more cost-efficient and flexible computing.

virtual machine

How does it work?

Virtualization is the process of creating a software-based, or “virtual” version of a computer, with dedicated amounts of CPU, memory, and storage that are “borrowed” from a physical host computer – such as your personal computer –  and/or a remote server – such as a server in a cloud provider’s datacenter. A virtual machine is a computer file, typically called an image, that behaves like an actual computer. It can run in a window as a separate computing environment, often to run a different operating system – or even to function as the user’s entire computer experience – as is common on many people’s work computers. The virtual machine is partitioned from the rest of the system, meaning that the software inside a VM can’t interfere with the host computer’s primary operating system.

What are virtual machines used for?

Virtual machines (VMs) allow a business to run an operating system that behaves like a completely separate computer in an app window on a desktop. VMs may be deployed to accommodate different levels of processing power needs, to run software that requires a different operating system, or to test applications in a safe, sandboxed environment.

Virtual machines have historically been used for server virtualization, which enables IT teams, to consolidate their computing resources and improve efficiency. Additionally, virtual machines can perform specific tasks considered too risky to carry out in a host environment, such as accessing virus-infected data or testing operating systems. Since the virtual machine is separated from the rest of the system, the software inside the virtual machine cannot tamper with the host computer.

Advantages of virtual machines

While virtual machines run like individual computers with individual operating systems and applications, they have the advantage of remaining completely independent of one another and the physical host machine. A piece of software called a hypervisor, or virtual machine manager, lets you run different operating systems on different virtual machines at the same time. This makes it possible to run Linux VMs, for example, on a Windows OS, or to run an earlier version of Windows on a more current Windows OS.

And, because VMs are independent of each other, they’re also extremely portable. You can move a VM on a hypervisor to another hypervisor on a completely different machine almost instantaneously.

Because of their flexibility and portability, virtual machines provide many benefits, such as:

  • Cost savings – running multiple virtual environments from one piece of infrastructure means that you can drastically reduce your physical infrastructure footprint. This boosts your bottom line – decreasing the need to maintain nearly as many servers and saving on maintenance costs and electricity.
  • Agility and speed – Spinning up a VM is relatively easy and quick and is much simpler than provisioning an entirely new environment for your developers. Virtualization makes the process of running dev-test scenarios a lot quicker.
  • Lowered downtime – VMs are so portable and easy to move from one hypervisor to another on a different machine – this means that they are a great backup solution, in the event the host goes down unexpectedly.
  • Scalability – VMs allow you to more easily scale your apps by adding more physical or virtual servers to distribute the workload across multiple VMs. As a result, you can increase the availability and performance of your apps.
  • Security benefits – Because virtual machines run in multiple operating systems, using a guest operating system on a VM allows you to run apps of questionable security and protects your host operating system. VMs also allows for better security forensics and are often used to safely study computer viruses, isolating the viruses to avoid risking their host computer.

virtual machine

Disadvantages of virtual machines

While virtual machines have several advantages over physical machines, there are also some potential disadvantages:

  • Running multiple virtual machines on one physical machine can result in unstable performance if infrastructure requirements are not met.
  • Virtual machines are less efficient and run slower than a full physical computer. Most enterprises use a combination of physical and virtual infrastructure to balance the corresponding advantages and disadvantages.

Why use a VM?

Server consolidation is a top reason to use VMs. Most operating system and application deployments only use a small amount of the physical resources available when deployed to bare metal. By virtualizing your servers, you can place many virtual servers onto each physical server to improve hardware utilization.

This keeps you from needing to purchase additional physical resources, like hard drives or hard disks, as well as reduces the need for power, space, and cooling in the data center. VMs provide additional disaster recovery options by enabling failover and redundancy that could previously only be achieved through additional hardware.

A VM provides an environment that is isolated from the rest of a system, so whatever is running inside a VM won’t interfere with anything else running on the host hardware.

Because VMs are isolated, they are a good option for testing new applications or setting up a production environment. You can also run a single-purpose VM to support a specific process.