From b30a9f777503206f90919e94cfb641ea6ee46747 Mon Sep 17 00:00:00 2001 From: behemothuk-hash Date: Mon, 5 May 2025 18:17:49 +0100 Subject: [PATCH 1/2] Update create-ubuntu-cloud-template.sh Fixes proxmox lvm setup deployment --- .../create-ubuntu-cloud-template.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Bash/Proxmox Scripts/create-ubuntu-cloud-template.sh b/Bash/Proxmox Scripts/create-ubuntu-cloud-template.sh index 75d4714..a3d8c88 100644 --- a/Bash/Proxmox Scripts/create-ubuntu-cloud-template.sh +++ b/Bash/Proxmox Scripts/create-ubuntu-cloud-template.sh @@ -29,19 +29,19 @@ BALLOON="768" # Minimum balooning size BIOS="ovmf" # Choose between ovmf or seabios CORES="2" DISK_SIZE="15G" -DISK_STOR="proxmox" # Name of disk storage within Proxmox +DISK_STOR="local-lvm" # Name of disk storage within Proxmox FSTRIM="1" MACHINE="q35" # Type of machine. Q35 or i440fx MEM="2048" # Max RAM -NET_BRIDGE="vmbr1" # Network bridge name +NET_BRIDGE="vmbr0" # Network bridge name TAG="template" OS_TYPE="l26" # OS type (Linux 6x - 2.6 Kernel) # SSH Keys. Unset the variable if you don't want to use this. Use the public key. SSH_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOFLnUCnFyoONBwVMs1Gj4EqERx+Pc81dyhF6IuF26WM proxvms" TZ="Europe/London" -VLAN="50" # Set if you have VLAN requirements -ZFS="true" # Set to true if you have a ZFS datastore +VLAN="" # Set if you have VLAN requirements +ZFS="false" # Set to true if you have a ZFS datastore # Notes variable NOTES=$(cat << 'EOF' @@ -298,9 +298,9 @@ create_vm() { qm set $VMID --efidisk0 $DISK_STOR:0,efitype=4m,,pre-enrolled-keys=1,size=1M else echo "### ZFS set to $ZFS ####" - qm importdisk $VMID $WORK_DIR/$DISK_IMAGE $DISK_STOR -format qcow2 - qm set $VMID --scsihw virtio-scsi-single --scsi0 $DISK_STOR:$VMID/vm-$VMID-disk-0.qcow2,cache=writethrough,discard=on,iothread=1,ssd=1 - qm set $VMID --efidisk0 $DISK_STOR:0,efitype=4m,,format=qcow2,pre-enrolled-keys=1,size=1M + qm importdisk $VMID $WORK_DIR/$DISK_IMAGE $DISK_STOR + qm set $VMID --scsihw virtio-scsi-single --scsi0 $DISK_STOR:vm-$VMID-disk-0,cache=writethrough,discard=on,iothread=1,ssd=1 + qm set $VMID --efidisk0 $DISK_STOR:0,efitype=4m,,format=raw,pre-enrolled-keys=1,size=1M fi qm set $VMID --tags $TAG qm set $VMID --scsi1 $DISK_STOR:cloudinit From 5266121a0e9bf45665841f545c5db55ee10af94f Mon Sep 17 00:00:00 2001 From: behemothuk-hash Date: Mon, 5 May 2025 18:21:30 +0100 Subject: [PATCH 2/2] Update create-ubuntu-cloud-template.sh v2 reset default values --- Bash/Proxmox Scripts/create-ubuntu-cloud-template.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Bash/Proxmox Scripts/create-ubuntu-cloud-template.sh b/Bash/Proxmox Scripts/create-ubuntu-cloud-template.sh index a3d8c88..fb4bec0 100644 --- a/Bash/Proxmox Scripts/create-ubuntu-cloud-template.sh +++ b/Bash/Proxmox Scripts/create-ubuntu-cloud-template.sh @@ -29,19 +29,19 @@ BALLOON="768" # Minimum balooning size BIOS="ovmf" # Choose between ovmf or seabios CORES="2" DISK_SIZE="15G" -DISK_STOR="local-lvm" # Name of disk storage within Proxmox +DISK_STOR="proxmox" # Name of disk storage within Proxmox FSTRIM="1" MACHINE="q35" # Type of machine. Q35 or i440fx MEM="2048" # Max RAM -NET_BRIDGE="vmbr0" # Network bridge name +NET_BRIDGE="vmbr1" # Network bridge name TAG="template" OS_TYPE="l26" # OS type (Linux 6x - 2.6 Kernel) # SSH Keys. Unset the variable if you don't want to use this. Use the public key. SSH_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOFLnUCnFyoONBwVMs1Gj4EqERx+Pc81dyhF6IuF26WM proxvms" TZ="Europe/London" -VLAN="" # Set if you have VLAN requirements -ZFS="false" # Set to true if you have a ZFS datastore +VLAN="50" # Set if you have VLAN requirements +ZFS="true" # Set to true if you have a ZFS datastore # Notes variable NOTES=$(cat << 'EOF'