分享

带你走进服务器级别的虚拟化技术世界(入门讲解)

 丝广里 2017-09-11

一、(用户空间)软件级别虚拟化(OS级别虚拟化)

1、vmware workstation

2、openVZ

特点:

1、只能实现完全虚拟化,一般情况下一个虚拟机就是操作系统上面的一个进程,虚拟化软件控制资源的能力低下

2、虚拟机的所设备都由应用层软件来模拟,虚拟机中看到的所有硬件都是假的,指令集转换的路径过长,所以效率低下,一般不于企业环境

3、实现起来简便,可以造假,一般叫超载或者叫超卖

(内核空间)内核级别虚拟化(OS级别虚拟化)

KVM

特点:

1、只能实现完全虚拟化,功能完善

2、虚拟机的所有设备都由应用层软件来模拟,效率比软件级别虚拟化较强,因为转换路径比用户空间虚拟短,另外虚拟化软件运行在操作系统的核心之上,所以对资源的控制能力也比较强。

(底层)hpyervisor虚拟化

1、xen

2、vmware ESX

3、微软hpyervior

特点:

1、hpyervisor直接运行在硬件之上,对硬件(CPU、MEMORY,中断)绝对的控制权,效率强劲

2、需要一个domain0来管理除CPU、MEMEORY、中断以外的硬件处理

3、实现半虚拟化时需要修客户机内核,实现比较麻烦,装好软件后需要重启机器

4、可以实现半虚拟化或者全虚拟化,需要CPU配合。

二、虚拟机分类:

完全虚拟化(不需要更改操作系统的内核,所有的硬件都靠软件来模拟,所以硬件都是假,另外虚拟机的硬件工作时指令集都需要转换)

半虚拟化(需要更改母机和虚拟机的内核,一般不需要软件来模拟,直接使用物理)

XEN的逻辑结构:

带你走进服务器级别的虚拟化技术世界(入门讲解)

XEN结构逻辑图

Below is a diagram of the Xen architecture. The Xen hypervisor runs directly on the hardware and is responsible for handling CPU, Memory, and interrupts. It is the first program running after exiting the bootloader. On top of Xen run a number of virtual machines. A running instance of a virtual machine in Xen is called a domain or guest. A special domain, called domain 0 contains the drivers for all the devices in the system. Domain 0 also contains a control stack to manage virtual machine creation, destruction, and configuration.

Components in detail:

The Xen Hypervisor is an exceptionally lean (<150,000 lines="" of="" code)="" software="" layer="" that="" runs="" directly="" on="" the="" hardware="" and="" is="" responsible="" for="" managing="" cpu,="" memory,="" and="" interrupts.="" it="" is="" the="" first="" program="" running="" after="" the="" bootloader="" exits.="" the="" hypervisor="" itself="" has="" no="" knowledge="" of="" i/o="" functions="" such="" as="" networking="" and="">

Guest Domains/Virtual Machines are virtualized environments, each running their own operating system and applications. Xen supports two different virtualization modes: Paravirtualization (PV) and Hardware-assisted or Full Virtualization (HVM). Both guest types can be used at the same time on a single Xen system. It is also possible to use techniques used for Paravirtualization in an HVM guest: essentially creating a continuum between PV and HVM. This approach is called PV on HVM. Xen guests are totally isolated from the hardware: in other words, they have no privilege to access hardware or I/O functionality. Thus, they are also called unprivileged domain (or DomU).

The Control Domain (or Domain 0) is a specialized Virtual Machine that 0 has special privileges like the capability to access the hardware directly, handles all access to the system’s I/O functions and interacts with the the other Virtual Machines. It also exposes a control interface to the outside world, through which the system is controlled. The Xen hypervisor is not usable without Domain 0, which is the first VM started by the system.

Toolstack and Console: Domain 0 contains a control stack (also called Toolstack) that allows a user to manage virtual machine creation, destruction, and configuration. The toolstack exposes an interface that is either driven by a command line console, by a graphical interface or by a cloud orchestration stack such as OpenStack or CloudStack.

Xen-enabled operating systems: A Xen Domain 0 requires a Xen-enabled kernel. Paravirtualized guests require a PV-enabled kernel. Linux distributions that are based on recent Linux kernel are Xen-enabled and usually contain packages that contain the Xen Hypervisor and Tools Xen (the default Toolstack and Console). All but legacy Linux kernels are PV-enabled: in other words, they will run Xen PV guests.

带你走进服务器级别的虚拟化技术世界(入门讲解)

XEN结构逻辑图

带你走进服务器级别的虚拟化技术世界(入门讲解)

XEN结构逻辑图

KVM的逻辑结构图:

带你走进服务器级别的虚拟化技术世界(入门讲解)

KVM结构逻辑图

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多