≡ Menu

CentOS / Redhat: Install KVM Virtualization Software

KVM (Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions Intel VT or AMD-V. How do I install KVM under CentOS or Red Hat Enterprise Linux version 5.5?

The Linux kernel 2.6.20 and above included KVM. RHEL 5.5 (and upcoming RHEL 6) supports KVM out of box and it has also been ported to FreeBSD as a loadable kernel module. However, this tutorial is tested on both CentOS and RHEL 5.5 only running 64 bit Intel Xeon CPU (with Intel VT) and 64 bit kernels with SELinux running in enforcing mode.

This entry is 1 of 14 in the CentOS / Redhat (RHEL) KVM Virtulization series. Keep reading the rest of the series:
  1. CentOS / Redhat: Install KVM Virtualization Software
  2. CentOS / Redhat: KVM Bridged Network Configuration
  3. KVM virt-manager: Install CentOS As Guest Operating System
  4. KVM virt-install: Install FreeBSD / CentOS As Guest Operating System
  5. KVM: Install CentOS / RHEL Using Kickstart File (Automated Installation)
  6. Troubleshooting KVM Virtualization Problem With Log Files
  7. KVM Virsh: Redirect FreeBSD Console To A Serial Port
  8. KVM: Starting / Stopping Guest Operating Systems With virsh Command
  9. Linux KVM: Disable virbr0 NAT Interface
  10. FreeBSD / OpeBSD Running in KVM Does Not Accept FTP Traffic
  11. KVM: Start a Virtual Machine / Guest At Boot Time
  12. KVM virt-install: Install OpenBSD As Guest Operating System
  13. Linux KVM: OpenBSD Guest Hangs At Starting tty Flags
  14. KVM Virtualization: Start VNC Remote Access For Guest Operating Systems
{ 35 comments… add one }
  • Zdenek Styblik June 13, 2010, 10:23 am

    The heading should read ‘virtualization’.
    Not bad summary though.

  • qt2r June 14, 2010, 11:43 am

    Excellent guide. thanks for sharing :)

  • cod3fr3ak June 14, 2010, 3:41 pm

    Which gives better results with non-virtual aware operating system, xen or kvm. I can never remember. I am considering trying to run Windows 7 within a xen or kvm instance on Centos 5.5. Does anyone know if it supports Directx? A couple of the games I play use it for 3d and effects rendering.

    • fred January 19, 2013, 12:09 am

      hi cod3fr3ak,
      did you get any answers on your question about xen or kvm supporting directx?
      i’m having the same problem…
      thx in advance

  • Bhaskar Chowdhury June 16, 2010, 4:42 am

    Hey Vivek!
    This article is as good as others you have posted earlier.Keep up the good work man.Looking forward to the next installment of this article.

    Cheers mate!

  • Paul June 17, 2010, 7:48 am


    as far as I’m aware Novell does not yet support KVM, it is included in SLES11 sp1 as a “technology preview”, I think they call it, ie they include it for you to test but it is not supported, at least not officially.


    • Ian June 27, 2010, 10:49 am

      It was tech preview in sles11, fully supported in sles11sp1

  • mam June 22, 2010, 10:21 am

    I found error in one command yum groupinstall KMV, correct is yum groupinstall KVM

  • rwilla August 5, 2010, 6:49 am

    You can list all packages in the group as follows: #yum groupinfo Virtualization

  • Rocky Patel October 14, 2010, 4:45 pm


    I m getting this error while installing yum groupinstall KVM..

    yum groupinstall KVM
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * addons: mirrors.hns.net.in
    * base: mirrors.hns.net.in
    * extras: mirrors.hns.net.in
    * updates: mirrors.hns.net.in
    Setting up Install Process
    Resolving Dependencies
    –> Running transaction check
    —> Package kvm.i386 0:36-1 set to be updated
    —> Package virt-manager.i386 0:0.6.1-12.el5 set to be updated
    –> Processing Dependency: python-virtinst >= 0.400.3 for package: virt-manager
    —> Package virt-viewer.i386 0:0.0.2-3.el5 set to be updated
    –> Running transaction check
    —> Package python-virtinst.noarch 0:0.400.3-9.el5_5.1 set to be updated
    –> Processing Conflict: libvirt conflicts kvm Finished Dependency Resolution
    libvirt-0.6.3-33.el5_5.3.i386 from installed has depsolving problems
    –> libvirt conflicts with kvm
    Error: libvirt conflicts with kvm
    You could try using –skip-broken to work around the problem
    You could try running: package-cleanup –problems
    package-cleanup –dupes
    rpm -Va –nofiles –nodigest
    The program package-cleanup is found in the yum-utils package.

  • Ice72 December 2, 2010, 8:58 am


    great summary. On fedora core 14 the “yum install ” command not install the qemu-kvm.x86_64 which is installed if I use the command “yum install virtualization”

  • Hanif December 30, 2010, 3:47 am

    How about if I want the vcpu more than 16 cores

  • alessandroo June 21, 2011, 8:48 am


    Is kvm available on RHEL 5.5 32 bits ?

    I have only a 32 bit processor…

    • nixCraft June 21, 2011, 11:28 am

      Running a 64 bit kernel (RHEL 64 bit) on the host operating system is recommended but not required. You can use 32bit but limited to 2GB ram per VM. A 32 bit server can only host 32-bit guest operating system.

  • alessandroo June 21, 2011, 12:10 pm

    ok thanks for this information, but its not really my request.
    I have a RHEL 5.5 32bits distribution (i have only a proc 32bits, i dont have the choice) in a plateform test and i need to install KVM.

    Is KVM compatible with a 32 bit distribution? Because i dont find the packet “kvm”, “libvirt”, “virt manager”

    • nixCraft June 21, 2011, 12:20 pm

      RHEL 5.5+ x86 removed 32bit kvm packages. Your options are as follows
      a) Go with 64bit (x64) RHEL system as Redhat not planned create 32bit KVM as most VM server runs on 64 bit platform.
      b) Go with 32 bit RHEL and compile new kernel with KVM
      c) Use Ubuntu or other 32 bit Linux distro that support 32bit KVM

  • abdullah kamal August 23, 2011, 4:06 pm

    is it possible to create virtual data center in centos, currently this kind of technology is provided by the redhat.

  • Lio September 5, 2011, 6:00 pm

    Hi all
    could anyone advise me to solve the problem
    the problem is as following:
    I’ve installed kvm with all its packages and when i want to install win 7 it will be stacked and does not go forward please help
    i’ll be appreciated

  • ahmad September 7, 2011, 9:09 am

    Please note that RedHat/CentOS was configured to run KVM only on 64-bit operating systems.

  • Ivan September 18, 2011, 2:50 pm

    For the host Centos OS, what is the recommended installation configurations? (Server or Minimal)? I have chosen Minimal but couldn’t load any GUI for my centos…and is stuck at the step where it is suppose to load a GUI for virtual manager

  • Rashid Iqbal October 15, 2011, 7:28 pm

    I want to change the default location of virtual harddisk to another LVM volume.

    How can I do this………?

  • luckysanj November 20, 2011, 9:18 am

    same thing from my side also….For the host Centos OS, what is the recommended installation configurations? (Server or Minimal)? I have chosen Minimal but couldn’t load any GUI for my centos…and is stuck at the step where it is suppose to load a GUI for virtual manager.

  • Sathish January 25, 2012, 6:13 pm

    Thanks, its very helpful for me :)

  • kuljinder mathoun February 28, 2012, 6:42 pm

    Do we have any equivalent application like VMware Virtual Center to manage KVM hosts?
    I heard about OVIRT but it has some limitation.


  • Rafi March 16, 2012, 2:10 am

    first thank you Vivek, for writing an article that brand new newbies could follow, nice organized. Further request to dumb it down by some server sizing how many CPUs, RAM etc especially for small cluster of 1-10 desktops (that is what we like to do)… also do you have articles on how to installed RHEL 64 on a brand new machine?

    Sorry folks, I have to start somewhere, I am staring at my RHEL 6.2 ISO images, new server no OS on it, 3.0 GHz CPU quad core and 16 GB RAM. Plugged in and I have no CLUE. I absolutely cannot stand the other techies speak nor understand it.

    Everything else I read, just went into total geekdom high brow type writeup/

    Vivek any dummy level article that goes step by step or any material I could read up on will be deeply appreciated!!!

  • Rafi March 16, 2012, 2:13 am

    Just saw your TOC some install stuff there, will try that… thanks!

  • aswin May 31, 2012, 10:17 am

    I have question, I already installed kvm at dell R720 12 Core with 64GB RAM and 4TB HDD SCSI with RAID5.
    Problem with windows guest OS when running with KVM, ethernet using virtio driver very slow performance, I copy from sharing folder 25Mb it took 60Minutes until finish.
    but running well wit Linux guest OS.

    info :
    Running in CentOS 6.2 x86_64 kernel 2.6.32-220.13.1.el6.x86_64
    lsmod :
    virtio_pci 6687 0
    virtio_net 15839 0
    virtio_ring 7729 2 virtio_pci,virtio_net
    virtio 4890 2 virtio_pci,virtio_net
    vhost_net 31384 2
    macvtap 9724 5 vhost_net
    macvlan 10180 1 macvtap
    tun 17051 5 vhost_net
    kvm_intel 50412 10
    kvm 305988 1 kvm_intel
    acpi_pad 87758 0

    Do you have any Idea, thank you..


  • Putchong Uthayopas June 3, 2012, 1:15 am

    Good start for KVM. Help me a lot. Thanks…

  • David Ramirez November 1, 2012, 3:59 pm

    Thanks – a good lead-in into doing this for 1st time… even after coming from other commercial environments…

  • Lihar Shendi Wijaya October 29, 2013, 10:01 am

    I Very Like This Post :)

    i want ask question sir

    ifcfg-eth0 = ifcfg-br0
    ifcfg-eth1 = ifcfg-br1

    what is iptables nat use? interfaes iptables eth0 with eth1 or br0 with br1 ?

    thanks sir

  • sahil January 7, 2014, 11:37 am

    Hello Sir,

    Can we install KVM on Centos 32 bit base machine. ?
    I tried it on centos 6 32 bit using yum but Its says no package found for KVM.
    Please help

  • sudheer January 19, 2014, 11:14 am

    HI Guys,

    In my setup we need to configure both IPV4 and IPv6 on same KVM machine(Br0 for IPV4 and Br1 for IPV6 internal). Can some one who worked on this kind of setups please suggest me how to create bridges and guest network. I have configured as i IPV4 setup but very often the guests are not reachable from outside of the server.

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , , , , , , , ,