VirtualBox Setup

Quick guide on how to setup VirtualBox

VirtualBox Overview

VirtualBox enables a host computer to run guest virtual machines

VirtualBox can run a virtual Operating System (OS) such as Windows, Linux, or MacOS.

VirtualBox was acquired by Oracle, and rebranded as Oracle VM VirtualBox.

VirtualBox is free and open-source software. Its extensions are propriety, and free of charge only for personal users. If used for a product or service to earn for a business, then consider getting a license.

Virtual Machine Host vs Guest

The "Host" is your computer. The "Guest" is the virtual machine that runs on your host computer.

Why use a Virtual Machine (VM) or specifically VirtualBox

Virtual Machine lets us isolate a working environment into a guest VM that we can create, clone, destroy, or automate with less cost. The isolation protects our host computer from changes. There can be multiple instances of guest VM on a single host VM.

VirtualBox can run an OS that is different to the host OS. Example: Host computer is Windows, and guest VM is Linux.

Containers such as Docker are unable to run a guest OS that does not have a similar kernel to the host OS in a straightforward way. Example: Windows host computer is unable to run Linux guest container because the container needs the Linux kernel.

Windows has WSL2 that allows to virtualize instances of Linux. WSL2 enables Linux kernel to run alongside Windows. WSL1 has limitations because it does not have the Linux kernel. That is why WSL2 is better and recommended for WSL.

However, run only trusted apps on WSL2 because the host Windows storage works like a mounted directory when viewed inside the WSL2 guest. There are configurations to prevent that. But with VMs such as VirtualBox, the isolation is by default.

The other options have steeper learning curve. VirtualBox is much more user friendly with its configurations that are accessible via the app user interface.

VirtualBox is a popular and well-used technology. That also means there are a lot of online documentation, forums, and resources.

There are trade-offs when making a choice. The choice depends on the requirements and resources.

This guide was last tested on these conditions

The last environment that was tested to work

VirtualBox version: 7.0.10

Windows version: 10 Windows build version: 10.0.19045 Build 19045 Windows VirtualBox installer: VirtualBox-7.0.10-158379-Win.exe

Download

Download installer from the official website

Go to

For Windows host, download the Windows host installer. For MacOS host, download the MacOS host installer. For Linux host, select and download from the available distribution installers.

Install on Windows

Run the VirtualBox installer for Windows

Double click the installer Example: VirtualBox-7.0.10-158379-Win.exe A message asks to allow the app to make changes to device. Click Yes

Install Microsoft Visual C++ 2019 Redistributable Package if asked

Skip this step if not applicable
A message might show that VirtualBox needs Microsoft Visual C++ 2019 Redistributable Package. Close the message.
Then, the installer shows a message that the Setup Wizard ended prematurely. Close the message.
Then, a message shows that installation failed. Close the message.

Download the Visual C++ Redistributable Package installer Go to

Go to the section Visual Studio 2015, 2017, 2019, and 2022 Then, download the X64 installer

Run the installer VC_redist.x64.exe Read and agree to the terms and conditions. Click Install. Allow to make changes to device. After a successful installation, a message shows that Setup is successful. Proceed and run the VirtualBox installer.

Installer will show welcome message. Click Next. Installer shows Custom Setup. Click Next.

Installer might show Warning: Network Interfaces Installing VirtualBox Networking feature will reset the network connection and temporarily disconnect from the internet. Proceed with installation now? Click Yes.

Installer might show Missing Dependencies Python Core / Win32api. Proceed with installation now? Click Yes.

Installer will show Ready to install. Click Install to begin the installation. Other options: Click Back to review. Click Cancel to exit the installer.

Please wait while the Setup Wizard installs VirtualBox. After a successful installation, the installer shows VirtualBox installation is complete. Click Finish. Option: Tick the checkbox to start VirtualBox after installation.