Help on enable iommu on intel CPU

Lucas Rey

Well-Known Member
May 18, 2018
35
21
48
51
Hello community, I need to passthrough my intel GPU (onboard UHD Graphics 630), but I got the error:
No IOMMU detected, please activate it.See Documentation for further information.
And when I try to start the VM:
TASK ERROR: cannot prepare PCI pass-through, IOMMU not present

Code:
# lspci
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630]

What I did, following the User Manual, is:

1. Chek if VT-d is enabled on BIOS: OK

2. Add the intel_iommu=on to /etc/default/grub
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
GRUB_CMDLINE_LINUX="root=ZFS=rpool/ROOT/pve-1 boot=zfs net.ifnames=0 biosdevnames=0"

then:
Code:
update-grub

3. Modify the /etc/modules
Code:
vfio
vfio_iommu_type1
vfio_pci

then:
Code:
update-initramfs -u -k all

What I have after reboot is:
Code:
# lsmod | grep vfio
vfio_pci               16384  0
vfio_pci_core          86016  1 vfio_pci
irqbypass              12288  2 vfio_pci_core,kvm
vfio_iommu_type1       49152  0
vfio                   57344  3 vfio_pci_core,vfio_iommu_type1,vfio_pci
iommufd                77824  1 vfio

Code:
# dmesg | grep -e DMAR -e IOMMU
[    0.009964] ACPI: DMAR 0x000000006D4182B8 0000A8 (v01 ALASKA A M I    00000002      01000013)
[    0.009984] ACPI: Reserving DMAR table memory at [mem 0x6d4182b8-0x6d41835f]
[    0.416835] DMAR: Host address width 39
[    0.416837] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[    0.416843] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
[    0.416847] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[    0.416850] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
[    0.416854] DMAR: RMRR base: 0x0000006d9e0000 end: 0x0000006dc29fff
[    0.416856] DMAR: RMRR base: 0x0000006f000000 end: 0x0000008f7fffff
[    0.416859] DMAR-IR: IOAPIC id 2 under DRHD base  0xfed91000 IOMMU 1
[    0.416861] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[    0.416863] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    0.420004] DMAR-IR: Enabled IRQ remapping in x2apic mode

Code:
# cat /proc/cmdline
initrd=\EFI\proxmox\6.5.11-8-pve\initrd.img-6.5.11-8-pve root=ZFS=rpool/ROOT/pve-1 boot=zfs

Did I missed something?

Could someone help me to understand what's wrong?
Thank you
Lucas
 
Last edited:
Code:
# cat /proc/cmdline
initrd=\EFI\proxmox\6.5.11-8-pve\initrd.img-6.5.11-8-pve root=ZFS=rpool/ROOT/pve-1 boot=zfs

Did I missed something?
Yes, you did not add intel_iommu=on to the active kernel parameters. This procedure is explained in the manual (and on this forum about every week when I answer this same question): https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_configuration_14 . Click the link about "kernel command line" and the manual explains how to do it for BOTH bootloaders that can be used by Proxmox. Look here to find out which bootloader is used: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysboot_determine_bootloader_used .

In short: you need need to add intel_iommu=on to /etc/kernel/cmdline (on the same single line!) and activate it with update-initramfs as you already tried for GRUB (which is not used by your Proxmox installation). Also, your CPU and motherboard (chipset) need to support VT-d and it needs to be enabled by the motherboard BIOS/UEFI.
 
  • Like
Reactions: Lucas Rey
You're right. Manually editing the /etc/kernel/cmdline did the tricks. Now IOMMU is correctly enabled and VM starts without issue.
Maybe this step is not so clear in manual, at least for me, that I'm a newbie. This is absolutely not a criticism however :)
Anyway, thank you for reply and point me to the solution!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!