Rocky 9.1: Adding `intel_iommu=on` to kernel

[root@kvmserver nasheayahu]# virt-host-validate
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking if device /dev/kvm exists                                   : PASS
  QEMU: Checking if device /dev/kvm is accessible                            : PASS
  QEMU: Checking if device /dev/vhost-net exists                             : PASS
  QEMU: Checking if device /dev/net/tun exists                               : PASS
  QEMU: Checking for cgroup 'cpu' controller support                         : PASS
  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS
  QEMU: Checking for cgroup 'cpuset' controller support                      : PASS
  QEMU: Checking for cgroup 'memory' controller support                      : PASS
  QEMU: Checking for cgroup 'devices' controller support                     : PASS
  QEMU: Checking for cgroup 'blkio' controller support                       : PASS
  QEMU: Checking for device assignment IOMMU support                         : PASS
  QEMU: Checking if IOMMU is enabled by kernel                               : WARN (IOMMU appears to be disabled in kernel. Add intel_iommu=on to kernel cmdline arguments)
  QEMU: Checking for secure guest support                                    : WARN (Unknown if this platform has Secure Guest support)

IOMMU is enable during boot in BIOS, I ran,

sudo grubby --update-kernel=ALL --args=“intel_iommu=on”

and did a reboot, but I still get the WARNING message and doing a sysctl -a does not show the parameter being set. Do I need to run.

sysctl -w <TUNABLE_CLASS>.<PARAMETER>=<TARGET_VALUE> >> /etc/sysctl.conf

to (1) remove the WARNING message, and (2) even though having this message and IOMMU enabled in BIOS, will I have any problems with virtualization until the kernel parameter is set?

First, you don’t say what flavor of rocky you are using, RL8 or RL9, which may have a bearing on how you add parameters.
Second, I’ve had trouble using grubby to add kernel parameters and have actually created an unbootable system using it. Grubby in my experience does not append parameters, it replaces existing parameters with the parameter within the quotes " ". Which will remove the root=UUID= kernel parameter unless you also include it with your additional parameter.
But, in your case it appears to have ignored your input all together which is also something I experienced recently on RL9.

Any feed back on the correct solution to add this parameter to the kernel to remove this “warning” message?

Edit /etc/default/grub

Line:
GRUB_CMDLINE_LINUX=“rhgb quiet intel_iommu=on”

dracut --force

reboot

Thanks for your reply, but I found the answer here “4.4. Changing kernel command-line parameters for all boot entries”

but to NOTE, I did try your suggestion, and I lost my desktop environment settings (Wanland etc.,) and ended up with 1024x X display. However, following the above, everything was restored and the warning message is now gone.

1 Like