# codehunter-py/packer-examples-for-vsphere architecture

> Architecture diagram of the GitHub repository codehunter-py/packer-examples-for-vsphere, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/codehunter-py/packer-examples-for-vsphere
- Repository: https://github.com/codehunter-py/packer-examples-for-vsphere

## Overview

This repository is a collection of HashiCorp Packer HCL examples for building VMware vSphere VM images across many Linux and Windows versions. The documented workflow is to use Packer with the VMware vSphere plugin’s vsphere-iso builder to automate image creation. The tree also contains guest provisioning, network and storage templates, and Terraform examples; without source excerpts or README relationships, their detailed interactions cannot be established.

Main entry points: [`builds`](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds) (Packer OS builds), [`artifacts`](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/artifacts) (Built images)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_packer["Image building"]
  node_packer["Packer OS builds"]
  node_linux["Linux build definitions"]
  node_windows["Windows build definitions"]
end

subgraph group_guest["Guest configuration"]
  node_network["Network templates"]
  node_storage["Storage templates"]
  node_install["OS install templates"]
  node_ansible["Ansible roles"]
  node_scripts["Guest scripts"]
end

subgraph group_terraform["Terraform examples"]
  node_vm_tf["VM provisioning examples"]
  node_role_tf["vSphere role example"]
end

node_user(("Image builder user"))
node_vsphere_plugin["vSphere Packer plugin"]
node_vsphere["VMware vSphere"]
node_artifacts["Built images"]

node_user -->|"uses examples"| node_packer
node_packer -->|"uses builder"| node_vsphere_plugin
node_vsphere_plugin -->|"builds images"| node_vsphere
node_packer -->|"creates images"| node_artifacts

click node_packer "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds"
click node_linux "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds/linux"
click node_windows "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds/windows"
click node_network "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds"
click node_storage "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds"
click node_install "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds"
click node_ansible "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/ansible/roles"
click node_scripts "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/scripts"
click node_artifacts "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/artifacts"
click node_vm_tf "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/terraform/vsphere-virtual-machine"
click node_role_tf "https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/terraform/vsphere-role"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_packer,node_linux,node_windows,node_user toneBlue
class node_network,node_storage,node_install,node_ansible,node_scripts toneAmber
class node_vm_tf,node_role_tf toneMint
class node_vsphere_plugin,node_vsphere toneIndigo
class node_artifacts toneTeal
```

## Components

### Image building

- [Packer OS builds](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds): `builds`
- [Linux build definitions](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds/linux): `builds/linux`
- [Windows build definitions](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds/windows): `builds/windows`

### Guest configuration

- [Network templates](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds): `builds`
- [Storage templates](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds): `builds`
- [OS install templates](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/builds): `builds`
- [Ansible roles](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/ansible/roles): `ansible/roles`
- [Guest scripts](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/scripts): `scripts`

### Terraform examples

- [VM provisioning examples](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/terraform/vsphere-virtual-machine): `terraform/vsphere-virtual-machine`
- [vSphere role example](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/terraform/vsphere-role): `terraform/vsphere-role`

### Other components

- **Image builder user**
- **vSphere Packer plugin**
- **VMware vSphere**
- [Built images](https://github.com/codehunter-py/packer-examples-for-vsphere/tree/develop/artifacts): `artifacts`

## Connections

- Image builder user → Packer OS builds: uses examples (evidence: `README.md`)
- Packer OS builds → vSphere Packer plugin: uses builder (evidence: `README.md`)
- vSphere Packer plugin → VMware vSphere: builds images (evidence: `README.md`)
- Packer OS builds → Built images: creates images (evidence: `README.md`)
