Install a Linux Server VM in VirtualBox or VMware
You will install a headless Ubuntu Server virtual machine you can break and rebuild freely, the safe foundation for every other server lab. By the end you will have a reachable VM with a clean snapshot to roll back to.
Learning Objectives
- Create and boot a Linux server VM from an ISO.
- Configure bridged networking so the VM is reachable over SSH.
- Capture a clean snapshot you can restore in seconds.
- Time: ~1 hour · Difficulty: Beginner · Prereqs: a host with 4GB+ free RAM and virtualization enabled in BIOS.
Architecture Overview
Environment Setup
You will need:
- VirtualBox 7.x (virtualbox.org) or VMware Workstation.
- The Ubuntu Server 22.04 ISO.
- Virtualization (VT-x/AMD-V) enabled in your host BIOS.
Before you begin: confirm you have 4GB+ free RAM and 20GB free disk.
Step-by-Step Execution
This provisions an empty VM with a 20GB dynamically allocated disk. A dedicated disk keeps the lab isolated from your host.
VBoxManage createvm --name ubuntu-srv --ostype Ubuntu_64 --registerBooting from the ISO launches the guided Ubuntu installer where you set hostname, user, and OpenSSH.
VBoxManage storageattach ubuntu-srv --storagectl IDE --port 0 --device 0 --type dvddrive --medium ubuntu-22.04-live-server.isoConfirm the release so later commands match your Debian-family tooling.
cat /etc/os-release | head -2Bridged mode puts the VM on your LAN with its own IP so you can SSH in from your host.
A snapshot lets you undo any future mistake instantly, which is what makes a VM a safe learning sandbox.
VBoxManage snapshot ubuntu-srv take clean-base --description "fresh install"Progress So Far
Testing & Validation
Run this final check from your host:
ssh [email protected] 'uname -a && uptime'You should see the VM's kernel string and uptime. If all checks pass, you have a working, reachable, restorable Linux server.
Troubleshooting
- No 64-bit OS option: enable VT-x/AMD-V in host BIOS, then restart VirtualBox.
- SSH connection refused: confirm OpenSSH was selected during install (
sudo systemctl status ssh). - No LAN IP: switch the adapter from NAT to Bridged and re-run the installer's network step.
Extension Ideas
- Try the Post-Installation Configuration lab to harden this base.
- Convert the VM to a KVM guest in Creating Nested VMs with KVM.
- Read the Ubuntu Server install docs for autoinstall (cloud-init) automation.
Key Results
- Stood up a reachable Linux server VM in under 1 hour.
- Confirmed SSH access over a bridged LAN IP.
- Captured a snapshot enabling sub-minute rollback.
- Created a disposable base reused across 11 server labs.