Pages

Thursday, March 28, 2013

enable kvm module linux

enable kvm module linux


Initial Hardware Check: 

Enabling KVM module requires  support from the Hardware.
The following command will help to detect the hardware support.

egrep '(vmx|svm)' --color=always /proc/cpuinfo
 
For more information , refer this link.
 
http://wiki.centos.org/HowTos/KVM 


Step 1:  Check whether the kvm module is loaded or not.

lsmod |grep kvm

This command must not report any output.
It means that the kvm module is not loaded currently

Step 2 : Locate Kernel Object File of KVM Module


locate `uname -r` |grep kvm

This  command will report some output as follows.

/lib/modules/2.6.32-358.2.1.el6.x86_64/kernel/arch/x86/kvm
/lib/modules/2.6.32-358.2.1.el6.x86_64/kernel/arch/x86/kvm/kvm-amd.ko
/lib/modules/2.6.32-358.2.1.el6.x86_64/kernel/arch/x86/kvm/kvm-intel.ko
/lib/modules/2.6.32-358.2.1.el6.x86_64/kernel/arch/x86/kvm/kvm.ko


Step 3: Detect  your Machine Architecture

uname -m 

This command will report your machine architecture.

In my case, I got the following output.

x86_64

It means that the machine and the Operating System is a 64-Bit Machine.
In some machines, it may show like

i686

It means that, it is a 32 bit machine.


Step 4 : Since my machine is 64 bit architecture, I will select 64 Bit Kernel object file .

depmod /lib/modules/2.6.32-358.2.1.el6.x86_64/kernel/arch/x86/kvm/kvm.ko

modprobe kvm


depmod /lib/modules/2.6.32-358.2.1.el6.x86_64/kernel/arch/x86/kvm/kvm-intel.ko
 

modprobe  kvm-intel


Step 5: Now verify the list of loaded modules.

lsmod |grep kvm

You should get the following output

kvm_intel              53484  0
kvm                   316506  1 kvm_intel




No comments:

Post a Comment