VirtualBox

Also known as: Oracle VirtualBox

On this page 7

VirtualBox, officially Oracle VirtualBox, is a free, cross-platform type 2 hypervisor that runs complete virtual machines as applications on top of an existing desktop or server operating system. In virtualization, it is the classic tool for running several operating systems on one workstation, for example a Linux server on a Windows laptop, to build, test and learn without dedicated hardware.

VirtualBox runs on Windows, Linux, macOS and Solaris hosts and supports a wide range of guests, including Windows, Linux distributions, BSD variants and older systems. Its core is released as open-source software under the GPL, and it is widely used together with tools such as Vagrant to create reproducible development environments. Originally developed by innotek, it passed to Sun Microsystems in 2008 and to Oracle in 2010.

How VirtualBox runs a virtual machine

VirtualBox consists of a kernel driver loaded into the host operating system and user-space processes that manage each virtual machine. The driver uses the processor’s hardware virtualization extensions, Intel VT-x or AMD-V, to run guest code directly on the CPU while trapping privileged operations. Since version 6.1, these extensions are required; the older software-only execution mode was removed.

Memory virtualization relies on nested paging (Intel EPT or AMD RVI), which lets the CPU translate guest addresses without constant hypervisor intervention. Devices such as disk controllers, network cards, USB controllers and graphics adapters are emulated in software, and paravirtualized options such as virtio-net and the paravirtualization interfaces for KVM and Hyper-V reduce that overhead for modern guests.

Because the host operating system schedules VirtualBox like any other application, guests compete with host programs for CPU and memory. This is the essential difference from a type 1 hypervisor, which runs directly on the hardware.

Key components and configuration options

A virtual machine in VirtualBox is defined by an XML settings file and one or more virtual disk images. The most important settings and their practical ranges are summarized below.

SettingTypical valuesPractical guidance
vCPUs1 to the number of host coresKeep below physical cores to leave room for the host
Base memory1 to 16 GB for typical guestsNever assign so much that the host starts swapping
Virtual disk formatVDI, VMDK, VHDVDI is native; VMDK eases exchange with VMware
Disk allocationDynamically allocated or fixed sizeDynamic saves space; fixed gives steadier performance
Video memory and controller16 to 256 MB, VMSVGA or VBoxSVGAChoose the controller recommended for the guest OS
FirmwareBIOS or EFIEFI is needed for modern boot and some guests
Main VirtualBox virtual machine settings

Installing Guest Additions inside the guest adds optimized drivers for graphics and mouse integration, shared folders, clipboard sharing and time synchronization. Every operation available in the graphical manager can also be scripted with the VBoxManage command-line tool, which makes automation and headless operation possible.

Networking modes in VirtualBox

Each virtual machine can have several virtual network adapters, and each adapter is attached to one networking mode. Choosing the right mode determines who can reach the guest and whom the guest can reach.

ModeGuest reachesReachable fromTypical use
NATHost network and internetNobody, except forwarded portsDefault, simple internet access
NAT NetworkInternet and other VMs in the networkForwarded ports onlySmall isolated labs with internet
BridgedPhysical LAN directlyAny machine on the LANGuests acting as real servers
Host-onlyHost and other host-only VMsHost onlyPrivate test networks
Internal networkOnly VMs on the same named networkOther VMs onlyFully isolated labs, security testing
VirtualBox networking modes

A common lab pattern combines NAT for internet access with a host-only adapter for stable addresses between host and guests, which avoids exposing test machines on the office network.

VirtualBox compared with other hypervisors

VirtualBox occupies the desktop and developer niche. It is easy to install and free, but it is not designed for dense production consolidation. The comparison shows where it fits among neighboring products.

HypervisorTypePrimary useKey difference
VirtualBoxType 2Desktop labs, development, trainingFree and cross-platform
VMware Workstation and FusionType 2Professional desktop virtualizationPolished graphics, VMware ecosystem
Hyper-VType 1Windows servers and desktopsBuilt into Windows, runs beneath the host OS
KVM with QEMUType 1, Linux kernel basedLinux servers and cloudsHigh performance, production scale
VMware ESXiType 1Enterprise data centersLive migration, clustering, vCenter
VirtualBox and related hypervisors

On Windows hosts, enabling Hyper-V, WSL 2 or virtualization-based security means Hyper-V owns the virtualization extensions. VirtualBox can then run through the Windows Hypervisor Platform interface, but usually with noticeably lower performance, which is a frequent source of confusion.

Snapshots, licensing and limitations

VirtualBox supports snapshots, which freeze the disk state and optionally memory so a machine can be returned to a known point, and clones, either full copies or linked clones that share a parent disk. Snapshots are ideal before risky changes, but long snapshot chains slow disk access and should be merged when no longer needed.

  • Extension Pack licensing: the base package is GPL, but the Oracle Extension Pack, which adds features such as USB 3 passthrough, remote display and disk encryption, uses a separate license that restricts commercial use without a paid agreement.
  • No live migration between hosts in typical use and no cluster management, unlike type 1 platforms.
  • Performance depends on host load, so benchmarks inside a guest rarely reflect production hardware.
  • 3D graphics support is limited, which makes VirtualBox a poor choice for graphics-heavy guests.
  • Not suited to production hosting, where a type 1 hypervisor offers isolation, density and management tools.

In simple terms

VirtualBox lets one computer pretend to be several computers at once. It creates a window that behaves like a separate machine with its own operating system, disk and network card, all stored as files on the real computer.

If something goes wrong inside that pretend machine, the real computer is not harmed, and a snapshot can turn the clock back in seconds. That makes it a safe place to learn, test and experiment.

A practical example

A web developer working on a Windows laptop needs to test an application that will run on Ubuntu Server with Nginx and PostgreSQL. Using Vagrant with the VirtualBox provider, she creates two virtual machines with 2 vCPUs and 4 GB of RAM each: one web server and one database server, connected through a host-only network and given internet access through NAT.

Before upgrading PostgreSQL to a new major version, she takes a snapshot of the database VM. The upgrade breaks an extension, so she restores the snapshot in under a minute, fixes the migration script and tries again. The whole environment is defined in one file, so a colleague can recreate an identical setup with a single command.