Skip to content

Packer VMs on Proxmox

Packer image building process for [[Proxmox]]

Packer Setup can be done in different ways:

Option 1 - Manual Cloud Image

This process is based on the heise article Wie Sie mit Terraform und Proxmox Testumgebungen erzeugen and also shows how this template can be leveraged by [[Terraform]].

Option 2.1 - Packer with Standard Image

Based on Ubuntu Server 22.04 image with Packer and Subiquity for Proxmox and its Github Repo. Since the boot_command was not working, some ideas were also taken from Create Proxmox Template With Packer.

Option 2.2 - Packer with Standard Image, Cloud-Init enabled

Based on Create Proxmox Template With Packer. This approach seems to be more modern since it is using hcl but the overall setup is also more complex that 2.1 (but also more flexible?).

Follow-up to deploy VMs with [[Terraform]]: Deploying VMs With Terraform In Proxmox

Option 3 - Packer with Cloud Image

Based on Create Proxmox cloud-init templates for use with Packer and this gist.

Current issue: script fails, cannot add qemu-guest-agent on Proxmox server (but it works on a linux VM). Maybe a Proxmox host firewall setting?

Resources

Packer Plugin "Proxmox Builder"

Cloud Images templates for Proxmox PVE via packer

Automating my Homelab - Part 2 - Provisioning with Terraform