header image
Home arrow Blog arrow Tips arrow Remove kvm (kvm_intel) kernel module
Remove kvm (kvm_intel) kernel module PDF Print E-mail
Written by Han   
May 27, 2008 at 05:07 PM
I usually use Virtualbox, but recently I played with KVM for a while because it supports X86-64 client which Virtualbox doesn't. However, when come to the day-to-day usage, I still like Virtualbox, especially because usually the only case that I need a virtual OS is when I am trying to view some M$ Office files, and the Windows XP 32bit that I installed under Virtualbox is more than enough to fit my requirement.

However, it turns out that Virtualbox would refuse to start the guest OS if the kvm_intel (kvm) module is loaded. So I had to remove the kvm package by running

sudo apt-get remove kvm

However, it seems (in Ubuntu 8.04) the module kvm_intel and kvm are still been loaded every time the machine is restarted even if the kvm dep package has been removed. One still has to run

sudo rmmod kvm_intel kvm

before running Virtualbox otherwise you will get the same error message.

One (not so pretty) way to solve this problem is to simply remove the file /etc/init.d/kvm:

sudo mkdir /etc/init.d/backup.files
sudo mv /etc/init.d/kvm /etc/init.d/backup.files/


You may confirm that the kvm and kvm_intel are no longer loaded after reboot by running:

lsmod|grep kvm
 

 Edit: A better way to solve this problem is to completely remove the kvm package (including configuration files) by running sudo dpkg --purge kvm


User Comments

Comment by on 2009-11-03 14:32:50
You can only unload kvn kernel module instead of removing:  
 
sudo modprobe -r kvm_intel 
 
it works until next restart

Comment by Tim on 2010-02-14 06:24:05
I have this problem. lsmod|grep kvm gives: 
kvm_intel 43816 0  
kvm 162624 1 kvm_intel 
but your "better way" gives: 
dpkg: warning: ignoring request to remove kvm which isn't installed. 
 
Great.

Comment by Tim on 2010-02-14 06:28:13
Also, I don't have a kvm directory in init.d so the not so pretty way doesn't work either. I'm using Karmic. Do you have any other suggestions because this is a pain. 
 
Thanks, 
 
Tim

Comment by Akshay Guleria on 2010-03-30 08:23:52
in my case, kvm was not installed but these modules were provided by qemu_kvm. 
 
Removing qemu_kvm got rid of these kernel modules.
Your Name / Email Address
Security Check. Please enter this code Listen to code

Last Updated ( Sep 30, 2008 at 04:22 PM )