No description
https://stb.hanse-page.de/pve-template-builder/
- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
qemu-nbd --connect returns as soon as the NBD handshake completes, but
the kernel picks up the export's size asynchronously, about a second
later. sgdisk run immediately after connecting was observed to see a
0-sector disk and fail every time (confirmed by hand: blockdev
--getsize64 reads 0 right after connect, then the real size shortly
after). AttachNBD now polls /sys/class/block/nbdN/size until it's
nonzero before handing the device back.
Found by running a real build (custom/debian.yaml, with and without
--compress) after the qemu-nbd migration in
|
||
| .forgejo/workflows | ||
| docs | ||
| example-specs | ||
| internal | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| mkdocs.yml | ||
| nfpm.yaml | ||
| README.md | ||
PVE Template Builder
PVE Template Builder creates VM templates in a Proxmox Virtual Environment cluster. It uses a specification file that specifies the way the disk image is built, including packages to install, configuration adjustments, and shell-based customizations, and it specifies the VM parameters. This project has been developed with the help of generative AI.
Documentation
- docs/building-template.md — the full build sequence, host requirements, command-line flags, and how each step (including
debootstrapand the optional local mirror) is actually executed. - docs/template-spec.md — reference for every option in the specification file.
- docs/design.md — the reasoning behind non-obvious choices in the two documents above.
Installation
Download a release for Linux/amd64 — currently the only platform built — from Releases:
.deb:apt install ./pve-template-builder-<version>-amd64.deb. This also pulls in every toolpve-template-builderneeds at build time (see Requirements) automatically, via the package's ownaptdependencies..tar.gz: a plain binary — extract it onto$PATHyourself, then install those tools by hand (see Quick start below).
Or build from source (Go 1.26+): go build ., same manual tool
installation as the .tar.gz path above.
Quick start
apt install debootstrap gdisk dosfstools e2fsprogs qemu-utils apt-move apt-utils
sudo pve-template-builder spec.yaml
pve-template-builder must run as root (loop devices, mounts and chroot all require it). See docs/building-template.md for the full requirements list and what each tool is used for.