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.qcow2Create Proxmox VM
- Create a new VM
- General
- name:
DebianTemplate
- name:
- OS
- Select “Do Not Use Any Media”
- System
- Check QEMU Agent Enabled
- Disks
- Delete all disksf
- CPU / Memory
- Leave defaults in place
- General
- Upload the image downloaded in Download the Debian cloud-init image to one of the shares in Proxmox. This can be through the UI.
- Import Debian cloud init image as a disk to the
DebianTemplateVM. - 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 passwordGet public key
cat ~/ssh-automation/automation-key.pub
#Copy to clipboard
#Add under Cloud Init settings in proxmoxSet 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.