Introduction
Proxmox VE is a powerful, open-source platform. One of its incredible features is enabling IOMMU (Input-Output Memory Management Unit), which is crucial for tasks like passing through physical devices to virtual machines. This blog post will guide you through enabling IOMMU on Proxmox, enhancing your virtualization capabilities.
What is IOMMU and Why Enable It?
IOMMU is a system specific to the processor that allows virtual machines to interact directly with physical hardware devices. It plays a critical role in hardware virtualization, allowing for device pass-through. This means that specific hardware like GPUs, network cards, or storage controllers can be dedicated to a virtual machine, offering near-native performance.
This mainly benefits resource-intensive applications, gaming, or specialized hardware utilization. For me, this is important because I have virtualised my JellyFin server, and when I play videos on mobile devices, the VM can’t transcode the video streams fast enough, and I get buffering issues.
Prerequisites
Before proceeding, ensure you have:
- A Proxmox VE installed system.
- Hardware that supports IOMMU (most modern CPUs do).
- Backup of your Proxmox system (to prevent data loss in case of a misconfiguration).
Step-by-Step Guide to Enable IOMMU on Proxmox
- Check IOMMU Support: First, verify that your CPU supports IOMMU. You can access your system’s BIOS/UEFI and check for VT-d (Intel) or AMD-Vi (AMD) options.
- Enable IOMMU in BIOS/UEFI: Power up your server and enter the BIOS/UEFI setup. Enable settings named ‘Intel Virtualization Technology for Directed I/O (VT-d)’ or ‘AMD I/O Virtualization Technology (AMD-Vi)’.
- Configure Proxmox to Use IOMMU:
- SSH into your Proxmox server or use the console.
- Edit the GRUB configuration file by running:
nano /etc/default/grub
. - Find the line starting with
GRUB_CMDLINE_LINUX_DEFAULT
. - Add
intel_iommu=on
oramd_iommu=on
to this line (depending on your CPU). - Save and close the file.
- Update GRUB and Reboot:
- Update GRUB with
update-grub
. - Reboot your Proxmox server for the changes to take effect.
- Update GRUB with
- Verify IOMMU Activation:
- After rebooting, SSH into your Proxmox server.
- Run
dmesg | grep -e DMAR -e IOMMU
. - If IOMMU is enabled, you will see messages indicating its activation.
- Configure VMs for Device Pass-Through:
- Access Proxmox’s web interface.
- Select the VM you want to pass devices through.
- Under ‘Hardware’, add the PCI device, ensuring the ‘All Functions’ checkbox is ticked if you’re passing through all components of a multi-function device.
Conclusion
Enabling IOMMU on Proxmox can significantly enhance your virtualization experience by allowing direct hardware access to VMs. This setup is ideal for high-performance tasks, specialized hardware applications, or gaming.
Remember, while enabling IOMMU is a powerful feature, it requires compatible hardware and careful configuration.
Another critical thing to note is that VMs that require the additional hardware you pass through to them will then be tied to that physical host, as it isn’t possible to move the hardware from one host to the other just by moving the VM.