Compare commits

..

3 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
b07841104f Update Debian VM script to use architecture variable (arm64 support) 2026-09-17 14:02:28 +02:00
CanbiZ (MickLesk)
b42a9a7617 remove deprecated debian 13 vm 2026-09-17 14:00:57 +02:00
CanbiZ (MickLesk)
bc5194a81b Debian-VM: Refactor | Support Debian 11, 12, 13 2026-09-17 13:58:48 +02:00
6 changed files with 2 additions and 422 deletions

View File

@@ -545,11 +545,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-09-17
### 🆕 New Scripts
- Alpine-VM ([#17324](https://github.com/community-scripts/ProxmoxVE/pull/17324))
- Allstarlink ([#17321](https://github.com/community-scripts/ProxmoxVE/pull/17321))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
@@ -557,10 +552,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- sparkyfitness: run the Better Auth migration during the update [@MickLesk](https://github.com/MickLesk) ([#17318](https://github.com/community-scripts/ProxmoxVE/pull/17318))
- poznote: follow init.sh into docker/ [@MickLesk](https://github.com/MickLesk) ([#17316](https://github.com/community-scripts/ProxmoxVE/pull/17316))
- #### ✨ New Features
- Debian-VM: Refactor | Support Debian 11, 12, 13 [@MickLesk](https://github.com/MickLesk) ([#17325](https://github.com/community-scripts/ProxmoxVE/pull/17325))
### 💾 Core
- Ask before replacing a cached image that no longer matches [@MickLesk](https://github.com/MickLesk) ([core#44](https://github.com/community-scripts/core/pull/44))

View File

@@ -32,18 +32,7 @@ function update_script() {
exit
fi
ensure_dependencies libjpeg-dev poppler-utils file locales
msg_info "Generating Locales"
for l in cs_CZ de_DE en_GB en_US es_ES fr_FR id_ID it_IT ja_JP ko_KR \
pl_PL pt_BR ru_RU tr_TR uk_UA zh_CN zh_TW; do
sed -i "s/^# *${l}.UTF-8 UTF-8/${l}.UTF-8 UTF-8/" /etc/locale.gen
done
$STD locale-gen
if ! grep -q "^LC_ALL=" /opt/changedetection/.env 2>/dev/null; then
echo "LC_ALL=en_US.UTF-8" >>/opt/changedetection/.env
fi
msg_ok "Generated Locales"
ensure_dependencies libjpeg-dev
NODE_VERSION="24" setup_nodejs

View File

@@ -38,20 +38,9 @@ $STD apt-get install -y \
qpdf \
xdg-utils \
xvfb \
ca-certificates \
locales \
poppler-utils \
file
ca-certificates
msg_ok "Installed Dependencies"
msg_info "Generating Locales"
for l in cs_CZ de_DE en_GB en_US es_ES fr_FR id_ID it_IT ja_JP ko_KR \
pl_PL pt_BR ru_RU tr_TR uk_UA zh_CN zh_TW; do
sed -i "s/^# *${l}.UTF-8 UTF-8/${l}.UTF-8 UTF-8/" /etc/locale.gen
done
$STD locale-gen
msg_ok "Generated Locales"
PYTHON_VERSION="3.13" setup_uv
NODE_VERSION="24" setup_nodejs
@@ -65,7 +54,6 @@ $STD /opt/changedetection/.venv/bin/python -m pip install changedetection.io
cat <<EOF >/opt/changedetection/.env
WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch=eyJkZWZhdWx0Vmlld3BvcnQiOnsiaGVpZ2h0Ijo3MjAsIndpZHRoIjoxMjgwfSwiaGVhZGxlc3MiOmZhbHNlLCJzdGVhbHRoIjp0cnVlfQ==&blockAds=true
LC_ALL=en_US.UTF-8
EOF
msg_ok "Installed Change Detection"

View File

@@ -1,203 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Don Locke (DonLocke) | MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/AllStarLink
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}"
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/pve/vm-core.func")
load_functions
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
NEXTID=$(pvesh get /cluster/nextid)
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)"
METHOD=""
APP="AllStarLink"
APP_TYPE="vm"
NSAPP="allstarlink-vm"
var_os="debian"
var_version="13"
DISK_SIZE="8G"
HA=$(echo "\033[1;34m")
THIN="discard=on,ssd=1,"
header_info
echo -e "\n Loading..."
set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
TEMP_DIR=$(mktemp -d)
pushd $TEMP_DIR >/dev/null
if [[ "${VM_UNATTENDED:-0}" == "1" ]]; then
var_version="${VM_OS_VERSION:-$var_version}"
elif vm_dialog radiolist "DEBIAN BASE" "Choose the Debian release AllStarLink runs on" --cancel-button Exit-Script 11 60 2 \
"13" "Debian 13 (Trixie)" ON \
"12" "Debian 12 (Bookworm)" OFF; then
var_version="$VM_DIALOG_RESULT"
else
exit_script
fi
case "$var_version" in
13) DEBIAN_CODENAME="trixie" ;;
12) DEBIAN_CODENAME="bookworm" ;;
*)
msg_error "AllStarLink only publishes packages for Debian 12 and 13 (got '${var_version}')"
exit 1
;;
esac
function default_settings() {
vm_apply_machine_type "i440fx"
VMID="$NEXTID"
DISK_CACHE=""
HN="allstarlink"
CPU_TYPE=""
CORE_COUNT="2"
RAM_SIZE="2048"
BRG="vmbr0"
MAC="$GEN_MAC"
VLAN=""
MTU=""
START_VM="yes"
METHOD="default"
vm_echo_default_settings
}
function advanced_settings() {
METHOD="advanced"
vm_prompt_vmid "${VMID:-$(get_valid_nextid)}"
vm_prompt_machine_type "i440fx"
vm_prompt_disk_size "8G"
vm_prompt_disk_cache "none"
vm_prompt_hostname "allstarlink"
vm_prompt_cpu_model "kvm64"
vm_prompt_cpu_cores "2"
vm_prompt_ram "2048"
vm_prompt_bridge "vmbr0"
vm_prompt_mac "$GEN_MAC"
vm_prompt_vlan
vm_prompt_mtu
vm_prompt_verbose "no"
vm_prompt_start_vm "yes"
if vm_confirm_advanced_settings "Ready to create a AllStarLink VM?"; then
echo -e "${CREATING}${BOLD}${DGN}Creating a AllStarLink VM using the above advanced settings${CL}"
else
header_info
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
advanced_settings
fi
}
vm_preflight
vm_start_script "Use Default Settings?" 10 58
post_to_api_vm
vm_select_storage "$HN"
msg_info "Retrieving the URL for the Debian ${var_version} Qcow2 Disk Image"
URL="https://cloud.debian.org/images/cloud/${DEBIAN_CODENAME}/latest/debian-${var_version}-nocloud-$(dpkg --print-architecture).qcow2"
sleep 2
msg_ok "${CL}${BL}${URL}${CL}"
CACHE_FILE="$(vm_image_cache_path "$URL")"
vm_fetch_image "$URL" "$CACHE_FILE" --cache --min-bytes $((100 * 1024 * 1024)) || exit 115
FILE="$(basename "$CACHE_FILE")"
# Work on a copy: the expand and virt-customize steps below rewrite the image,
# which would poison the cache for every later VM.
cp -f "$CACHE_FILE" "$FILE"
# qm resize only grows the block device. Without cloud-init nothing grows the
# guest partition, so expand it offline first.
if [ "${CLOUD_INIT:-no}" != "yes" ]; then
msg_info "Expanding the root filesystem to ${DISK_SIZE}"
vm_expand_image "$FILE" "$DISK_SIZE" || true
fi
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
case $STORAGE_TYPE in
nfs | dir)
DISK_EXT=".qcow2"
DISK_REF="$VMID/"
DISK_IMPORT="-format qcow2"
THIN=""
;;
btrfs)
DISK_EXT=".raw"
DISK_REF="$VMID/"
DISK_IMPORT="-format raw"
FORMAT=",efitype=4m"
THIN=""
;;
esac
for i in {0,1}; do
disk="DISK$i"
eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-}
eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk}
done
msg_info "Installing Pre-Requisite libguestfs-tools onto Host"
$STD apt-get update
$STD apt-get install -y libguestfs-tools lsb-release
msg_ok "Installed libguestfs-tools successfully"
msg_info "Adding ASL Package Repository"
virt-customize -q -a "${FILE}" \
--run-command "curl -fsSL https://repo.allstarlink.org/public/asl-apt-repos.deb${var_version}_all.deb -o /tmp/asl-apt-repos.deb${var_version}_all.deb" \
--run-command "dpkg -i /tmp/asl-apt-repos.deb${var_version}_all.deb" \
--update \
--run-command "rm -f /tmp/asl-apt-repos.deb${var_version}_all.deb" >/dev/null
msg_ok "Added ASL Package Repository"
msg_info "Installing AllStarLink (patience)"
virt-customize -q -a "${FILE}" \
--install asl3 \
--run-command "sed -i \"/secret /s/= .*/= $(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)/\" /etc/asterisk/manager.conf" >/dev/null
msg_ok "Installed AllStarLink"
vm_prepare_cloud_image "$FILE" "$HN" || true
if [[ "${VM_UNATTENDED:-0}" == "1" ]]; then
ADD_ALLMON3="${VM_ALLMON3:-no}"
elif vm_dialog yesno "SETTINGS" "Would you like to add Allmon3?" 10 58; then
ADD_ALLMON3="yes"
else
ADD_ALLMON3="no"
fi
if [[ "$ADD_ALLMON3" == "yes" ]]; then
msg_info "Installing Allmon3"
virt-customize -q -a "${FILE}" \
--install allmon3 \
--run-command "sed -i \"s/;pass=.*/;pass=\$(sed -ne 's/^secret = //p' /etc/asterisk/manager.conf)/\" /etc/allmon3/allmon3.ini" >/dev/null
msg_ok "Installed Allmon3"
fi
msg_info "Creating a AllStarLink 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,debian${var_version},radio -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
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
qm set $VMID \
-efidisk0 ${DISK0_REF}${FORMAT} \
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \
-boot order=scsi0 \
-serial0 socket >/dev/null
vm_resize_disk
qm set $VMID --agent enabled=1 >/dev/null
set_description
msg_ok "Created a AllStarLink VM ${CL}${BL}(${HN})"
if [ "$START_VM" == "yes" ]; then
msg_info "Starting AllStarLink VM"
$STD qm start $VMID
msg_ok "Started AllStarLink VM"
fi
post_update_to_api "done" "none"
msg_ok "Completed successfully!\n"

View File

@@ -1,179 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://alpinelinux.org/cloud/
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}"
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/pve/vm-core.func")
load_functions
APP="Alpine"
APP_TYPE="vm"
NSAPP="alpine-vm"
var_os="alpine"
var_version=" "
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)"
METHOD=""
THIN="discard=on,ssd=1,"
header_info
echo -e "\n Loading..."
set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT
trap 'post_update_to_api "failed" "130"' SIGINT
trap 'post_update_to_api "failed" "143"' SIGTERM
trap 'post_update_to_api "failed" "129"; exit 129' SIGHUP
TEMP_DIR=$(mktemp -d)
pushd "$TEMP_DIR" >/dev/null
vm_preflight
function default_settings() {
VMID=$(get_valid_nextid)
vm_apply_machine_type "q35"
DISK_SIZE="8G"
DISK_CACHE=""
HN="alpine"
CPU_TYPE=" -cpu host"
CORE_COUNT="2"
RAM_SIZE="1024"
BRG="vmbr0"
MAC="$GEN_MAC"
VLAN=""
MTU=""
START_VM="yes"
METHOD="default"
USE_CLOUD_INIT="yes"
vm_echo_default_settings
}
function advanced_settings() {
METHOD="advanced"
vm_prompt_vmid "${VMID:-$(get_valid_nextid)}"
vm_prompt_machine_type "q35"
vm_prompt_disk_size "8G" "Set Disk Size in GiB"
vm_prompt_disk_cache "none"
vm_prompt_hostname "alpine"
vm_prompt_cpu_model "host"
vm_prompt_cpu_cores "2"
vm_prompt_ram "1024"
vm_prompt_bridge "vmbr0"
vm_prompt_mac "$GEN_MAC"
vm_prompt_vlan
vm_prompt_mtu
vm_prompt_cloud_init "alpine"
vm_prompt_verbose "no"
vm_prompt_start_vm "yes"
if vm_confirm_advanced_settings "Ready to create an Alpine VM?"; then
echo -e "${CREATING}${BOLD}${DGN}Creating an Alpine VM using the above advanced settings${CL}"
else
header_info
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
advanced_settings
fi
}
vm_start_script "Use Default Settings?\n\nDefaults:\n• 2 CPU Cores\n• 1 GB RAM\n• 8 GB Disk\n• Cloud-Init enabled" 14 58
post_to_api_vm
vm_select_storage "$HN"
if ! command -v virt-customize &>/dev/null; then
msg_info "Installing libguestfs-tools"
$STD apt-get update
$STD apt-get install -y libguestfs-tools
msg_ok "Installed libguestfs-tools"
fi
msg_info "Retrieving the URL for the Alpine cloud image"
# Alpine publishes a bios and a uefi variant side by side. This script boots
# through OVMF, so picking the bios image would produce a VM that never starts.
# The release number and the -r revision both live in the filename, so the
# directory has to be listed rather than guessed.
CLOUD_DIR="https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/cloud"
FILE=$(curl -fsSL "${CLOUD_DIR}/" 2>/dev/null | grep -oP 'href="\Kgeneric_alpine-[0-9.]+-x86_64-uefi-cloudinit-r[0-9]+\.qcow2(?=")' | sort -V | tail -1)
if [[ -z "$FILE" ]]; then
msg_error "Could not determine the current Alpine cloud image"
exit 1
fi
ALPINE_VERSION=$(echo "$FILE" | grep -oP 'generic_alpine-\K[0-9.]+')
msg_ok "Alpine ${CL}${BL}${ALPINE_VERSION}${CL} ${GN}(${FILE})"
URL="${CLOUD_DIR}/${FILE}"
CACHE_FILE="$(vm_image_cache_path "$URL")"
vm_fetch_image "$URL" "$CACHE_FILE" --cache --min-bytes $((5 * 1024 * 1024)) || exit 115
msg_info "Customizing ${FILE}"
WORK_FILE=$(mktemp --suffix=.qcow2)
cp "$CACHE_FILE" "$WORK_FILE"
popd >/dev/null
rm -rf "$TEMP_DIR"
# No systemctl and no SELinux here: Alpine runs OpenRC, and the cloud image
# already wires up the serial console through /etc/inittab.
vm_prepare_cloud_image "$WORK_FILE" "$HN" || true
msg_ok "Customized image"
STORAGE_TYPE=$(pvesm status -storage "$STORAGE" | awk 'NR>1 {print $2}')
vm_apply_storage_layout "$STORAGE_TYPE"
vm_define_disk_references 3
if [[ "$DISK_IMPORT_FORMAT" == "raw" ]]; then
msg_info "Converting image to raw format"
RAW_FILE=$(mktemp --suffix=.raw)
qemu-img convert -f qcow2 -O raw "$WORK_FILE" "$RAW_FILE"
rm -f "$WORK_FILE"
WORK_FILE="$RAW_FILE"
msg_ok "Converted image to raw format"
fi
msg_info "Creating an Alpine 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" "$DISK2" 4M 1>&/dev/null
qm importdisk "$VMID" "$WORK_FILE" "$STORAGE" -format "$DISK_IMPORT_FORMAT" 1>&/dev/null
qm set "$VMID" \
-efidisk0 "${DISK0_REF}${FORMAT:-}" \
-scsi0 "${DISK1_REF}",${DISK_CACHE}${THIN}size="${DISK_SIZE}" \
-tpmstate0 "${DISK2_REF}",version=v2.0 \
-boot order=scsi0 \
-serial0 socket >/dev/null
set_description
rm -f "$WORK_FILE"
msg_ok "Created an Alpine VM ${CL}${BL}(${HN})"
vm_resize_disk
vm_provision "$VMID" || true
if [ "$START_VM" == "yes" ]; then
msg_info "Starting Alpine VM"
$STD qm start "$VMID"
msg_ok "Started Alpine VM"
fi
post_update_to_api "done" "none"
echo -e "\n${INFO}${BOLD}${GN}Alpine VM Configuration Summary:${CL}"
echo -e "${TAB}${DGN}VM ID: ${BGN}${VMID}${CL}"
echo -e "${TAB}${DGN}Hostname: ${BGN}${HN}${CL}"
echo -e "${TAB}${DGN}Release: ${BGN}Alpine ${ALPINE_VERSION}${CL}"
if [ -n "${CLOUDINIT_CRED_FILE:-}" ]; then
echo -e "${TAB}${DGN}Cloud-Init credentials: ${BGN}${CLOUDINIT_CRED_FILE}${CL}"
fi
echo -e "\n${INFO}${BOLD}${YW}Note:${CL}"
echo -e "${TAB}Alpine uses apk and OpenRC, not apt and systemd."
echo -e "${TAB}Enable a service with ${BL}rc-update add <service> default${CL}."
msg_ok "Completed successfully!\n"

View File

@@ -1,6 +0,0 @@
___ _________ __ __ _ __
/ | / / / ___// /_____ ______/ / (_)___ / /__
/ /| | / / /\__ \/ __/ __ `/ ___/ / / / __ \/ //_/
/ ___ |/ / /___/ / /_/ /_/ / / / /___/ / / / / ,<
/_/ |_/_/_//____/\__/\__,_/_/ /_____/_/_/ /_/_/|_|