Break-and-fix Linux troubleshooting labs in disposable local KVM virtual machines.
This is my first post on HN and I've always been someone who went through others' posts. Hopefully, this idea interest you and would really love some feedback!
A while back I came across SadServers through a LinkedIn post. It's been one of the most useful ways I've found to practice real troubleshooting. Thanks fduran for building this.
I wanted to keep practising on my own machine as well, offline and sometimes with no time limit if I am deep into reading some docs, so I built brokenbox. It's a small Python CLI that runs the same kind of scenario in disposable KVM VMs.
How it works:
- Each scenario is a qcow2 copy-on-write overlay on a shared golden image, created through libvirt. cloud-init creates the user and SSH keys.
- the setup and checker scripts are piped to root over SSH stdin, so they're never written to the guest's disk and you can't read the answer from inside the VM.
- After setup, a disk+memory snapshot is taken, so reset is near-instant and is useful if someone does end up messing up the VM while troubleshooting.
There are 15 scenarios so far. Each one is based on a question people keep asking on Stack Exchange, and those questions for inspiration are linked in the scenario. I've personally solved these as well and was a fun learning experience.
If you loved this, I'd love contributions on tasks as well.
It needs Linux with KVM and libvirt. I wrote more about why and how I built it in https://pavithra.dev/blogs/5
1 comment
Read the full thread on Hacker News →
Related stories
- Hacker News · 3 points · 2 months ago
- Hacker News · 47 points · about 2 months ago
- Launch HN: Vespper (YC F24) – SOTA Docx MCPvespper.comHacker News · 31 points · 2 months ago
- Hacker News · 3 points · about 2 months ago
- Show HN: NetWasm – Independent .NET Compiler/Runtime (82.5 KB Hello World in C#)playground.netwasm.comHacker News · 5 points · 2 months ago
- Hacker News · 1 points · 2 months ago