Update: If you are searching for QEMU only installation, see here.
KVM stands for Kernel-based Virtual Machine, is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable Kernel module, kvm.ko, that provides the core virtualization infrastructure and processor specific module.
QEMU-KVM is a QEMU modified for use with KVM.
Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images.
In this article we will discuss about installing QEMU-KVM for Slackware64 14.0. Thus, we will use:
- Slackware64 14.0, although any version is OK
- qemu-kvm 1.2.0
- zlib libraries and headers
- SDL libraries and headers
- alsa libraries and headers (optional for alsa support)
- gnutls libraries and headers (optional VNC TLS support)
- kernel source code and headers
Also in hardware parts, you need A VT capable Intel processor, or an SVM capable AMD processor.
Downloading the Source
Most Linux distros already have KVM kernel modules and userspace tools available. However, our purpose is to build our own from scratch, so we will need the source codes. However there are some note.
The source can be obtained from Sourceforge. Download the latest qemu-kvm source code here.
Next thing to do is doing configuration and make the binary code. Remember to use enough credentials to install. We will install it to /usr/local thus need root privilege. If you plan to install it elsewhere, need to make sure you have privilege to do it.
Now invoke following command:
tar -xzf qemu-kvm-1.2.0.tar.gz cd qemu-kvm-1.2.0 ./configure --prefix=/usr/local make make install
If you are using kernel from http://www.kernel.org/ do not use the kvm-mod modules. Use the provided modules (which is most likely already installed).
If you are using kernel 2.6 series, you have option to compile the modules by yourself. Which, you need to download kvm-kmod with version available for your kernel.
Now, to verify the kernel, test it by invoking following command:
Congratulation! You have installed qemu.kvm, linux, qemu