Skip to main content

VirtualBox Setup Guide

VirtualBox is a powerful, free, and open-source virtualization platform that allows you to run multiple operating systems simultaneously on a single physical machine.

About VirtualBox

Oracle VM VirtualBox is a cross-platform virtualization application that:
  • Runs on Windows, Linux, macOS, and Solaris
  • Supports a wide variety of guest operating systems
  • Provides enterprise-grade features for free
  • Offers excellent performance and flexibility
  • Is ideal for education, development, and testing

Downloading VirtualBox

1

Visit Official Website

Download VirtualBox from the official project page: virtualbox.org
2

Select Your Platform

Choose the appropriate version for your operating system:
  • Windows hosts
  • macOS hosts
  • Linux distributions
  • Solaris hosts
3

Download Extension Pack

Also download the VirtualBox Extension Pack for additional features:
  • USB 2.0 and USB 3.0 support
  • VirtualBox Remote Desktop Protocol (VRDP)
  • Disk encryption
  • NVMe and PXE boot support
The Extension Pack must match your VirtualBox version exactly.

Installing VirtualBox

Windows Installation

1

Run Installer

Double-click the downloaded .exe file.
2

Follow Wizard

  1. Accept the license agreement
  2. Choose installation location
  3. Select features to install (use defaults)
  4. Allow the network interface warning (required for networking features)
3

Complete Installation

Click Install and wait for completion.
4

Install Extension Pack

Double-click the .vbox-extpack file or install from VirtualBox:
  1. Open VirtualBox
  2. Go to FilePreferencesExtensions
  3. Click the + icon
  4. Select the Extension Pack file

Linux Installation

1

Add Repository (Debian/Ubuntu)

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
2

Install VirtualBox

sudo apt update
sudo apt install virtualbox-7.0
3

Install Extension Pack

# Download Extension Pack
wget https://download.virtualbox.org/virtualbox/7.0.x/Oracle_VM_VirtualBox_Extension_Pack-7.0.x.vbox-extpack

# Install it
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.x.vbox-extpack
4

Add User to vboxusers Group

sudo usermod -aG vboxusers $USER
Log out and back in for this to take effect.

macOS Installation

1

Open DMG File

Double-click the downloaded .dmg file.
2

Run Installer

Double-click the VirtualBox.pkg icon.
3

Allow System Extension

macOS may prompt you to allow the system extension:
  1. Open System PreferencesSecurity & Privacy
  2. Click Allow next to the Oracle extension
4

Install Extension Pack

Double-click the Extension Pack file or install through VirtualBox preferences.

Enabling Virtualization in BIOS

Critical Step: Hardware virtualization must be enabled in your BIOS/UEFI for 64-bit guest operating systems.
1

Enter BIOS/UEFI

Restart your computer and press the BIOS key during boot:
  • Common keys: F2, F10, Del, Esc
  • Varies by manufacturer
2

Find Virtualization Settings

Look for options named:
  • Intel VT-x or Intel Virtualization Technology (Intel CPUs)
  • AMD-V or SVM Mode (AMD CPUs)
Usually found in:
  • Advanced → CPU Configuration
  • Security settings
  • Chipset settings
3

Enable and Save

  1. Change the setting to Enabled
  2. Save changes (usually F10)
  3. Exit and reboot
Windows:
  1. Open Task Manager (Ctrl+Shift+Esc)
  2. Go to Performance tab
  3. Select CPU
  4. Look for “Virtualization: Enabled”
Linux:
egrep -c '(vmx|svm)' /proc/cpuinfo
If the output is greater than 0, virtualization is supported and enabled.macOS:
sysctl -a | grep machdep.cpu.features | grep VMX
If VMX appears, virtualization is supported.

VirtualBox Interface Overview

Main Window

When you open VirtualBox, you’ll see:
  • Toolbar: Quick access to VM operations (New, Settings, Start)
  • VM List: All your virtual machines
  • Details Panel: Information about the selected VM
  • Preview: Live preview of running VMs

Key Menu Options

File Menu
  • Preferences: Global VirtualBox settings
  • Import/Export Appliance: Share VMs in OVA/OVF format
  • Virtual Media Manager: Manage disk images
Machine Menu
  • New: Create a new VM
  • Settings: Configure selected VM
  • Clone: Duplicate a VM
  • Remove: Delete a VM

Network Modes Explained

Understanding network modes is crucial for VM connectivity.
Use case: Basic internet accessCharacteristics:
  • VM can access the internet
  • Host cannot access VM directly
  • Different VMs in NAT cannot see each other
  • Easiest setup, works out of the box
Best for: Simple internet access, software downloads
Use case: VM as a separate network deviceCharacteristics:
  • VM gets its own IP from your router/DHCP
  • Appears as a physical device on your network
  • Can be accessed by other devices
  • Requires working network adapter on host
Best for: Servers, network testing, accessing VMs from other machines
Use case: Isolated VM-to-VM communicationCharacteristics:
  • VMs can communicate with each other
  • No internet access
  • Host cannot access VMs
  • Completely isolated from external networks
Best for: Creating private networks, testing network configurations
Use case: VM-to-host communicationCharacteristics:
  • VMs can communicate with host
  • VMs can communicate with each other
  • No internet access by default
  • Isolated from external network
Best for: Development environments, secure testing
Use case: Multiple VMs with internet access that can see each otherCharacteristics:
  • VMs can access internet
  • VMs can communicate with each other
  • More complex than simple NAT
  • Requires creating a NAT Network first
Best for: Small VM networks that need internet

Creating Your First Virtual Machine

1

Click New

In VirtualBox Manager, click the New button.
2

Name and OS

  • Enter a descriptive name
  • VirtualBox auto-detects OS type from the name
  • Manually select if needed
3

Memory Size

Allocate RAM based on guest OS requirements:
  • Windows 10/11: 2-4 GB minimum
  • Linux Desktop: 1-2 GB minimum
  • Windows Server: 2-4 GB minimum
Don’t allocate more than 50-75% of your total RAM if running multiple VMs.
4

Hard Disk

  • Select Create a virtual hard disk now
  • Choose VDI (VirtualBox Disk Image)
  • Select Dynamically allocated for flexibility
  • Set appropriate size for your OS
5

Configure Settings

Before starting:
  1. Attach installation ISO (SettingsStorage)
  2. Configure network (SettingsNetwork)
  3. Adjust other settings as needed
6

Start VM

Click Start to boot your VM and begin installation.

Best Practices

Performance Tips
  • Enable hardware virtualization (VT-x/AMD-V) in BIOS
  • Allocate sufficient RAM (but don’t over-allocate)
  • Use dynamically allocated disks for flexibility
  • Install Guest Additions for better integration
  • Give VMs at least 2 CPU cores if available
Security Tips
  • Keep VirtualBox updated
  • Use snapshots before major changes
  • Isolate untrusted VMs with appropriate networking
  • Regularly backup important VMs
  • Use encryption for sensitive data
Storage Tips
  • Store VMs on fast storage (SSD preferred)
  • Regularly clean up old snapshots
  • Export important VMs as appliances for backup
  • Monitor disk space usage

Next Steps

Now that VirtualBox is set up, you can:

Troubleshooting

VirtualBox won’t start VMs
  • Check virtualization is enabled in BIOS
  • Ensure no other hypervisors are running (Hyper-V, VMware)
  • Update VirtualBox to latest version
  • Reinstall VirtualBox
Only 32-bit options available
  • Enable VT-x/AMD-V in BIOS
  • Disable Hyper-V on Windows
  • Check that you downloaded the 64-bit version of VirtualBox
USB devices not working
  • Install Extension Pack
  • Add your user to vboxusers group (Linux)
  • Enable USB in VM settings
Poor performance
  • Allocate more RAM/CPU
  • Enable 3D acceleration (Settings → Display)
  • Install Guest Additions
  • Use VirtIO drivers for better I/O

Build docs developers (and LLMs) love