From 815d25269fbd2c8010b9f7297351ec54d3949531 Mon Sep 17 00:00:00 2001 From: Adora Laura Kalb Date: Tue, 10 Dec 2024 08:36:43 +0100 Subject: [PATCH] update variables --- proxmox/create-debian-template.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/proxmox/create-debian-template.sh b/proxmox/create-debian-template.sh index 592cdd5..cf957ce 100755 --- a/proxmox/create-debian-template.sh +++ b/proxmox/create-debian-template.sh @@ -1,23 +1,26 @@ #!/bin/bash set -x -vmid=9001 + +vmId=9001 +pveStorage="local-lvm" +vmName="debian-12-${timestamp}.template.net" timestamp=$(date '+%Y-%m-%d-%H-%M') -vmname=debian-12-$timestamp.template.net +################## wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2 -O debian-genericcloud-amd64.qcow2 -qm destroy ${vmid} +qm destroy ${vmId} -qm create ${vmid} --cores 2 --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci --name $vmname +qm create ${vmId} --cores 2 --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci --name "${vmName}" -qm set ${vmid} --scsi0 pve:0,import-from=/root/debian-genericcloud-amd64.qcow2 -qm set ${vmid} --ide2 pve:cloudinit -qm set ${vmid} --boot order=scsi0 -qm set ${vmid} --agent enabled=1 -qm set ${vmid} --ostype l26 -qm set ${vmid} --serial0 socket --vga serial0 -qm resize ${vmid} scsi0 +6G +qm set ${vmId} --scsi0 ${pveStorage}:0,import-from=/root/debian-genericcloud-amd64.qcow2 +qm set ${vmId} --ide2 ${pveStorage}:cloudinit +qm set ${vmId} --boot order=scsi0 +qm set ${vmId} --agent enabled=1 +qm set ${vmId} --ostype l26 +qm set ${vmId} --serial0 socket --vga serial0 +qm resize ${vmId} scsi0 +6G -qm template ${vmid} +qm template ${vmId} rm debian-genericcloud-amd64.qcow2 set +x