Skip to content

Halfway through the Ubuntu installer, a screen offers Erase disk and install Ubuntu. On the computer in front of you, that choice would delete Windows or macOS and every file you own. In this lesson, you choose it on purpose, and nothing of yours is lost.

By the end, you have a working Ubuntu VM, you can give the reason for each of its settings, and you can say exactly which disk “Erase disk” erased.

  • Downloading and verifying installation media (B02.2). You need the image you verified there, ubuntu-24.04.5.1-desktop-amd64.iso or ubuntu-24.04.5-desktop-arm64.iso.
  • Free disk space for a 25 GB virtual disk, with room to spare, and at least 8 GB of memory on your computer. The settings table below explains both.
  • One to two hours, mostly waiting while files copy.

The steps were tested with Oracle VirtualBox 7.2.18 on a Windows host. A later 7.2 release may differ slightly in labels. The screenshots were made with the image ubuntu-24.04.4-desktop-amd64.iso; with the 24.04.5.1 image from lesson B02.2, the steps are the same.

Download VirtualBox from virtualbox.org/wiki/Downloads. It offers one platform package for each kind of host:

Choose Windows hosts and run the installer. The manual supports Windows 10 and 11 on Intel and AMD processors; on Windows 11 with an ARM processor, it is an “Experimental Feature”, without Oracle support.

You do not need the separately licensed Extension Pack; this course does not use it.

Open VirtualBox. Its main window is the VirtualBox Manager. Click New in the toolbar.

The New Virtual Machine window opens. It is one window with four sections, and you open each one by clicking its title:

  • Virtual machine name and operating system
  • Set up unattended guest OS installation
  • Specify virtual hardware
  • Specify virtual hard disk

There is no summary page. Finish creates the VM from what the sections hold, so check every section before you click it.

In the first section:

  1. VM Name: rootvolt-lab. VirtualBox names the VM’s folder and files after it.
  2. VM Folder: D:\VMs, the folder this course uses. If your computer has no D: drive, use C:\VMs. The drive needs room for the 25 GB disk.
  3. ISO Image: the Ubuntu image you verified.
  4. OS, OS Distribution, and OS Version: VirtualBox fills them from the image. Check them: Linux, Ubuntu, and Ubuntu 24.04 LTS (Noble Numbat) (64-bit).
  5. Proceed with Unattended Installation: untick it. The next section explains why.

Look at OS Version before you go on. VirtualBox may preselect another Ubuntu version; in testing, it chose Ubuntu 24.10 (Oracular Oriole). Open the list and select Ubuntu 24.04 LTS (Noble Numbat) (64-bit). On a Mac with Apple silicon, select the ARM 64-bit entry for Ubuntu 24.04 LTS.

Choose a VM folder whose path contains no personal name, such as your user name. The path appears in VirtualBox’s windows, so it shows up in your screenshots and in any question you post for help. On macOS and Linux, the default folder is inside your home folder, and its path contains your user name; keep that in mind before you share a screenshot.

The New Virtual Machine window with the section Virtual machine name and operating system open. VM Name is rootvolt-lab, VM Folder is D:\VMs, the ISO Image is ubuntu-24.04.4-desktop-amd64.iso, OS is Linux, OS Distribution is Ubuntu, OS Version is Ubuntu 24.04 LTS (Noble Numbat) (64-bit), and Proceed with Unattended Installation is unticked.
The first section of the New Virtual Machine window, filled in for the course VM. VirtualBox 7.2.18 on Windows, with the Ubuntu 24.04.4 image.
  1. VM Folder is D:\VMs: a path with no personal name in it.
  2. OS Version is Ubuntu 24.04 LTS (Noble Numbat) (64-bit), checked by hand.
  3. Proceed with Unattended Installation is unticked.

rootvolt-lab is the VM’s name on the host. The guest gets its own computer name, rootvolt, in the installer: one name on each side of the boundary from lesson B02.1.

The manual says: “By default, Oracle VirtualBox will install the chosen OS using the ISO image provided, if the image supports unattended installation.” Ubuntu’s image does, so Proceed with Unattended Installation is ticked as soon as you select the image. Untick it. The image then stays attached to the VM, and you install from it yourself. You can leave the Set up unattended guest OS installation section closed.

This course installs by hand for three reasons:

  • An unattended installation answers every installer question for you, so you never see the disk choice, the account, or the computer name.
  • On Linux guests, the manual says, “the root user will also be created with the same password” as your user. This course keeps the accounts that Ubuntu’s own installer creates; module B03 explains root.
  • On a Mac with Apple silicon, unattended installation “isn’t available”. The manual path works on every host.

Open Specify virtual hardware, then Specify virtual hard disk. VirtualBox suggests values for Ubuntu; set these:

Setting Value Why
Base Memory 4096 MB The desktop and the installer run in it. The host loses it while the VM runs, so give at most half of the host’s memory
Number of CPUs 2 The manual says: “Do not assign more than half of the total processor threads from the host machine”
Use EFI Unticked VirtualBox uses BIOS firmware unless you turn EFI on, and nothing in this course needs EFI. On a Mac with Apple silicon, the option cannot be changed
Create a New Virtual Hard Disk Selected The installer needs an empty disk
Disk Size 25 GB Ubuntu’s install tutorial asks for at least 25 GB. The disk takes space on the host only as the guest uses it
VDI (VirtualBox Disk Image) Selected VirtualBox’s own disk image format
Pre-allocate Full Size Unticked The disk is then dynamically allocated: the file on the host grows only as the guest writes

The manual warns: “The memory you give to the VM will not be available to your host OS while the VM is running.” If your computer has less than 8 GB, give the VM 2048 MB and expect a slower desktop; the manual notes that “a guest OS may require at least 1 or 2 GB of memory to install and boot up”.

A thread is a stream of work the processor runs at once. A processor with 4 cores and 8 threads could give the VM 4 virtual CPUs; 2 is enough here.

The New Virtual Machine window with the section Specify virtual hardware open. Base Memory is 4096 MB, Number of CPUs is 2, and Use EFI is unticked.
The virtual hardware section with the course values. VirtualBox 7.2.18 on Windows, with the Ubuntu 24.04.4 image.
  1. Base Memory is 4096 MB.
  2. Number of CPUs is 2.
  3. Use EFI is unticked.
The New Virtual Machine window with the section Specify virtual hard disk open. Create a New Virtual Hard Disk is selected, the file is D:\VMs\rootvolt-lab\rootvolt-lab.vdi, Disk Size is 25.00 GB, the type is VDI (VirtualBox Disk Image), and Pre-allocate Full Size is unticked.
The virtual hard disk section with the course values. VirtualBox 7.2.18 on Windows, with the Ubuntu 24.04.4 image. The file name of another VM’s disk, in the unused list under Use an Existing Virtual Hard Disk File, is covered.
  1. Create a New Virtual Hard Disk is selected.
  2. The disposable virtual disk: D:\VMs\rootvolt-lab\rootvolt-lab.vdi. This file becomes the guest’s whole disk.
  3. Disk Size is 25.00 GB.
  4. Pre-allocate Full Size is unticked, so the file starts small.

Click Finish. The VM appears in the Manager’s list, powered off.

The virtual disk is a file in the VM folder. With the course’s folder, it is D:\VMs\rootvolt-lab\rootvolt-lab.vdi.

If you do not change VM Folder, VirtualBox puts the VM inside VirtualBox VMs in your home folder (replace <you> with your user name on the host):

Host Virtual disk file
Windows C:\Users\<you>\VirtualBox VMs\rootvolt-lab\rootvolt-lab.vdi
macOS /Users/<you>/VirtualBox VMs/rootvolt-lab/rootvolt-lab.vdi
Linux /home/<you>/VirtualBox VMs/rootvolt-lab/rootvolt-lab.vdi

Next to the disk file is rootvolt-lab.vbox, the VM’s settings file.

Guess first: the guest has a 25 GB disk. How much space does rootvolt-lab.vdi take on your host now, before anything is installed?

Check your guess

Very little, far from 25 GB: in the tested VM, 2.00 MB. The manual says a dynamically allocated image “will initially be very small and not occupy any space for unused virtual disk sectors, but will grow every time a disk sector is written to for the first time”. The 25 GB is a maximum. The Storage settings below show both sizes; you check them again at the end of this lesson.

The guest's whole disk is one file on the host The host disk holds your own files and programs, and a VM folder, D:\VMs\rootvolt-lab\, with the file rootvolt-lab.vdi. That file starts small and grows as the guest writes. The guest sees the file as one empty 25 GB disk, and the installer's Erase disk acts only on that disk. Host computer Host disk Your files and programs D:\VMs\rootvolt-lab\ rootvolt-lab.vdi Starts small and grows as the guest writes The guest sees Guest (Ubuntu) One 25 GB disk empty before the install Erase disk acts only here
The guest's whole disk is one file on the host The host disk holds your own files and programs, and a VM folder, D:\VMs\rootvolt-lab\, with the file rootvolt-lab.vdi. That file starts small and grows as the guest writes. The guest sees the file as one empty 25 GB disk, and the installer's Erase disk acts only on that disk. Host computer Host disk Your files and programs D:\VMs\rootvolt-lab\ rootvolt-lab.vdi Starts small and grows as the guest writes The guest sees Guest (Ubuntu) One 25 GB disk empty before the install Erase disk acts only here
Simplified model. The guest's whole disk is one file on the host: rootvolt-lab.vdi, in the VM folder, which the guest sees as one empty 25 GB disk.

In words: the host disk holds your own files and the VM folder, where rootvolt-lab.vdi grows as the guest writes. The guest cannot see the host disk. It sees one empty 25 GB disk. The diagram is a simplified model: it leaves out the settings file and the snapshot files that lesson B02.4 adds.

That is why “Erase disk” is safe here: the installer erases the only disk it can see, the file rootvolt-lab.vdi.

Before the first start, select the VM and open its Settings, Storage. It lists two devices. Under Controller: IDE is the optical drive, a simulated CD/DVD drive holding the Ubuntu image. The manual says VirtualBox presents an ISO image “to a guest system as if it were a physical CD-ROM”. Under Controller: SATA is the virtual hard disk, rootvolt-lab.vdi. Select the disk: Virtual size is what the guest sees, and Actual size is the space the file takes now. Close the window without changes.

The rootvolt-lab Settings window on the Storage page. Controller: IDE holds ubuntu-24.04.4-desktop-amd64.iso. Controller: SATA holds rootvolt-lab.vdi, which is selected. Its information shows Virtual size 25.00 GB, Actual size 2.00 MB, and Dynamically allocated storage.
The VM’s Storage settings before the first start. VirtualBox 7.2.18 on Windows, with the Ubuntu 24.04.4 image.
  1. The Ubuntu image in the optical drive.
  2. The disposable virtual disk, rootvolt-lab.vdi.
  3. Virtual size 25.00 GB, the most the guest can use, and Actual size 2.00 MB, the file before the installation.

Select rootvolt-lab and click Start. A window shows the VM’s screen. The virtual disk is empty, so the VM starts from the optical drive and shows the image’s boot menu, titled GNU GRUB. Try or Install Ubuntu is highlighted. Press Enter, or wait: the menu starts it after a countdown.

The rootvolt-lab VM window showing the GNU GRUB version 2.12 menu with three entries: Try or Install Ubuntu, which is highlighted, Ubuntu (safe graphics), and Test memory. A line below says the highlighted entry will be executed automatically in 25s.
The boot menu of the Ubuntu image at the VM’s first start. VirtualBox 7.2.18 on Windows, with the Ubuntu 24.04.4 image.
  1. Try or Install Ubuntu, highlighted: press Enter.

When you click inside the VM’s window, the VM may take the keyboard and mouse. Press the Host key to give them back: the right Ctrl key, or the left Command key on a Mac. The VM window shows the current Host key at the bottom right.

The installer’s screens, as Ubuntu’s install tutorial describes them:

  1. Language: English, to match this course.
  2. Accessibility: any settings you need.
  3. Keyboard layout: the layout of your real keyboard.
  4. Internet connection: choose Use wired connection. The VM is already connected through the host; lesson B02.4 explains how.
  5. Install Ubuntu, not Try Ubuntu.
  6. Interactive installation.
  7. Default selection of applications.
  8. Third-party software: the tutorial describes it as drivers for real hardware, such as NVIDIA graphics, and more media formats. The VM has virtual hardware, so leave both options off.
  9. Disk setup: the screen asks “How do you want to install Ubuntu?”. Choose Erase disk and install Ubuntu. Leave Advanced features at None selected: encryption asks for a passphrase at every start.
  10. Create your account: see the next list.
  11. Time zone: your location.
  12. Ready to install: the window has this title, and its heading reads Review your choices. Check the disk, then click Install.
The Ubuntu installer's Disk setup screen asking How do you want to install Ubuntu. Erase disk and install Ubuntu is selected, Advanced features shows None selected, and Manual installation is not selected.
The installer’s Disk setup screen in the VM. Ubuntu 24.04.4 installer, in VirtualBox 7.2.18 on Windows.
  1. Erase disk and install Ubuntu. It erases the guest’s only disk, the disposable virtual disk rootvolt-lab.vdi.
  2. Advanced features at None selected: no encryption.

On Create your account, fill in the fields in lowercase:

  • Your name: learner
  • Your computer’s name: rootvolt. If the installer suggests another name, replace it.
  • Your username: learner
  • Password: one you will remember. The installer rates the password as you type; choose one it does not mark weak.

Keep Require my password to log in ticked. Leave Use Active Directory unticked: it joins the computer to a company’s Windows domain, and the lab has none.

The Ubuntu installer's Create your account screen. Your name is learner, Your computer's name is rootvolt, Your username is learner, the password is hidden and rated Weak password, Require my password to log in is ticked, and Use Active Directory is unticked.
The installer’s Create your account screen with the course’s names. Ubuntu 24.04.4 installer, in VirtualBox 7.2.18 on Windows.
  1. Your name: learner.
  2. Your computer’s name: rootvolt.
  3. Your username: learner.
  4. The password rating. The test VM’s password was rated Weak password; choose one the installer does not mark weak.
  5. Use Active Directory is unticked.

The names give you the prompt learner@rootvolt that every terminal example in this course shows.

The Ubuntu installer's Ready to install window with the heading Review your choices. Disk setup is Erase disk and Install Ubuntu, Installation disk is VBOX HARDDISK sda, and under Partitions: partition sda1 created, partition sda2 formatted as ext4 used for /.
The installer’s last screen before it writes to the disk. Ubuntu 24.04.4 installer, in VirtualBox 7.2.18 on Windows.
  1. Disk setup: Erase disk and Install Ubuntu.
  2. Installation disk: VBOX HARDDISK sda, the disposable virtual disk.
  3. Partitions: sda1 and sda2, both on that disk.

Guess first: the review lists the installation disk as VBOX HARDDISK sda. What is sda, and how does this line show that the installer will erase the virtual disk, not your computer’s disk?

Check your guess

sda is the name Linux gives the first disk it finds; a second disk would be sdb. VBOX HARDDISK is the model name the disk reports, and VirtualBox gives it to its virtual disks. Your computer’s own disk reports its manufacturer’s model, and it does not appear: the guest cannot see it. So “Erase disk” acts on rootvolt-lab.vdi. If you see a disk with another model name here, stop and check the VM’s Storage settings.

A partition is a part of a disk set aside for one use. The installer formats sda2 as ext4, a file system, which is the way files are organized on a partition, and uses it for /, the top of the file tree that lesson B05.1 explains. Your installed system lives there. The installer also creates sda1; it does not hold your files.

The installation takes 10 to 30 minutes. Then click Restart now. Ubuntu asks you to remove the installation medium and press Enter.

In the VM, the installation medium is the image in the optical drive. Usually the drive is already empty: in testing, Ubuntu ejected the image itself, and VirtualBox showed the optical drive as [Optical Drive] Empty.

To check, open the Devices menu in the VM’s window, not in the VirtualBox Manager, then Optical Drives. Remove the Ubuntu image there only if it is still ticked. Then click inside the VM and press Enter.

The VM tries the optical drive before the hard disk. With the image still inserted, it would start the installer again instead of your installed system. Without it, the VM starts from its virtual disk and shows the login screen.

The login. The login screen shows learner. Log in with your password. The welcome window’s steps are optional.

The rootvolt-lab VM window after the first start from the virtual disk. The Ubuntu login screen shows one account, learner, with a Not listed? link below it and the Ubuntu logo at the bottom.
The login screen at the first start of the installed system. VirtualBox 7.2.18 on Windows, with Ubuntu 24.04.4.
  1. The account learner, which you created in the installer.

The prompt. Press Ctrl+Alt+T to open a terminal; on a Windows or Linux host, use the left Ctrl key, because the right one is the Host key. The prompt reads learner@rootvolt:~$: user learner, computer rootvolt, in your home directory. Module B03 explains the terminal.

The system. Type these four commands, pressing Enter after each:

Terminal window
lsb_release -d
uname -m
free -h
lsblk -d -o NAME,SIZE,TYPE

In the tested VM, they printed:

Screen
learner@rootvolt:~$ lsb_release -d
No LSB modules are available.
Description: Ubuntu 24.04.4 LTS
learner@rootvolt:~$ uname -m
x86_64
learner@rootvolt:~$ free -h
total used free shared buff/cache available
Mem: 3.8Gi 1.1Gi 1.4Gi 34Mi 1.6Gi 2.7Gi
Swap: 3.8Gi 0B 3.8Gi
learner@rootvolt:~$ lsblk -d -o NAME,SIZE,TYPE
NAME SIZE TYPE
loop0 4K loop
loop1 74M loop
loop2 251.7M loop
loop3 91.7M loop
loop4 531.4M loop
loop5 10.8M loop
loop6 18.5M loop
loop7 576K loop
loop8 48.1M loop
sda 25G disk
sr0 1024M rom

Each command answers one question about the VM:

  • lsb_release -d prints the Description of the installed release. In the tested VM, it is Ubuntu 24.04.4 LTS: Ubuntu 24.04 LTS with its point release, 4. The line above it, No LSB modules are available., is a notice you can ignore. With the 24.04.5.1 image, the point release differs.
  • uname -m prints the machine’s hardware name: x86_64 with the amd64 image. On a Mac with Apple silicon, the arm64 image prints aarch64.
  • free -h shows memory in units that are easy to read (-h). The total on the Mem: line is 3.8Gi: the 4096 MB of Base Memory you set, minus the part the kernel keeps for itself. The used and free values change from minute to minute.
  • lsblk lists the disks. -d leaves out the partitions on each disk, and -o chooses the columns: name, size, and type. The line sda, size 25G, type disk, is the virtual disk. The loop lines are files that Ubuntu uses as small disks for its snap applications, and sr0, type rom, is the optical drive. Their number and sizes vary; this check needs only sda.

If all four match, the lab is ready.

Hardware virtualization is off in the firmware. The VM does not start. On an Intel processor, the error includes:

Error
VT-x is disabled in the BIOS for all CPU modes

On an AMD processor:

Error
AMD-V is disabled in the BIOS (or by the host OS)

VT-x and AMD-V are Intel’s and AMD’s names for hardware virtualization, the processor features a VM needs. Some computers ship with them off in the firmware, the settings program that runs before the operating system, often called the BIOS. Restart, open the firmware settings, and turn the feature on. The way in and the setting’s name depend on the manufacturer; the computer’s manual has both.

Unattended installation left on. If Proceed with Unattended Installation stays ticked, VirtualBox installs Ubuntu without asking you anything. In testing, the result had a default account, ubuntu, instead of learner, and the optical drive held a generated image named Unattended-… instead of the Ubuntu image. Remove the VM in the VirtualBox Manager, delete its files, and create it again with the box unticked.

The installer starts again after the restart. No error appears; you see the installer’s language list instead of the login screen. The image is still in the optical drive. Do not install again: “Erase disk” would erase the system you installed. Close the VM’s window, choose Power off the machine, remove the image in Settings, Storage, and start the VM again.

Too little memory. VirtualBox shows no message; you notice the effects. A guest with too little is very slow, or does not start: the manual says, “A VM will not start if it does not have enough RAM to boot.” A host with too little “might excessively swap memory to the hard disk, which will effectively bring the host system to a standstill.” Power off the VM and change Base Memory in Settings, System.

Windows, Hyper-V, and WSL 2. The manual says: “A green turtle icon indicates that a native hypervisor, such as Hyper-V, is running on the host.” The VM then runs, but slower. WSL 2 from lesson B02.1 needs one of those Windows features, Virtual Machine Platform. The manual advises turning off Hyper-V Platform, Virtual Machine Platform, and Windows Hypervisor Platform, which stops WSL 2 from working. If the VM runs well enough with the turtle, leave them on.

Macs with Apple silicon. The manual lists Ubuntu 24.04 among the guests that “might run” on Arm hosts, with limited support: Oracle does not promise to resolve problems with it. The steps are the same, with the arm64 image.

3D acceleration. Ubuntu’s 24.04 release notes say some applications, including the desktop wallpaper, “do not display correctly with VirtualBox or VMWare with 3D Acceleration”. Keep Enable 3D Acceleration off in the VM’s Display settings.

Three VirtualBox features can open the boundary between guest and host: the shared clipboard, drag and drop, and shared folders. The manual says, “For security reasons, the shared clipboard is disabled by default”. Drag and drop is off by default too, and a shared folder exists only if you create one.

Keep all three off in the lab VM. A harmful file you study in the guest then has no path to your host’s files, and restoring a snapshot (lesson B02.4) removes what it did.

Goal: Show from the host side that the guest’s disk is one file that grew during the installation.

  1. Shut down Ubuntu: open the menu at the top right of its screen and choose Power Off.
  2. On the host, find rootvolt-lab.vdi and note its size.
  3. In VirtualBox, open Settings, Storage for rootvolt-lab, select the hard disk, and note its Virtual size and Actual size.
  4. Check that the optical drive in the same window is empty.

Expected: The file is several gigabytes, far less than 25 GB; the virtual size is 25.00 GB; the actual size matches the file; the optical drive is empty.

Hint

Before the installation, the actual size was 2.00 MB. The disk is dynamically allocated. What happened to the file while the installer wrote the system?

Solution

The file holds only what the guest has written, the installed system: several gigabytes. The virtual size, 25.00 GB, is what the guest sees and the most the file can grow to.

If the optical drive still holds the image, remove it now, so the next start cannot open the installer.

  • The course VM, rootvolt-lab, runs Ubuntu 24.04 LTS in VirtualBox 7.2 with 4096 MB of memory, 2 processors, and a 25 GB dynamically allocated disk, in a folder whose path holds no personal name.
  • The guest’s whole disk is one file on the host, rootvolt-lab.vdi. The installer calls it VBOX HARDDISK sda, and “Erase disk” erased only that disk.
  • You unticked Proceed with Unattended Installation, checked OS Version by hand, and chose the user learner and the computer name rootvolt.
  • After the installation, the image comes out of the optical drive; otherwise the VM starts the installer again.

Next, in Network modes and snapshots (B02.4), you choose how the VM reaches the network and take your first snapshot.

All sources were checked on 1 November 2026, for VirtualBox 7.2. The steps were tested with VirtualBox 7.2.18.