Skip to main content

Command Palette

Search for a command to run...

🖥️ Building a Portable VM Lab for DevOps & Pentesting

Updated
•2 min read
🖥️ Building a Portable VM Lab for DevOps & Pentesting
G
Aspiring DevOps/cloud engineer passionate about automation, Kubernetes, and open source. Sharing hands-on tutorials, projects, and tips to help others level up in tech.

I wanted a clean, reproducible way to spin up both DevOps and pentesting environments without constantly reinstalling tools or breaking my main system. So I built VM Lab — a Vagrant-based setup that runs on VMware (Fusion on Mac or Workstation on Windows) and gives me ready-to-use environments in minutes.

Why I built this

Setting up environments manually is slow and inconsistent. One machine has Docker issues, another is missing dependencies, and suddenly you’re debugging setup instead of actually learning or building.

This project solves that by:

  • Automating environment provisioning

  • Keeping setups consistent across machines

  • Letting me destroy and recreate labs instantly


What’s inside

Ubuntu DevOps VM

A full DevOps playground with everything I need preinstalled:

  • Docker, Kubernetes (kind), Helm

  • Terraform, Ansible, ArgoCD

  • AWS CLI, gcloud

  • VS Code + GUI (GNOME)

Runs on:

  • 8GB RAM, 4 vCPU

  • Static IP: 192.168.56.10


Kali Linux Pentest VM

A focused environment for security testing and research:

  • Nmap, Metasploit, Burp Suite

  • OWASP ZAP, Wireshark

  • Recon tools like Amass & Subfinder

  • Password cracking tools (Hydra, John, Hashcat)

Runs on:

  • 6GB RAM, 3 vCPU

  • Static IP: 192.168.56.20


Quick workflow

Spin up a VM:

VM_TYPE=ubuntu vagrant up

Export it to VMware:

./scripts/export-vm.sh ubuntu

Open and use it like a normal VM:

open ~/VMware-Labs/ubuntu-vm/ubuntu-24.04-aarch64.vmx

Destroy and reset anytime:

vagrant destroy

Why this is useful

  • For learning DevOps → instantly test tools like Kubernetes, Terraform, and CI/CD setups

  • For pentesting practice → isolated environment with all essential tools ready

  • For consistency → same setup every time, no “works on my machine” issues


Final thoughts

This is basically my personal lab in a box. I can spin it up, break things, experiment, and reset everything in minutes. No more wasted time on setup — just focus on actually learning and building.

Next step: expanding this with multi-node clusters and automated scenarios.

More from this blog

D

Debugging My Life

9 posts