Packer - Create Debian Template in Proxmox
In this article, we will see how to build a Debian template in Proxmox using HashiCorp Packer. This process will streamline the creation and deployment of Debian virtual machines, making it easier to maintain consistent environments.
Prerequisites
- Proxmox: Version 7 or higher
- Packer: Version 1 or higher
- ISO : ISO file of the debian 12 or debian 11
Installation Steps
Clone the Repository
git clone https://github.com/RivenLab/packer-proxmox-templates.git
Navigate to the Directory
cd packer-proxmox-templates
Copy Example Variables
cp example-variables.pkrvars.hcl variables.auto.pkrvars.hcl
Edit Variables
Open variables.auto.pkrvars.hcl
and update it to correspond with your current environment.
Add Your Public SSH Key
Place your public SSH key in the cloud.cfg
file under ssh_authorized_keys
:
ssh_authorized_keys:
- ssh-rsa AAAAB3... your_key_comment
Initialize Packer
packer init .
Build the Template
packer build .
Note
- The default user is: dragon.