Refactor GPU passthrough and device config handling

Switches device configuration to use pct set format for GPU passthrough, simplifying config and improving GUI visibility. Updates GID handling logic for devices, streamlines fix_gpu_gids function, and improves container creation logging and API reporting. Removes commented-out MOTD/SSH debug setup from build copy.func.
This commit is contained in:
CanbiZ
2025-11-24 10:11:13 +01:00
parent 8740271cd9
commit 532fa094f3
2 changed files with 26 additions and 89 deletions

View File

@@ -2830,18 +2830,6 @@ EOF'
echo -e "${BFR}${CM}${GN}Container ${CTID} removed${CL}"
elif [[ "$response" =~ ^[Nn]$ ]]; then
echo -e "\n${TAB}${YW}Container ${CTID} kept for debugging${CL}"
# Dev mode: Setup MOTD/SSH for debugging access to broken container
# if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then
# echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}"
# if pct exec "$CTID" -- bash -c "
# source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func)
# declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true
# " >/dev/null 2>&1; then
# local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1)
# echo -e "${BFR}${CM}${GN}MOTD/SSH ready - SSH into container: ssh root@${ct_ip}${CL}"
# fi
# fi
fi
else
# Timeout - auto-remove