infra/clusters/vntx/setup-debian-template.sh
2025-09-06 10:55:13 -05:00

40 lines
No EOL
1 KiB
Bash
Executable file

#!/bin/bash
# Script to create Debian 13 cloud-init template on Proxmox
echo "This script will create a Debian 13 (Bookworm) cloud-init template on your Proxmox host"
echo "Run this on your Proxmox host (10.0.0.1 or 10.0.0.2)"
echo
echo "Commands to run:"
echo
cat << 'EOF'
# Download Debian 13 cloud image
wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-13-genericcloud-amd64.qcow2
# Create a new VM
qm create 9000 --name debian13-cloud --memory 2048 --cores 2 --net0 virtio,bridge=vmbr0
# Import the downloaded disk to the VM
qm importdisk 9000 debian-13-genericcloud-amd64.qcow2 local-lvm
# Attach the disk to the VM
qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0
# Set boot disk
qm set 9000 --boot c --bootdisk scsi0
# Add cloud-init drive
qm set 9000 --ide2 local-lvm:cloudinit
# Configure serial console
qm set 9000 --serial0 socket --vga serial0
# Enable QEMU agent
qm set 9000 --agent enabled=1
# Convert to template
qm template 9000
echo "Template created! VM ID 9000 named 'debian13-cloud'"
EOF