Search results for

All search results
Best daily deals

Affiliate links on Android Authority may earn us a commission. Learn more.

What is a virtual machine and how to set one up?

A virtual machine is like running a computer on top of a computer.
By

Published onJanuary 26, 2023

If you’ve ever looked into running a different operating system on your computer, chances are that you’ve come across the term virtual machine. The technology is incredibly powerful and versatile — it’s essentially a piece of software that simulates an entire computer. Chrome OS, for example, uses it to run Android apps. Similarly, you can spin up a virtual machine on your Macbook to run Windows apps.

So in this article, let’s take a closer look at virtual machines, how they work, and how you can set one up on your own computer.

What are virtual machines and hypervisors?

When you turn on your computer, it boots into an operating system — either Windows, Chrome OS, macOS, or Linux. But what if you want to run more than one of these at the same time? Or what if you own a newer Macbook without the ability to install Windows? That’s where virtual machines or VMs come in. The technology allows you to run multiple operating systems on one computer.

Virtual machines allow you to run multiple operating systems on one physical computer.

To get started with virtual machines, you’ll need a piece of software known as a hypervisor. A hypervisor allocates a portion of your computer’s hardware to each VM. Since you only have one physical computer, all resources — including CPU, RAM, storage, and even networking — need to be split up. Hypervisors also isolate VMs from each other and the host so they don’t interfere with each other.

Some examples of hypervisors you can download and install on your computer include Oracle’s VirtualBox, Microsoft’s Hyper-V on Windows, and the Parallels app for Chrome OS and macOS. These are known as Type 2 hypervisors as they run on top of an existing operating system. By contrast, a Type 1 hypervisor runs directly on the host hardware, eliminating the processing overhead of a base operating system.

A virtual machine won't match the performance of a physical computer.

Regardless of the type of hypervisor, virtual machines typically lose some performance compared to running the same operating system on physical hardware. And with more than one running simultaneously, you may run into storage or processing bottlenecks. Of course, you do gain flexibility in exchange for that drop in performance.

See also: How to install Linux on your Android device

What are virtual machines used for?

Acer Chromebook Spin 713 display
Eric Zeman / Android Authority

There are several reasons to use virtual machines, even for an average user. Say you want to run a Windows-exclusive program on your Macbook, for instance. Some people also use the technology to run older operating systems like Windows XP to improve compatibility with a particular program from that era.

A virtual machine lets you run unsupported software on top of your existing operating system.

The isolated nature of virtual machines also makes them ideal in scenarios where you don’t want to risk your primary operating system. For example, you could use a VM to download and run potentially malicious software. Even if something does end up infecting your VM, it shouldn’t easily spread to the host — keeping your files safe.

Businesses also commonly use virtual machines to create remote workstations for employees. With this approach, you can split a single powerful computer’s resources across multiple users. This saves physical space, potentially reduces energy consumption, and makes administration easier as all of the hardware is in one place.

Data centers use virtual machines to split powerful computers into smaller units.

Finally, VMs are commonly used in data centers to host different websites and servers. Once again, the technology allows powerful hardware to be portioned into smaller chunks. They can then each run different operating systems and applications depending on the client’s needs.

Related: The best Android emulators for PC and Mac

Virtual machines vs containers: What’s the difference?

Virtual machines aren’t the only way to create isolated computing environments these days — containers have also become a popular choice. However, there are several key differences between the two technologies, some of which make containers less useful to the average user.

Containers are lighter than virtual machines because they don't run an independent operating system.

Containers use very few hardware resources compared to VMs, but that’s because they don’t run guest operating systems. Instead, they simply isolate applications and share the host’s operating system and resources. However, this means that you cannot use a container to run applications designed for a different operating system. A container designed for Linux simply won’t work on Windows, for example.

How to create a virtual machine

Getting started with a virtual machine doesn’t take too long — you can use free software like Windows Hyper-V or Oracle’s VirtualBox. Let’s use the latter as an example.

  • Download the latest version of VirtualBox from the official website for your platform and install it.
  • We’ll also need to provide a copy of the operating system we want our VM to run. For this guide, we’ll use the Ubuntu Linux ISO. Download it here.
  • Click the New button in VirtualBox. This will bring up a setup window where you’ll be asked to provide a name and ISO for the VM.
virtualbox new virtual machine
Calvin Wankhede / Android Authority
  • In the following steps, you’ll need to allocate CPU cores, RAM, and disk space for your VM.
virtualbox new vm
Calvin Wankhede / Android Authority
  • Review your settings at the end and click Finish.
virtualbox finalize virtual machine specs
Calvin Wankhede / Android Authority
  • Your VM should boot up automatically — simply click the Show button to bring up the virtual display.
virtualbox running ubuntu virtual machine
Calvin Wankhede / Android Authority

That’s it — creating a virtual machine takes just a few seconds. You can repeat this process to install another VM, running a different operating system like Windows 11.

Read next: How to run Android apps on Windows 11


FAQs

Yes, using virtual machines, you can run multiple operating systems on a single computer. However, you will have to split your computer’s hardware resources like CPU and memory between each VM.

Virtual machines are used to run software designed for different operating systems. For example, you might use a Windows-based virtual machine on macOS. And since they operate independently of each other, VMs are also used for website and email server hosting. This is how data centers can rent out a portion of their powerful servers to dozens of different clients.

You might like