1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
KVM for Debian
--------------
A few bits about history
~~~~~~~~~~~~~~~~~~~~~~~~
KVM (stands for Kernel Virtual Machine) is a branch of a machine emulator,
qemu. It's a qemu modified to use virtualization extensions of modern
(initially x86) CPUs, to be able to run guest system without emulating the
CPU, achieving near-native CPU and memory speeds.
The goal of KVM is to eventually merge back to qemu, so it serves as just
a development branch of qemu. Many kvm changes are already in qemu, but
as of this writing (qemu-kvm-0.11.0), the merge is still incomplete, and
even more, kvm is not feature-complete.
There's two numbering schemes and release series names for kvm. Initially
kvm were released as numbered snapshots, like kvm-1, kvm-72 and so on.
These were nothing more than development snapshots, the releases were
frequent, changes in each release were significant, each release fixed
many bugs but introduced others.
Later on, the KVM team decided to release a stable series. At the same time,
to distinguish between stable and development trees, new naming scheme was
introduced as well. The first stable release was qemu-kvm-0.10.0, released
after kvm-87 and qemu-0.10.0.
Since this time, kvm exists in two forms or two branches, -- kvm and
qemu-kvm, kvm-nn is a series of development snapshots as before, and
qemu-kvm-x.yy.z are stable series which receive updates.
Stable releases of Debian will include qemu-kvm packages. For now
it is still uncertain if kvm packages will be supported in Debian.
KVM packages will not be included in stable releases of Debian,
only qemu-kvm packages will be included.
Since KVM is just a modified qemu, the build system of KVM produces
an executable that's named according to qemu rules. On x86 platform,
it's qemu-system-x86_64. In this package, that binary is installed
under the name "kvm". When the Debian package was renamed from kvm
to qemu-kvm, the executable name did not change.
Hardware support
~~~~~~~~~~~~~~~~
KVM works only on CPUs with virtualization extensions.
Without these extensions it's nothing more than qemu, it will perform
full emulation as qemu does, which is slow.
To find out if your system has the necessary hardware support for kvm,
check for processor flags in /proc/cpuinfo.
For AMD CPUs "svm" flag should be listed. For Intel CPUs, it's "vmx".
The following command:
egrep '^flags.*(vmx|svm)' /proc/cpuinfo
will output nothing if these extensions are either not present of not
enabled.
Almost all AMD CPUs after and including Athlon X2-64 supports virtualization,
including most Durons. Modern Opteron, AthlonII, Phenom and Phenom II
have it too.
For Intel CPUs things are not this simple. Even in latest Core2 Duo and
Core2 Quad series there are models without VT support. If in doubt check
Intel documents about your CPU and Wikipedia articles, for example
http://en.wikipedia.org/wiki/List_of_Intel_Core_2_microprocessors.
Note that in addition to the CPU itself, the BIOS of the system should
have support for these extensions too, and it should be enabled. It is
NOT POSSIBLE for now to turn the extensions on if they're not enabled in
BIOS or BIOS has no support. The only option in this case is to
update the system BIOS.
Kernel requirements
~~~~~~~~~~~~~~~~~~~
KVM requires kernel modules that enables the use of the above mentioned
extensions to be present and loaded. For AMD CPUs it is kvm_amd.ko, and
for Intel CPUs it is kvm_intel.ko. The startup script in this package
ensures that the appropriate module is loaded during system startup.
Kernel includes the necessary modules since 2.6.22 version.
In order to run this version of KVM, your system should be running at least
a 2.6.24 kernel. However, using a 2.6.28 or more later kernel is highly
recommended.
Miscellaneous
~~~~~~~~~~~~~
The recommended qemu package contains the script
/usr/sbin/qemu-make-debian-root, which uses debootstrap to build a Debian disk
image. See the man page for qemu-make-debian-root. The suggested hal package is
only used for automatically reporting the system bios version and computer
model when reporting bugs.
|