qemu-kvm 准备知识

来源:互联网 发布:如何禁止软件自动升级 编辑:程序博客网 时间:2024/04/29 00:18

qemu-kvm是当前比较热门的虚拟化技术,接下来的一段时间里我将会在这里为大家呈现系列qemu-kvm内容。这里所要谈到的虚拟化,是指在CPU硬件支持基础之上的虚拟化技术。


KVM(Kernel-based Virtual Machine)官网:http://www.linux-kvm.org/page/Main_Page

介绍:

KVM (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 a processor specific module, kvm-intel.ko or kvm-amd.ko. KVM also requires a modified QEMU although work is underway to get the required changes upstream.

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.

The kernel component of KVM is included in mainline Linux, as of 2.6.20.

KVM is open source software.


qemu官网:http://wiki.qemu.org/Main_Page

介绍:

QEMU is a generic and open source machine emulator and virtualizer.

When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.

When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU. QEMU supports virtualization when executing under the Xen hypervisor or using the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, server and embedded PowerPC, and S390 guests.


准确来说,KVM是Linux kernel的一个模块。可以用命令modprobe去加载KVM模块。加载了模块后,才能进一步通过其他工具创建虚拟机。但仅有KVM模块是 远远不够的,因为用户无法直接控制内核模块去作事情,你还必须有一个运行在用户空间的工具才行。这个用户空间的工具,kvm开发者选择了已经成型的开源虚拟化软件 QEMU。说起来QEMU也是一个虚拟化软件。它的特点是可虚拟不同的CPU。比如说在x86的CPU上可虚拟一个Power的CPU,并可利用它编译出可运行在Power上的程序。KVM使用了QEMU的一部分,并稍加改造,就成了可控制KVM的用户空间工具了。所以你会看到,官方提供的KVM下载有两大部分(qemu和kvm)三个文件(KVM模块、QEMU工具以及二者的合集)。也就是说,你可以只升级KVM模块,也可以只升级QEMU工具。这就是KVM和QEMU 的关系。





Linux Kernel-based Virtual Machine (KVM) 是一款 Linux 开放源码虚拟化软件,基于硬件虚拟化扩展(Intel VT-X 和 AMD-V)和 QEMU 的修改版。KVM 的实现模块又两个,分别是: kvm.ko是提供核心虚拟化的基础架构;特定于处理器的模块 kvm-intel.ko 和 kvm-amd.ko 其设计目标是在需要引导多个未改动的 PC 操作系统时支持完整的硬件模拟。


附:Debian KVM搭建实例





原创粉丝点击