#!/bin/sh # apt install curl # obviously change this per your needs VMID=9001 STOR=local-lvm VER=20230124-1270 URL_PATH=https://cloud.debian.org/images/cloud/bullseye/$VER/ IMG=debian-11-genericcloud-amd64-$VER.qcow2 curl -L -o $IMG -C - $URL_PATH$IMG # https://pve.proxmox.com/wiki/Cloud-Init_Support # https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines qm create $VMID --cores 4 --cpu cputype=host --memory 4096 --net0 virtio,bridge=vmbr0 --ostype l26 --serial0 socket --vga serial0 qm importdisk $VMID $IMG $STOR qm set $VMID --scsihw virtio-scsi-single --scsi0 $STOR:vm-$VMID-disk-0,discard=on,iothread=true qm set $VMID --ide2 $STOR:cloudinit qm set $VMID --boot c --bootdisk scsi0 qm template $VMID