Virtualization

How to create a GNU/Linux virtual machine in VirtualBox 7.2

Creating a GNU/Linux virtual machine is one of the easiest ways to learn Linux, test a new distribution, or build a lab without changing the operating system installed on your main computer. With Oracle VirtualBox, a useful Linux environment can be created in a few minutes, provided the VM is sized sensibly from the start.

This guide uses Ubuntu 26.04.1 LTS as the reference guest. You do not have to use Ubuntu. The same basic process works with Debian, Fedora, Linux Mint, openSUSE, and many other supported distributions.

If VirtualBox is not installed yet, begin with our Oracle VirtualBox 7.2 installation guide for Windows. If you want the broader background first, see our VirtualBox 7.2 introduction.

Choose a distribution and download the ISO from the official project

The first step is to download the installation image directly from the project that maintains the distribution. When an official ISO is readily available, there is little reason to rely on third-party download sites.

Current examples include:

For the configuration below, we will assume the Ubuntu Desktop 26.04.1 LTS ISO for 64-bit Intel/AMD systems.

Match the guest architecture to the host

This matters more now that Arm-based computers are common. A conventional Intel or AMD x86-64 host should use an x86-64/amd64 Linux guest for normal hardware virtualization. An Arm64 host needs compatible Arm64 guests.

VirtualBox does not transparently turn an x86-64 operating system into an Arm64 guest or vice versa. Downloading the correct architecture is therefore part of the VM setup, not an optional detail.

How many resources does a current Ubuntu desktop need?

Canonical recommends a dual-core 2 GHz processor or better, 6 GB of RAM, and 25 GB of free storage for Ubuntu Desktop 26.04 LTS. Inside a VM, it is sensible to provide some headroom rather than configuring only the published minimums.

For a comfortable desktop lab on a capable host, a reasonable starting point is:

  • RAM: 6 to 8 GB;
  • vCPU: 2 to 4;
  • virtual disk: 40 to 60 GB, dynamically allocated;
  • network: NAT;
  • firmware: UEFI for a modern lab setup;
  • graphics: VirtualBox’s recommended Linux controller, with 3D acceleration optional.

These numbers are not a universal prescription. A host with 8 GB of total RAM should not give the entire 8 GB to the guest. On lower-end systems, Xubuntu, Lubuntu, a lighter Debian desktop, or a server installation may be a better fit.

Create the virtual machine in VirtualBox 7.2

Open Oracle VirtualBox Manager and click New. The wizard can be shown in Basic or Expert mode; the exact layout changes slightly, but the important settings are the same.

Give the VM a descriptive name such as Ubuntu 26.04 Lab, choose the folder where its files will be stored, and select the ISO you downloaded.

VirtualBox attempts to identify the guest operating system automatically. When it recognizes Ubuntu, it adjusts several defaults for a Linux guest.

Unattended installation or manual installation?

VirtualBox 7.2 can perform an unattended installation for supported Linux distributions. The wizard can collect a user name, password, host name, and other settings and can also integrate Guest Additions into the deployment workflow.

For a first Linux VM, manual installation is more educational. Clear Install OS Using Unattended Installation and let the Ubuntu installer run normally so you can see the choices it makes.

For repeatable labs, unattended installation can save a substantial amount of time and keep multiple VMs consistent. Oracle documents the process in Creating a New Virtual Machine.

Assign memory and CPU without starving the host

For Ubuntu Desktop 26.04.1 LTS, 6 GB of RAM is a sensible baseline when the host has enough memory. On a 16 GB host, a 6 GB guest usually leaves enough headroom for Windows or Linux on the host and a few normal applications. On a 32 GB host, 8 GB is comfortable for a desktop VM.

Two virtual CPUs are enough to start. Four can improve responsiveness if the host has plenty of processor threads and you are not running several heavy VMs at the same time.

Assigning every core and most of the host’s memory to one VM is counterproductive. The guest may look generously provisioned while the physical system becomes slow and begins paging heavily.

Create the virtual disk

For a VM that will remain in VirtualBox, VDI is the simplest native disk format. The virtual disk can be fixed-size or dynamically allocated.

A dynamically allocated disk grows on the host as the guest writes data, up to the maximum capacity you set. For an Ubuntu Desktop lab, configure at least 40 GB; 60 GB gives more room for packages, updates, development tools, and test data.

With dynamic allocation, configuring a 60 GB virtual disk does not immediately consume 60 GB of physical storage on the host.

UEFI is a good default for a modern Linux VM

GNU/Linux can boot with traditional BIOS firmware or UEFI, but a new VM is a good opportunity to use UEFI. That makes the lab more representative of current physical systems and lets you work with GPT partitioning and UEFI boot behavior.

VirtualBox can enable EFI in the VM’s system settings. It is not mandatory for every Linux distribution, but for a modern desktop VM it is a reasonable default.

Use NAT as the initial network mode

Older versions of this guide recommended Bridged Adapter as the default. Most desktop VMs do not need that exposure.

With NAT, the Linux guest can reach the Internet through the host without automatically becoming another directly reachable device on the physical LAN. It is simple, works well for package installation, and provides a sensible initial level of separation.

Use Bridged Adapter when the VM genuinely needs its own presence on the LAN, such as a web or SSH server that other physical machines must reach.

Host-Only, Internal Network, and NAT Network are useful for more advanced networking labs, but they are not required for a first Linux desktop VM.

Leave clipboard, drag-and-drop, and shared folders disabled at first

Those features are convenient, but they rely on Guest Additions and create additional communication paths between the host and guest.

For an ordinary development VM, enable them after Linux and Guest Additions are installed. For security labs or systems that may process untrusted software, leave them disabled unless they are truly necessary.

Graphics and 3D acceleration

VirtualBox normally selects VMSVGA for modern Linux guests. For a desktop distribution, use the video memory recommended by VirtualBox and enable 3D acceleration only if you need it and it behaves reliably on your host.

3D acceleration is not required to install Ubuntu. If the guest develops graphical corruption, black screens, or instability, temporarily disabling 3D acceleration is a reasonable troubleshooting step.

Start the VM and install Ubuntu

With the ISO attached and the virtual hardware configured, click Start. Ubuntu will boot from the ISO and normally offers an option to try the desktop before installing it.

Follow the Ubuntu installer through language, keyboard, time zone, user-account, and storage choices. Because this is a VM with a dedicated virtual disk, allowing Ubuntu to use the entire virtual disk does not erase the physical disk in the host computer.

After installation completes, restart the VM and let it boot from the virtual disk.

Update Linux before adding integration tools

Once the system is installed, apply updates before installing additional integration components.

On Ubuntu and Debian:

sudo apt update
sudo apt full-upgrade

On Fedora:

sudo dnf upgrade --refresh

Updating first reduces the chance of Guest Additions running into mismatched kernel headers, toolchains, or modules.

Install Guest Additions on Linux

Oracle VirtualBox Guest Additions provide drivers and services that improve host/guest integration, including dynamic display resizing, mouse integration, shared folders, clipboard support, and other features.

Oracle supports Guest Additions on Ubuntu, Fedora, Oracle Linux, Red Hat Enterprise Linux, SUSE/openSUSE, and other compatible distributions.

From the running VM, choose Devices → Insert Guest Additions CD Image. On Linux, installation may require a compiler, kernel headers, and build tools so VirtualBox can build modules for the kernel currently in use.

Oracle documents the process in Guest Additions for Linux.

Distribution packages or the VirtualBox Guest Additions ISO?

Some Linux distributions provide VirtualBox integration packages in their own repositories. In some cases those packages are already installed partially or are the most convenient way to keep integration components aligned with distribution updates.

Avoid mixing installation methods without a reason. If the distribution packages provide the integration you need, staying with that method can be simpler. If you need features or compatibility tied closely to the host’s current VirtualBox release, Oracle’s Guest Additions ISO may be preferable.

What about VirtIO?

With VirtualBox, you generally do not install a separate VirtIO driver bundle the way you often do with KVM/QEMU guests. VirtualBox presents its own virtual devices and supported guest drivers.

Advanced users can select some paravirtualized device types, including particular network adapters, but for a first Linux VM the safest approach is to keep the defaults VirtualBox selects for the detected guest type.

Create a clean snapshot after the VM is ready

After Linux is installed, updated, and integrated properly with VirtualBox, create a baseline snapshot before making larger experimental changes.

A snapshot is convenient for rolling back a lab, but it is not a backup. If the physical storage containing the VM is lost, the VM and its snapshots can be lost together.

A practical Ubuntu Desktop 26.04.1 LTS starting point

  • RAM: 6–8 GB when the host has enough memory;
  • vCPU: 2–4;
  • disk: 40–60 GB dynamically allocated VDI;
  • firmware: UEFI;
  • network: NAT;
  • graphics: VMSVGA, with 3D acceleration optional;
  • Guest Additions: install after Linux is updated;
  • shared clipboard/folders: enable only when needed.

Ubuntu Server, a minimal Debian installation, or a lightweight desktop can run with substantially fewer resources. Size the VM for the workload rather than copying desktop settings blindly.

Official sources and documentation

Eidy EV

Computer Science Engineer with over 10 years of experience in information technology. Has held roles as a Software Architect, Analyst, Senior Software Full stack developer, Network and Systems Administrator (Sysadmin), and Information Security Specialist (Pentester).

Entradas recientes

PHP in 2026: The Complete PHP 8.5 Guide to Modern Web Development

Learn PHP 8.5 from scratch: syntax, databases, Composer, PSR, Laravel, Symfony, modern runtimes, APIs, security,…

1 week hace

How to Install VirtualBox Guest Additions 7.2.20 on Linux

Step-by-step guide to installing VirtualBox Guest Additions 7.2.20 on Linux: kernel headers, modules, Secure Boot,…

1 week hace

Kali Linux 2026: What It Is, What It Is Used For, and How to Learn

An introduction to Kali Linux 2026.2: authorized security testing, rolling updates, APT changes, virtual machines,…

1 week hace

Software Test Automation Tools: How to Choose the Right Framework

A practical guide to software test automation: unit, integration, API, contracts, Selenium, Playwright, Cypress, Appium,…

1 week hace

Computer networking from scratch: roadmap for future sysadmins

A complete networking roadmap for future sysadmins: Ethernet, IPv4/IPv6, subnetting, VLANs, routing, DNS, DHCP, Linux,…

2 years hace

The United Airlines reservation system designed by Evelyn Berezin

History and architecture of Evelyn Berezin’s United Airlines reservation system, distinguishing it from the earlier…

2 years hace