Virtualization with KVM: Difference between revisions

From Yocto Project
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
Virtualization is a hot topic in the operating systems world these days. The use cases vary from server consolidation, virtual test environments to Linux enthusiasms who can’t decide which distribution is best. The Kernel-based Virtual Machine, kvm (http://www.linux-kvm.org) is a popular full-virtualization solution for Linux based systems. It can be used to run guests systems on systems with hardware virtualization extensions (AMD-V or Intel VT-x).
Virtualization is a hot topic in the operating systems world these days. The use cases vary from server consolidation, virtual test environments to Linux enthusiasms who can’t decide which distribution is best. The Kernel-based Virtual Machine, kvm (http://www.linux-kvm.org) is a popular full-virtualization solution for Linux based systems. It can be used to run guests systems on systems with hardware virtualization extensions (AMD-V or Intel VT-x).
The goal of this project was creating a minimal solution that would allow a user to run virtual machines (VM) over yocto.
The goal of this project was creating a minimal solution that would allow a user to run virtual machines (VM) over yocto.
== Packages ==
The project is based on the [git://git.se-eng.com/meta-xen.git meta-xen] layer from [http://www.openembedded.org/wiki/LayerIndex oe-core]. This layer creates a target image that can act as a host for running VMs using the Xen hypervisor. It also features the libvirt package used for the virtual machine management.
=== KVM ===
KVM can be used to run multiple virtual machines that containing unmodified Windows or Linux images. Starting from the 2.6.20 version, the kvm component is included in the mainline Linux kernel so no extra packages are required for kvm support, only a proper kernel configuration.
=== Qemu ===
To be able to run the KVM virtual machines, the [http://www.qemu.org qemu] package was included in the image. This comes with built-in support for KVM and for all the new advanced features like virtio, which is the main platform for IO virtualization If the underlying hardware does not provide support for KVM or if it has been disabled, qemu can be used to run the VMs using software emulation, but with a performance loss.
=== Libvirt ====
Libvirt(http://libvirt.org/) is a toolkit for interacting with virtual machine hypervisors. It comes with a C API and a set of bindings for common languages. The functionality is exposed through the virsh command. The library is also used by some modern VM management systems to handle typical tasks when dealing with VMs. Our layer builds libvirt only for the qemu package. To configure libvirt for other hypervisors you just have to make some minor modifications to the recipe provided by the meta-xen layer. An example of how to remotely connect using virt-manager(http://virt-manager.org/) to control the VMs can be found in the VMM section (link).

Revision as of 09:01, 8 November 2012

Virtualization is a hot topic in the operating systems world these days. The use cases vary from server consolidation, virtual test environments to Linux enthusiasms who can’t decide which distribution is best. The Kernel-based Virtual Machine, kvm (http://www.linux-kvm.org) is a popular full-virtualization solution for Linux based systems. It can be used to run guests systems on systems with hardware virtualization extensions (AMD-V or Intel VT-x). The goal of this project was creating a minimal solution that would allow a user to run virtual machines (VM) over yocto.

Packages

The project is based on the meta-xen layer from oe-core. This layer creates a target image that can act as a host for running VMs using the Xen hypervisor. It also features the libvirt package used for the virtual machine management.

KVM

KVM can be used to run multiple virtual machines that containing unmodified Windows or Linux images. Starting from the 2.6.20 version, the kvm component is included in the mainline Linux kernel so no extra packages are required for kvm support, only a proper kernel configuration.

Qemu

To be able to run the KVM virtual machines, the qemu package was included in the image. This comes with built-in support for KVM and for all the new advanced features like virtio, which is the main platform for IO virtualization If the underlying hardware does not provide support for KVM or if it has been disabled, qemu can be used to run the VMs using software emulation, but with a performance loss.

Libvirt =

Libvirt(http://libvirt.org/) is a toolkit for interacting with virtual machine hypervisors. It comes with a C API and a set of bindings for common languages. The functionality is exposed through the virsh command. The library is also used by some modern VM management systems to handle typical tasks when dealing with VMs. Our layer builds libvirt only for the qemu package. To configure libvirt for other hypervisors you just have to make some minor modifications to the recipe provided by the meta-xen layer. An example of how to remotely connect using virt-manager(http://virt-manager.org/) to control the VMs can be found in the VMM section (link).