vmlab — training

A declarative QEMU/KVM VM-lab orchestrator: labs and virtual networks declared in WCL, reusable disk templates built locally or distributed over OCI registries, and guest automation written in wscript.

Work through the lessons in order — each builds on the previous one, and every lesson ends with exercises you can check against the expected results.

§ 1Your first lab

Install vmlab, declare a one-VM lab, boot it, poke at the guest, and tear it down.

1. Install vmlab and validate a lab — Get the CLI running, write a minimal vmlab.wcl, and let vmlab validate check it.

2. Boot it and look around — Bring the lab up, watch the template pull, and inspect it with status, console, and logs.

3. Run commands in the guest, then tear down — Use the guest agent from the CLI, then learn the difference between down and destroy.

§ 2Templates

Where guest disks come from: pull them from a registry, build your own, and move them between hosts.

1. Boot straight from a registry — OCI refs in template = and what pull-on-up does.

2. Build a template from installer media — The template block: sources, an unattended install, and vmlab template build.

3. Share templates: push, pull, export — Publish a store entry to any OCI registry, or move it as an archive.

§ 3Networking

Segments as declared networks: addressing, DHCP, NAT, port forwards, and inter-segment routes.

1. Segments, leases, and static IPs — Declare isolated networks and control who gets which address.

2. NAT, port forwards, and routes — Let guests out, let the host in, and join segments together.

§ 4Automation with wscript

Provision scripts, event handlers, and driving guests through the agent — and through the screen.

1. Your first provision script — A provision block that waits for the guest and configures it through the typed API.

2. React to lab eventson handlers: run a script when something happens instead of polling for it.

3. Drive the screen: keys, matching, OCR — Automate what has no agent — installers and GUIs — with keystrokes and vision.