Table of contents
Characteristics (essence) of virtualization
Two major factions of virtual machines
Some important concepts in virtualization
VMM functions and classifications
Operating system virtualization
Three directions of virtualization
Virtualization basics
The concept of virtualization
What is virtualization
The essence of virtualization is a resource management technology that abstracts and presents various physical resources of a computer (such as servers, networks, memory storage, etc.). These resources are not limited by the architecture, region or physical equipment of the existing resources. constraints; these resources are then combined into a configuration environment for one or more computers, breaking down the indivisible barriers between physical device structures
That is: there is no binding of software and hardware before virtualization, and decoupling of software and hardware after virtualization (separating software and hardware modules to reduce dependency between them)
The implementation of virtualization technology is to add a virtualization layer to the system, through which the lower-layer resources are abstracted into another form of resources and provided to upper-layer applications.
The relationship between cloud computing and virtualization
Virtualization is one of the technical support methods for realizing cloud computing, but it is not the core focus of cloud computing.
Virtualization technology is the basis for cloud computing to have commercial value at the Iass layer
Advantages of virtualization
Cost savings, more effective resource allocation, improved productivity, simplified operation, maintenance and management, higher flexibility and scalability, easier and safer application development, and easier business failure recovery
Characteristics (essence) of virtualization
Partition
The virtualization layer divides server resources between multiple virtual machines, and each virtual machine can run a separate operating system at the same time.
For operating systems on virtual machines, they all think that they are running on real physical machines because they can detect the "virtual hardware" provided by the virtualization layer.
isolation
Failure or virus in one virtual machine will not affect the other virtual machine.
Encapsulation (on which migration depends)
The execution environment of the virtual machine is encapsulated in a separate file (for example, the virtual machine's memory, hard disk, etc. are all encapsulated in the form of files)
In this way, you only need to move these files to move the virtual machine.
Independent from hardware (decoupled from hardware)
Since the virtual machine can only see the "virtual hardware" provided by the virtualization layer, and the "virtual hardware" does not need to consider the physical server, the virtual machine can run on any server from a different manufacturer (migration You need to ensure that the VMM virtualization monitor used is the same)--The VMM software installed under different architecture servers and different operating systems is different. For details, you need to check the corresponding VMM software official website. (VMM will be explained in the next node)
Two major factions of virtual machines
Small and big (computing power integration)
Take out all the resources on several servers and throw them into a resource pool, and then install an operating system on the resource pool to use all the resources; improve the overall performance of the server
Typical representative is Google
big get together small
Divide a server into several small virtual machines; improve resource utilization
A typical representative is Amazon EC2
VMM explanation
Some important concepts in virtualization
Host Machine: Physical machine source
Guest Machine: 空拟机资源
Host OS: The system running on the physical machine
Guest OS: System running on the virtual machine
Hypervisor: Hypervisor is also called a virtual machine monitor (Vritual machine monitor VMM) is an intermediate software layer that runs between the underlying physical server and the operating system, allowing multiple operating systems and applications to share the same hardware resources (i.e. Manages the CPU, memory, I/O devices, instruction sets, etc. of each virtual machine in a virtualized environment; this software layer is also called the virtualization layer and is the core of all virtualization technologies
VMM functions and classifications
VMM's ability
virtual resources
VMM uses underlying hardware resources to build a virtual environment including virtual CPU, memory, hard disk, I/O, etc.
The Guest OS in this environment thinks that it is running on a real computer and uniquely owns all the resources on this 'virtual' machine.
Virtual environment scheduling
VMM can build multiple virtual machines at the same time, run multiple Guest OSs for concurrent execution, and effectively schedule resources through policies.
Management interface for virtualized environments
VMM provides a complete set of management interfaces to support the creation, deletion, suspension and migration of virtual environments.
The upper-layer management provides users with a management interface by calling the management interface provided by VMM.
Two implementation methods of VMM
Hypervisor VM—Type I virtualization—bare metal virtualization—no operating system required
VMM runs directly on physical hardware, focuses on virtual I/0 performance optimization, and is mainly used for server applications.
High operating efficiency, VMM serves as the main operating system
For example: VMware ESX server version, Xen 3.0 and later versions, and Hyper-V are all VMMs of this type.
Different VMM software types and versions run on different architecture servers (x86, RAM, etc. architecture)
Hosted VM ——Type II virtualization—hosted virtualization—requires operating system
VMM runs on the operating system of the physical machine. The upper layer functions are relatively richer and are often used in desktop applications.
The operating efficiency is lower than Type I, but VMM runs as an application within the main operating system environment and is more flexible.
For example: VMware workstation, versions before Xen 3.0, and Oracle VMVirtualBox are all VMMs of this type.
There is currently controversy over whether KVM is a type 1 or type 2 VMM. It can be regarded as a hybrid type and is temporarily classified as type 2.
The above type II VMM can run on both Linux and Windows systems.
Virtualized architecture
A virtualization architecture can use different virtualization technologies; for example, KVM can achieve full virtualization of CPU or paravirtualization of IO (that is, there is no absolute relationship between virtualization architecture and virtualization technology)
That is, the two implementation methods of VMM can be subdivided into the following four implementation methods;
Type II VMM can be subdivided into: host, hybrid, and operating system virtualization, because all three require a host (that is, an operating system needs to be installed first)
Type I VMM is divided into: bare metal architecture (no need to install a host operating system)
host virtualization
Hosted virtualization architecture refers to the installation and running of virtualization programs on the host operating system, relying on the host operating system's support for devices and management of physical resources; this virtualization architecture is also called Type II VMM
The virtualization layer VMM can be regarded as a piece of software, which must be installed on the operating system to run normally. It has high compatibility and is easy to implement; however, it has high management overhead and a large loss of performance.
For example: VMware Workstation used on PCs installs a main operating system, that is, the host operating system, on the hardware basis, then installs a software VMware Workstation on the operating system for virtualization, and then starts several virtual machines on the software.
Manufacturer VMware Workstation, some versions of Hyper-V
Bare metal virtualization
The bare metal virtualization architecture is a native architecture. The virtualized VMM is directly installed on the hard disk and takes over all the resources of the server; this virtualization architecture is also called Type I VMM.
The virtualization layer serves as the main operating system. It is only responsible for communicating with the upper-layer virtual machine operating system and resource coordination. It does not need to deal with too complicated matters, making the performance of the virtual machine almost the same as that of the physical host. However, the compatibility of the hardware is poor, and the virtualization layer Kernel development is difficult
That is: install virtualization management software directly on the physical server, and then run several virtual machines on it
Vendor: VMware EXS, Citrix Xen, FusionSphere, and some versions of Hyper-V
Operating system virtualization
Divide a part of the host operating system, generate an execution environment in this part, and then run multiple virtual machines in the execution environment (virtualize each operating system on the operating system); generally speaking, it also belongs to type II VMM
The operating system virtualization architecture divides a single operating system into multiple containers and uses a container manager to manage it.
Low management overhead; but poor isolation, multiple containers share the same operating system
ManufacturerVirtuozzo
Hybrid virtualization
Insert a kernel-level driver into the kernel of the host operating system. This driver serves as a virtual hardware manager to coordinate hardware access between the virtual machine and the host operating system to implement virtualization resource allocation; in general, it also belongs to Type II VMM
Hybrid virtualization requires underlying hardware to support virtualization extensions
VendorRedhat KVM
Three directions of virtualization
Compute virtualization
It is subdivided into CPU virtualization, memory virtualization, and I/0 virtualization.
CPU virtualization: Let the virtual machine execute some CPU instructions (high-risk instructions, user instructions) like a physical machine
Computing Virtualization 1—CPU Virtualization-CSDN Blog
Memory virtualization: Memory virtualization is simply the management of memory addresses.
Computing Virtualization 2 - Memory Virtualization-CSDN Blog
I/O virtualization: virtualize one input and output interface into multiple
Computing Virtualization 3—I/O Device Virtualization-CSDN Blog
Storage virtualization
It is subdivided into raw device + logical volume, storage device virtualization, host storage virtualization + file system
Storage Virtualization Explanation-CSDN Blog
Advanced features of computing/storage virtualization-CSDN Blog
Network virtualization
Subdivided into VMDQ, SR-IOV, etc.