What you're actually installing

A virtual machine is software that creates a fake computer inside your real computer. When you install it, you're installing the software that runs that fake computer — not the fake computer itself. The most common choices are VirtualBox (free, works on Windows, Mac, and Linux), VMware Player (free for personal use), and Hyper-V (built into Windows Pro and higher). After you install the software, you'll need to create a virtual machine inside it, then install an operating system on that virtual machine.

The process has two separate steps that people often mix up: first you install the virtualization software itself, then you create and configure a virtual machine within it. This guide covers both.

Key Takeaways

  • VirtualBox is free and works on Windows, Mac, and Linux — it's the easiest starting point for most people.
  • Installing the virtualization software takes 10 to 15 minutes, but creating a working virtual machine takes another 30 to 60 minutes because you're also installing an operating system.
  • Your computer needs at least 8 GB of RAM and 50 GB of free disk space to run a virtual machine smoothly alongside your main system.
  • You'll need an ISO file (an operating system installer) before you can finish setting up your virtual machine.

Check your computer's hardware first

Virtual machines run inside your main operating system, so they share your computer's memory and storage. If your computer is already slow or running low on space, adding a virtual machine will make it slower. Before you start, open your system settings and check how much RAM you have and how much free disk space is available.

For Windows: Right-click "This PC" or "My Computer," select Properties, and look for "Installed RAM." For Mac: Click the Apple menu, select "About This Mac," and check "Memory." For Linux: Open a terminal and type free -h. You need at least 8 GB of RAM total, and ideally 16 GB if you plan to use your main computer while the virtual machine is running. Check free disk space the same way — you need at least 50 GB free, though 100 GB is better.

If your computer doesn't meet these minimums, the virtual machine will work but will be noticeably slow. You can still proceed, but expect delays when opening programs inside the virtual machine.

Download and install VirtualBox

VirtualBox is free and the most straightforward option for beginners. Go to virtualbox.org, click the "Download" button, and select the version for your operating system (Windows, Mac, or Linux). The file will be about 100 MB.

Once the download finishes, open the installer file. On Windows, double-click the .exe file. On Mac, double-click the .dmg file. On Linux, follow the instructions for your specific distribution on the VirtualBox website. The installer will walk you through a series of screens — accept the default options unless you have a specific reason to change them. The installation takes about 5 minutes. When it finishes, you'll see VirtualBox in your applications menu.

Open VirtualBox to confirm it installed correctly. You should see a window with a blue VirtualBox logo and a menu bar at the top. If you see an error message about missing drivers or permissions, restart your computer and try opening VirtualBox again.

Get an operating system installer file

Before you create a virtual machine, you need an ISO file — this is a single file that contains a complete operating system installer. Common choices are Ubuntu Linux (free), Windows 10 or 11 (free to download, but you need a license key to use long-term), or older versions of macOS (if you're on a Mac).

For Ubuntu, go to ubuntu.com/download/desktop and click the download button. The file is about 3 to 4 GB, so it may take 10 to 30 minutes depending on your internet speed. For Windows, go to microsoft.com/software-download, select your version, and download the ISO. For macOS, the process is more complex — search "download macOS ISO" for your specific version.

Save the ISO file somewhere you'll remember, like your Downloads folder or Desktop. You'll need to point VirtualBox to this file when you create the virtual machine. Do not extract or open the ISO file — VirtualBox will read it as-is.

Create a new virtual machine in VirtualBox

Open VirtualBox and click the blue "New" button in the toolbar. A dialog box will appear asking for basic information about your virtual machine. Give it a name (like "Ubuntu Test" or "Windows Practice") and select the operating system you're installing from the dropdown menu. VirtualBox will auto-detect the type based on the name you enter.

On the next screen, you'll set how much RAM to allocate. The slider will suggest a default amount — for most uses, accept the suggestion. If you're running Ubuntu, 2 to 4 GB is fine. If you're running Windows, use at least 4 GB. Remember that this RAM is only used when the virtual machine is running, so you can allocate more than you think you need.

Next, you'll create a virtual hard drive. Select "Create a virtual hard drive now" and choose VDI format. Set the size to at least 20 GB for Linux or 40 GB for Windows — you can make it larger, but you can't easily shrink it later. Choose "Dynamically allocated" so the virtual hard drive only uses disk space as you fill it, rather than reserving the full amount immediately.

Install the operating system on your virtual machine

After you create the virtual machine, it will appear in the left sidebar of VirtualBox. Click it to select it, then click the green "Start" button. A window will open, and VirtualBox will ask you to select a startup disk — this is where you point it to the ISO file you downloaded. Click the folder icon, navigate to your ISO file, select it, and click "Open."

The virtual machine will boot up and show you the operating system installer, just as if you were installing it on a real computer. Follow the on-screen prompts to install the operating system. For Ubuntu, this takes about 10 to 15 minutes. For Windows, it takes 20 to 30 minutes. During installation, the virtual machine may restart several times — this is normal.

Once the installation finishes, the virtual machine will boot into the new operating system. You now have a working virtual machine. You can shut it down by clicking the X button on the window, and it will save its state so you can start it again later.

Basic maintenance and next steps

After your virtual machine is running, you can install software inside it just as you would on a real computer. The virtual machine has its own operating system, its own file system, and its own applications — everything is isolated from your main computer.

If you want to move files between your main computer and the virtual machine, you can use a shared folder. In VirtualBox, select your virtual machine, click "Settings," go to "Shared Folders," and add a folder from your main computer. Inside the virtual machine, you'll be able to access this folder and copy files back and forth.

To take a snapshot of your virtual machine at any point, right-click it in the sidebar and select "Snapshots." This saves the exact state of the virtual machine so you can revert to it later if something goes wrong. This is useful if you're testing software or experimenting with settings.

Frequently Asked Questions

Can I run a virtual machine and use my main computer at the same time?

Yes, but your main computer will be slower. The virtual machine shares your RAM and processor with your main operating system. If you have 16 GB of RAM and allocate 4 GB to the virtual machine, you have 12 GB left for your main system. Close other programs on your main computer to free up resources.

What if VirtualBox won't start or shows an error about virtualization?

Your computer's processor may have virtualization disabled in the BIOS. Restart your computer and enter the BIOS setup (usually by pressing Delete, F2, or F12 during startup — check your computer's manual). Look for a setting called "Virtualization," "VT-x," or "AMD-V" and enable it. Save and exit. Then try opening VirtualBox again.

Can I delete a virtual machine and get my disk space back?

Yes. In VirtualBox, right-click the virtual machine you want to remove and select "Remove." Choose "Delete all files" to remove the virtual machine and its virtual hard drive completely. The disk space will be freed up on your main computer.

Do I need a license key to run Windows in a virtual machine?

Windows will run without a key, but you'll see a watermark on the desktop and some features will be disabled. If you want to use Windows long-term in the virtual machine, you need to purchase a license key from Microsoft and enter it during or after installation.

How do I move a virtual machine to a different computer?

In VirtualBox, right-click your virtual machine and select "Export Appliance." This creates a single file containing your entire virtual machine. You can copy this file to another computer, open VirtualBox there, and select "Import Appliance" to restore it. The process takes several minutes depending on the size of your virtual machine.