Blog / Operating systems & apps /

Virtual machines explained for beginners

A virtual machine (VM) is a pretend computer that runs as an app inside your real one. It has its own operating system, its own files and its own settings, but it’s all contained in a window on your screen, and it can be copied, paused or thrown away without touching the real machine.

If that sounds odd, here’s the plain version: it lets you run Windows on a Mac, Linux on Windows, or an old version of anything, without buying a second computer.

The analogy

Think of your computer as a house. Normally you live in the whole thing. A virtual machine is like building a self-contained flat inside one room. The flat has its own front door, kitchen and bathroom. If you flood the flat, the rest of the house is fine. You can knock it down and rebuild it any time.

The software that makes the flat possible is called a hypervisor. It divides up the real computer’s processor, memory and storage and hands a slice to each virtual machine.

What a virtual machine is made of

  • The host is your real computer and its operating system.
  • The guest is the operating system running inside the VM.
  • The virtual disk is one big file on your real drive that acts as the VM’s hard drive.
  • Allocated resources. You decide how much memory and how many processor cores the VM gets. Give it too little and it crawls. Give it too much and your real computer struggles.

Why people use them

  1. Try something risky safely. Open a suspicious file or test unfamiliar software in a VM, and if it goes wrong you delete the VM. That’s the main security use.
  2. Run software for another system. A Windows-only program on a Mac, for instance.
  3. Test websites and software. If you manage websites, you can check how a site looks on another operating system and browser combination without owning a second computer.
  4. Learn. Practise installing Linux or setting up a server on a safe copy. If you’ve ever wanted to understand the command line, as in why every web admin should know a little Linux, a VM is the cheapest classroom.
  5. Keep old software alive. Some older business programs only run on old versions of Windows.

Snapshots: the best feature

Most VM software lets you take a snapshot, which saves the machine’s exact state at a moment in time. Break something, and you roll back in seconds. It’s the closest thing computing has to an undo button for an entire system. Before trying anything you’re unsure about, take a snapshot.

The common tools

Tool Runs on Notes
VirtualBox Windows, Mac (Intel), Linux Free and open source
VMware Workstation / Fusion Windows and Linux / Mac Well known, free personal-use versions have existed
Parallels Desktop Mac Paid, popular with Mac users who need Windows
Hyper-V Windows (Pro and higher) Built into Windows
UTM Mac Free to download, works on Apple silicon Macs

Which one fits depends on your computer. If you have a Mac with an Apple silicon chip (M1 or M2), note that the VM must be built for that kind of processor. Not every tool supported it fully at this point, so check before you download.

On Windows, there’s also WSL (Windows Subsystem for Linux), a lighter way to run Linux tools without a full VM. It’s a good fit for developers.

What you need

  • Enough memory. For a basic Windows or Linux VM alongside normal use, a computer with 8GB of RAM is workable and 16GB is more comfortable. Less than that gets painful.
  • Free storage. A VM’s disk can easily take tens of gigabytes. Check before you start.
  • A licence for the guest OS. Linux is free. Windows needs a valid licence, even in a VM.
  • Virtualisation support. Most modern processors have it, but on some PCs it needs switching on in the BIOS.

If you’re short of memory or storage, it’s a good moment to check how your device is doing. See also phone storage: why 128GB disappears faster than you think for the same kind of problem on a phone.

Myths

  • “A VM is completely isolated and totally safe.” Mostly, yes, but not perfectly. Weaknesses have been found in the past. Keep both host and guest updated.
  • “It runs as fast as a real computer.” No. It shares your hardware, so it’s slower, particularly for graphics and games.
  • “I need a powerful computer.” For light uses such as testing a website or running Linux, an ordinary modern laptop is fine.
  • “It’s only for developers.” Anyone who wants to try something without risk can use one.

A beginner’s first VM

  1. Pick a hypervisor that supports your machine.
  2. Download an installer for the guest system. Ubuntu is a popular, free choice for a first try.
  3. Create a new VM, give it modest resources, and point it at the installer.
  4. Install the guest OS the way you would on a real computer.
  5. Take a snapshot as soon as it’s set up and working.
  6. Experiment. Delete the VM when you’re done, if you like.

Key takeaways

  • A VM is a computer running inside your computer, contained in a window.
  • It’s useful for testing, learning, running old software and trying risky things safely.
  • Snapshots make mistakes cheap.
  • Check memory, storage and processor support before you start.

Is there a program or a system you’ve been scared to try on your main machine? A VM might be the answer.