# Virtual Machine (VM)

> A whole computer made in software. Lots of them can share one real box.

**Field:** Infrastructure  
**Category:** Virtualization & Cloud  
**Also known as:** VM, Guest VM, Virtual Computer

## Think of it like

It is like a dollhouse inside a real house. It has its own rooms, but it stands on the real floor.

## Definition

A virtual machine is a whole computer made in software. It has its own processor, memory, disk and system. All of them are borrowed from a real machine. Programs inside it act as if it were a real computer. Many virtual machines can share one server. You can start, stop, copy or delete one in minutes.

## Example

Lucy needs a test server for one day. She starts a virtual machine with 2 vCPUs and 4 GB of memory, then deletes it the next evening.

## Why it matters

Virtual machines are how most servers run today. They are quick to make, easy to copy and cheap to throw away.

## Common mistake

Thinking a VM is the same as a container. A VM carries a whole operating system. So it is heavier and slower to start.

## Three principles

- **A whole computer.** With its own operating system.
- **Shares hardware.** Many run on one real server.
- **Easy to replace.** Make, copy or delete in minutes.

## Related terms

- [Virtualization](https://learn.benibix.com/term/infrastructure/virtualization)
- [Hypervisor](https://learn.benibix.com/term/infrastructure/hypervisor)
- [Cloud Instance](https://learn.benibix.com/term/infrastructure/cloud-instance)
- [Container](https://learn.benibix.com/term/infrastructure/container)
- [Virtual CPU (vCPU)](https://learn.benibix.com/term/infrastructure/virtual-cpu)
- [Machine Image](https://learn.benibix.com/term/infrastructure/machine-image)
- [Java Virtual Machine (JVM)](https://learn.benibix.com/term/development/java-virtual-machine)

## Told apart from

- [Virtual Machine vs Container](https://learn.benibix.com/compare/virtual-machine-vs-container): People think a virtual machine and a container are the same thing, and they are not. A virtual machine is a whole computer in software, with its own operating system. A container is just an app and its parts. It shares the system of the machine it runs on. So a container starts in seconds and is much smaller. A VM keeps its users further apart.
- [Virtual Host vs Virtual Machine](https://learn.benibix.com/compare/virtual-host-vs-virtual-machine): People think a virtual host is a kind of virtual machine, and it is not. A virtual machine is a whole computer made in software. A virtual host is just a block of settings inside one web server. It lets that server answer for many site names. Both words start with virtual, but one splits a machine and the other splits a web server.
- [JVM vs Virtual Machine](https://learn.benibix.com/compare/jvm-vs-virtual-machine): A virtual machine in the cloud acts like a whole computer and runs a full system. The JVM is just a program. It only runs Java bytecode.

## Taught in

- [VPS, Shared and Dedicated](https://learn.benibix.com/learn/infrastructure-vps/vps-vs-shared-and-dedicated): VPS, 1/7
- [Virtualization and VMs](https://learn.benibix.com/learn/infrastructure-virtualization/virtualization-and-virtual-machines): Cloud Computing, 1/11

![Two stacks side by side. On the left, type 1: the hardware at the bottom, a hypervisor straight on top of it, and three virtual machines above, each with its own system, apps and a few vCPUs. On the right, type 2: the hardware, then a normal operating system such as Windows, then a hypervisor app, then two virtual machines.](https://learn.benibix.com/diagrams/inf2-hypervisor.svg)

---

Source: https://learn.benibix.com/term/infrastructure/virtual-machine
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
