Installing Oracle VirtualBox and creating an Ubuntu virtual machine takes four stages: download and install VirtualBox from virtualbox.org, click New to create a VM and point it at your Ubuntu ISO, allocate at least 4 GB of RAM and a dynamically allocated virtual disk, then start the VM to boot the installer. On VirtualBox 7.x you can let the built-in Unattended Installation feature detect Ubuntu from the ISO and install it — and Guest Additions — automatically, so the whole thing is largely hands-off. The entire toolchain is free and open source, and the workflow is identical on Windows, macOS, and Linux hosts.
That's the summary an AI would give you. Here's what it can't show you — the actual decision points where beginners get stuck (Dynamic vs Fixed disk, VDI vs VMDK, how much RAM is "too much"), the animated map of how the pieces fit together, and a symptom → cause → fix table for the errors that stop people cold (the dreaded "32-bit only" dropdown, VT-x disabled in BIOS, no network). Everything below is the current VirtualBox 7.x workflow, not the decade-old wizard.
Note: This tutorial was originally migrated from an older site that referenced Ubuntu 10.10 and VirtualBox's early multi-page wizard. The steps have been updated to the current VirtualBox 7.x single-screen "Create Virtual Machine" flow. The concepts are unchanged; only the number of clicks got smaller.
The whole process at a glance
VirtualBox is a Type 2 (hosted) hypervisor: it runs as an ordinary application on top of your existing operating system rather than on bare metal. That is exactly what makes it perfect for learning and testing — you install one program and you can spin up throwaway Linux, Windows, or BSD machines that are fully isolated from your real system. It is open source (GPLv3) and runs on Linux, macOS, Windows, and Solaris hosts.
To get a copy, go to virtualbox.org and grab the package for your host OS. While you are there, download the Ubuntu Desktop ISO from ubuntu.com/download — you'll point the VM at that file in step 2.
Step 1 — Installing VirtualBox
The installer is a straightforward next-next-finish affair. The one screen that surprises people is the network warning.
- Download VirtualBox for your host OS from virtualbox.org.
- Double-click the installer.
- Click Next, accept the licence agreement, click Next again.
- Leave the default components selected (all are useful) and click Next.
- You'll get a warning that installation will briefly reset your network connection — this is normal, because VirtualBox installs a virtual network adapter. Close any downloads or VPN sessions first, then click Yes.
- Click Install. This takes a minute or two. On Windows you may be prompted to trust the "Oracle" device software; approve it, or the virtual network won't work.
- Leave "Start Oracle VirtualBox after installation" ticked and click Finish.
VirtualBox launches to the VirtualBox Manager — an empty list on the left where your VMs will live, with a big New button in the toolbar.
Step 2 — Creating your first virtual machine
Modern VirtualBox collapsed the old multi-page wizard into a single screen. Here's the current flow:
- Click New in the toolbar.
- Give the VM a Name (e.g.
Ubuntu-Test). VirtualBox auto-fills a folder for it. - Under ISO Image, click the dropdown and browse to your downloaded Ubuntu ISO. VirtualBox reads the ISO and auto-detects the Type = Linux and Version = Ubuntu (64-bit) for you.
- Decision point — Unattended Install: if VirtualBox recognizes the ISO, it offers to install Ubuntu automatically. Leave it enabled and fill in a username, password, and hostname to have it install Ubuntu and Guest Additions with zero clicking. Tick "Skip Unattended Installation" instead if you want to drive the Ubuntu installer manually (useful for custom partitioning).
- On the Hardware step, set Base Memory to at least 4096 MB and Processors to 2. Watch the colour bar — keep the marker in the green zone (see the RAM guidance below).
- On the Hard Disk step, choose Create a Virtual Hard Disk Now, set the size to 25 GB or more, and leave the format on VDI.
- Click Finish.
How much memory (and why the slider is colour-coded)
The number you set is a ceiling, not a reservation — the VM only uses what it needs, up to that limit. But over-allocating starves the host. VirtualBox's slider turns amber then red as you approach and exceed a safe fraction of physical RAM.
| Your host RAM | Safe Ubuntu Desktop RAM | Notes |
|---|---|---|
| 8 GB | 2048–3072 MB | Tight — close other apps while the VM runs |
| 16 GB | 4096 MB | The comfortable sweet spot |
| 32 GB+ | 8192 MB | Smooth even with a browser and IDE inside the VM |
Rule of thumb: keep the total RAM of all running VMs under ~50% of physical memory so the host OS keeps enough for itself.
Dynamic vs Fixed disk, and which format to pick
Two choices trip up beginners on the disk step. Here's the straight answer for each:
| Option | What it does | Performance | Space used up front | Pick this when |
|---|---|---|---|---|
| Dynamically allocated | Grows on the host only as the guest writes data | Slightly slower on heavy writes | Nearly zero | Almost always — the sane default |
| Fixed size | Reserves the full size immediately | Marginally faster | The whole disk (e.g. 25 GB) | Disk-heavy DB workloads on spinning rust |
| VDI format | VirtualBox's native disk | Native | — | Default — you're staying in VirtualBox |
| VHD format | Microsoft's format (Hyper-V, Azure) | Native | — | You'll move the disk to Hyper-V/Azure |
| VMDK format | VMware's format | Native | — | You'll move the disk to VMware/ESXi |
Which should I use? For a first Ubuntu VM: Dynamically allocated + VDI. On a modern SSD the fixed-size performance edge is negligible, and dynamic disks keep your host storage tidy.
Step 3 — Powering on and installing Ubuntu
- Select your VM in the list and click Start.
- A console window opens. If you left Unattended Installation on, sit back — Ubuntu installs itself, reboots, and lands at the login screen with the credentials you entered.
- If you skipped unattended install, the VM boots off the ISO into the Ubuntu installer. Choose Install Ubuntu, and when it asks about disks, "Erase disk and install Ubuntu" is safe — it only touches the virtual 25 GB disk, never your real drive.
- Set your keyboard, timezone, username, and password; let it copy files (a few minutes), then Remove installation medium and reboot when prompted.
If VirtualBox doesn't auto-eject the ISO on reboot, remove it from Settings → Storage while the VM is off, or just press Enter at the "please remove medium" prompt.
Step 4 — Install Guest Additions (don't skip this)
A fresh Ubuntu VM works, but it's stuck at a small resolution with no clipboard sharing. Guest Additions fixes that by installing paravirtualized drivers inside the guest.
- With the VM running and Ubuntu logged in, open the VirtualBox window's Devices menu → Insert Guest Additions CD image.
- Ubuntu mounts a virtual CD. Open a terminal in that folder (or let the autorun prompt do it) and run the installer; enter your password when asked.
- Reboot the VM. You'll now get automatic window resizing, a shared clipboard, drag-and-drop, and much smoother graphics.
Then enable the conveniences under Devices: Shared Clipboard → Bidirectional and Drag and Drop → Bidirectional.
When it doesn't work: symptom → cause → fix
The errors below account for the vast majority of "VirtualBox won't work" support threads.
| Symptom | Likely cause | Fix |
|---|---|---|
| OS dropdown shows only 32-bit options | Hardware virtualization (VT-x / AMD-V) disabled | Reboot into BIOS/UEFI, enable Intel VT-x or AMD SVM; on Windows disable Hyper-V/WSL2/Core Isolation |
| "VT-x is disabled in the BIOS" on start | Same as above, or nested virtualization off | Enable virtualization in BIOS/UEFI; if in a cloud/VM, enable nested virtualization |
| VM won't start, "kernel driver not installed" (Windows) | VirtualBox network/USB driver blocked | Reinstall and approve the Oracle device-software prompt; disable conflicting hypervisors |
| Same error on a Linux host | Secure Boot blocked the unsigned vboxdrv module | Sign the module for Secure Boot, or disable Secure Boot; run sudo /sbin/vboxconfig |
| Screen stuck at 640×480, no resize | Guest Additions not installed | Install Guest Additions (Step 4) and reboot |
| No internet inside the VM | Network adapter disabled, or wrong mode | Settings → Network → tick Enable Network Adapter; leave on NAT for basic internet |
| Black screen / very slow graphics | Too little video memory or bad 3D accel | Settings → Display → raise Video Memory to 128 MB; toggle 3D Acceleration |
| Install disk full mid-install | Virtual disk too small | Power off; File → Tools → Virtual Media Manager to resize, then extend the partition in Ubuntu |
Quick pre-flight checklist
Before you click Start, confirm:
- Virtualization (VT-x / AMD-V) enabled in BIOS/UEFI
- Ubuntu ISO downloaded and selected in the VM
- RAM in the green zone (4096 MB on a 16 GB host)
- 2+ CPUs assigned
- Disk set to Dynamically allocated, VDI, 25 GB+
- On Windows: Hyper-V / WSL2 / Core Isolation disabled if the 64-bit options are missing
- Plan to install Guest Additions after first boot
Next steps
Once your Ubuntu VM is running, the features that make VirtualBox genuinely useful are:
- Snapshots — before any risky change, take a snapshot (Machine → Take Snapshot). If something breaks, roll back in seconds. This alone makes VMs the safest place to experiment.
- Shared folders — mount a host directory inside the guest to move files without a network share.
- Clones — duplicate a configured VM (linked or full clone) to spin up a fresh copy instantly.
- Networking modes — graduate from NAT to Bridged when you need the VM reachable on your LAN, or a Host-only network to build an isolated multi-VM lab.
Virtual machines are the safest way to test new software, learn a new operating system, or build an isolated development environment — all without risking your main system. When you outgrow desktop virtualization and want to run VMs on a dedicated Linux host, the natural next step is KVM on Ubuntu or scripting VM creation with virt-install and cloud-init.