Download the Debian cloud-init image

# Download the qcow2 compressed disk image for the genericcloud for amd64
# Generic cloud is missing a number of specialized drivers that you shouldn't
# need for a virtualized insall
wget https://cloud.debian.org/images/cloud/trixie/20251117-2299/debian-13-genericcloud-amd64-20251117-2299.qcow2

Create Proxmox VM

  1. Create a new VM
    1. General
      1. name: DebianTemplate
    2. OS
      1. Select “Do Not Use Any Media”
    3. System
      1. Check QEMU Agent Enabled
    4. Disks
      1. Delete all disksf
    5. CPU / Memory
      1. Leave defaults in place
  2. Upload the image downloaded in Download the Debian cloud-init image to one of the shares in Proxmox. This can be through the UI.
  3. Import Debian cloud init image as a disk to the DebianTemplate VM.
  4. On the hardware tab for the VM, add a cloud init drive.

Create private key for automation

mkdir ssh-automation
ssh-keygen -f ~/ssh-automation/automation-key
# Follow prompts for adding password

Get public key

cat ~/ssh-automation/automation-key.pub
#Copy to clipboard
#Add under Cloud Init settings in proxmox

Set initial cloud-init Settings on the VM

For me, this is setting a username and password as well as supplying the public generated Above. I’ve also set the VM to use DHCP. Everything else, I’m planning to add through Ansible after provisioning using the key.

Change boot device order

Make sure the first boot device is your iscsi drive where you mounted the cloud-init image

Convert to template

After the above configuration is done, convert the VM to a template for cloning at a later date.