Creating VM templates from raw disk images on Proxmox

Learning new things or building new things requires rapid prototyping. This is a guide on how to create a VM template using a raw image and LVM-Thin storage. We're using an ubuntu cloud image in this.

get https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img
qm create 9000 --memory 17000 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
qm set 9000 --scsi0 local-lvm:0,import-from=/var/lib/vz/images/noble-server-cloudimg-amd64.img
qm set 9000 --ide2 local-lvm:cloudinit
qm set 9000 --boot order=scsi0
qm set 9000 --serial0 socket --vga serial0



qm template 9000
qm clone 9000 8000 --name fk-intel
qm resize 8000 scsi0 +1024G
qm set 8000 --cipassword ubuntu
qm clone 9000 8001 --name omnitool
qm resize 8001 scsi0 +500G
qm set 8001 --cipassword ubuntu #You could also use sshkey if you want to be civilized