If you're building a cybersecurity homelab on Windows, Hyper-V is the best starting point — it's built into Windows 10/11 Pro, completely free, and runs Linux VMs without slowing down your main machine.
This guide takes you from zero to a fully updated Ubuntu 22.04 LTS desktop inside Hyper-V. No third-party software, no dual-booting, no BIOS changes needed on most modern machines.
Prerequisites
- Windows 10/11 Pro, Enterprise, or Education — Home editions do not include Hyper-V
- 64-bit CPU with hardware virtualisation (Intel VT-x or AMD-V) — enabled by default on most machines made after 2015
- At least 8 GB RAM (4 GB for the host + 4 GB assigned to the VM)
- 20+ GB free disk space for the virtual hard disk
Step 1 — Enable Hyper-V
Open PowerShell as Administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Restart when prompted. Alternatively go to Control Panel → Programs → Turn Windows features on or off, tick Hyper-V (both Platform and Management Tools), and restart.
Step 2 — Download Ubuntu ISO
Go to ubuntu.com/download/desktop and grab the latest LTS release (22.04 or 24.04). Save it somewhere easy to find — you'll point Hyper-V at it in the next step.
Step 3 — Create the VM in Hyper-V Manager
Open Hyper-V Manager (search it in Start). Click New → Virtual Machine on the right panel and work through the wizard:
- Name:
Ubuntu-Lab01 - Generation: Generation 2 (UEFI — required for Ubuntu 22.04+)
- Memory: 4096 MB minimum. Enable Dynamic Memory so Hyper-V manages it automatically
- Network: Select Default Switch for NAT internet access through your host
- Virtual Hard Disk: Create a new VHD — 25 GB is comfortable
- Installation Media: "Install from a bootable image file" → browse to your Ubuntu ISO
Before hitting Start, open the VM's Settings → Security and either disable Secure Boot or change the template to Microsoft UEFI Certificate Authority. Ubuntu will not boot with the default Windows Secure Boot template.
Step 4 — Install Ubuntu
Start the VM. It boots the Ubuntu live environment. Click Install Ubuntu and follow the prompts:
- Installation type: Normal installation, check "Download updates while installing"
- Disk: "Erase disk and install Ubuntu" — this only touches the virtual disk, not your real drive
- Set your name, username, and a strong password even for a lab VM
Installation takes 5–10 minutes. The VM restarts automatically when done.
Step 5 — Update Everything
Log in and open a terminal (Ctrl + Alt + T). Run:
sudo apt update && sudo apt upgrade -y
This pulls all pending security patches. Reboot after it finishes.
Step 6 — Install Hyper-V Guest Tools
For automatic screen scaling and clipboard sharing between host and VM:
sudo apt install -y linux-tools-virtual linux-cloud-tools-virtual
Restart the VM. You can now resize the Hyper-V window and the Ubuntu desktop scales with it.
What's Next
You now have a free, clean Ubuntu VM running inside Windows. From here:
- Install security tools — Nmap, Wireshark, Burp Suite, Metasploit
- Set up Splunk or Elastic to start ingesting logs
- Take a Hyper-V Checkpoint before each lab exercise — revert in 10 seconds if something breaks
- Clone the VM to spin up multiple machines for network lab scenarios
Hyper-V Checkpoints are the killer feature for security labs. Take one before every exercise, revert instantly if you break something. VMware charges for snapshots on the Pro tier — Hyper-V gives you unlimited checkpoints for free.
The next lab in this series covers installing Splunk Free inside this VM to start ingesting Windows event logs from your host machine.
← All posts