Option 1: Blacklist
Many distros use a module blacklist to disallow module loading. Normally this can be done by adding these lines to your distro’s modules.conf
or similar. You might try reading man modules.conf
or googling for directions for your specific distribution.
blacklist kvm_intel
blacklist kvm
Option 2: Unload
An alternative is to add these lines to your rc.local
script (or some other system boot-time script, preferably not one associated with a package):
modprobe -r kvm_intel
modprobe -r kvm
Option 3: Disable (new)
Both of the above will prevent the modules from getting loaded on bootup, but won’t stop them from loading into the kernel later. To completely disable the module, use these lines — again, they can go in a modules.conf
file, or in /etc/modprobe.d/disabled
or similar:
install kvm_intel /bin/true
install kvm /bin/true
What this does is tell the system to run /bin/true
whenever these modules are requested. The program doesn’t do anything except return true, so any load “succeeds” but the modules are never actually loaded. To re-enable drivers disabled with this technique, comment out these lines and reboot.