From ef45257c05f1a943318dbcb9d1d60184f6052cdc Mon Sep 17 00:00:00 2001
From: MacRimi
Date: Sat, 1 Mar 2025 18:07:08 +0100
Subject: [PATCH] update
---
.../docs/post-install/basic-settings/page.tsx | 94 +++++-----
.../docs/post-install/virtualization/page.tsx | 162 +++++++++++++++++-
2 files changed, 214 insertions(+), 42 deletions(-)
diff --git a/web/app/docs/post-install/basic-settings/page.tsx b/web/app/docs/post-install/basic-settings/page.tsx
index 0450bd9..77c7750 100644
--- a/web/app/docs/post-install/basic-settings/page.tsx
+++ b/web/app/docs/post-install/basic-settings/page.tsx
@@ -5,7 +5,28 @@ export const metadata: Metadata = {
title: "ProxMenux Post-Install: Basic Settings",
description:
"Detailed guide to the Basic Settings category in the ProxMenux post-install script for Proxmox VE optimization.",
- // ... (rest of the metadata remains the same)
+ openGraph: {
+ title: "ProxMenux Post-Install: Basic Settings",
+ description:
+ "Detailed guide to the Basic Settings category in the ProxMenux post-install script for Proxmox VE optimization.",
+ type: "article",
+ url: "https://macrimi.github.io/ProxMenux/docs/post-install/basic-settings",
+ images: [
+ {
+ url: "https://macrimi.github.io/ProxMenux/basic-settings-image.png",
+ width: 1200,
+ height: 630,
+ alt: "ProxMenux Post-Install Basic Settings",
+ },
+ ],
+ },
+ twitter: {
+ card: "summary_large_image",
+ title: "ProxMenux Post-Install: Basic Settings",
+ description:
+ "Detailed guide to the Basic Settings category in the ProxMenux post-install script for Proxmox VE optimization.",
+ images: ["https://macrimi.github.io/ProxMenux/basic-settings-image.png"],
+ },
}
export default function BasicSettingsPage() {
@@ -26,7 +47,7 @@ echo 'Acquire::Languages "none";' | sudo tee /etc/apt/apt.conf.d/99-disable-tran
IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
TIMEZONE=$(curl -s "https://ipapi.co/$IP/timezone")
sudo timedatectl set-timezone "$TIMEZONE"
-`
+ `
const updateUpgradeCode = `
# Disable enterprise repos
@@ -66,13 +87,12 @@ sudo apt-get install -y zfsutils-linux proxmox-backup-restore-image chrony
This optimization installs a set of common system utilities that are useful for system administration and
troubleshooting.
- What it does:
-
- - Installs packages like curl, htop, iftop, nano, vim, and more
- - Checks which packages are already installed to avoid unnecessary installations
- - Provides a progress bar during the installation process
-
- Manual commands:
+
+ Why it's beneficial: Having these utilities pre-installed saves time when managing your
+ Proxmox VE system. They provide essential tools for monitoring system performance, managing files, and
+ troubleshooting issues, enhancing your ability to maintain and optimize your virtualization environment.
+
+ To apply this optimization manually, you would run:
{installUtilitiesCode}
@@ -84,11 +104,12 @@ sudo apt-get install -y zfsutils-linux proxmox-backup-restore-image chrony
This optimization configures APT to skip downloading additional language packages, which can save disk space
and speed up package operations.
- What it does:
-
- - Creates or modifies the APT configuration file to skip language downloads
-
- Manual commands:
+
+ Why it's beneficial: By skipping unnecessary language packages, you can reduce disk usage and
+ improve the speed of package management operations. This is particularly useful in server environments where
+ multiple language support is often not required.
+
+ To apply this optimization manually, you would run:
{skipLanguagesCode}
@@ -99,12 +120,12 @@ sudo apt-get install -y zfsutils-linux proxmox-backup-restore-image chrony
This optimization configures the system to automatically synchronize its time, ensuring accurate timekeeping.
- What it does:
-
- - Attempts to set the timezone automatically based on the system's IP address
- - Enables automatic time synchronization using systemd's timesyncd
-
- Manual commands:
+
+ Why it's beneficial: Accurate timekeeping is crucial for many system operations, log
+ consistency, and proper functioning of time-sensitive applications. Automatic synchronization ensures your
+ Proxmox VE system maintains the correct time without manual intervention.
+
+ To apply this optimization manually, you would run:
{timeSyncCode}
@@ -116,30 +137,25 @@ sudo apt-get install -y zfsutils-linux proxmox-backup-restore-image chrony
This optimization updates the system's package lists, upgrades installed packages, and configures Proxmox
repositories.
- What it does:
-
- - Disables enterprise Proxmox repositories
- - Enables free public Proxmox repository
- - Configures main Debian repositories
- - Updates package lists and performs a system upgrade
- - Updates PVE application manager
- - Installs additional Proxmox packages
-
- Manual commands:
+
+ Why it's beneficial: Keeping your system up-to-date is essential for security, stability, and
+ performance. This optimization ensures you have the latest patches and features, while also configuring the
+ correct repositories for Proxmox VE, enabling access to necessary updates and tools.
+
+ To apply this optimization manually, you would run:
{updateUpgradeCode}
- Usage
-
- When running the customizable_post_install.sh script, you'll be prompted to choose which Basic Settings
- optimizations to apply. You can select all or pick specific ones based on your needs.
-
-
- For detailed information on each optimization and its impact, refer to the script comments or consult the
- ProxMenux documentation.
-
+
+ Automatic Application
+
+ All of these optimizations are automatically applied when selected in the Basic Settings section of the
+ customizable_post_install.sh script. This automation ensures that these beneficial settings are applied
+ consistently and correctly.
+
+
)
}
diff --git a/web/app/docs/post-install/virtualization/page.tsx b/web/app/docs/post-install/virtualization/page.tsx
index d49a52c..d72ba6c 100644
--- a/web/app/docs/post-install/virtualization/page.tsx
+++ b/web/app/docs/post-install/virtualization/page.tsx
@@ -4,18 +4,174 @@ import { Box } from "lucide-react"
export const metadata: Metadata = {
title: "ProxMenux Post-Install: Virtualization Settings",
description:
- "In-depth guide to Virtualization Settings in the ProxMenux post-install script for optimizing Proxmox VE virtualization capabilities.",
- // ... (rest of the metadata remains the same)
+ "Detailed guide to the Virtualization Settings category in the ProxMenux post-install script for Proxmox VE optimization.",
+ openGraph: {
+ title: "ProxMenux Post-Install: Virtualization Settings",
+ description:
+ "Detailed guide to the Virtualization Settings category in the ProxMenux post-install script for Proxmox VE optimization.",
+ type: "article",
+ url: "https://macrimi.github.io/ProxMenux/docs/post-install/virtualization",
+ images: [
+ {
+ url: "https://macrimi.github.io/ProxMenux/virtualization-settings-image.png",
+ width: 1200,
+ height: 630,
+ alt: "ProxMenux Post-Install Virtualization Settings",
+ },
+ ],
+ },
+ twitter: {
+ card: "summary_large_image",
+ title: "ProxMenux Post-Install: Virtualization Settings",
+ description:
+ "Detailed guide to the Virtualization Settings category in the ProxMenux post-install script for Proxmox VE optimization.",
+ images: ["https://macrimi.github.io/ProxMenux/virtualization-settings-image.png"],
+ },
}
export default function VirtualizationSettingsPage() {
+ const enableVfioIommuCode = `
+# Enable IOMMU for Intel or AMD CPU
+# For Intel:
+sed -i '/GRUB_CMDLINE_LINUX_DEFAULT=/ s/"$/ intel_iommu=on iommu=pt"/' /etc/default/grub
+# For AMD:
+# sed -i '/GRUB_CMDLINE_LINUX_DEFAULT=/ s/"$/ amd_iommu=on iommu=pt"/' /etc/default/grub
+
+# Configure VFIO modules
+echo "vfio" >> /etc/modules
+echo "vfio_iommu_type1" >> /etc/modules
+echo "vfio_pci" >> /etc/modules
+echo "vfio_virqfd" >> /etc/modules
+
+# Blacklist conflicting drivers
+echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
+echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf
+
+# Update GRUB and initramfs
+update-grub
+update-initramfs -u -k all
+ `
+
+ const installGuestAgentCode = `
+# Detect virtualization environment
+VIRT_ENV=$(systemd-detect-virt)
+
+# Install appropriate guest agent
+case $VIRT_ENV in
+ kvm)
+ apt-get install -y qemu-guest-agent
+ ;;
+ vmware)
+ apt-get install -y open-vm-tools
+ ;;
+ oracle)
+ apt-get install -y virtualbox-guest-utils
+ ;;
+ *)
+ echo "No specific guest agent needed or virtualization not detected."
+ ;;
+esac
+ `
+
+ const configureKsmtunedCode = `
+# Install KSM control daemon
+apt-get install -y ksm-control-daemon
+
+# Configure KSM based on system RAM
+RAM_GB=$(free -g | awk '/^Mem:/{print $2}')
+if [ $RAM_GB -le 16 ]; then
+ sed -i 's/KSM_THRES_COEF=.*/KSM_THRES_COEF=50/' /etc/ksmtuned.conf
+ sed -i 's/KSM_SLEEP_MSEC=.*/KSM_SLEEP_MSEC=80/' /etc/ksmtuned.conf
+elif [ $RAM_GB -le 32 ]; then
+ sed -i 's/KSM_THRES_COEF=.*/KSM_THRES_COEF=40/' /etc/ksmtuned.conf
+ sed -i 's/KSM_SLEEP_MSEC=.*/KSM_SLEEP_MSEC=60/' /etc/ksmtuned.conf
+elif [ $RAM_GB -le 64 ]; then
+ sed -i 's/KSM_THRES_COEF=.*/KSM_THRES_COEF=30/' /etc/ksmtuned.conf
+ sed -i 's/KSM_SLEEP_MSEC=.*/KSM_SLEEP_MSEC=40/' /etc/ksmtuned.conf
+elif [ $RAM_GB -le 128 ]; then
+ sed -i 's/KSM_THRES_COEF=.*/KSM_THRES_COEF=20/' /etc/ksmtuned.conf
+ sed -i 's/KSM_SLEEP_MSEC=.*/KSM_SLEEP_MSEC=20/' /etc/ksmtuned.conf
+else
+ sed -i 's/KSM_THRES_COEF=.*/KSM_THRES_COEF=10/' /etc/ksmtuned.conf
+ sed -i 's/KSM_SLEEP_MSEC=.*/KSM_SLEEP_MSEC=10/' /etc/ksmtuned.conf
+fi
+
+# Enable ksmtuned service
+systemctl enable ksmtuned
+ `
+
return (
Virtualization Settings
- {/* ... (rest of the component remains the same) */}
+
+ The Virtualization Settings category in the customizable_post_install.sh script focuses on optimizing your
+ Proxmox VE installation for better virtualization performance and compatibility.
+
+
+
Available Optimizations
+
+
+ 1. Enable VFIO IOMMU Support
+
+ This optimization enables IOMMU (Input-Output Memory Management Unit) and configures VFIO (Virtual Function
+ I/O) for PCI passthrough, allowing direct assignment of PCI devices to virtual machines.
+
+
+ Why it's beneficial: IOMMU and VFIO support enables near-native performance for PCI devices
+ (like GPUs or network cards) in virtual machines, which is crucial for high-performance virtualization
+ scenarios.
+
+ To apply this optimization manually, you would run:
+
+ {enableVfioIommuCode}
+
+
+
+
+ 2. Install Relevant Guest Agent
+
+ This optimization detects the virtualization environment and installs the appropriate guest agent for improved
+ integration between the host and guest systems.
+
+
+ Why it's beneficial: Guest agents improve communication between the host and guest systems,
+ enabling features like graceful shutdown, file sharing, and better performance monitoring. This ensures
+ smoother operation and management of virtual machines.
+
+ To apply this optimization manually, you would run:
+
+ {installGuestAgentCode}
+
+
+
+
+ 3. Configure KSM Control Daemon
+
+ This optimization installs and configures the KSM (Kernel Samepage Merging) control daemon, which helps
+ optimize memory usage in virtualized environments.
+
+
+ Why it's beneficial: KSM allows the kernel to share identical memory pages between multiple
+ virtual machines, reducing overall memory usage. This can lead to better resource utilization, especially in
+ environments with many similar virtual machines.
+
+ To apply this optimization manually, you would run:
+
+ {configureKsmtunedCode}
+
+
+
+
+ Automatic Application
+
+ All of these optimizations are automatically applied when selected in the Virtualization section of the
+ customizable_post_install.sh script. This automation ensures that these beneficial settings are applied
+ consistently and correctly.
+
+
)
}