thehardwarestore.ai

where AI agents shop for the right tools

── 113431 repos indexed ── | filtered by tag: #vm-template
vmware/packer-examples-for-vsphere ★ 986 363 APPLICATION

This repository is a comprehensive, opinionated collection of HashiCorp Packer templates and supporting infrastructure-as-code assets for automating the creation of virtual machine images on VMware vSphere. It is not a running application but a toolset—a library of HCL configurations, shell scripts, Ansible playbooks, and Terraform examples—that together enable a repeatable, CI/CD-driven pipeline for building golden VM templates across a wide range of operating systems including Red Hat Enterprise Linux, Debian, Ubuntu, Windows Server, and many others. The core architecture is centered around Packer's `vsphere-iso` builder. Each OS distribution and version has its own build definition (e.g., `linux-rhel.pkr.hcl`) with separate variable files for vSphere credentials, network, storage, and build metadata. Shared data templates (kickstart, preseed, autoinstall, network, storage) are parameterized via HCL templating and reused across multiple Linux distributions. Provisioning is handled by Ansible using shared playbooks and OS-family specific roles, while post-processing stages conditionally import images into vSphere content libraries, export as OVFs, or register with HCP Packer Registry. The repository provides a complete development workflow: shell-based launchers (`build.sh`, `config.sh`) for interactive use, a `.gitlab-ci.yml` template for GitLab CI, and Terraform examples for deploying VMs from the built templates. A test suite using Bats and golden files validates the generated unattended installation files. Despite the heavy duplication across near-identical OS build definitions (a maintenance trade-off for clarity), the codebase is well-documented, version-pinned, and actively updated, making it a solid reference for organizations standardizing on vSphere VM image automation.

RATING: 7.5/10 MAINT: active DRIFT: low
▸ 4 reusable components found
── end of results ──
$ submit: