Add Proxmox compatibility detection and warning
- Created PROXMOX_COMPATIBILITY.md with detailed analysis - Added check_proxmox() function to detect Proxmox VE hosts - Shows warning about potential issues (RAM allocation, kernel params) - Allows user to continue or abort - Updated README.md with Proxmox warning - Recommends running inside VMs instead of on host Key concerns on Proxmox host: - zram reduces RAM available for VMs - tmpfs allocates up to 40% of RAM - Desktop kernel parameters not optimal for hypervisor - Safe to use: inside VMs or monitoring scripts only
This commit is contained in:
@@ -42,6 +42,36 @@ check_root() {
|
||||
fi
|
||||
}
|
||||
|
||||
check_proxmox() {
|
||||
# Detect if running on Proxmox host
|
||||
if [[ -f /etc/pve/.version ]] || [[ -d /etc/pve ]] || pveversion &>/dev/null; then
|
||||
warn "⚠️ Proxmox VE host detected!"
|
||||
echo ""
|
||||
echo "This tool is designed for desktop Linux systems and may not be"
|
||||
echo "suitable for Proxmox hosts. Key concerns:"
|
||||
echo ""
|
||||
echo " 🔴 zram: Reduces RAM available for VMs"
|
||||
echo " 🟡 tmpfs: Allocates significant memory (up to 40%)"
|
||||
echo " 🟡 Kernel params: Tuned for desktop, not hypervisor"
|
||||
echo ""
|
||||
echo "📖 See PROXMOX_COMPATIBILITY.md for detailed analysis"
|
||||
echo ""
|
||||
echo "Recommendations:"
|
||||
echo " ✅ Run inside desktop VMs (fully safe)"
|
||||
echo " ⚠️ Run on Proxmox host (may affect VM performance)"
|
||||
echo " 📊 Monitoring scripts are always safe"
|
||||
echo ""
|
||||
read -p "Continue anyway? (y/N): " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
log "Aborted by user. Consider running inside VMs instead."
|
||||
exit 0
|
||||
fi
|
||||
warn "Proceeding on Proxmox host - monitor VM performance carefully!"
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
analyze_and_prompt() {
|
||||
log "Analyzing current system optimizations..."
|
||||
|
||||
@@ -1290,6 +1320,7 @@ main() {
|
||||
echo ""
|
||||
|
||||
check_root
|
||||
check_proxmox
|
||||
|
||||
# Setup directories
|
||||
mkdir -p "$(dirname "$LOG_FILE")" "$BACKUP_DIR"
|
||||
|
||||
Reference in New Issue
Block a user