This repository contains the build system used for generating USO VMs for labs and ctf.
Install the following dependencies on your machine:
packer: https://developer.hashicorp.com/packer/install#linuxansible: https://docs.ansible.com/ansible/latest/installation_guide/installation_distros.html#installing-ansible-on-specific-operating-systems
Packer requires the following plugins to be installed:
# Get Packer required plugins automatically
packer init ubuntu-25-04-vbox-amd64.pkr.hcl
# Or install them manually
packer plugins install github.com/hashicorp/virtualbox
packer plugins install github.com/hashicorp/ansibleThe lifecycle of building the VM is:
- download the corresponding Ubuntu image and configure the VM resources using
packer. All the configs are available inubuntu-*.pkr.hcl. - allow installation leveraging
cloud-initand theautoinstallfeature from Ubuntu. The configuration available in the GUI installation wizard are available inscripts/autoinst/ubuntu-*-autoinstall,yml. - all the other config required for the USO lab environment are set using ansible. The scrips are available in
scripts/ansible/*.yml
A Makefile is availale for building the VM:
makeFor debugging purposes, start the build as following:
PACKER_LOG=1 packer build -var headless=false ubuntu-*-vbox.pkr.hclThe cookbook guid for configuring VMs are available at the following link.
The scripts were inspired from this repository.