2012-08-21

‎Using the Kernel-based Virtual Machine: Removed unclear and outdated informations

← Older revision

Revision as of 10:08, 21 August 2012

Line 99:

Line 99:

== Using the Kernel-based Virtual Machine ==

== Using the Kernel-based Virtual Machine ==



[[KVM]] 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 a processor specific module, kvm-intel.ko or kvm-amd.ko. Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images. Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc
.

+

[[KVM]] is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).



{{
Tip
|
It
is
recommended to use KVM whenever possible because it will greatly improve the performance of the running virtual machine compared to QEMU emulating the virtual machine entirely in software.
}}

+

The command to use it with
{{
Pkg
|
qemu}}
is
:

+

qemu -enable-kvm

+

With {{Pkg|qemu-kvm
}}
:

+

qemu-kvm



KVM requires an x86 machine running a recent ( >= 2.6.22) Linux
kernel
on an Intel processor with VT
-
x (Virtualization Technology) extensions,
or
an AMD processor with SVM (Secure Virtual Machine) extensions—''AMD
-
V'' is the marketing term for AMD's SVM
. It is
included
in the
mainline Linux kernel since 2.6.20 and is enabled by default in the Arch Linux kernel
.

+

QEMU relies on the
kernel
modules named {{ic|kvm}} and either {{ic|kvm
-
intel}}
or
{{ic|kvm
-
amd}}
. It
uses {{ic|/dev/kvm}} which
is
why you have to be
in the
{{ic|kvm}} group
.



{{Pkg|qemu}} >
=
0.15.0 has full support for KVM
,
as
the
{{Pkg|qemu-kvm}} tree has been completely merged into the upstream QEMU tree. Therefore, there should be no difference between {{ic|qemu -enable-kvm}} and {{ic|qemu-kvm}} if your version of {{Pkg|qemu}} is >
=
0.15.0
.

+

For detailed installation and usage instructions
,
refer to
the
[[KVM]] article
.



{{
Note
|
QEMU in older versions (
is
not
recommended to use
this, as many
KVM
-related functions had not been implemented in upstream QEMU. Instead, for older versions of QEMU you should go for
the
{{Pkg|qemu-kvm}} package in the [[Official Repositories|official repositories]], which is released by the KVM development team and contains all
of the
latest features (and bug-fixes) of KVM userspace. Please refer
to
the [[KVM]] page itself, for more information on using
QEMU
with KVM on Arch Linux.}}

+

{{
Tip
|
It
is recommended to use KVM
whenever possible because it will greatly improve
the
performance
of the
running virtual machine compared
to QEMU
emulating
the
virtual machine entirely
in
software
.}}



+



To take advantage of KVM, you need a compatible processor (
the
following command must return something on the screen):

+



$ grep -E "(vmx|svm)" --color=always /proc/cpuinfo

+



+



And load the appropriate module from your {{ic|/etc/[[rc.conf]]}}.

+



+



* For Intel® processors, add {{ic|kvm-intel}} to your {{ic|MODULES}} array
in
{{ic|/etc/rc
.
conf
}}

+



* for AMD® processors, add {{ic|kvm-amd}} to your {{ic|MODULES}} array in {{ic|/etc/rc.conf}}

+



+



Also, you will need to add yourself to the group {{ic|kvm}}.

+



# gpasswd -a
kvm

+

== Overlay images ==

== Overlay images ==

Show more