CN114691286A - Server system, virtual machine creation method and device - Google Patents

Server system, virtual machine creation method and device Download PDF

Info

Publication number
CN114691286A
CN114691286A CN202110351008.2A CN202110351008A CN114691286A CN 114691286 A CN114691286 A CN 114691286A CN 202110351008 A CN202110351008 A CN 202110351008A CN 114691286 A CN114691286 A CN 114691286A
Authority
CN
China
Prior art keywords
virtual machine
server
virtual
management
submodule
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110351008.2A
Other languages
Chinese (zh)
Inventor
龚磊
龙鹏
周谊珉
黄智超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Cloud Computing Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Cloud Computing Technologies Co Ltd filed Critical Huawei Cloud Computing Technologies Co Ltd
Priority to PCT/CN2021/142282 priority Critical patent/WO2022143714A1/en
Publication of CN114691286A publication Critical patent/CN114691286A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Abstract

The application discloses a server system, a virtual machine creating method and a virtual machine creating device, and belongs to the technical field of cloud computing. The server system comprises a server and an unloading card inserted in the server, and a connection channel is established between the server and the unloading card; the server is internally provided with a virtual machine, the virtual machine is realized through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, and the virtual machine management module comprises a virtual machine management agent submodule and a virtual machine management submodule; the server is provided with a virtual machine management agent submodule, and the unloading card is provided with a virtual machine management submodule, wherein the virtual machine management agent submodule is communicated with the virtual machine management submodule through a connecting channel, and the virtual machine management submodule is used for realizing the management function of the virtual machine. The method and the device reduce the occupation of the server resources by the overhead of the virtual machine simulator.

Description

Server system, virtual machine creation method and device
The present disclosure claims priority from chinese patent application No. 202011603679.5 entitled "computer system supporting cloud services" filed on 29/12/2020, which is incorporated by reference in its entirety.
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a server system, a virtual machine creation method, and an apparatus.
Background
The virtualization technology is used as a core technology of a cloud scene, and the physical resources of one server are shared by a plurality of users by taking a virtual machine as granularity, so that the users can conveniently and flexibly use the physical resources of the server on the premise of safety isolation, and the utilization rate of the physical resources of the server can be greatly improved.
However, in the conventional virtualization technology, when the virtual machine emulator uses the physical resources of the server to provide the virtual machine service for the user, certain physical resources are consumed.
Therefore, all physical resources of the server cannot be fully provided for the user to use. Moreover, with the improvement of the IO performance, the physical resources consumed by the virtual machine simulator are in a linear increase trend, and may have a great influence on the service performance of the virtual machine provided for the user.
Disclosure of Invention
The application provides a server system, a virtual machine creation method and a virtual machine creation device, which can reduce the occupation of a virtual machine simulator on physical resources of a server and ensure the service performance of a virtual machine.
In a first aspect, the present application provides a server system, where the server system includes a server and an offload card inserted in the server, and a connection channel is established between the server and the offload card; the server is internally provided with a virtual machine, the virtual machine is realized through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, and the virtual machine management module comprises a virtual machine management agent submodule and a virtual machine management submodule; the server is provided with a virtual machine management agent submodule, and the unloading card is provided with a virtual machine management submodule, wherein the virtual machine management agent submodule is communicated with the virtual machine management submodule through a connecting channel, and the virtual machine management submodule is used for realizing the management function of the virtual machine.
In the server system, the virtual machine management module is divided into the virtual machine management agent submodule and the virtual machine management submodule, and the virtual machine management submodule is deployed on the unloading card, so that the function of the virtual machine simulator, which has high consumption on server resources, is deployed in the unloading card, the occupation of the overhead of the virtual machine simulator on the server resources is reduced, the influence of the overhead of the virtual machine simulator and the virtual machine providing service for a user on the service performance of the virtual machine due to resource competition is reduced, and the service performance of the virtual machine is effectively ensured. Moreover, the virtual machine management module is divided into a virtual machine management agent submodule and a virtual machine management submodule, so that side effects on the service performance of the virtual machine (such as the scheduling performance of a virtual processor and the I/O read-write performance of the virtual machine) are avoided, and the virtual machine management module has a good application prospect.
Optionally, the management function comprises: one or any combination of a virtual machine life cycle management function, a virtual machine migration function, a virtual remote control function, an asynchronous information processing function and a parameter analysis function.
As can be seen from the above, the functions provided by the vm management sub-module can be regarded as functions that are not very relevant to the vm traffic and/or involve asynchronous operations, and such functions have no influence on the internal performance of the vm itself, but consume large server resources. Therefore, the virtual machine management submodule is deployed on the unloading card, so that the occupation of a virtual machine simulator on server resources can be effectively reduced, and the service performance of the virtual machine can be effectively ensured.
In one implementation manner, the virtual machine simulator further includes a virtual machine hardware simulation module, the virtual machine hardware simulation module is disposed in the server, and the virtual machine hardware simulation module is configured to simulate hardware of the virtual machine according to hardware of the server.
Optionally, the hardware of the virtual machine comprises one or more of: the virtual processor, the virtual memory, the virtual mainboard chip, the virtual input and output device and the virtual bus.
The virtual machine hardware simulation module is used for realizing functions strongly related to functions of the virtual machine, and the functions basically do not consume server resources, so that even if the virtual machine hardware simulation module is deployed in a server, the probability that the virtual machine hardware simulation module affects the service performance of the virtual machine is low, and the service performance of the virtual machine can be effectively ensured.
In one implementation, the virtual machine management submodule is further configured to access data of the virtual machine from a memory of the server in a Direct Memory Access (DMA) manner through the connection channel.
The data are acquired from the virtual memory in a DMA mode, and the DMA mode can allow the data to be directly transmitted between the external equipment and the storage resource, so that the participation of a CPU (central processing unit) is not needed in the data transmission process, and the occupation of the server resource by acquiring the data from the storage resource can be effectively reduced.
Optionally, the server and offload cards are connected via a virtual peripheral component interconnect PCIe bus or a compute express link CXL bus.
In a second aspect, the present application provides a virtual machine creation method, where the method is applied to a server system, the server system includes a server and an offload card inserted in the server, and the server and the offload card establish a connection channel, and the method includes: the method comprises the steps that a server receives a virtual machine creation request sent by a cloud management platform; the server creates a virtual machine in the server according to the virtual machine creating request, starts a virtual machine management agent submodule arranged in the server, and starts a virtual machine management submodule arranged in the unloading card through a connecting channel; the virtual machine is realized through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, the virtual machine management module comprises a virtual machine management agent submodule and a virtual machine management submodule, the virtual machine management agent submodule is communicated with the virtual machine management submodule through a connecting channel, and the virtual machine management submodule is used for realizing the management function of the virtual machine.
Optionally, the virtual machine simulator further includes a virtual machine hardware simulation module, the virtual machine hardware simulation module is disposed in the server, and the virtual machine hardware simulation module is configured to simulate hardware of the virtual machine according to hardware of the server.
Optionally, the virtual machine management submodule is further configured to access data of the virtual machine from the memory of the server in a direct memory access DMA manner through the connection channel.
Optionally, the hardware of the virtual machine comprises one or more of: the virtual processor, the virtual memory, the virtual mainboard chip, the virtual input and output device and the virtual bus.
Optionally, the management function comprises: one or any combination of a virtual machine lifecycle management function, a virtual machine migration function, a virtual remote control function, an asynchronous information processing function, and a parameter parsing function.
Optionally, the server and offload cards are connected via a virtual peripheral component interconnect PCIe bus or a compute express link CXL bus.
In a third aspect, the present application provides a virtual machine creating apparatus, where the apparatus is applied to a server, an offload card is inserted into the server, and a connection channel is established between the server and the offload card, and the apparatus includes: the receiving module is used for receiving a virtual machine creation request sent by the cloud management platform; the processing module is used for creating a virtual machine in the server according to the virtual machine creating request, starting a virtual machine management agent submodule arranged in the server and starting a virtual machine management submodule arranged in the unloading card through a connecting channel; the virtual machine is realized through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, the virtual machine management module comprises a virtual machine management agent submodule and a virtual machine management submodule, the virtual machine management agent submodule is communicated with the virtual machine management submodule through a connecting channel, and the virtual machine management submodule is used for realizing the management function of the virtual machine.
Optionally, the virtual machine simulator further includes a virtual machine hardware simulation module, the virtual machine hardware simulation module is disposed in the server, and the virtual machine hardware simulation module is configured to simulate hardware of the virtual machine according to hardware of the server.
Optionally, the virtual machine management submodule is further configured to access data of the virtual machine from the memory of the server in a direct memory access DMA manner through the connection channel.
Optionally, the hardware of the virtual machine comprises one or more of: the virtual processor, the virtual memory, the virtual mainboard chip, the virtual input and output device and the virtual bus.
Optionally, the management function comprises: one or any combination of a virtual machine life cycle management function, a virtual machine migration function, a virtual remote control function, an asynchronous information processing function and a parameter analysis function.
Optionally, the server and offload cards are connected via a virtual peripheral component interconnect PCIe bus or a compute express link CXL bus.
In a fourth aspect, there is provided a computer device comprising: a processor and a memory, the memory having stored therein a computer program; when the processor executes the computer program, the computer device implements the method provided by the second aspect.
In a fifth aspect, a storage medium is provided, and when executed by a processor, the instructions in the storage medium implement the method provided by the second aspect.
Drawings
Fig. 1 is a schematic diagram of an implementation scenario related to a server system provided in an embodiment of the present application;
FIG. 2 is a schematic deployment diagram of a server system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a server system according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of another server system provided in an embodiment of the present application;
fig. 5 is a schematic diagram of an implementation process of cooperatively implementing a VNC function by a virtual machine management agent submodule and a virtual machine management submodule according to an embodiment of the present application;
fig. 6 is a schematic diagram of an implementation process of performing input on a VNC client through a mouse and a keyboard to achieve remote control of a virtual machine according to an embodiment of the present application;
fig. 7 is a flowchart of a virtual machine creation method provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a virtual machine creation apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
For the sake of understanding, terms referred to in the embodiments of the present application will be explained below.
Cloud computing (cloud computing): cloud computing is a kind of distributed computing, and refers to a network that performs unified management and scheduling on a large number of computing resources and storage resources and provides on-demand services to users. The computing resources and storage resources are both provided by clusters of computing devices disposed in a data center. Moreover, the cloud computing may provide multiple types of service types for the user, for example, infrastructure as a service (IaaS), platform as a service (PaaS), software as a service (SaaS), and the like may be provided.
Virtualization (virtualization) is a resource management technology, which abstracts and converts various physical resources of a host, such as servers, network resources, memory, storage resources and the like, to present them, so as to break the barrier of non-cuttability among the physical structures of the host, and enable users to apply these resources in a better way than the original configuration. The resources used by virtualization are called virtualized resources, and the virtualized resources are not limited by the existing resource installation mode, region or physical configuration. Generally, virtualized resources include computing resources and storage resources.
Virtual Machine (VM): the method refers to a complete computer system which is simulated by a virtualization technology and has complete hardware system functions and runs in a completely isolated environment. Part of the instruction subset of the virtual machine may be processed in the host machine, and other part of the instructions may be executed in an emulated manner. A user may purchase cloud services in the form of renting virtual machines.
Host (also called physical machine): physical resources (such as virtual machines or physical machines) for carrying virtualization technologies. Typically, the host used to deploy the virtual machines is typically a physical server.
Direct Memory Access (DMA): the direct memory operation or the group data transmission mode may also be referred to as a data interaction mode in which an external device directly accesses data from a memory of a computer without passing through a Central Processing Unit (CPU) of the computer. When data is transmitted in the DMA mode, a CPU of the computer issues an instruction to the DMA controller to indicate the DMA controller to control the transmission of the data, and the DMA controller feeds back the information of the transmission completion to the CPU after the data transmission is completed. Therefore, in the process of DMA data transmission, the CPU of the computer is not required to execute transmission operation, so that the operations of instruction fetching, data sending and the like of the CPU of the computer can be omitted, the resource occupancy rate of the CPU of the computer is reduced, and the system resource can be saved.
The DMA may include Remote Direct Memory Access (RDMA) and local DMA. RDMA refers to a data transmission mode in which data is directly transmitted from the memory of one computer to another computer through a network without intervention of operating systems of both parties. Local DMA refers to the manner in which data is transferred without going through a network.
Peripheral component interconnect express (PCIe) bus: a high speed serial computer expansion bus.
Compute express link (CXL) bus: a high-speed connection bus for a high-speed computer.
Network card: which may also be referred to as a Network Interface Controller (NIC), a network adapter, or a local area network receiver, is a type of computer hardware designed to allow a host or computing device to communicate over a network.
Memory (memory): the memory may be referred to as an internal memory or a main memory, and is used for temporarily storing arithmetic data in the CPU and data exchanged with an external memory such as a hard disk.
The embodiment of the application provides a server system. The server system comprises a server and an uninstalling card inserted in the server. The server and the uninstalling card establish a connection channel. The server is internally provided with a virtual machine, the virtual machine is realized through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, and the virtual machine management module comprises a virtual machine management agent submodule and a virtual machine management submodule. The server is provided with a virtual machine management agent submodule, and the uninstalling card is provided with a virtual machine management submodule. The virtual machine management agent submodule is communicated with the virtual machine management submodule through a connecting channel, and the virtual machine management submodule is used for realizing the management function of the virtual machine.
Because the virtual machine management submodule is used for realizing the management function of the virtual machine, the virtual machine management submodule consumes larger physical resources, and the virtual machine management module is divided into the virtual machine management agent submodule and the virtual machine management submodule and is deployed on the unloading card, so that the function of consuming larger server resources in the virtual machine simulator is deployed in the unloading card, the occupation of the server resources by the overhead of the virtual machine simulator is reduced, the influence of the overhead of the virtual machine simulator and the virtual machine providing service for a user on the service performance of the virtual machine due to competitive resources is reduced, and the service performance of the virtual machine is effectively ensured.
Fig. 1 is a schematic diagram of an implementation scenario related to a server system provided in an embodiment of the present application. As shown in fig. 1, the implementation scenario includes: a server system 1 and a management platform 2. The management platform 2 is configured to interact with a user and send a request of the user to the server system 1. The server system 1 is used to respond to the user's request. For example, the management platform 2 is configured to send a virtual machine creation request or a request for managing a virtual machine to the server system 1, where the server system 1 is configured to create the virtual machine according to the virtual machine creation request, or the server system 1 is configured to execute an operation related to managing the virtual machine according to the request for managing the virtual machine. The virtual machine is used for implementing a service of a user and providing a service for the user, for example: the virtual machine is used for providing a language identification service, a video auditing service or an image rendering service and the like for a user.
In an implementation manner, the server system 1 may be deployed in a cloud platform P of a cloud data center, and the management platform may be a cloud management platform 2 deployed in the cloud platform P. The cloud platform P may be a cloud platform P of a center cloud, a cloud platform P of an edge cloud, or a cloud platform P including a center cloud and an edge cloud, which is not specifically limited in the embodiment of the present application. Fig. 1 is a schematic diagram of a server system 1 deployed in a cloud platform P.
In an implementation manner, the cloud platform P may be implemented by a hardware manner such as the physical server 11. For example, the cloud platform P may be implemented by one physical server 11, or a physical server 11 cluster composed of several physical servers 11, or a cloud computing service center. Moreover, the cloud platform P may be implemented by independently deployed resources, or may be implemented by distributively deployed resources.
A large amount of basic resources owned by a cloud service provider are deployed in the cloud platform P, and the cloud platform P can provide cloud services to users by using the basic resources. The underlying resources may include computing resources, storage resources, network resources, and the like, and the computing resources may be a large number of computing devices (e.g., server system 1). As shown in fig. 1, when a user purchases a cloud service, the cloud platform P may create a virtual machine for the user using basic resources such as the server system 1, so as to provide the cloud service to the user using the created virtual machine.
The cloud management platform 2 and the server system 1 may be implemented according to the basic resources in the cloud platform P. Optionally, the cloud management platform 2 may be implemented by software such as a virtual machine or a container on a base resource, or the cloud management platform 2 may be implemented by a physical server 11 (also referred to as a host) such as a bare metal server 11. The server system 1 includes a server 11 and an offload card 12, and the server 11 may be implemented by a physical server 11 (also referred to as a host) such as a bare metal server 11. The offload card 12 may be implemented by heterogeneous hardware, and the heterogeneous hardware may be an external device to the server 11. Where the offload card 12 is also referred to as a smart card, the offload card 12 may be considered a mini-server.
As shown in fig. 2, a Virtual Machine Manager (VMM) 111 and a virtual machine simulator 112 run on the server 11. The VMM is used to provide hardware resources such as CPU and memory in the server 11 to the virtual machines (e.g., VMs 1-VMn in fig. 2) for use through virtualization technology. And the VMM is also used to pass the input and output devices provided by the offload card 12 through to the virtual machine for use. By passing the input and output devices of the offload card 12 through to the virtual machine for use, the virtual machine is enabled to bypass the VMM to directly access the input and output devices of the offload card 12, thereby enabling the virtual machine to achieve performance approaching that of a physical machine. The virtual machine emulator 112 is configured to virtualize a virtual machine based on the hardware function of the virtual machine provided by the virtual machine manager 111.
Optionally, as shown in fig. 2, the offload card 12 may be connected to a storage resource and/or a network resource, so that the offload card 12 can send the I/O request of the virtual machine running in the server 11 to the storage resource and/or the network resource for processing.
The following describes an implementation of the server system 1 according to the embodiment of the present application. As shown in fig. 3, the server system 1 includes: the server 11 and the uninstalling card 12, and the server 11 and the uninstalling card 12 establish a connection channel.
A virtual machine VM (e.g., VM1,....., VMn in fig. 3) is disposed in the server 11, and the virtual machine is implemented by the virtual machine emulator 112, where the virtual machine emulator 112 includes a virtual machine management module 1121, and the virtual machine management module 1121 includes a virtual machine management agent sub-module 1121a and a virtual machine management sub-module 1121 b.
A virtual machine management agent sub-module 1121a is deployed on the server 11, and a virtual machine management sub-module 1121b is deployed on the offload card 12, where the virtual machine management agent sub-module 1121a communicates with the virtual machine management sub-module 1121b through a connection channel, and the virtual machine management sub-module 1121b is configured to implement a management function of a virtual machine.
In an implementation manner, the virtual machine management agent sub-module 1121a is specifically configured to receive a management request requesting to manage a virtual machine, and send the management request to the virtual machine management sub-module 1121b through a connection channel, and the virtual machine management sub-module 1121b is specifically configured to execute a relevant operation of managing the virtual machine according to the management request, so as to implement management of the virtual machine.
Because the virtual machine management sub-module 1121b is used to implement a management function of a virtual machine, and the virtual machine management sub-module 1121b consumes physical resources greatly, the virtual machine management module 1121b is split into the virtual machine management agent sub-module 1121a and the virtual machine management sub-module 1121b, and the virtual machine management sub-module 1121b is deployed on the offload card 12, so that a function of consuming a large amount of server resources in the virtual machine emulator 112 is deployed in the offload card 12, occupation of server resources by the overhead of the virtual machine emulator 112 itself is reduced, the overhead of the virtual machine emulator 112 itself and an influence of competing resources on service performance of the virtual machine by a virtual machine providing service for a user are reduced, and service performance of the virtual machine is effectively guaranteed.
In the embodiment of the present application, the server 11 may be implemented by a physical server 11 such as a bare metal server 11. The offload card 12 may be implemented by heterogeneous hardware, and the heterogeneous hardware may serve as an external device to the server 11. The connection channel between the offload card 12 and the server 11 may be implemented by a connection bus. For example, a PCIe bus, a CXL bus, a virtual Peripheral Component Interconnect (PCI) bus, or an Industry Standard Architecture (ISA) bus is connected between the offload card 12 and the server 11. At this time, when the server 11 processes input/output (I/O) traffic that needs to be offloaded to the offload card 12, the server may output relevant data to the offload card 12 for processing through a bus between the offload card 12 and the server 11. The offload card 12 is an offload card 12 suitable for a connection bus between the offload card 12 and the server 11, for example, when a PCIe bus is connected between the offload card 12 and the server 11, the offload card 12 is a PCIe card, and the model of the offload card is not specifically limited in this embodiment of the application.
The following describes an implementation of the server system 1, taking as an example a connection between the offload card 12 and the server 11 via a PCIe bus. Fig. 4 is a schematic structural diagram of a server system 1 according to an embodiment of the present application. As shown in fig. 4, the server system 1 in the system architecture includes a server 11 and an offload card 12. The server 11 includes a CPU1, memory 1, and a Root Complex (RC) chip. The offload card 12 includes a CPU2, a memory 2, and an End Point (EP) chip connected to an RC chip via a PCIe bus. The RC chip is used to provide the CPU1 with a hardware interface for sending and receiving PCIe messages from external devices. The EP chip is used to provide the peripheral interface with a hardware interface for sending and receiving PCIe messages with the server 11.
The embodiment of the present application does not limit the specific implementation of the RC chip and the EP chip, and any RC chip and EP chip that are implemented following the PCIe specification can be used. For example, the EP chip may be an application-specific integrated circuit (ASIC) chip, an intelligent network card or a field-programmable gate array (FPGA) chip, and the like. Also, the EP chip may be connected directly or indirectly to the PCIe bus, so that the server 11 and the EP may be connected through the PCIe bus. For example, an EP may be indirectly connected to a PCIe bus through a switch (switch) that can provide more ports for connecting EP chips for expansion links.
Optionally, the management function of the virtual machine includes: one or any combination of a virtual machine life cycle management function, a virtual machine migration function, a virtual remote control function, an asynchronous information processing function and a parameter analysis function. Accordingly, as shown in fig. 4, the virtual machine management submodule 1121b includes: one or any combination of a virtual machine lifecycle management unit b1, a migration unit b2, a virtual remote control unit b3, an asynchronous information processing unit b4, and a parameter parsing unit b 5. The function of each unit is as follows:
the virtual machine lifecycle management unit b1 is used to implement a virtual machine lifecycle management function, i.e., manage the running state of the virtual machine. For example, the virtual machine lifecycle management unit b1 is used to control virtual machine start and stop.
The migration unit b2 is configured to implement a virtual machine migration function, that is, to obtain data to be migrated of the virtual machine from the virtual memory 1122b, and perform a migration operation on the virtual machine based on the data to be migrated. In an implementation manner, the migration unit b2 may be a live migration unit b2, configured to perform acceleration processing on the migration logic, including acquiring data to be migrated of the virtual machine in the virtual memory 1122b in a DMA manner, and then sending the data to be migrated to another server 11 to which the virtual machine needs to be migrated. The live migration module may send the data to be migrated to another server 11 through a connection channel between the servers 11. For example, a communication channel such as a socket channel between the servers 11 is used to send the data to be migrated to the other servers 11.
The virtual remote control unit b3 is configured to implement a virtual remote control function, that is, obtain video memory data from the virtual memory 1122b of the virtual machine, and provide the video memory data to the remote control client, so that the remote control client performs remote control on the virtual machine based on the video memory data. In an implementation manner, the virtual remote control unit b3 may be configured to implement functions of a Virtual Network Console (VNC), including a function of performing protocol analysis on the VNC and a function of acquiring video memory data according to operations such as a keyboard and a mouse.
The asynchronous information processing unit b4 is configured to implement an asynchronous information processing function, that is, to obtain information required by the virtual machine management submodule 1121b to perform an asynchronous operation from a virtual machine. In the running process of the virtual machine, the virtual machine management sub-module 1121b needs to implement some asynchronous operations according to data acquired from the virtual machine. At this time, the asynchronous information processing unit b4 is used to acquire the relevant information from the virtual machine in the non-busy state of the virtual machine. For example, the asynchronous information processing unit b4 may obtain some configuration information of the virtual machine when the virtual machine is powered on, so that the virtual machine management sub-module 1121b can execute a corresponding asynchronous operation according to the configuration information.
The parameter parsing unit b5 is used to implement a parameter parsing function, i.e., to parse the communication protocol used to run the virtual machine and the parameters required to run the virtual machine. For example, the parameter parsing unit b5 is used to parse parameters required to create a virtual machine.
As can be seen from the above, the functions provided by the vm management sub-module 1121b can be regarded as functions that are not related to the vm traffic and/or involve asynchronous operations, and such functions have no impact on the internal performance of the vm, but consume large server resources. Therefore, by deploying the vm management sub-module 1121b in the offload card 12, the occupation of server resources by the vm emulator 112 can be effectively reduced, and the service performance of the vm can be effectively ensured.
It should be noted that the above contents of the management function of the virtual machine management module 1121 are merely examples of the management function of the virtual machine management module 1121, and are not used to limit the type of the management function of the virtual machine management module 1121, and the type of the management function of the virtual machine management module 1121 may be adjusted according to the application requirements of virtual machines.
In one implementation, as shown in fig. 4, the virtual machine emulator 112 further includes a virtual machine hardware emulation module 1122, the virtual machine hardware emulation module 1122 is provided in the server 11, and the virtual machine hardware emulation module 1122 is configured to emulate hardware of the virtual machine according to hardware of the server 11. The virtual machine hardware simulation module 1122 is configured to implement a function strongly related to a virtual machine function, and the function basically does not consume server resources, so that even if the virtual machine hardware simulation module 1122 is deployed in the server 11, the probability that the virtual machine hardware simulation module 1122 affects the service performance of the virtual machine is low, and the service performance of the virtual machine can be effectively ensured.
Optionally, as shown in fig. 4, the hardware of the virtual machine includes one or more of: a virtual central processing unit (vm) 1122a, a virtual memory 1122b, a virtual motherboard chip 1122c, a virtual i/o device 1122d, and a virtual bus 1122 e.
The virtual machine hardware simulation module 1122 simulates hardware of a virtual machine, and means that the virtual machine hardware simulation module 1122 provides a function corresponding to the hardware of the virtual machine to the virtual machine. For example, the virtual machine hardware simulation module 1122 simulating the virtual processor 1122a means that the virtual machine hardware simulation module 1122 provides the computing power of the virtual processor 1122a to the virtual machine. For example, the virtual machine hardware simulation module 1122 simulates the virtual memory 1122b, and provides the virtual machine with a function of temporarily storing the operation data in the virtual processor 1122a and the data exchanged with the external memory such as a hard disk by the virtual machine hardware simulation module 1122 b. For another example, the virtual machine hardware simulation module 1122 simulates the virtual motherboard chip 1122c, and means that the virtual machine hardware simulation module 1122 provides the virtual machine with functions such as connecting different virtual circuit elements to the virtual motherboard chip 1122c, transmitting information between the different virtual circuit elements, and receiving external information and transmitting the external information to the corresponding virtual circuit element for processing. For another example, the virtual machine hardware simulation module 1122 simulating the virtual input/output device 1122d means that the virtual machine hardware simulation module 1122 provides the input and output functions of the input/output device to the virtual machine. For example, the virtual machine hardware simulation module 1122 simulating the virtual bus 1122e means that the virtual machine hardware simulation module 1122 provides a function of transferring information between the virtual processor 1122a, the virtual memory 1122b, and the virtual input/output device 1122d to the virtual machine.
Optionally, virtual memory 1122b includes processor memory allocated to virtual processor 1122a, as well as virtual video memory. The virtual motherboard chip 1122c includes a host bridge chip of the virtual bus 1122e, a south bridge chip of the virtual bus 1122e, a north bridge chip of the virtual bus 1122e, and the like. The virtual input and output device 1122d includes a virtual mouse, a virtual keyboard, and the like. The type of virtual bus 1122e may be determined by the application requirements of the virtual machine. For example, virtual bus 1122e can be a virtual PCIe bus, a CXL bus, a PCI bus, an ISA bus, or the like.
The contents of the hardware of the virtual machine are merely examples of the hardware of the virtual machine simulated by the virtual machine hardware simulation module 1122, and the types of the hardware of the virtual machine simulated by the virtual machine hardware simulation module 1122 are not limited, and may be adjusted according to the application requirements of the virtual machine.
In the virtual machine emulator 112 provided in this embodiment of the present application, the virtual machine management agent sub-module 1121a and the virtual machine hardware simulation module 1122 are deployed on the server 11, and the virtual machine management sub-module 1121b is deployed on the offload card 12, but the management function for the virtual machine needs to be implemented through cooperation between the virtual machine VM, the virtual machine management agent sub-module 1121a, and the virtual machine management sub-module 1121 b. For example, in some functions for a virtual machine, the virtual machine management sub-module 1121b needs to acquire data from a storage resource of the virtual machine VM and perform a corresponding operation according to the acquired data.
A connection channel is established between the server 11 and the offload card 12, and the virtual machine management agent sub-module 1121a can communicate with the virtual machine management sub-module 1121b through the connection channel, so that the virtual machine management agent sub-module 1121a transmits data acquired from a storage resource of a virtual machine to the virtual machine management sub-module 1121 b. And, in order to reduce the occupation of server resources by the overhead of acquiring data, at least two communication channels implemented by software can be established based on the connection channel.
In one implementation, the at least two communication channels implemented by software include: an address fetch channel and a DMA channel. The address obtaining channel is used for the vm management agent sub-module 1121a to send a storage address of data in the virtual memory to the vm management sub-module 1121 b. The memory address may be represented by a first address and an offset to the data. Optionally, the address obtaining channel between the virtual machine management agent sub-module 1121a and the virtual machine management sub-module 1121b may be a socket (socket) connection channel (e.g., a vsock channel). The DMA channel is used for the virtual machine management submodule 1121b to obtain the required data from the virtual memory in a DMA manner based on the storage address of the data in the virtual memory.
The storage address of the data in the virtual memory belongs to the control plane information, and the control plane information is transmitted through the address acquisition channel due to the small data volume of the control plane information, so that the occupation of the overhead of transmitting the control plane information on server resources can be effectively reduced. And the DMA mode is adopted to acquire the data from the virtual memory, and the DMA mode can allow the data transmission between the external equipment and the storage resource to be directly carried out, so that the participation of a CPU (central processing unit) is not needed in the data transmission process, and the occupation of the server resource by acquiring the data from the storage resource can be effectively reduced.
For example, a vsock channel is provided between virtual machine management sub-module 1121b and virtual machine management agent sub-module 1121 a. When the VNC function is implemented, the vm management sub-module 1121b establishes a connection with a VNC client. When the video memory data needs to be acquired, the virtual machine management submodule 1121b may send an address acquisition request to the virtual machine management agent submodule 1121a through the vsock channel. The virtual machine management agent submodule 1121a may obtain, according to the address obtaining request, an address of the video memory data in the virtual video memory of the virtual machine, and then send the address to the virtual machine management submodule 1121b through the vsock channel. Then, the virtual machine management sub-module 1121b obtains the video memory data from the virtual video memory of the virtual machine through a DMA according to the address, and sends the video memory data to the VNC client. The VNC client acquires video memory data from a virtual video memory of the virtual machine, displays the video memory data on the VNC client according to the video memory data, and then remotely controls the virtual machine according to the displayed content.
In an implementation manner, as shown in fig. 5, a specific implementation process of the VNC function may include the following steps:
step S1, after the virtual machine is started, the virtual machine management agent sub-module 1121a and the virtual machine management sub-module 1121b start to operate, the management agent main thread is pulled up in the server 11, the vsk _ thiophread thread and the vnc _ worker thread are pulled up in the offload card 12, and a vsock channel is established between the vsk _ thiophread thread and the management agent main thread. The function of the virtual machine management sub-module 1121a is implemented by a management agent main thread in the server 11, the function of the virtual machine management sub-module 1121b is implemented by an vsk _ othread thread and a vnc _ worker thread, and a virtual video memory vga is allocated in the virtual memory 1122 b.
Step S2, the VNC _ worker thread monitors a connection request sent by the VNC client, where the connection request carries an Internet Protocol (IP) address and a port address of the VNC client.
Step S3, the VNC _ worker thread establishes a communication connection with the VNC client according to the IP address and the port address of the VNC client, and starts a timer in the virtual machine management sub-module 1121 b.
And S4 and vsk _ thiophread thread sends an address acquisition request to the main thread of the management agent through the vsock channel under the triggering of the timer.
Step S5, the management agent main thread in the virtual machine management agent sub-module 1121a monitors a message sent through the vsock channel, analyzes the address acquisition request after receiving the address acquisition request, queries the virtual graphics memory vga.vram according to the analysis content to obtain the address of the graphics memory data in the virtual graphics memory, and sends the queried graphics memory address to the vsk _ thiophead thread through the vsock channel. The operating system of the virtual machine is used for updating the video memory data in the virtual video memory according to the running state of the virtual machine.
The address of the video memory data in the virtual video memory can be reflected by the physical address of the virtual video memory, the dirty page bitmap, the image dirty bitmap and other information. Moreover, VGA virtual devices are also simulated in the vm management agent sub-module 1121a, and when the VNC function is implemented, the video memory data may be stored in the video memory allocated to the VGA virtual device, and correspondingly, when the video memory address is queried, the address of the video memory data in the video memory allocated to the VGA virtual device may be implemented by querying the address of the video memory data in the video memory allocated to the VGA virtual device. In addition, the representation of the address is slightly different when the virtual machine is operating in a graphics mode and a text mode, respectively. In the graphic mode, the address is represented by information such as VGA video memory physical address, video memory dirty page bitmap and image dirty page bitmap. In the text mode, the address is represented by information such as a physical address and an image dirty page bitmap stored in the encoding result. Meanwhile, in order to facilitate the VNC client to correctly display according to the video memory data, it is necessary to acquire basic composition information of the video memory data in addition to the address of the video memory data in the virtual video memory, for example, in a graphics mode, the basic composition information of an image is also necessary to acquire. A dirty page is a page in memory that has updated content but the updated content has not yet been flushed to disk.
And S6 and vsk _ thiophread thread send the video memory address acquired from the vsock channel to the vnc _ worker thread.
And step S7, the vnc _ worker thread acquires the video memory data from the virtual video memory in a DMA mode according to the received video memory address.
In addition, before the vnc _ worker thread acquires the video memory data according to the video memory address, preparation work such as applying for a memory space for storing the acquired video memory data and the like is also required according to basic composition information of the video memory data.
And S8, the VNC _ worker thread encodes the acquired video memory data and sends the encoded video memory data to the VNC client.
And step S9, the VNC client displays the video memory data according to the received video memory data, and remotely controls the virtual machine according to the displayed image.
The implementation scenarios of the VNC function are various, and the implementation procedure of the implementation scenario is described below by taking an implementation scenario in which input is performed on a VNC client through a mouse and a keyboard to implement remote control on a virtual machine as an example, and fig. 6 is an implementation procedure schematic diagram of the implementation scenario provided in the embodiment of the present application.
As shown in fig. 6, in response to an input operation of a mouse and a keyboard on the VNC client, the virtual input/output devices simulated by the virtual machine hardware simulation module 1122 include a virtual mouse and a virtual keyboard, and a shadow device of the mouse and the keyboard is configured in the virtual machine management submodule 1121 b. After information is input by a mouse or a keyboard on the VNC client, the VNC client transmits the input event to the VNC _ worker thread, and the VNC _ worker thread transmits the input event to the console in the uninstall card 12. The console determines whether the input event is generated by a mouse or a keyboard according to the input event, and then feeds back an identifier of the input event to the vnc _ worker thread. The vnc worker thread sends the identity to the shadow device, which records the identity and sends the identity and the entered information to the vsk _ thiophead thread. The vsk _ thiophread thread sends the identification and entered information to the management agent main thread through the vsock channel. The management agent main thread sends the input information to the corresponding virtual input/output device 1122d according to the identification, that is, when the identification indicates a keyboard, the input information is sent to the virtual keyboard, and when the identification indicates a mouse, the input information is sent to the virtual mouse. And then, the corresponding input and output equipment executes related input operation according to the input information, and sends the result of the input operation to the operating system of the virtual machine through an interrupt signal, so that the operating system updates the video memory according to the result of the input operation. Then, the management agent main thread acquires an updated address of the video memory, and sends the updated address of the video memory to the vsk _ thioread thread through the vsock channel, so that the VNC _ worker thread acquires updated video memory data according to the address, and sends the updated video memory data to the VNC client, so as to display a result generated by an input operation on the VNC client. The process from receiving the input information to sending the information to the server 11 by the offload card 12 may be regarded as a process in which the offload card 12 encapsulates and modifies the input information of the VNC client into a remote call event, and then sends the remote call event to the server 11 through a callback and a vsock channel registered by a corresponding shadow device. The process from receiving vsk _ thiophead thread information sent through the vsock channel to updating the video memory according to the operation result by the server 11 can be regarded as a process in which the server 11 reversely parses the remote call event, and finds the device to call the corresponding event processing function for processing according to the identifier in the parsed content.
It should be noted that there are various functions that need to be implemented by the virtual machine through cooperation of the virtual machine, the virtual machine management agent sub-module 1121a and the virtual machine management sub-module 1121b, and this embodiment of the present application does not list them one by one. However, it should be understood that, when a function that needs to be implemented by the virtual machine, the virtual machine management agent sub-module 1121a, and the virtual machine management sub-module 1121b cooperatively is implemented, the implementation process thereof may refer to the implementation process of the VNC function, which is not described in detail herein.
Optionally, as shown in fig. 4, the offload card 12 may be connected to the storage resource and/or the network resource through the network card 13, so that the offload card 12 can send the I/O request of the virtual machine running in the server 11 to the storage resource and/or the network resource for processing. For example, the offload card 12 is configured with a network card 13, and the offload card 12 can be connected to the storage resources and the network resources in the cloud data center through the network card 13.
In an implementation manner, as shown in fig. 4, a server management module 113 is further disposed in the offload card 12, and the server management module 113 is configured to manage an operation state of the server system 1. For example, the server management module 113 is used for managing the virtualization platform (e.g., implementing libvirt's function), maintaining and managing the computing resources of the virtual machine (e.g., implementing Nova's function), and performing system installation, upgrade, deployment, and operation and maintenance related functions in the server 11.
In addition, when the server system 1 is deployed in a cloud data center, the server management module 113 is further configured to receive a management plane operation request sent by the cloud management platform 2, and execute a corresponding operation according to the management plane operation request. The management plane operation request may be a request for the cloud management platform 2 to manage and send the virtual machine, or may be a request for the user to manage and send the virtual machine through the cloud management platform 2.
The server management module 113 receives the management plane operation request and executes corresponding operation, so that the server 11 does not need to receive the management plane operation request and execute corresponding operation, the overhead of server resources caused by receiving the management plane request and executing corresponding operation is reduced, and the service performance of the virtual machine can be further ensured.
In summary, in the server system provided in the embodiment of the present application, the virtual machine management module is split into the virtual machine management agent sub-module and the virtual machine management sub-module, and the virtual machine management sub-module is deployed on the offload card, so that a function that consumes a large amount of server resources in the virtual machine simulator is deployed in the offload card, occupation of server resources by overhead of the virtual machine simulator itself is reduced, influence of the overhead of the virtual machine simulator itself and a virtual machine providing service for a user on service performance of the virtual machine due to resource competition is reduced, and service performance of the virtual machine is effectively ensured. Moreover, the virtual machine management module is divided into a virtual machine management agent submodule and a virtual machine management submodule, so that side effects on the service performance of the virtual machine (such as the scheduling performance of a virtual processor and the I/O read-write performance of the virtual machine) are avoided, and the virtual machine management module has a good application prospect.
The embodiment of the application also provides a virtual machine creating method. The virtual machine creating method is applied to the server system provided by the embodiment of the application, the server system comprises a server and an unloading card inserted in the server, and a connection channel is established between the server and the unloading card. Optionally, a server management module is also deployed in the offload card. And the uninstalling card is connected with the storage resource and/or the network resource through the network card. Further, the server and offload card may be connected via a bus, such as a virtual peripheral component interconnect (PCIe) bus connection.
As shown in fig. 7, the virtual machine creation method includes:
step 701, a server receives a virtual machine creation request sent by a cloud platform.
When a user needs to use a virtual machine to realize a service, the user can operate on a client, the operation triggers a virtual machine creation request for requesting to create the virtual machine to be sent to a cloud management platform, and the cloud management platform sends the virtual machine creation request to a server.
The virtual machine creation request carries the configuration requirements of the virtual machine. The configuration requirements of the virtual machine are used to indicate the specification of the virtual machine that is requested to be created. Also, since the virtual machine needs to run based on the hardware of the virtual machine provided by the virtual machine simulator, what the configuration requirement indicates may be the specification of the hardware of the virtual machine required for the virtual machine to run. For example, the specification of the hardware of the virtual machine indicated by the configuration requirement may include: the method comprises the following steps of obtaining specification parameters such as the total number of virtual processors, the topological structure of the virtual processors, the types of the virtual processors, the number of virtual memories, the use strategy of the virtual memories, the setting mode of virtual memory slots, the types of virtual input and output equipment, the specifications of the virtual input and output equipment, the storage path of an image file of an operating system of the virtual machine, the storage path of the image file of an application program for realizing services of the virtual machine, and configuration information of initialization parameters of the operating system of the virtual machine.
Wherein the topology of the virtual processors is to indicate one or more of a total number of virtual processors that the virtual machine needs to use, a total number of virtual cores that each virtual processor includes, and a total number of hyper-threads that each virtual processor includes. The type of the virtual processor is used to indicate the word size, model number, etc. of the virtual processor. The word size of a virtual processor is the number of binary bits that the virtual processor can process in parallel at one time. The usage policy of the virtual memory is used to instruct a manner in which the virtual memory is used by the plurality of virtual processors used by the virtual machine. For example, the virtual memory usage policy is used to instruct a plurality of virtual CPUs used by the virtual machine to use the virtual memory in a non-uniform memory access (NUMA) manner. The specification of the virtual input output device is used for indicating the configuration specification of the virtual input output device. For example, when the virtual input/output device is a virtual network card, the specification of the virtual network card indicates information such as description information of a queue of the virtual network card and a Media Access Control (MAC) address. When the virtual input/output device is a virtual disk, the specification of the virtual disk indicates information such as the capacity of the virtual disk. The image file of the operating system of the virtual machine is used for recording relevant information of interaction between the operating system and the hardware of the virtual machine. The image file of the application program for realizing the service of the virtual machine is used for recording relevant information of interaction between the application program for realizing the service, which runs on the basis of the operating system of the virtual machine, and the operating system of the virtual machine. For example, when the operating system of the virtual machine is the LINUX system, the image file of the operating system of the virtual machine may be a kernel image file, and the image file of the application program for implementing the service of the virtual machine may be an initrd image file.
Step 702, the server creates a virtual machine in the server according to the virtual machine creation request, starts a virtual machine management agent submodule arranged in the server, and starts a virtual machine management submodule arranged in the uninstalling card through a connecting channel.
After receiving the virtual machine creation request, the VMM in the server pulls up the virtual machine hardware simulation module according to the virtual machine creation request, and uses the virtual machine hardware simulation module to simulate the hardware of the virtual machine according to the configuration requirement of the virtual machine indicated by the virtual machine creation request and the hardware of the server. In addition, the VMM may also start a virtual machine management agent sub-module disposed in the server, and start a virtual machine management sub-module disposed in the offload card through the connection channel, so as to implement a management function of the virtual machine through the virtual machine management agent sub-module and the virtual machine management sub-module.
Optionally, the hardware of the virtual machine comprises one or more of: the virtual processor, the virtual memory, the virtual mainboard chip, the virtual input and output device and the virtual bus. For example, the virtual machine hardware simulation module may simulate the hardware of the virtual machine according to specification parameters related to the hardware of the virtual machine, such as the total number of virtual processors, the topology of the virtual processors, the type of the virtual processors, the number of virtual memories, the use policy of the virtual memories, the setting manner of virtual memory slots, the type of virtual input/output devices, and the specification of the virtual input/output devices, which are indicated by the configuration requirements.
Optionally, the virtual machine management submodule is further configured to access data of the virtual machine from the memory of the server in a direct memory access DMA manner through the connection channel.
Optionally, the management function of the virtual machine includes: one or any combination of a virtual machine life cycle management function, a virtual machine migration function, a virtual remote control function, an asynchronous information processing function and a parameter analysis function.
Optionally, the server and offload cards are connected via a virtual peripheral component interconnect PCIe bus or a compute express link CXL bus.
In summary, in the virtual machine creating method provided in the embodiment of the present application, the virtual machine management module is split into the virtual machine management agent sub-module and the virtual machine management sub-module, and the virtual machine management sub-module is deployed on the offload card, so that a function that consumes a large amount of server resources in the virtual machine simulator is deployed in the offload card, occupation of server resources by the overhead of the virtual machine simulator itself is reduced, influence of the overhead of the virtual machine simulator and the virtual machine providing services for users on the service performance of the virtual machine due to resource competition is reduced, and the service performance of the virtual machine is effectively ensured. Moreover, the virtual machine management module is divided into a virtual machine management agent submodule and a virtual machine management submodule, so that side effects on the service performance of the virtual machine (such as the scheduling performance of a virtual processor and the I/O read-write performance of the virtual machine) are avoided, and the virtual machine management module has a good application prospect.
It should be noted that, the order of steps of the virtual machine creation method provided in the embodiment of the present application may be appropriately adjusted, and the steps may also be increased or decreased according to the situation. Any method that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application is covered by the protection scope of the present application, and thus the detailed description thereof is omitted.
Moreover, it can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the implementation process and related contents of the virtual machine creation method described above may refer to corresponding contents in the foregoing server system embodiment, and are not described herein again.
The present application provides a virtual machine creation apparatus, which is applied to a server, an uninstall card is inserted into the server, and a connection channel is established between the server and the uninstall card, as shown in fig. 8, the virtual machine creation apparatus 80 includes:
the receiving module 801 is configured to receive a virtual machine creation request sent by a cloud management platform.
The processing module 802 is configured to create a virtual machine in the server according to the virtual machine creation request, start a virtual machine management agent sub-module disposed in the server, and start a virtual machine management sub-module disposed in the offload card through the connection channel.
The virtual machine is realized through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, the virtual machine management module comprises a virtual machine management agent submodule and a virtual machine management submodule, the virtual machine management agent submodule is communicated with the virtual machine management submodule through a connecting channel, and the virtual machine management submodule is used for realizing the management function of the virtual machine.
Optionally, the virtual machine simulator further includes a virtual machine hardware simulation module, the virtual machine hardware simulation module is disposed in the server, and the virtual machine hardware simulation module is configured to simulate hardware of the virtual machine according to hardware of the server.
Optionally, the virtual machine management submodule is further configured to access data of the virtual machine from the memory of the server in a direct memory access DMA manner through the connection channel.
Optionally, the hardware of the virtual machine comprises one or more of: the virtual processor, the virtual memory, the virtual mainboard chip, the virtual input and output device and the virtual bus.
Optionally, the management function comprises: one or any combination of a virtual machine life cycle management function, a virtual machine migration function, a virtual remote control function, an asynchronous information processing function and a parameter analysis function.
Optionally, the server and offload cards are connected via a virtual peripheral component interconnect PCIe bus or a compute express link CXL bus.
In summary, in the virtual machine creating apparatus provided in the embodiment of the present application, the virtual machine management module is split into the virtual machine management agent sub-module and the virtual machine management sub-module, and the virtual machine management sub-module is deployed on the offload card, so that a function that consumes a large amount of server resources in the virtual machine simulator is deployed in the offload card, occupation of server resources by the overhead of the virtual machine simulator itself is reduced, influence of the overhead of the virtual machine simulator and the virtual machine providing services for users on the service performance of the virtual machine due to resource competition is reduced, and the service performance of the virtual machine is effectively ensured. Moreover, the virtual machine management module is divided into a virtual machine management agent submodule and a virtual machine management submodule, so that side effects on the service performance of the virtual machine (such as the scheduling performance of a virtual processor and the I/O read-write performance of the virtual machine) are avoided, and the virtual machine management module has a good application prospect.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the working principle of the virtual machine creating apparatus and the module described above may refer to the corresponding content in the foregoing server system embodiment, and will not be described herein again.
The embodiment of the application provides computer equipment. Fig. 9 illustratively provides a possible architecture diagram for a computer device. As shown in fig. 9, the computer device 90 may include a processor 901, a memory 902, a communication interface 903, and a bus 904. In a computer device, the number of the processors 901 may be one or more, and fig. 9 illustrates only one of the processors 901. Alternatively, the processor 901 may be a Central Processing Unit (CPU). If the computer device has multiple processors 901, the types of the multiple processors 901 may be different, or may be the same. Optionally, multiple processors of the computer device may also be integrated into a multi-core processor.
The memory 902 stores computer instructions and data, and the memory 902 may store computer instructions and data necessary to implement the virtual machine creation methods provided herein. Memory 902 may be any one or any combination of the following storage media: nonvolatile Memory (e.g., Read-Only Memory (ROM), Solid State Disk (SSD), Hard Disk Drive (HDD), optical disc, etc., volatile Memory.
The communication interface 903 may be any one or any combination of the following devices: network interface (such as Ethernet interface), wireless network card, etc. Communication interface 903 provides for a computer device to communicate data with other nodes or other computer devices.
Fig. 9 also illustratively depicts bus 904. The bus 904 may connect the processor 901 to the memory 902 and the communication interface 903. Thus, via bus 904, processor 901 may access memory 902 and may also utilize communication interface 903 for data interaction with other nodes or other computer devices.
In the present application, the computer device executes the computer instructions in the memory 902, and can implement the virtual machine creation method provided by the embodiment of the present application. For example, a virtual machine creation request sent by a cloud management platform is received; and creating a virtual machine in the server according to the virtual machine creating request, starting a virtual machine management agent submodule arranged in the server, and starting a virtual machine management submodule arranged in the unloading card through a connecting channel. Moreover, by executing the computer instructions in the memory 902, the implementation process of executing the steps of the computer device may refer to the corresponding description in the above method embodiments.
The embodiment of the present application further provides a storage medium, which is a non-volatile computer-readable storage medium, and when instructions in the storage medium are executed by a processor, the virtual machine creation method provided in the embodiment of the present application is implemented.
The embodiment of the present application further provides a computer program product containing instructions, which when the computer program product runs on a computer, causes the computer to execute the virtual machine creation method provided by the embodiment of the present application.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk.
In the embodiments of the present application, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The term "at least one" means one or more, and the term "plurality" means two or more, unless expressly defined otherwise.
The term "and/or" in this application is only one kind of association relationship describing the association object, and means that there may be three kinds of relationships, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The above description is intended only to illustrate the alternative embodiments of the present application, and not to limit the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (20)

1. The server system is characterized by comprising a server and an unloading card inserted in the server, wherein a connection channel is established between the server and the unloading card;
the server is internally provided with a virtual machine, the virtual machine is realized through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, and the virtual machine management module comprises a virtual machine management agent submodule and a virtual machine management submodule;
the server is provided with the virtual machine management agent submodule, the unloading card is provided with the virtual machine management submodule, the virtual machine management agent submodule is communicated with the virtual machine management submodule through the connecting channel, and the virtual machine management submodule is used for realizing the management function of the virtual machine.
2. The system of claim 1, wherein the virtual machine simulator further comprises a virtual machine hardware simulation module disposed in the server, the virtual machine hardware simulation module configured to simulate hardware of the virtual machine according to hardware of the server.
3. The system of claim 1 or 2, wherein the virtual machine management submodule is further configured to access data of the virtual machine from the memory of the server in a Direct Memory Access (DMA) manner through the connection channel.
4. The system of any of claims 2 to 3, wherein the hardware of the virtual machine comprises one or more of: the virtual processor, the virtual memory, the virtual mainboard chip, the virtual input and output device and the virtual bus.
5. The system according to any one of claims 1 to 4, wherein the management function comprises: one or any combination of a virtual machine life cycle management function, a virtual machine migration function, a virtual remote control function, an asynchronous information processing function and a parameter analysis function.
6. The system of any of claims 1 to 5, wherein the server and the offload card are connected via a virtual peripheral component interconnect (PCIe) bus or a compute express link (CXL) bus.
7. A virtual machine creating method is applied to a server system, the server system comprises a server and an unloading card inserted in the server, a connection channel is established between the server and the unloading card, and the method comprises the following steps:
the server receives a virtual machine creation request sent by a cloud management platform;
the server creates a virtual machine in the server according to the virtual machine creating request, starts a virtual machine management agent submodule arranged in the server, and starts a virtual machine management submodule arranged in the unloading card through the connecting channel;
the virtual machine is realized through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, the virtual machine management module comprises a virtual machine management agent submodule and a virtual machine management submodule, the virtual machine management agent submodule is communicated with the virtual machine management submodule through the connecting channel, and the virtual machine management submodule is used for realizing the management function of the virtual machine.
8. The method of claim 7, wherein the virtual machine simulator further comprises a virtual machine hardware simulation module disposed in the server, the virtual machine hardware simulation module configured to simulate hardware of the virtual machine according to hardware of the server.
9. The method of claim 7 or 8, wherein the virtual machine management submodule is further configured to access data of the virtual machine from the memory of the server in a Direct Memory Access (DMA) manner through the connection channel.
10. The method of any of claims 8 to 9, wherein the hardware of the virtual machine comprises one or more of: the virtual processor, the virtual memory, the virtual mainboard chip, the virtual input and output device and the virtual bus.
11. The method according to any of claims 7 to 10, wherein the management function comprises: one or any combination of a virtual machine lifecycle management function, a virtual machine migration function, a virtual remote control function, an asynchronous information processing function, and a parameter parsing function.
12. The method of any of claims 7 to 11, wherein the server and the offload card are connected via a virtual peripheral component interconnect (PCIe) bus or a compute express link (CXL) bus.
13. The virtual machine creating device is applied to a server, an unloading card is inserted into the server, and a connection channel is established between the server and the unloading card, and the virtual machine creating device comprises:
the receiving module is used for receiving a virtual machine creation request sent by the cloud management platform;
the processing module is used for creating a virtual machine in the server according to the virtual machine creating request, starting a virtual machine management agent submodule arranged in the server and starting a virtual machine management submodule arranged in the unloading card through the connecting channel;
the virtual machine is realized through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, the virtual machine management module comprises a virtual machine management agent submodule and a virtual machine management submodule, the virtual machine management agent submodule is communicated with the virtual machine management submodule through the connecting channel, and the virtual machine management submodule is used for realizing the management function of the virtual machine.
14. The apparatus of claim 13, wherein the virtual machine simulator further comprises a virtual machine hardware simulation module, the virtual machine hardware simulation module being disposed in the server, the virtual machine hardware simulation module being configured to simulate hardware of the virtual machine according to hardware of the server.
15. The apparatus according to claim 13 or 14, wherein the virtual machine management submodule is further configured to access data of the virtual machine from the memory of the server in a Direct Memory Access (DMA) manner through the connection channel.
16. The apparatus of any of claims 14 to 15, wherein the hardware of the virtual machine comprises one or more of: the virtual processor, the virtual memory, the virtual mainboard chip, the virtual input and output device and the virtual bus.
17. The apparatus according to any of claims 13 to 16, wherein the management function comprises: one or any combination of a virtual machine life cycle management function, a virtual machine migration function, a virtual remote control function, an asynchronous information processing function and a parameter analysis function.
18. The apparatus of any of claims 13 to 17, wherein the server and the offload card are connected via a virtual peripheral component interconnect (PCIe) bus or a compute express link (CXL) bus.
19. A computer device, characterized in that the computer device comprises: a processor and a memory, the memory having stored therein a computer program; the computer program, when executed by the processor, causes the computer device to perform the method of any of claims 7 to 12.
20. A storage medium, wherein instructions of the storage medium, when executed by a processor, implement the method of any of claims 7 to 12.
CN202110351008.2A 2020-12-29 2021-03-31 Server system, virtual machine creation method and device Pending CN114691286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/142282 WO2022143714A1 (en) 2020-12-29 2021-12-29 Server system, and virtual machine creation method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011603679 2020-12-29
CN2020116036795 2020-12-29

Publications (1)

Publication Number Publication Date
CN114691286A true CN114691286A (en) 2022-07-01

Family

ID=82135613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110351008.2A Pending CN114691286A (en) 2020-12-29 2021-03-31 Server system, virtual machine creation method and device

Country Status (2)

Country Link
CN (1) CN114691286A (en)
WO (1) WO2022143714A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115858102A (en) * 2023-02-24 2023-03-28 珠海星云智联科技有限公司 Method for deploying virtual machine supporting virtualization hardware acceleration
CN116991544A (en) * 2023-09-26 2023-11-03 苏州元脑智能科技有限公司 Simulation method and device of CXL (control information and automation) equipment, electronic equipment and client
CN117170877A (en) * 2023-10-26 2023-12-05 西安羚控电子科技有限公司 Unmanned aerial vehicle virtualization task management device and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10146471B1 (en) * 2016-06-27 2018-12-04 Emc Corporation Offloaded data protection based on virtual machine snapshots
US10318737B2 (en) * 2016-06-30 2019-06-11 Amazon Technologies, Inc. Secure booting of virtualization managers
CN111198663B (en) * 2020-01-03 2022-09-20 苏州浪潮智能科技有限公司 Method, system, apparatus and storage medium for controlling data access operation

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115858102A (en) * 2023-02-24 2023-03-28 珠海星云智联科技有限公司 Method for deploying virtual machine supporting virtualization hardware acceleration
CN116991544A (en) * 2023-09-26 2023-11-03 苏州元脑智能科技有限公司 Simulation method and device of CXL (control information and automation) equipment, electronic equipment and client
CN116991544B (en) * 2023-09-26 2024-01-26 苏州元脑智能科技有限公司 Simulation method and device of CXL (control information and automation) equipment, electronic equipment and client
CN117170877A (en) * 2023-10-26 2023-12-05 西安羚控电子科技有限公司 Unmanned aerial vehicle virtualization task management device and method
CN117170877B (en) * 2023-10-26 2024-02-23 西安羚控电子科技有限公司 Unmanned aerial vehicle virtualization task management device and method

Also Published As

Publication number Publication date
WO2022143714A1 (en) 2022-07-07

Similar Documents

Publication Publication Date Title
US10579305B2 (en) Method and apparatus for processing read/write request in physical machine
JP5689526B2 (en) Resource affinity through dynamic reconfiguration of multiqueue network adapters
EP3086228B1 (en) Resource processing method, operating system, and device
CN114691286A (en) Server system, virtual machine creation method and device
CN102609298B (en) Based on network interface card virtualization system and the method thereof of hardware queue expansion
WO2021000717A1 (en) Method and apparatus for processing io
US10922153B2 (en) Communication method and device for virtual base stations
US20110032944A1 (en) Method and System for Switching in a Virtualized Platform
US9697024B2 (en) Interrupt management method, and computer implementing the interrupt management method
CN113312143B (en) Cloud computing system, command processing method and virtualization simulation device
EP3242440A1 (en) Fault tolerant method, apparatus and system for virtual machine
CN103034524A (en) Paravirtualized virtual GPU
JP7310924B2 (en) In-server delay control device, server, in-server delay control method and program
WO2022179423A1 (en) Virtualization processing system, method and apparatus, and device
WO2023050819A1 (en) System on chip, virtual machine task processing method and device, and storage medium
US20220050795A1 (en) Data processing method, apparatus, and device
CN112799840A (en) Method, device, equipment and storage medium for transmitting data
CN108737131B (en) Method and device for realizing network equipment virtualization
WO2022001808A1 (en) System and interrupt processing method
CN103092676A (en) Analog input output method, device and system of virtual machine cluster
CN114281442A (en) Cloud desktop client and method thereof
Zhang et al. NVMe-over-RPMsg: A virtual storage device model applied to heterogeneous multi-core SoCs
CN114115703A (en) Bare metal server online migration method and system
US20240129255A1 (en) Server delay control device, server delay control method, and program
CN116800616B (en) Management method and related device of virtualized network equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination