Skip to content

Instantly share code, notes, and snippets.

@siddolo
Last active August 27, 2025 07:28
Show Gist options
  • Save siddolo/0ba832d4a74e6e2a620fc66c701c4824 to your computer and use it in GitHub Desktop.
Save siddolo/0ba832d4a74e6e2a620fc66c701c4824 to your computer and use it in GitHub Desktop.
Ubuntu 24.04 VM Template for Proxmox with CloudInit

Ubuntu 24.04 VM Template for Proxmox with CloudInit

wget -q https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img

# Feel free to change the 32G to whatever you want as root disk size
qemu-img resize noble-server-cloudimg-amd64.img 32

# VGA can be serial, qxl or virtio, do not specify --vga for default
qm create 9001 --name "template.ubuntu-server-2404-cloudinit" --ostype l26 \
    --memory 1024 \
    --agent 1 \
    --bios ovmf --machine q35 --efidisk0 fast-zfs:0,pre-enrolled-keys=0 \
    --cpu host --socket 1 --cores 1 \
    --vga serial0 --serial0 socket  \
    --net0 virtio,bridge=vmbr0
    
qm importdisk 9001 noble-server-cloudimg-amd64.img local-zfs
qm set 9001 --scsihw virtio-scsi-pci --virtio0 fast-zfs:vm-9001-disk-1,discard=on
qm set 9001 --boot order=virtio0
qm set 9001 --scsi1 local-zfs:cloudinit

qm template 9001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment