mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-17 00:01:14 +02:00
[arm64] port pve scripts to support arm64
This commit is contained in:
@@ -54,6 +54,11 @@ if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(dpkg --print-architecture 2>/dev/null)" = "arm64" ]; then
|
||||||
|
echo -e "${RD}Intel HW acceleration is only available on x86 (Intel) systems.${CL}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add Intel HW Acceleration" --yesno "This Will Add Intel HW Acceleration to an existing LXC Container. Proceed?" 8 72
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add Intel HW Acceleration" --yesno "This Will Add Intel HW Acceleration to an existing LXC Container. Proceed?" 8 72
|
||||||
NODE=$(hostname)
|
NODE=$(hostname)
|
||||||
PREV_MENU=()
|
PREV_MENU=()
|
||||||
|
|||||||
@@ -139,6 +139,12 @@ if ! command -v pveversion >/dev/null 2>&1; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(dpkg --print-architecture 2>/dev/null)" = "arm64" ]; then
|
||||||
|
header_info
|
||||||
|
msg_error "CPU microcode updates are only available for x86 (Intel/AMD) systems."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Processor Microcode" --yesno "This will check for CPU microcode packages with the option to install. Proceed?" 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Processor Microcode" --yesno "This will check for CPU microcode packages with the option to install. Proceed?" 10 58
|
||||||
|
|
||||||
msg_info "Checking CPU Vendor"
|
msg_info "Checking CPU Vendor"
|
||||||
|
|||||||
@@ -157,6 +157,12 @@ if [ ! -f /etc/proxmox-backup/user.cfg ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(dpkg --print-architecture 2>/dev/null)" = "arm64" ]; then
|
||||||
|
header_info
|
||||||
|
msg_error "CPU microcode updates are only available for x86 (Intel/AMD) systems."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
whiptail --backtitle "Proxmox Backup Server Helper Scripts" \
|
whiptail --backtitle "Proxmox Backup Server Helper Scripts" \
|
||||||
--title "Proxmox Backup Server Processor Microcode" \
|
--title "Proxmox Backup Server Processor Microcode" \
|
||||||
--yesno "This script searches for CPU microcode packages and offers the option to install them.\nProceed?" 10 68
|
--yesno "This script searches for CPU microcode packages and offers the option to install them.\nProceed?" 10 68
|
||||||
|
|||||||
@@ -175,4 +175,10 @@ while true; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$(dpkg --print-architecture 2>/dev/null)" = "arm64" ]; then
|
||||||
|
header_info
|
||||||
|
msg_error "This upgrade script targets the amd64 Proxmox repositories and is not supported on ARM64."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
start_routines
|
start_routines
|
||||||
|
|||||||
@@ -199,4 +199,10 @@ while true; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$(dpkg --print-architecture 2>/dev/null)" = "arm64" ]; then
|
||||||
|
header_info
|
||||||
|
msg_error "This upgrade script targets the amd64 Proxmox repositories and is not supported on ARM64."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
start_routines
|
start_routines
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ require_whiptail() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
arch_is_arm64() { [[ "$(dpkg --print-architecture 2>/dev/null)" == "arm64" ]]; }
|
||||||
|
|
||||||
# ---- main ----
|
# ---- main ----
|
||||||
main() {
|
main() {
|
||||||
header_info
|
header_info
|
||||||
@@ -135,6 +137,12 @@ EOF
|
|||||||
no) msg_error "Selected no to Correcting Debian Sources" ;;
|
no) msg_error "Selected no to Correcting Debian Sources" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if arch_is_arm64; then
|
||||||
|
msg_ok "ARM64 detected - skipping Proxmox repository setup"
|
||||||
|
post_routines_common
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# --- Enterprise repo ---
|
# --- Enterprise repo ---
|
||||||
read -r state file <<<"$(repo_state_list pbs-enterprise)"
|
read -r state file <<<"$(repo_state_list pbs-enterprise)"
|
||||||
case $state in
|
case $state in
|
||||||
@@ -209,6 +217,12 @@ EOF
|
|||||||
no) msg_error "Selected no to Correcting Debian Sources" ;;
|
no) msg_error "Selected no to Correcting Debian Sources" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if arch_is_arm64; then
|
||||||
|
msg_ok "ARM64 detected - skipping Proxmox repository setup"
|
||||||
|
post_routines_common
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# --- Enterprise repo ---
|
# --- Enterprise repo ---
|
||||||
if component_exists_in_sources "pbs-enterprise"; then
|
if component_exists_in_sources "pbs-enterprise"; then
|
||||||
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS Enterprise Repository" --menu \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PBS Enterprise Repository" --menu \
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ if ! dpkg -s proxmox-mailgateway-container >/dev/null 2>&1 &&
|
|||||||
exit 232
|
exit 232
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(dpkg --print-architecture 2>/dev/null)" = "arm64" ]; then
|
||||||
|
msg_error "Proxmox Mail Gateway does not support ARM64."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
repo_state() {
|
repo_state() {
|
||||||
# $1 = repo name (e.g. pmg-enterprise, pmg-no-subscription, pmgtest)
|
# $1 = repo name (e.g. pmg-enterprise, pmg-no-subscription, pmgtest)
|
||||||
local repo="$1"
|
local repo="$1"
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ msg_error() {
|
|||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||||
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "post-pve-install" "pve"
|
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "post-pve-install" "pve"
|
||||||
|
|
||||||
|
arch_is_arm64() { [[ "$(dpkg --print-architecture 2>/dev/null)" == "arm64" ]]; }
|
||||||
|
|
||||||
get_pve_version() {
|
get_pve_version() {
|
||||||
local pve_ver
|
local pve_ver
|
||||||
pve_ver="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
|
pve_ver="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
|
||||||
@@ -125,6 +127,12 @@ EOF
|
|||||||
no) msg_error "Selected no to Correcting Proxmox VE Sources" ;;
|
no) msg_error "Selected no to Correcting Proxmox VE Sources" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if arch_is_arm64; then
|
||||||
|
msg_ok "ARM64 detected - skipping Proxmox repository setup"
|
||||||
|
post_routines_common
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \
|
||||||
"yes" " " \
|
"yes" " " \
|
||||||
"no" " " 3>&2 2>&1 1>&3)
|
"no" " " 3>&2 2>&1 1>&3)
|
||||||
@@ -282,6 +290,12 @@ EOF
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if arch_is_arm64; then
|
||||||
|
msg_ok "ARM64 detected - skipping Proxmox repository setup"
|
||||||
|
post_routines_common
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# ---- PVE-ENTERPRISE ----
|
# ---- PVE-ENTERPRISE ----
|
||||||
if component_exists_in_sources "pve-enterprise"; then
|
if component_exists_in_sources "pve-enterprise"; then
|
||||||
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
|
||||||
|
|||||||
@@ -131,6 +131,12 @@ if ! command -v pveversion >/dev/null 2>&1; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(dpkg --print-architecture 2>/dev/null)" = "arm64" ]; then
|
||||||
|
header_info
|
||||||
|
msg_error "This upgrade script targets the amd64 Proxmox VE repositories and is not supported on ARM64."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if ! pveversion | grep -Eq "pve-manager/(7\.4-(16|17|18|19))"; then
|
if ! pveversion | grep -Eq "pve-manager/(7\.4-(16|17|18|19))"; then
|
||||||
header_info
|
header_info
|
||||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||||
|
|||||||
Reference in New Issue
Block a user