Build OpenVox-ready VMware VMs from Packer golden templates (or a legacy ISO) β without memorizing Terraform every time.
Quick Start Β· Install Β· Usage Β· Configuration Β· Secrets Β· Changelog
ovbuilder is a command-line tool. You run it on your laptop or workstation (macOS, Linux, or Windows). It talks to VMware vCenter, creates a virtual machine, sets hostname and IP, and can install the OpenVox agent so the new node joins your Puppet/OpenVox fleet.
You do not need to be a UNIX expert. If you can open a terminal (Terminal.app, PowerShell, Windows Terminal, or Git Bash) and type a few commands, you can use it.
Typical flow:
- Build golden OS templates once with Packer (optional but recommended).
- Run
ovbuilder build. - Answer prompts (vCenter login, datacenter, OS, hostname, IP, size).
- Terraform clones the template. The guest boots with cloud-init identity.
- Optionally install the OpenVox agent over SSH.
Legacy mode still supports empty-disk + ISO install if you prefer console installs.
Never commit passwords or vCenter credentials to git.
Set up a local golden-login password before your first clone. Full steps for macOS, Linux, and Windows:
β docs/SECRETS.md
| Tool | Why | Where to get it |
|---|---|---|
| Python 3.9+ | Runs the ovbuilder CLI |
python.org or your OS package manager |
| Terraform 1.5+ | Creates/clones the VM in vSphere | HashiCorp Terraform |
| Network to vCenter | Inventory discovery + Terraform | Your VPN / lab network |
| Packer 1.9+ (optional) | One-time golden image builds | HashiCorp Packer |
| Git | Clone this repository | git-scm.com |
Guest VMs are Linux (AlmaLinux / Ubuntu). The operator machine can be UNIX or Windows.
git clone https://github.com/cvquesty/openvox-ovbuilder.git
cd openvox-ovbuilder
# macOS: sudo -H keeps your real HOME so config lands in the right place
sudo -H ./install.shThen open a new terminal (or refresh your PATH) and run:
ovbuilder --versionUser-only install (no /opt):
./install.sh --userUninstall:
./install.sh --uninstallinstall.sh is a Bash script. On Windows use one of:
- WSL (Windows Subsystem for Linux) β clone and run
./install.shinside WSL (treat as Linux). - Git Bash β sometimes works for
install.sh; if not, use the manual steps below. - PowerShell / Command Prompt β manual Python venv (works everywhere):
git clone https://github.com/cvquesty/openvox-ovbuilder.git
cd openvox-ovbuilder
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e .
# Put Terraform on PATH, then:
ovbuilder --versionIf PowerShell blocks script activation:
Set-ExecutionPolicy -Scope CurrentUser RemoteSignedAdd the venv Scripts folder to your user PATH, or activate the venv each session.
macOS / Linux / WSL / Git Bash:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
ovbuilder buildWindows PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e .
ovbuilder build- Install Terraform and put it on your
PATH. - Create secrets (
OVBUILDER_GOLDEN_PASSWORD). - Build Packer goldens once (see packer/README.md), or skip ahead if templates already exist in vCenter.
- Run:
ovbuilder buildYou will be asked for:
- vCenter hostname and login
- Datacenter, cluster, datastore, network(s)
- OS (golden template), or ISO if you chose legacy mode
- Hostname, IP, subnet prefix, optional gateway/DNS
- CPU, memory (GB), disk (GB, always thin-provisioned)
Confirm, then Terraform runs. When it finishes, the VM is cloned and powered on.
ovbuilder build
β discover vSphere inventory
β select OS (AlmaLinux 10 / Ubuntu 24.04 template)
β interview hostname / IP / sizing
β terraform clone + cloud-init guestinfo
β cloud-init sets identity + (on Alma) DNF groups
β SSH-ready guest
β optional OpenVox agent bootstrap
ovbuilder build --mode isoovbuilder build --mode iso
β pick datastore ISO
β empty disk + ISO attached
β you finish OS install in the vSphere console
β ovbuilder disconnects the ISO (releases the lock)
β optional SSH network + DNF groups + agent bootstrap
ovbuilder buildSame as running ovbuilder with no subcommand.
ovbuilder build --yes \
--hostname openvox-web03 \
--ip 10.0.42.103 \
--os almalinux-10 \
--prefix 24 \
--gateway 10.0.42.1 \
--dns 10.0.42.10 \
--dns 1.1.1.1 \
--cpus 4 --memory 8 --disk 120 \
--vsphere-server vcenter.example.com \
--vsphere-user administrator@vsphere.local \
--vsphere-password "***"Placement (datacenter, cluster, datastores, networks) comes from your config file unless you already set it interactively in a previous session and saved it.
ovbuilder build --yes --mode iso \
--hostname openvox-web03 \
--ip 10.0.42.103 \
--iso isos/AlmaLinux-10.0-x86_64-dvd.iso \
--vsphere-server vcenter.example.com \
--vsphere-user administrator@vsphere.local \
--vsphere-password "***"| Flag | Meaning |
|---|---|
--mode golden / --mode iso |
Clone template (default) or attach ISO |
--os almalinux-10 |
Golden image key (non-interactive golden) |
--iso path/to.iso |
Datastore-relative ISO path (ISO mode) |
--hostname / --ip |
Guest identity |
--prefix / --cidr |
Subnet as 24, /19, or 255.255.224.0 |
--gateway |
Optional default gateway |
--dns |
DNS server (repeat or comma-separate; interactive: one per prompt until empty) |
--cpus / --memory / --disk |
Size (memory in GB) |
--skip-dnf-groups |
Do not install configured EL package groups |
--yes / -y |
No prompts (requires hostname, IP, and OS or ISO) |
-V / --version |
Print version |
ovbuilder --help
ovbuilder build --help
ovbuilder config| Piece | Role |
|---|---|
ovbuilder CLI |
Interview, discovery, Terraform driver, optional SSH |
Bundled Terraform (terraform/modules/vm) |
Clone golden or empty disk + ISO |
| Per-VM state | Each hostname has its own Terraform state file |
| cloud-init guestinfo | Hostname + static IP on golden clones |
| DNF groups | Extra EL package groups after network is up |
| SSH post-steps | Optional agent install; ISO network + DNF groups |
State lives under the data directory (see Configuration), not in the shared Terraform module folder. Building ovca3 does not rename ovca2.
| OS | Config + secrets | Terraform state / data |
|---|---|---|
| Linux / macOS | ~/.config/ovbuilder/ |
~/.local/share/ovbuilder/ |
| Windows | %APPDATA%\ovbuilder\ |
%LOCALAPPDATA%\ovbuilder\ |
| Any OS | $XDG_CONFIG_HOME/ovbuilder/ if set |
$XDG_DATA_HOME/ovbuilder/ if set |
Examples:
- macOS:
/Users/you/.config/ovbuilder/config.yaml - Linux:
/home/you/.config/ovbuilder/config.yaml - Windows:
C:\Users\you\AppData\Roaming\ovbuilder\config.yaml
Create the directory if it does not exist. vSphere passwords are not written to config.yaml by default.
terraform_dir: "" # blank = bundled or /opt/ovbuilder/terraform
vsphere_server: vcenter.example.com
vm_datastore: vsanDatastore
iso_datastore: isos
networks:
- "VM Production"
datacenter: "Main DC"
cluster: "Production Cluster"
domain: example.com
openvox_server: openvox.example.com
default_cpus: 2
default_memory_gb: 4
default_disk_gb: 80
provision_mode: golden # or iso
golden_images:
almalinux-10:
template: ovbuilder-almalinux-10
guest_id: other4xLinux64Guest
default_user: almalinux
description: AlmaLinux 10 (Packer golden)
ubuntu-24.04:
template: ovbuilder-ubuntu-24.04
guest_id: ubuntu64Guest
default_user: ubuntu
description: Ubuntu 24.04 LTS (Packer golden)
# EL only. Applied at clone time (cloud-init) or ISO SSH post-install.
# Set to [] to disable. One-off skip: --skip-dnf-groups
dnf_groups:
- Server
- Virtualization Host
- Console Internet Tools
- Container Management
- RPM Development Tools
- Development Tools
- Headless Management
- Legacy UNIX Compatibility
- Network Servers
- Scientific Support
- Security Tools
- System Tools
known_isos:
"AlmaLinux 10": "isos/AlmaLinux-10.0-x86_64-dvd.iso"
"Ubuntu 24.04": "isos/ubuntu-24.04-live-server-amd64.iso"| Variable | Purpose |
|---|---|
OVBUILDER_TERRAFORM_DIR |
Terraform root module path |
OVBUILDER_VM_DATASTORE |
Default VM datastore |
OVBUILDER_ISO_DATASTORE |
Default ISO datastore |
OVBUILDER_OPENVOX_SERVER |
OpenVox compile/CA host for agent install |
OVBUILDER_PROVISION_MODE |
golden or iso |
OVBUILDER_GOLDEN_PASSWORD |
Guest login password (see SECRETS.md) |
XDG_CONFIG_HOME / XDG_DATA_HOME |
Override config/data roots on any OS |
ovbuilder configGolden and ISO guests often start as Minimal / @core. By default ovbuilder installs a set of DNF groups after the network is configured:
- Golden: cloud-init runs
/usr/local/sbin/ovbuilder-dnf-groups.sh - ISO: SSH post-install runs the same logic
- Ubuntu: skipped (no
dnf/yum)
Edit dnf_groups in config, or pass --skip-dnf-groups for a lean clone. Failed group names are warnings; the build continues.
First boot on Alma can take a while while groups download.
| Component | Version / note |
|---|---|
| ovbuilder CLI | 0.97-beta17 |
| Terraform module | Bundled terraform/modules/vm (clone + ISO) |
| Python | 3.9+ |
| Guest targets | AlmaLinux 10, Ubuntu 24.04 (golden); other ISOs in ISO mode |
| OpenVox agent | 8.x+ via official install.bash on port 8140 |
export PATH="/usr/local/bin:$HOME/.local/bin:$PATH"
hash -r
ovbuilder --versionIf you used sudo ./install.sh without -H on macOS, re-run with sudo -H ./install.sh.
sudo chmod -h 755 /usr/local/bin/ovbuilder
sudo chmod 644 /opt/ovbuilder/venv/pyvenv.cfg
sudo chmod 755 /opt/ovbuilder/venv /opt/ovbuilder/venv/binSet-ExecutionPolicy -Scope CurrentUser RemoteSigned
.\.venv\Scripts\Activate.ps1- Confirm you installed the package that includes
pyvmomi(python -m pip show ovbuilder). - Interactive mode needs a working vCenter connection.
Follow the panel output or docs/SECRETS.md. The file must exist on the machine running ovbuilder, not inside the guest.
- Check cloud-init log on the guest console:
/var/log/cloud-init-output.log - Confirm gateway/DNS match the port group
- Confirm VMware Tools /
open-vm-toolsare running
ovbuilder disconnects CD/DVD after clone hygiene and after ISO installs. If you exited early, disconnect manually in vSphere: VM β Edit Settings β CD/DVD β Client Device.
Each hostname has isolated state under the data directory tfstate/<hostname>/. Do not point two builds at the same hostname unless you intend to update that VM.
| Doc | Audience |
|---|---|
| README.md (this file) | Everyone β install, use, configure |
| docs/SECRETS.md | Everyone β passwords and credentials |
| packer/README.md | People who build golden templates |
| terraform/modules/vm/README.md | People calling Terraform directly |
| CHANGELOG.md | Release notes |
| AGENTS.md | Project versioning / commit rules |
- Keep CLI help clear for interactive and
--yesusers. - Docs should stay beginner-friendly (college-freshman reading level) and work for Windows and UNIX operators.
- Versioning: see CHANGELOG.md and AGENTS.md.
Apache 2.0 β same as the rest of the OpenVox ecosystem.
Made with a healthy disrespect for repetitive manual labor.
Part of the OpenVox family of tools.