From KVM
Revision as of 12:32, 23 June 2011 by Stefanha (Talk | contribs)


kernel git tree

The kvm kernel code is available through a git tree (like the kernel itself). To create a repository using git, type

git clone git://

Alternatively, it is also accessible through the gitweb interface: [1]

For subsequent upgrades use the command

git pull

in the git working directory.

userspace git tree

The kvm userspace code (libkvm and qemu) is available through a git tree. To create a repository using git, type

git clone git://

Alternatively, it is also accessible through the gitweb interface: [2]

If you want to contribute code, please develop against qemu.git and submit patches to The qemu-kvm.git tree regularly gets changes from qemu.git and patches against qemu-kvm.git should be minimized.

building an external module with older kernels

This only works for the x86 architecture.

1. If you wish to use a distribution kernel (or just some random kernel you like) with kvm, you can use the external module kit. You will need the kvm-kmod repository:

git clone git://
cd kvm-kmod
git submodule update --init
./configure [--kerneldir=/path/to/kernel/dir]
make sync

Tip about building against Red Hat Enterprise Linux kernels

kvm-userspace/kernel has some compat code to allow it to compile against older kernels, and also some code specific to features that are normally not present on older kernels but are present on RHEL kernels.

So, when building against a RHEL kernel tree, check if the RHEL_* macros at ${kerneldir}/include/linux/version.h are defined correctly, corresponding to the RHEL version where the kernel source comes from. If those macros aren't defined correctly, the compat code that allows compilation against RHEL kernels will break and you will get build errors.

release tags

kvm stable releases (based off of Qemu's stable branch) are tagged with kvm-qemu-0.NN.N where N equates to the upstream Qemu branch versions. Note that kvm has them tagged not branched.

kvm development releases are tagged with kvm-nn where nn is the release number.

Binary Packages


Unofficial packages of latest releases can be found at:


For Debian Lenny, please use packages from - for both qemu-kvm and kernel (at least 2.6.32). It is important to use more recent kernel - 2.6.26 does not work well with kvm.

Note that package "kvm" has been renamed to "qemu-kvm" in Squeeze and in Lenny backports (and kvm is now transitional package that installs qemu-kvm automatically).

Debian Squeeze will have qemu-kvm based on 0.12, available in standard repositories.

Experimental 0.13 packages are available at , pending upload to debian -experimental.

nightly snapshots

Nightly snapshots, for those who are uncomfortable with git, are available. When reporting a problem with a snapshot, please quote the snapshot name (which includes the date) and the contents of the SOURCES file in the snapshot tarball.