How to create your own cloud-like image

Requirement

  • Have access to proxmox by SSH


Special case for fedora, this method doesn’t work.

Create templates

Works with ubuntu and debian.

cd /tmp
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
qm create 10000 --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci --name ubuntu-22.04
qm set 10000 --scsi0 local-lvm:0,import-from=/tmp/jammy-server-cloudimg-amd64.img
qm set 10000 --ide2 local-lvm:cloudinit
qm set 10000 --boot order=scsi0
qm set 10000 --serial0 socket --vga serial0
qm set 10000 --agent enabled=1,freeze-fs-on-backup=1,fstrim_cloned_disks=0,type=virtio
qm template 10000