Lab 03: Create and Configure a Virtual Machine Using VirtualBox¶
Introduction to VirtualBox¶
Oracle VirtualBox is a free and open-source virtualization software that allows you to run multiple operating systems on your computer. Instead of using multiple physical machines, VirtualBox lets you create Virtual Machines (VMs) — software-based computers that run like real ones. It is widely used for testing, learning, and development because it is lightweight and easy to use.
Step 1: Downloading and Installing VirtualBox¶
-
Open a web browser and go to the official VirtualBox download page:
👉 https://www.virtualbox.org/wiki/Downloads -
Download the latest stable version for Windows hosts.
-
Once the installer is downloaded, double-click the file to begin installation.
-
Installation steps:
- Click Next through the setup wizard.
- Keep the default options.
- Allow installation of network adapters when prompted.
- Click Install and wait for the process to finish.
-
After installation, launch VirtualBox from the Start Menu.
Step 2: Downloading a Lightweight Linux OS¶
For this lab, we will use Lubuntu — a lightweight, beginner-friendly Linux distribution.
-
Go to the official Lubuntu downloads page:
👉 https://lubuntu.me/downloads/ -
Download the latest LTS ISO (as of September 2025: Lubuntu 24.04 LTS).
-
Optional: Verify the download integrity by checking the checksum provided on the website.
Step 3: Navigating VirtualBox Interface¶
When you open VirtualBox, you will see: - Toolbar: Create, Start, Settings, and other VM management options. - Main Window: List of all created VMs. - Details Panel: Shows the configuration of the selected VM.
Step 4: Creating a New Virtual Machine¶
- Click New in VirtualBox.
-
Enter the following details:
- Name:
Lubuntu_VM - Type: Linux
- Version: Ubuntu (64-bit)
- Name:
-
Assign hardware resources:
- RAM: 2048 MB (2 GB)
- CPU: 2 processors
-
Create a virtual hard disk:
- Select VDI (VirtualBox Disk Image)
- Choose Dynamically allocated
- Set size to 20 GB
-
Attach the downloaded Lubuntu ISO:
- Go to Settings → Storage
- Under Controller: IDE, click the Empty disk icon
- Choose Optical Disk → Select a disk file
- Browse and select the downloaded
lubuntu-24.04.iso
Step 5: Deploying the ISO and Installing Linux¶
- Start the VM.
- The Lubuntu installer will appear.
-
Follow these beginner-friendly steps:
- Select Language: English (default)
- Choose Install Lubuntu
- Select Erase disk and install (safe inside VM)
- Set a username and password
- Continue installation until finished
- Restart the VM and log in to your new Linux desktop.
Step 6: Networking Configuration¶
VirtualBox provides different networking modes:
- NAT: Default; allows internet but VM is hidden from local network.
- Bridged Adapter: VM appears as another device on the same network (recommended).
- Host-Only: VM communicates only with host.
- Internal: VM communicates only with other VMs.
- NAT Network: Like NAT, but supports multiple VMs.
👉 For this lab, select Bridged Adapter:
- Go to Settings → Network
- Change Attached to:
Bridged Adapter - Select your active network adapter (e.g., Wi-Fi or Ethernet).
Step 7: Accessing the VM¶
Logging in¶
- Use the credentials you created during installation.
- You can interact with the desktop interface.
Terminal Access from Windows 11¶
-
Find the VM’s IP address:
Look for an entry likeip addr192.168.x.x -
Using Windows Terminal:
ssh username@192.168.x.x -
If SSH is not installed, run inside the VM:
sudo apt update && sudo apt install openssh-server -
Using PuTTY (optional):
- Download PuTTY from: https://www.putty.org/
- Enter the VM’s IP address in PuTTY.
- Login with your username and password.
Troubleshooting Tips¶
- Black screen at boot: Ensure virtualization is enabled in BIOS/UEFI.
- No internet: Switch between NAT and Bridged mode.
- Cannot SSH: Check if OpenSSH is installed and running with:
sudo systemctl status ssh - Slow performance: Increase RAM/CPU allocation in VirtualBox settings.
✅ You have successfully created and configured a Virtual Machine using VirtualBox!