- Download the ISO using the GUI (tested on https://cloud-images.ubuntu.com/lunar/current/lunar-server-cloudimg-amd64-disk-kvm.img)
- Create the VM via CLI
VMID=<TEMPLATE ID HERE>
STORAGE=<YOUR STORAGE HERE>
qm create $VMID --memory 2048 --balloon 0 --core 2 --name ubuntu-cloud --net0 virtio,bridge=vmbr0
cd /var/lib/vz/template/iso/
qm importdisk 5000 lunar-server-cloudimg-amd64-disk-kvm.img $STORAGE
qm set $VMID --scsihw virtio-scsi-pci --scsi0 ${STORAGE}:vm-$VMID-disk-0,discard=on,ssd=1
qm set $VMID --ide2 ${STORAGE}:cloudinit
qm set $VMID --boot c --bootdisk scsi0
qm set $VMID --serial0 socket --vga serial0
- Expand the VM disk size to a suitable size (suggested 10 GB)
qm resize $VMID scsi0 10G
- Head over to Proxmox UI >
VMID
>Cloud-Init
section and set username, password, ssh keys and ip address configuration as desired. - Create the Cloud-Init template
qm template $VMID
- Deploy new VMs by cloning the template (full clone)