Go to file
Renovator Bot 2daa6d7c7d
ci/woodpecker/push/docs Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
chore(deps): update dependency hashicorp/packer-plugin-proxmox to v1.1.8 (#10)
Reviewed-on: #10
Co-authored-by: Renovator Bot <renovator@rknet.org>
Co-committed-by: Renovator Bot <renovator@rknet.org>
2024-05-15 08:28:46 +02:00
.woodpecker fix packer validate 2024-01-17 22:37:44 +01:00
rocky-9 chore(deps): update dependency hashicorp/packer-plugin-proxmox to v1.1.8 (#10) 2024-05-15 08:28:46 +02:00
scripts refactor: rework cloud-init and communicator integration 2022-09-09 10:29:00 +02:00
.dictionary fix: fix defaults for pve 8.x (#4) 2024-01-14 20:58:18 +01:00
.gitignore initial commit 2022-08-06 22:17:14 +02:00
.markdownlint.yml add markdownlint config 2022-08-06 22:27:38 +02:00
LICENSE initial commit 2022-08-06 22:17:14 +02:00
README.md cleanup readme 2024-01-14 21:25:37 +01:00
renovate.json chore: use renovate packer preset 2024-01-17 21:26:18 +01:00

README.md

packer-proxmox

Build Status License: MIT

This repository provides infrastructure-as-code examples to automate the creation of virtual machine images on Proxmox using HashiCorp Packer and the Packer Plugin for Proxmox. All examples are written in the HashiCorp Configuration Language HCL2.

This project is inspired by bitop/packer-templates.

Requirements

Packer:

Required plugins are automatically downloaded during the packer init phase. These plugins are placed in the same directory as your Packer executable /usr/local/bin or $HOME/.packer.d/plugins.

Configuration

Step 1 - Download the release

Download the latest release.

Step 2 - Download the Guest Operating Systems ISOs

  1. Download the required guest operating system ISO images (e.g. Rocky-9.3-x86_64-minimal.iso).
  2. Obtain the checksum type (e.g. sha256, md5, etc.) and checksum value for each guest operating system .iso image. This will be used in the build input variables.
  3. Upload the guest operating system .iso images to your Proxmox server.

Step 3 - Configure the Variables

All available variables are defined in the variables.pkr.hcl files. They can be overwritten using environment variables or in the server.auto.pkrvars.hcl file.

Step 4 - Modify the Configurations and Scripts (Optional)

If required, modify the configuration and scripts files.

Build

Initialize packer and start a build. Packer creates a local HTTP server to provide the kickstart file for the VM. For this to work, the Proxmox server must be able to reach the host IP of the Packer host.

Info: Using the force flag will automatically remove existing templates with a matching name or VMID.

packer init rocky-9/
packer build -force rocky-9/

License

This project is licensed under the MIT License - see the LICENSE file for details.