Install Ubuntu Linux in a Virtual Machine Safely
This manual lab installs Ubuntu inside a virtual machine, not on your physical disk. You will create a guest, attach an official installation image (ISO), install to a new virtual disk and log in as a normal user. The walkthrough describes VirtualBox 7 on a compatible host; screen labels may differ by version. No VM installation has been executed in the authoring environment.
Prepare the installer and host
Use the official Ubuntu 24.04 LTS desktop image from the Ubuntu release archive, and a hypervisor supported on your host. Match the image architecture to the supported guest architecture; amd64 and arm64 are not interchangeable. If your host cannot run that guest architecture, use a supported alternative such as an appropriate Arm guest and hypervisor. Verify the ISO integrity using the official release checksum and authenticity instructions before attaching it. Back up important host files before changing virtualization settings.
Create the virtual machine
- Open the VM manager and create a new VM named
ByteMind-Linux-Lab. Select Linux/Ubuntu and the correct architecture. - As a starting allocation for a desktop lab, try 2 virtual CPUs, 4 GiB RAM and a 30 GiB virtual disk if the host has enough spare resources. Check current official requirements and leave enough memory and storage for the host.
- Create a new virtual disk file; do not attach an existing physical disk. Attach the verified ISO as a virtual optical drive. Use manual installation so you can inspect the target disk.
- Keep shared folders and physical-device passthrough disabled. Default NAT networking is suitable for ordinary package downloads, if network access is permitted.
The virtual disk is a file or managed storage object presented to the guest as a disk. Its configured capacity is not proof of its identity or of available space on the host. Record the new disk in the VM manager before the installer starts, and do not continue if you cannot match it to the intended guest device.
Boot and install only inside the guest
Start the VM. In the guest installer, select the language and keyboard, choose installation, and follow the prompts. At the storage screen, compare the offered disk with the virtual disk configuration you just created. If there is more than one unexpected disk, stop. Only when you have verified the sole intended disposable disk should you choose the option that installs to the whole guest disk. Create a normal user account and a unique password; do not reuse host credentials. Complete the install, restart the guest and detach the ISO if requested.
The whole-disk installation option deletes existing content on its selected disk. Do not choose it on a physical machine or an unexpected disk. A command or capacity match alone does not establish that a disk is disposable. Check the hypervisor configuration and installer together.
Verify the installed guest
After login, open Terminal from the desktop app menu. Run these read-only commands. lsblk lists block devices (storage devices and partitions); the -o option selects columns. You do not need administrator access for these checks.
The first result should identify the intended Ubuntu release. The second may show a disk and one or more partitions, with / under MOUNTPOINTS for the device or logical volume holding the root filesystem. Names, sizes and additional devices vary. Compare with VM settings; do not modify storage based on this list alone. Shut down the guest through its desktop menu, then take a clean snapshot from the VM manager if supported.
Practice and recovery
Record the VM name, image release and architecture, allocated disk, whether shared folders are disabled and snapshot name. Do not record passwords. If installation fails, consult the hypervisor and Ubuntu documentation; restore the lab snapshot or recreate only the verified disposable guest. Do not change physical boot settings or disks as a generic fix.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Installing Linux in a VM — Knowledge Check
Apply the core ideas and safe practices from this lesson.
The installer lists an unexpected second disk. What should you do?
What should you verify before attaching an Ubuntu ISO?
What does lsblk -o NAME,SIZE,TYPE,MOUNTPOINTS do?
After the install, what is a good recovery preparation?