149 lines
5.8 KiB
TypeScript
Raw Permalink Normal View History

2025-02-25 20:40:47 +01:00
import type { Metadata } from "next"
2025-03-02 00:44:16 +01:00
import { Box } from "lucide-react"
2025-03-01 20:03:10 +01:00
import CopyableCode from "@/components/CopyableCode"
2025-02-25 20:40:47 +01:00
export const metadata: Metadata = {
title: "ProxMenux Post-Install: Virtualization Settings",
description:
2025-03-01 20:03:10 +01:00
"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"],
},
2025-02-25 20:40:47 +01:00
}
2025-03-02 00:44:16 +01:00
function StepNumber({ number }: { number: number }) {
return (
<div className="inline-flex items-center justify-center w-8 h-8 mr-3 text-white bg-blue-500 rounded-full">
<span className="text-sm font-bold">{number}</span>
</div>
)
}
2025-02-25 20:40:47 +01:00
export default function VirtualizationSettingsPage() {
return (
<div className="container mx-auto px-4 py-8">
2025-03-01 16:12:26 +01:00
<div className="flex items-center mb-6">
<Box className="h-8 w-8 mr-2 text-blue-500" />
<h1 className="text-3xl font-bold">Virtualization Settings</h1>
2025-03-01 16:17:08 +01:00
</div>
2025-03-01 20:03:10 +01:00
<p className="mb-4">
2025-03-02 13:20:26 +01:00
The <strong>Virtualization Settings</strong> category optimizes Proxmox VE for enhanced virtualization performance,
compatibility, and functionality.
2025-03-01 20:03:10 +01:00
</p>
<h2 className="text-2xl font-semibold mt-8 mb-4">Available Optimizations</h2>
2025-03-02 00:44:16 +01:00
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={1} />
Enable VFIO IOMMU Support
</h3>
<p className="mb-4">
2025-03-02 13:20:26 +01:00
This setting enables <strong>IOMMU</strong> (Input-Output Memory Management Unit) and configures <strong>VFIO</strong> (Virtual Function I/O)
for PCI passthrough, allowing direct assignment of PCI devices to virtual machines.
2025-03-02 00:44:16 +01:00
</p>
<p className="mb-4">
2025-03-02 16:54:00 +01:00
<strong className="block">Why it's beneficial:</strong>
Enables near-native performance for PCI devices, such as GPUs or network cards,
by allowing direct access from VMs. This is essential forGPU acceleration, low-latency networking,
and high-performance workloads, reducing hypervisor overhead and improving efficiency.
2025-03-02 00:44:16 +01:00
</p>
2025-03-02 01:14:53 +01:00
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
2025-03-02 00:44:16 +01:00
<CopyableCode
code={`
# For Intel CPUs
2025-03-01 20:03:10 +01:00
echo "intel_iommu=on" | sudo tee -a /etc/default/grub
# For AMD CPUs
echo "amd_iommu=on" | sudo tee -a /etc/default/grub
echo "vfio vfio_iommu_type1 vfio_pci vfio_virqfd" | sudo tee -a /etc/modules
sudo update-grub
2025-03-02 00:44:16 +01:00
sudo update-initramfs -u -k all
`}
/>
2025-03-01 20:03:10 +01:00
2025-03-02 00:44:16 +01:00
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={2} />
Install Relevant Guest Agent
</h3>
<p className="mb-4">
2025-03-02 13:20:26 +01:00
This optimization installs the appropriate <strong>guest agent</strong> based on the virtualization environment.
2025-03-02 00:44:16 +01:00
</p>
<p className="mb-4">
2025-03-02 16:54:00 +01:00
<strong className="block">Why it's beneficial:</strong>
Enhances host-guest integration by enabling graceful shutdown,
file sharing, performance monitoring, and better resource allocation.
2025-03-02 13:20:26 +01:00
This improves VM management and overall system efficiency.
2025-03-02 00:44:16 +01:00
</p>
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
<CopyableCode
code={`
# For QEMU/KVM VMs
2025-03-01 20:03:10 +01:00
sudo apt-get install -y qemu-guest-agent
2025-02-25 20:40:47 +01:00
2025-03-01 20:03:10 +01:00
# For VMware VMs
sudo apt-get install -y open-vm-tools
# For VirtualBox VMs
2025-03-02 00:44:16 +01:00
sudo apt-get install -y virtualbox-guest-utils
`}
/>
<h3 className="text-xl font-semibold mt-20 mb-4 flex items-center">
<StepNumber number={3} />
Configure KSM (Kernel Samepage Merging)
</h3>
<p className="mb-4">
2025-03-02 13:20:26 +01:00
This setting enables and configures <strong>KSM</strong> to optimize memory usage by sharing identical
memory pages across multiple virtual machines.
2025-03-02 00:44:16 +01:00
</p>
<p className="mb-4">
2025-03-02 16:54:00 +01:00
<strong className="block">Why it's beneficial:</strong>
Reduces RAM consumption in environments with similar VMs,
allowing for higher VM density on a single host. This is particularly useful for systems
2025-03-02 13:20:26 +01:00
running multiple instances of the same OS or application, improving memory efficiency and overall performance.
2025-03-02 00:44:16 +01:00
</p>
2025-03-02 01:14:53 +01:00
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
2025-03-02 00:44:16 +01:00
<CopyableCode
code={`
sudo apt-get install -y ksm-control-daemon
2025-03-01 20:03:10 +01:00
echo "KSM_ENABLED=1" | sudo tee -a /etc/default/ksm
echo "KSM_SLEEP_MSEC=100" | sudo tee -a /etc/default/ksm
sudo systemctl enable ksm
2025-03-02 00:44:16 +01:00
sudo systemctl start ksm
`}
/>
2025-03-01 20:03:10 +01:00
<section className="mt-12 p-4 bg-blue-100 rounded-md">
<h2 className="text-xl font-semibold mb-2">Automatic Application</h2>
<p>
2025-03-02 00:44:16 +01:00
All of these optimizations are automatically applied when selected in the Virtualization section. This
automation ensures that these beneficial settings are applied consistently and correctly, saving time and
reducing the potential for human error during manual configuration.
2025-03-01 20:03:10 +01:00
</p>
</section>
</div>
2025-03-02 00:44:16 +01:00
)
}