Get a shell into the proxmox server. Change VM_STORAGE to the location where to store your clout-init and disk image (e.g. local
, local-zfs
, etc.).
export VM_ID="$VM_ID"
export VM_STORAGE="freenas"
qm create $VM_ID --name "ubuntu-focal-cloudinit" --memory 2048 --cores 2 --net0 virtio,bridge=vmbr0
qm importdisk $VM_ID focal-server-cloudimg-amd64.img $VM_STORAGE
qm set $VM_ID --scsihw virtio-scsi-pci --scsi0 $VM_STORAGE:$VM_ID/vm-$VM_ID-disk-0.raw
qm set $VM_ID --boot c --bootdisk scsi0
qm set $VM_ID --ide2 $VM_STORAGE:cloudinit
qm set $VM_ID --serial0 socket --vga serial0
qm set $VM_ID --agent enabled=1
qm set $VM_ID --ipconfig0 ip=dhcp
qm resize $VM_ID scsi0 32G
qm template $VM_ID