From eb3222b3318faec45761f23e800de474ee518b43 Mon Sep 17 00:00:00 2001 From: Joe Passavanti Date: Thu, 3 Apr 2025 08:07:23 -0700 Subject: [PATCH 1/3] Update debian-vm.sh fixes asylumexp/Proxmox#126 --- vm/debian-vm.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index 6abb669b1..13efaef14 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -132,7 +132,7 @@ function pve_check() { } function arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then + if [ "$(dpkg --print-architecture)" != "arm64" ]; then echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" echo -e "Exiting..." @@ -422,7 +422,7 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for the Debian 12 Qcow2 Disk Image" -URL=https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-nocloud-amd64.qcow2 +URL=https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-nocloud-arm64.qcow2 sleep 2 msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL @@ -455,7 +455,7 @@ done msg_info "Creating a Debian 12 VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +pvesm alloc $STORAGE $VMID $DISK0 64M 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ @@ -493,13 +493,13 @@ DESCRIPTION=$( EOF ) qm set "$VMID" -description "$DESCRIPTION" >/dev/null -if [ -n "$DISK_SIZE" ]; then - msg_info "Resizing disk to $DISK_SIZE GB" - qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null -else - msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" - qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null -fi +#if [ -n "$DISK_SIZE" ]; then +# msg_info "Resizing disk to $DISK_SIZE GB" +# qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null +#else +# msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" +# qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null +#fi msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then From e820038018570db27687cfb403b3b657289feacd Mon Sep 17 00:00:00 2001 From: Joe Passavanti Date: Sun, 6 Apr 2025 09:24:37 -0700 Subject: [PATCH 2/3] Update ubuntu2404-vm.sh --- vm/ubuntu2404-vm.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vm/ubuntu2404-vm.sh b/vm/ubuntu2404-vm.sh index acabade15..7f7ce1c1e 100644 --- a/vm/ubuntu2404-vm.sh +++ b/vm/ubuntu2404-vm.sh @@ -132,7 +132,7 @@ function pve_check() { } function arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then + if [ "$(dpkg --print-architecture)" != "arm64" ]; then echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" echo -e "Exiting..." @@ -420,7 +420,7 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for the Ubuntu 24.04 Disk Image" -URL=https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img +URL=https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-arm64.img sleep 2 msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL @@ -453,7 +453,7 @@ done msg_info "Creating a Ubuntu 24.04 VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +pvesm alloc $STORAGE $VMID $DISK0 64M 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ @@ -492,13 +492,13 @@ DESCRIPTION=$( EOF ) qm set "$VMID" -description "$DESCRIPTION" >/dev/null -if [ -n "$DISK_SIZE" ]; then - msg_info "Resizing disk to $DISK_SIZE GB" - qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null -else - msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" - qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null -fi +# if [ -n "$DISK_SIZE" ]; then +# msg_info "Resizing disk to $DISK_SIZE GB" +# qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null +# else +# msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" +# qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null +# fi msg_ok "Created a Ubuntu 24.04 VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then From d23afe92c3d25f925d31d210716dd881cf6c3d0d Mon Sep 17 00:00:00 2001 From: Sam Heinz <54530346+asylumexp@users.noreply.github.com> Date: Tue, 8 Apr 2025 13:48:31 +1000 Subject: [PATCH 3/3] fixup 2410, 2204 --- vm/debian-vm.sh | 15 ++++----------- vm/ubuntu2204-vm.sh | 19 ++++++------------- vm/ubuntu2404-vm.sh | 13 +++---------- vm/ubuntu2410-vm.sh | 12 ++++++------ 4 files changed, 19 insertions(+), 40 deletions(-) diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index 13efaef14..9f4a9d2f0 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -4,7 +4,7 @@ # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/api.func) function header_info { clear @@ -133,8 +133,8 @@ function pve_check() { function arch_check() { if [ "$(dpkg --print-architecture)" != "arm64" ]; then - echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" - echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" + echo -e "\n ${INFO}${YWB}This script only works on PiMox! \n" + echo -e "\n ${YWB}Visit https://github.com/community-scripts/ProxmoxVE for AMD64 support. \n" echo -e "Exiting..." sleep 2 exit @@ -492,14 +492,7 @@ DESCRIPTION=$( EOF ) -qm set "$VMID" -description "$DESCRIPTION" >/dev/null -#if [ -n "$DISK_SIZE" ]; then -# msg_info "Resizing disk to $DISK_SIZE GB" -# qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null -#else -# msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" -# qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null -#fi +qm set "$VMID" -description "$DESCRIPTION" >/dev/null msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then diff --git a/vm/ubuntu2204-vm.sh b/vm/ubuntu2204-vm.sh index 2da417537..803745b2a 100644 --- a/vm/ubuntu2204-vm.sh +++ b/vm/ubuntu2204-vm.sh @@ -4,7 +4,7 @@ # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/api.func) function header_info { clear @@ -131,9 +131,9 @@ function pve_check() { } function arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" - echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" + if [ "$(dpkg --print-architecture)" != "arm64" ]; then + echo -e "\n ${INFO}${YWB}This script only works on PiMox! \n" + echo -e "\n ${YWB}Visit https://github.com/community-scripts/ProxmoxVE for AMD64 support. \n" echo -e "Exiting..." sleep 2 exit @@ -420,7 +420,7 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for the Ubuntu 22.04 Disk Image" -URL=https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img +URL=https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-arm64.img sleep 2 msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL @@ -453,7 +453,7 @@ done msg_info "Creating a Ubuntu 22.04 VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +pvesm alloc $STORAGE $VMID $DISK0 64M 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \ @@ -492,13 +492,6 @@ DESCRIPTION=$( EOF ) qm set "$VMID" -description "$DESCRIPTION" >/dev/null -if [ -n "$DISK_SIZE" ]; then - msg_info "Resizing disk to $DISK_SIZE GB" - qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null -else - msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" - qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null -fi msg_ok "Created a Ubuntu 22.04 VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then diff --git a/vm/ubuntu2404-vm.sh b/vm/ubuntu2404-vm.sh index 7f7ce1c1e..6991eb26c 100644 --- a/vm/ubuntu2404-vm.sh +++ b/vm/ubuntu2404-vm.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/api.func) function header_info { clear @@ -133,8 +133,8 @@ function pve_check() { function arch_check() { if [ "$(dpkg --print-architecture)" != "arm64" ]; then - echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" - echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" + echo -e "\n ${INFO}${YWB}This script only works on PiMox! \n" + echo -e "\n ${YWB}Visit https://github.com/community-scripts/ProxmoxVE for AMD64 support. \n" echo -e "Exiting..." sleep 2 exit @@ -492,13 +492,6 @@ DESCRIPTION=$( EOF ) qm set "$VMID" -description "$DESCRIPTION" >/dev/null -# if [ -n "$DISK_SIZE" ]; then -# msg_info "Resizing disk to $DISK_SIZE GB" -# qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null -# else -# msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" -# qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null -# fi msg_ok "Created a Ubuntu 24.04 VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then diff --git a/vm/ubuntu2410-vm.sh b/vm/ubuntu2410-vm.sh index 69e2f5359..a487a0274 100644 --- a/vm/ubuntu2410-vm.sh +++ b/vm/ubuntu2410-vm.sh @@ -4,7 +4,7 @@ # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/api.func) function header_info { clear @@ -131,9 +131,9 @@ function pve_check() { } function arch_check() { - if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" - echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" + if [ "$(dpkg --print-architecture)" != "arm64" ]; then + echo -e "\n ${INFO}${YWB}This script only works on PiMox! \n" + echo -e "\n ${YWB}Visit https://github.com/community-scripts/ProxmoxVE for AMD64 support. \n" echo -e "Exiting..." sleep 2 exit @@ -420,7 +420,7 @@ fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Retrieving the URL for the Ubuntu 24.10 Disk Image" -URL=https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-amd64.img +URL=https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-arm64.img sleep 2 msg_ok "${CL}${BL}${URL}${CL}" wget -q --show-progress $URL @@ -453,7 +453,7 @@ done msg_info "Creating a Ubuntu 24.10 VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +pvesm alloc $STORAGE $VMID $DISK0 64M 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ -efidisk0 ${DISK0_REF}${FORMAT} \