Practice: Building Your Lab
On this page
The screenshots in this module came from one tested computer: a Windows host with VirtualBox 7.2.18 and the Ubuntu 24.04.4 image. Your computer is probably not that one. It may have another processor, another operating system, no D: drive, or less memory. Each of those changes one decision, and the lessons cannot make it for you.
From module B03 on, every lesson assumes that your lab matches the course’s: the same names, the same network, and a snapshot to return to. If a later lesson shows something your VM does not, you need to know whether the lab or the command is the cause. This practice puts all four lessons of the module to work: you build the lab on your own computer, without reading along, and you write down the evidence that each step worked.
Before you start
Section titled “Before you start”- The four lessons of this module, from VM, WSL, live media, and bare metal (B02.1) to Network modes and snapshots (B02.4).
- Your own computer, with an internet connection, about 7 GB of free space for the image, free space for a 25 GB virtual disk, and at least 8 GB of memory.
- The time the lessons gave: one to two hours for the installation, mostly waiting, and about 20 minutes for the network check and the snapshot.
- A lab notebook: a text file on your host, not inside the VM. You write your evidence in it. The last goal shows why it must not live in the guest.
Close the lessons and try each goal on your own first. Look back only after you have tried, and note in your notebook what you had to look up.
If you built rootvolt-lab while reading lesson B02.3, you do not have to build it again. Do goals 1 and 2 from your notes, check your VM against the evidence for goals 3 and 4, and do goal 5 again.
Your task
Section titled “Your task”Reach these five goals, in order. Each one is an outcome; deciding how to reach it is part of the practice.
- You have chosen the setup your lab runs in, and you can justify it against one setup you did not choose.
- You have the Ubuntu 24.04 desktop image for your computer’s architecture, and you have proved that it is exactly the file Ubuntu published. If
gpgis available to you, you have also proved that the listing you checked it against came from Ubuntu. - You have a VM named
rootvolt-labwith the course’s settings, and Ubuntu 24.04 LTS installed in it by hand, with the userlearneron the computerrootvolt. The VM starts from its virtual disk, not from the image. - You know which network mode your VM uses, what it can reach, and what can reach it, and you have checked from inside Ubuntu that the connection works.
- You have a
clean-installsnapshot of the fresh system, and you have proved that restoring it removes a change you made after it.
Expected evidence
Section titled “Expected evidence”When you are done, your lab notebook holds the following. Every item is something you can see on your own screen.
Goal 1
- The setup you chose, with two reasons, each named after one of the four questions: isolation, persistence, hardware access, or snapshots.
- One setup you rejected, with the question it fails for this course.
Goal 2
- Your architecture, amd64 or arm64, and where your system showed it.
- The exact file name of the image you downloaded.
- The checksum check: all 64 characters equal the line for that exact file name in
SHA256SUMS, or, on Linux, that line ends withOKin the output ofsha256sum -c --ignore-missing SHA256SUMS. - If you checked the signature:
gpgreportsGood signature from "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>", and the key fingerprintgpgprinted equals the one in Ubuntu’s own verification tutorial.
Goal 3
- The VM folder you used, and the memory you gave the VM, with the reason if it differs from the course’s values.
- Settings, Storage, before the first start: the virtual disk
rootvolt-lab.vdiwith Virtual size 25.00 GB and an Actual size far below it. - The installer’s last screen, Review your choices: the installation disk is
VBOX HARDDISK sda. - After the installation: the login screen shows
learner, the terminal prompt readslearner@rootvolt:~$,lsb_release -dshows Ubuntu 24.04 LTS with a point release, andlsblk -d -o NAME,SIZE,TYPEshowssdawith25Ganddisk. - The optical drive is empty.
Goal 4
- Settings, Network, Adapter 1: Attached to is NAT.
ip -br address: theenp0s3line showsUPand10.0.2.15/24.ip route: the default route isvia 10.0.2.2.ping -c 3 example.com:3 received, 0% packet loss.- Two sentences: what NAT lets the VM reach and what it keeps out, and which mode you would not use for a target VM, and why.
Goal 5
- The Snapshots view lists
clean-install, with Current State below it. ls ~lists your test file after you created it, and does not list it after the restore.
Open a hint only when you are stuck on that goal.
Hint for goal 1
Take the course’s needs one at a time. Later lessons break the system on purpose: which question decides whether you can undo that? Some lessons cover services and startup: which setups run Ubuntu’s own kernel and systemd? For the setup you reject, ask the question it fails, not only whether it is harder to set up.
Hint for goal 2
Find the architecture before you download anything; the release folder depends on it. Download the two small files from the same folder as the image. On Windows and macOS, the checksum program needs an option or a format that makes it print the whole SHA-256 checksum. If the checksums differ, check first that you read the line with your exact file name.
Hint for goal 3
The New Virtual Machine window has no summary page, and Finish creates the VM from whatever its four sections hold. Check two values that VirtualBox fills in for you: one about the Ubuntu version, and one about installing without you. In the installer, the choice that sounds the most dangerous is the safe one here. Ask which disks the guest can see.
Hint for goal 4
You do not need to change the network mode: VirtualBox chose one when it created the VM. Find it, then ask what that mode lets in, not only what it lets out. Inside Ubuntu, three commands answer three questions: which address the VM has, where its traffic goes, and whether a website answers.
Hint for goal 5
Decide two things before you click: should the VM be running or powered off when you take the snapshot, and should the box in the restore confirmation be ticked? For the change, you know one way to create a file in your home directory from lesson B02.4. Give it a name you will recognize in ls ~.
Solution
Section titled “Solution”Solution
Goal 1: the setup
A full VM in VirtualBox 7. Two reasons that fit this course:
- Isolation: the guest has its own kernel and its own disk. A command that damages the guest does not reach your files on the host, as long as you set up no shared folder.
- Snapshots: before a risky exercise, you take one, and a restore with a few clicks returns the system to that state.
A third reason, which is not one of the four questions: the guest runs Ubuntu’s own kernel and starts with systemd, so lessons about services and startup match what you see.
Any of these rejections is correct:
- WSL 2, on isolation: your Windows
C:drive appears at/mnt/c, so a command can change Windows files. It also has no snapshots, and its kernel is built by Microsoft, not Ubuntu. - Live USB session, on persistence: it keeps nothing after a restart by default. And on isolation: it can open the computer’s internal disks.
- Bare metal, on isolation and snapshots: Linux is the whole system, so a mistake affects your real computer, and you have backups, not snapshots.
Goal 2: the image
- Architecture. Windows 11: Settings, System, About, System type: “x64-based processor” is amd64, “ARM-based processor” is arm64. macOS: About This Mac: an item labeled Chip means arm64, an item labeled Processor means amd64. Ubuntu or Debian:
dpkg --print-architecture. - Download. amd64 from releases.ubuntu.com/24.04, arm64 from cdimage.ubuntu.com/releases/24.04/release. Take the desktop image with the highest point release, and
SHA256SUMSandSHA256SUMS.gpgfrom the same folder. Ubuntu’s main download page offers releases other than 24.04, the one this course is tested on. - Integrity. Compute the checksum of the image:
Get-FileHashwithFormat-Listin Windows PowerShell,shasum -a 256on macOS, orsha256sum -c --ignore-missing SHA256SUMSon Linux. Compare all 64 characters with the line for your exact file name. A match proves your file is the fileSHA256SUMSdescribes. - Authenticity. Run
gpg --keyid-format long --verify SHA256SUMS.gpg SHA256SUMS, fetching Ubuntu’s keys first ifgpgreportsNo public key. Lesson B02.2 has the exact command. On Windows, use Gpg4win, not WSL. Then compare the fingerprint with the one in Ubuntu’s tutorial. The signature proves that Ubuntu’s key signed the listing, so the chain runs from Ubuntu’s key to the listing to your image.
If the checksum does not match, do not use the file: delete it and download it again from the Ubuntu folder.
Goal 3: the VM and the installation
Check your VM against this table. The reasons matter more than the order you set the values in.
| Setting | Course value | Why |
|---|---|---|
| VM Name | rootvolt-lab |
VirtualBox names the VM’s folder and files after it |
| VM Folder | D:\VMs, or C:\VMs without a D: drive |
A path with no personal name, on a drive with room for the 25 GB disk |
| OS Version | Ubuntu 24.04 LTS (Noble Numbat) (64-bit) | VirtualBox may preselect another version, so check it by hand. On Apple silicon, the ARM 64-bit entry |
| Proceed with Unattended Installation | Unticked | You see and answer the disk, account, and name questions yourself |
| Base Memory | 4096 MB, or 2048 MB on a host with less than 8 GB | The host loses it while the VM runs; give at most half |
| Number of CPUs | 2 | At most half of the host’s processor threads |
| Use EFI | Unticked | Nothing in the course needs EFI |
| Disk Size | 25 GB, VDI, Pre-allocate Full Size unticked | Ubuntu asks for at least 25 GB; the file grows only as the guest writes |
In the installer, choose Erase disk and install Ubuntu with Advanced features at None selected, and on Create your account use learner for your name and username and rootvolt for the computer’s name. Before you click Install, Review your choices must show VBOX HARDDISK sda. That is the model name VirtualBox gives its virtual disks, so the disk being erased is rootvolt-lab.vdi. If you see another model name, stop and check the VM’s Storage settings.
After Restart now, make sure the image is out of the optical drive, through Devices, Optical Drives in the VM’s window. With the image still in the drive, the VM starts the installer again, and “Erase disk” would erase the system you just installed.
At the first login, the prompt learner@rootvolt:~$ proves both names. lsblk showing one sda disk of 25G proves the guest sees the virtual disk and nothing else.
Goal 4: the network mode
Attached to: NAT is the mode VirtualBox chose when it created the VM, and it is the course default. Inside Ubuntu, enp0s3 is UP with 10.0.2.15/24, and the default route goes via 10.0.2.2. Those are the addresses the VirtualBox manual gives for a VM with one NAT card, and 10.0.2.2 is VirtualBox’s NAT engine, not your home router. 3 received, 0% packet loss from ping shows that the VM reaches the internet.
Your two sentences could read: “With NAT, the VM can start connections to the host, the home network, and the internet, and nothing outside can start a connection to it without a port forwarding rule. I would not use Bridged Adapter for a target VM: it puts a weak system on my home network as another device, where it can reach every device and every device can reach it.”
Goal 5: the snapshot round trip
- Power off the VM from Ubuntu’s menu. A snapshot of a running VM also stores its memory, here up to 4 GB. A snapshot of the powered-off VM has no memory file, and restoring it gives you a powered-off VM.
- In Snapshots, take a snapshot named
clean-install, with a description that says what the state is. - Start the VM and create a test file in your home directory, for example with
echo "Made after clean-install" > ~/restore-check.txt. Runls ~and find the file in the list. Power off. - Select
clean-installand click Restore. Check that the confirmation namesclean-install, untick Create a snapshot of the current machine state, and click Restore. The current state holds only the test file, which you want gone. - Start the VM and run
ls ~again. The file is not in the list: the disk is back to the moment you tookclean-install.
This is why the notebook lives on the host. A notebook kept in the guest’s home directory after clean-install would have disappeared with the test file: “Files that were since created will disappear”, as the VirtualBox manual puts it.
Recall check
Section titled “Recall check”Answer each question without looking back, then open the answer.
1. WSL 2 runs a real Linux kernel, so why is it not the reference environment for this course?
Answer
Its kernel is Microsoft’s, not Ubuntu’s, so lessons that depend on Ubuntu’s kernel, startup, or desktop may not match. It is close to Windows on purpose: your C: drive appears at /mnt/c, so it is not a sealed lab. And it has no snapshots; wsl --export saves a copy, which works as a backup, not as a snapshot you restore in place.
2. You downloaded the image and SHA256SUMS from a mirror you do not know, and the checksum matches. What have you proved, and what is still open?
Answer
You proved integrity: your image is exactly the file that this SHA256SUMS describes. You have not proved authenticity: whoever controls the mirror could have replaced both the image and the listing. The signature in SHA256SUMS.gpg, checked against Ubuntu’s key fingerprint, closes that gap, even for files from a mirror you do not trust.
3. A friend has a Mac with Apple silicon. Which image and which VirtualBox package do they need, and what will be different from the course’s steps?
Answer
The arm64 image and the macOS / Apple Silicon hosts package. The VirtualBox manual says an x86-based guest is not supported on an Arm host, so the amd64 image will not do. Unattended installation is not available there, which does not matter because the course installs by hand. Use EFI cannot be changed. Inside the VM, uname -m prints aarch64. And support is limited: Ubuntu 24.04 is among the guests that “might run” on Arm hosts.
4. On your own computer, Erase disk and install Ubuntu would delete everything. Why was it safe to choose it in the VM?
Answer
The guest can see only the disks VirtualBox gives it, and the course VM has one: the file rootvolt-lab.vdi on the host. The installer showed it as VBOX HARDDISK sda. Your computer’s own disk does not appear in the guest, so the installer cannot erase it. “Erase disk” erased an empty virtual disk.
5. A friend wants to set the lab VM to Bridged Adapter so they can reach it from their phone. What would that expose?
Answer
Bridged Adapter connects the VM to a real network card of the host, so the VM joins the home network as another device. Every device on that network can try to connect to the VM, and the VM can reach every device there. With a target VM, a weak system would sit next to the family’s laptops and phones. The course keeps NAT. To reach one service in a NAT VM, a port forwarding rule opens that service only.
6. Your clean-install snapshot is in D:\VMs\rootvolt-lab. Is it a backup of your lab?
Answer
No. VirtualBox does not copy the disk when it takes a snapshot. It keeps the original disk and writes later changes to a differencing image in the Snapshots folder, inside the same VM folder. If that folder is deleted or the drive fails, the VM and its snapshots are gone together. A backup is a copy kept somewhere else.
- A full VM is the course’s lab because it is isolated, has snapshots, and runs Ubuntu’s own kernel and systemd.
- An image is ready to install when its complete checksum matches its line in
SHA256SUMS, and authentic whenSHA256SUMS.gpgchecks against Ubuntu’s key. rootvolt-labis installed by hand, withlearneronrootvolt; “Erase disk” erased onlyrootvolt-lab.vdi, which the installer showed asVBOX HARDDISK sda.- NAT lets the VM out and keeps the home network from reaching in.
clean-installis your way back to the fresh system, and a restore removes what came after it.
Next, module B03 starts with Desktop and session basics (B03.1), in the VM you built. The module covers logging in, the desktop and the terminal, and the difference between a regular user and root.
Further reading
Section titled “Further reading”All sources are the ones the module’s lessons were written from, for VirtualBox 7.2 and Ubuntu 24.04 LTS.
- Oracle VirtualBox User Guide, release 7.2: Creating a New Virtual Machine, Virtual Networking, and Working with Virtual Machines, on snapshots.
- Ubuntu tutorials: How to verify your Ubuntu download, with the
gpgcommands and the key fingerprint. - Ubuntu Desktop documentation: Install Ubuntu Desktop, for 24.04 LTS.
- Microsoft Learn: Comparing WSL versions, on the WSL 2 kernel and its managed VM.