Server system, virtual machine creation method and apparatus
By splitting the virtual machine management module and deploying it on the unmount card, and combining it with DMA to acquire data, the problem of virtual machine emulators occupying server resources was solved, and the business performance of virtual machines was improved.
Patent Information
- Application Number
- CN202110351008.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-12-29
- Filing Date
- 2021-03-31
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2041-03-31
AI Technical Summary
In traditional virtualization technology, the physical resources consumed by virtual machine emulators grow linearly, affecting the business performance of virtual machines and making it impossible to provide all the physical resources of the server to users.
The virtual machine management module is split into a virtual machine management agent submodule and a virtual machine management submodule. The virtual machine management submodule is deployed on the offload card to reduce the virtual machine emulator's occupation of server resources. Data is obtained from server memory through direct memory access (DMA).
It effectively reduces the consumption of server resources by the virtual machine emulator, ensures the performance of virtual machine services, and reduces the impact on virtual machine service performance.
Smart Images

Figure CN114691286B_ABST
Abstract
Description
[0001] The present disclosure claims priority to the Chinese patent application with the application number 202011603679.5 and the title "Computer system supporting cloud service" filed on December 29, 2020, the whole content of which is incorporated into the present disclosure by reference. TECHNICAL FIELD
[0002] The present application relates to the technical field of cloud computing, in particular to a server system, a virtual machine creation method and device. BACKGROUND
[0003] Virtualization technology, as the core technology of cloud scenarios, shares the physical resources of a server with multiple users in the granularity of a virtual machine, so that users can conveniently and flexibly use the physical resources of the server under the premise of security isolation, and the utilization rate of the physical resources of the server can be greatly improved.
[0004] However, in the traditional virtualization technology, when the virtual machine emulator uses the physical resources of the server to provide virtual machine services for users, it needs to consume certain physical resources.
[0005] Therefore, all the physical resources of the server cannot be provided to users for use. Moreover, with the improvement of IO performance, the physical resources consumed by the virtual machine emulator tend to increase linearly, which will have a great impact on the business performance of the virtual machine provided for users. SUMMARY
[0006] The present application provides a server system, a virtual machine creation method and device, which can reduce the occupation of the physical resources of the server by the virtual machine emulator and ensure the business performance of the virtual machine.
[0007] In a first aspect, the present application provides a server system, which comprises a server and an offload card interposed in the server, and the server and the offload card establish a connection channel; the server is provided with a virtual machine, and the virtual machine is implemented through a virtual machine emulator, and the virtual machine emulator 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 virtual machine management agent submodule is deployed on the server, and the virtual machine management submodule is deployed on the offload card, wherein the virtual machine management agent submodule communicates with the virtual machine management submodule through the connection channel, and the virtual machine management submodule is used to implement the management function of the virtual machine.
[0008] In the server system, by splitting the virtual machine management module into a virtual machine management agent submodule and a virtual machine management submodule, and deploying the virtual machine management submodule on the offload card, the function in the virtual machine simulator which consumes more server resources is deployed on the offload card, the server resource occupied by the overhead of the virtual machine simulator itself is reduced, the influence of the overhead of the virtual machine simulator itself and the virtual machine providing services for users on the virtual machine service performance due to competition for resources is reduced, and the virtual machine service performance is effectively ensured. Moreover, splitting the virtual machine management module into the virtual machine management agent submodule and the virtual machine management submodule does not have side effects on the virtual machine service performance (such as the scheduling performance of the virtual processor and the I / O read-write performance of the virtual machine), and therefore has good application prospects.
[0009] 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 parsing function.
[0010] As can be seen from the above, the function provided by the virtual machine management submodule can be regarded as a function which has little relevance to the virtual machine service and / or involves asynchronous operation, and this function has no influence on the virtual machine internal performance itself, but consumes more server resources. Therefore, by deploying the virtual machine management submodule on the offload card, the server resource occupied by the virtual machine simulator can be effectively reduced, and the virtual machine service performance can be effectively ensured.
[0011] In an implementable manner, the virtual machine simulator further comprises a virtual machine hardware simulation module, the virtual machine hardware simulation module is arranged in the server, and the virtual machine hardware simulation module is configured to simulate the hardware of the virtual machine according to the hardware of the server.
[0012] Optionally, the hardware of the virtual machine comprises one or more of a virtual processor, a virtual memory, a virtual motherboard chip, a virtual input / output device, and a virtual bus.
[0013] The virtual machine hardware simulation module is configured to implement a function which is strongly related to the virtual machine function, and the function basically does not consume server resources. Therefore, even if the virtual machine hardware simulation module is deployed in the server, the probability of the virtual machine hardware simulation module affecting the virtual machine service performance is very low, and the virtual machine service performance can be effectively ensured.
[0014] In an implementable manner, the virtual machine management submodule is further configured to access the data of the virtual machine from the memory of the server in a direct memory access (DMA) mode through the connection channel.
[0015] The data is obtained from the virtual memory in a DMA mode, and the DMA mode allows direct data transmission between external devices and storage resources, so that the CPU is not involved in the data transmission process, and the occupation of server resources for obtaining data from the storage resources can be effectively reduced.
[0016] Optionally, the server and the offload card are connected through a virtual peripheral component interconnect express (PCIe) bus or a compute express link (CXL) bus.
[0017] In a second aspect, the application provides a virtual machine creation method, which is applied to a server system including a server and an offload card inserted into the server, and a connection channel is established between the server and the offload card. The method includes: the server receiving a virtual machine creation request sent by a cloud management platform; the server creating a virtual machine in the server according to the virtual machine creation request, starting a virtual machine management agent submodule arranged in the server, and starting a virtual machine management submodule arranged in the offload card through the connection channel; wherein the virtual machine is implemented through a virtual machine emulator, the virtual machine emulator includes a virtual machine management module, the virtual machine management module includes the virtual machine management agent submodule and the virtual machine management submodule, the virtual machine management agent submodule communicates with the virtual machine management submodule through the connection channel, and the virtual machine management submodule is used to implement a management function of the virtual machine.
[0018] Optionally, the virtual machine emulator further includes a virtual machine hardware simulation module arranged in the server, and the virtual machine hardware simulation module is used to simulate hardware of the virtual machine according to hardware of the server.
[0019] Optionally, the virtual machine management submodule is further used to access data of the virtual machine from a memory of the server in a direct memory access (DMA) mode through the connection channel.
[0020] Optionally, the hardware of the virtual machine includes one or more of the following: a virtual processor, a virtual memory, a virtual motherboard chip, a virtual input / output device, and a virtual bus.
[0021] Optionally, the management function includes one or any combination of the following: 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.
[0022] Optionally, the server and the offload card are connected through a virtual peripheral component interconnect express (PCIe) bus or a compute express link (CXL) bus.
[0023] In a third aspect, the present application provides a virtual machine creation device, which 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. The device comprises: a receiving module configured to receive a virtual machine creation request sent by a cloud management platform; and a processing module configured to create a virtual machine in the server according to the virtual machine creation request, start a virtual machine management agent submodule arranged in the server, and start a virtual machine management submodule arranged in the offload card through the connection channel. The virtual machine is implemented by a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, the virtual machine management module comprises the virtual machine management agent submodule and the virtual machine management submodule, the virtual machine management agent submodule communicates with the virtual machine management submodule through the connection channel, and the virtual machine management submodule is configured to implement a management function of the virtual machine.
[0024] Optionally, the virtual machine simulator further comprises a virtual machine hardware simulation module, the virtual machine hardware simulation module is arranged 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.
[0025] Optionally, 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) mode through the connection channel.
[0026] Optionally, the hardware of the virtual machine comprises one or more of the following: a virtual processor, a virtual memory, a virtual motherboard chip, a virtual input / output device and a virtual bus.
[0027] Optionally, the management function comprises one or any combination of the following: 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.
[0028] Optionally, the server and the offload card are connected through a virtual peripheral component interconnect express (PCIe) bus or a compute express link (CXL) bus.
[0029] In a fourth aspect, a computer device is provided, which comprises a processor and a memory, and the memory stores a computer program. When the processor executes the computer program, the computer device implements the method provided in the second aspect.
[0030] In a fifth aspect, a storage medium is provided, and when instructions in the storage medium are executed by a processor, the method provided in the second aspect is implemented. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is a schematic diagram of an implementation scenario related to a server system provided by an embodiment of the present application;
[0032] Figure 2is a deployment schematic diagram of a server system provided by an embodiment of the present application;
[0033] Figure 3 is a structural schematic diagram of a server system provided by an embodiment of the present application;
[0034] Figure 4 is a structural schematic diagram of another server system provided by an embodiment of the present application;
[0035] Figure 5 is an implementation process schematic diagram of a virtual machine management agent sub-module and a virtual machine management sub-module cooperating to implement VNC function provided by an embodiment of the present application;
[0036] Figure 6 is an implementation process schematic diagram of inputting through a mouse and a keyboard on a VNC client to implement remote control of a virtual machine provided by an embodiment of the present application;
[0037] Figure 7 is a flowchart of a virtual machine creation method provided by an embodiment of the present application;
[0038] Figure 8 is a structural schematic diagram of a virtual machine creation apparatus provided by an embodiment of the present application;
[0039] Figure 9 is a structural schematic diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical scheme and advantages of the present application clearer, the following will further describe the embodiments of the present application in combination with the drawings.
[0041] In order to facilitate understanding, the following first explains the terms involved in the embodiments of the present application.
[0042] Cloud computing: cloud computing is a kind of distributed computing, which refers to unified management and scheduling of a large number of computing resources and storage resources, and provides a network of on-demand services. The computing resources and storage resources are provided by a computing device cluster set in a data center. Moreover, cloud computing can provide multiple types of service types for users, for example, it can provide infrastructure as a service (IaaS), platform as a service (PaaS) and software as a service (SaaS) and the like.
[0043] Virtualization is a resource management technology that abstracts and converts various entity resources of a host, such as servers, network resources, memory and storage resources, and the like, to break the insurmountable barriers between the entity structures of the host, so that users can apply these resources in a better way than the original configuration. The resources used through virtualization are referred to as virtualized resources, which are not limited by the existing resource setup, region or physical configuration. Generally, virtualized resources include computing resources and storage resources.
[0044] Virtual machine (VM): refers to a complete computer system that is simulated by a virtualization technology and runs in a completely isolated environment. Part of the instructions of the virtual machine can be processed in the host machine, and the other part of the instructions can be executed in an emulated manner. Users can purchase cloud services by renting virtual machines.
[0045] Host (also referred to as physical machine): a physical resource (such as a virtual machine or a physical machine) used to carry virtualization technology. Generally, the host used to deploy virtual machines is usually a physical server.
[0046] Direct memory access (DMA): also referred to as direct memory operation or group data transmission mode, refers to a data interaction mode in which an external device accesses data from a memory of a computer without a central processing unit (CPU) of the computer. When data is transmitted in the DMA mode, the CPU of the computer issues an instruction to the DMA controller to instruct the DMA controller to control the transmission of data. The DMA controller feeds back information about the completion of the transmission to the CPU after completing the transmission of data. As can be seen, in the process of transmitting data in the DMA mode, the CPU of the computer does not need to perform the transmission operation, and the operations such as instruction fetching, data fetching and data sending of the CPU of the computer can be omitted, thereby reducing the resource occupancy rate of the CPU of the computer and saving system resources.
[0047] DMA can include remote DMA (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 the intervention of operating systems of both parties. The local DMA refers to a data transmission mode without the need for network transmission.
[0048] Peripheral component interconnect express (PCIe) bus: a high-speed serial computer expansion bus.
[0049] Compute Express Link (CXL) bus: a high-speed computer bus for express links.
[0050] Network card: also known as network interface controller (NIC), network adapter, or local area network receiver, is a computer hardware designed to allow the host or computing device to communicate on the network.
[0051] Memory: also known as memory or main memory, its role is to temporarily store the operation data in CPU and exchange data with external storage such as hard disk.
[0052] Embodiments of the present application provide a server system. The server system comprises a server and an offload card interposed in the server. The server and the offload card establish a connection channel. The server is provided with a virtual machine, and the virtual machine is implemented through a virtual machine emulator, and the virtual machine emulator 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 virtual machine management agent submodule is deployed on the server, and the virtual machine management submodule is deployed on the offload card. The virtual machine management agent submodule communicates with the virtual machine management submodule through the connection channel, and the virtual machine management submodule is used to implement the management function of the virtual machine.
[0053] Since the virtual machine management submodule is used to implement the management function of the virtual machine, the consumption of the virtual machine management submodule to the physical resources is large. By splitting the virtual machine management module into the virtual machine management agent submodule and the virtual machine management submodule, and deploying the virtual machine management submodule on the offload card, the function of the virtual machine emulator which consumes a large amount of server resources is deployed on the offload card, the occupation of the server resources by the overhead of the virtual machine emulator itself is reduced, the influence of the overhead of the virtual machine emulator itself and the virtual machine providing services for users on the business performance of the virtual machine due to the competition for resources is reduced, and the business performance of the virtual machine is effectively ensured.
[0054] Figure 1 is a schematic diagram of an implementation scenario related to a server system provided by embodiments of the present application. As shown in Figure 1As shown, 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 configured to respond to the request of the user. 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, and the server system 1 is configured to create a virtual machine according to the virtual machine creation request, or the server 1 is configured to perform an operation of managing the virtual machine according to the request for managing the virtual machine. The virtual machine is configured to implement a service of the user and provide a service for the user, for example, the virtual machine is configured to provide a language recognition service, a video review service, or an image rendering service for the user.
[0055] In an implementation manner, the server system 1 can be deployed in a cloud platform P of a cloud data center, and the management platform can be a cloud management platform 2 deployed in the cloud platform P. The cloud platform P can be a cloud platform P of a central cloud, a cloud platform P of an edge cloud, or a cloud platform P including a central cloud and an edge cloud, and the present embodiment does not make a specific limitation thereto. Wherein, Figure 1 A schematic diagram for deploying the server system 1 in the cloud platform P.
[0056] In an implementation manner, the cloud platform P can be implemented by a hardware manner such as a physical server 11. For example, the cloud platform P can be implemented by one physical server 11, or a physical server 11 cluster composed of a plurality of physical servers 11, or a cloud computing service center. In addition, the cloud platform P can be implemented by independently deployed resources, or can be implemented by distributed deployed resources.
[0057] The cloud platform P is deployed with a large number of basic resources owned by a cloud service provider, and the cloud platform P can provide cloud services for users by using the basic resources. The basic resources can include computing resources, storage resources, and network resources, and the computing resources can be a large number of computing devices (for example, the server system 1). For example, Figure 1 As shown, when a user purchases a cloud service, the cloud platform P can create a virtual machine for the user by using the basic resources such as the server system 1, so as to provide the cloud service for the user by using the created virtual machine.
[0058] The cloud management platform 2 and server system 1 can be implemented based on the basic resources in the cloud platform P. Optionally, the cloud management platform 2 can be implemented using software such as virtual machines or containers on the basic resources, or it can be implemented using a physical server 11 (also called a host) such as a bare metal server 11. The server system 1 includes a server 11 and an offloading card 12. The server 11 can be implemented using a physical server 11 (also called a host) such as a bare metal server 11. The offloading card 12 can be implemented using heterogeneous hardware, and this heterogeneous hardware can be used as an external device for the server 11. The offloading card 12 is also called a smart card, and it can be considered as a small server.
[0059] like Figure 2 As shown, server 11 runs a virtual machine monitor (VMM) 111 and a virtual machine emulator 112. This VMM is used to provide hardware resources such as CPU and memory from server 11 to virtual machines (e.g., virtualization machines) through virtualization technology. Figure 2 This virtual machine emulator (VM1 to VMn) is used. Furthermore, this VMM is also used to pass through the input / output devices provided by the offload card 12 to the virtual machines. By passing through the input / output devices of the offload card 12 to the virtual machines, the virtual machines can bypass the VMM and directly access the input / output devices of the offload card 12, thereby enabling the virtual machines to achieve performance close to that of a physical machine. This virtual machine emulator 112 is used to virtualize virtual machines based on the hardware functions of the virtual machines provided by the virtual machine manager 111.
[0060] Optionally, such as Figure 2 As shown, the offloading card 12 can be connected to storage resources and / or network resources so that the offloading card 12 can send I / O requests from virtual machines running in the server 11 to the storage resources and / or network resources for processing.
[0061] The implementation of the server system 1 provided in this application embodiment will be described below. Figure 3 As shown, the server system 1 includes a server 11 and an offloading card 12, and the server 11 and the offloading card 12 establish a connection channel.
[0062] Server 11 has a virtual machine VM configured (e.g., ... Figure 3 The virtual machines are implemented through a virtual machine emulator 112, which includes a virtual machine management module 1121. The virtual machine management module 1121 includes a virtual machine management agent submodule 1121a and a virtual machine management submodule 1121b.
[0063] The server 11 is deployed with a virtual machine management agent submodule 1121a, and the offload card 12 is deployed with a virtual machine management submodule 1121b, where the virtual machine management agent submodule 1121a communicates with the virtual machine management submodule 1121b through the connection channel, and the virtual machine management submodule 1121b is configured to implement the management function of the virtual machine.
[0064] In an implementation, the virtual machine management agent submodule 1121a is configured to receive a management request for requesting to manage the virtual machine, and send the management request to the virtual machine management submodule 1121b through the connection channel, and the virtual machine management submodule 1121b is configured to perform an operation of managing the virtual machine according to the management request, to implement the management of the virtual machine.
[0065] Since the virtual machine management submodule 1121b is configured to implement the management function of the virtual machine, the virtual machine management submodule 1121b consumes a large amount of physical resources. By splitting the virtual machine management module 1121 into the virtual machine management agent submodule 1121a and the virtual machine management submodule 1121b, and deploying the virtual machine management submodule 1121b on the offload card 12, the function of the virtual machine simulator 112 that consumes a large amount of server resources is deployed on the offload card 12, the server resource occupied by the overhead of the virtual machine simulator 112 itself is reduced, the influence of the overhead of the virtual machine simulator 112 itself and the virtual machine providing services for users on the performance of the virtual machine business due to the competition for resources is reduced, and the performance of the virtual machine business is effectively ensured.
[0066] In the embodiments of the present application, the server 11 can be implemented by a physical server 11 such as a bare-metal server 11. The offload card 12 can be implemented by heterogeneous hardware, and the heterogeneous hardware can be an external device of the server 11. The connection channel between the offload card 12 and the server 11 can be implemented by a connection bus. For example, the offload card 12 and the server 11 are connected by a PCIe bus, a CXL bus, a virtual peripheral component interconnect (PCI) bus, or a virtual industry standard architecture (ISA) bus. At this time, when the server 11 processes an input / output (I / O) business that needs to be offloaded to the offload card 12 for processing, the server 11 can send relevant data to the offload card 12 for processing through the bus between the offload card 12 and the server 11. Moreover, the offload card 12 is an offload card 12 suitable for the connection bus between the offload card 12 and the server 11. For example, when the offload card 12 and the server 11 are connected by a PCIe bus, the offload card 12 is a PCIe card, and the model of the offload card 12 is not limited in the embodiments of the present application.
[0067] The implementation of the server system 1 will be described below by taking the connection between the offload card 12 and the server 11 through the PCIe bus as an example. Figure 4 FIG. 1 is a structural schematic diagram of a server system 1 provided by an embodiment of the present application. As shown in the figure, the system architecture includes the server system 1, which includes a server 11 and an offload card 12. Figure 4 The server 11 includes a CPU 1, a memory 1, and a root complex (RC) chip. The offload card 12 includes a CPU 2, a memory 2, and an end point (EP) chip, which is connected to the RC chip through the PCIe bus. The RC chip is configured to provide the CPU 1 with a hardware interface for sending and receiving PCIe messages with external devices. The EP chip is configured to provide a peripheral interface with a hardware interface for sending and receiving PCIe messages with the server 11.
[0068] The embodiments of the present application do not limit the specific implementation of the RC chip and the EP chip, and any RC chip and EP chip that are implemented according to the PCIe specification can be used. For example, the EP chip can be an application-specific integrated circuit (ASIC) chip, a smart NIC, or a field-programmable gate array (FPGA) chip, etc. Moreover, the EP chip can be directly or indirectly connected to the PCIe bus, so that the server 11 and the EP can be connected through the PCIe bus. For example, the EP can be indirectly connected to the PCIe bus through a switch, which can provide more ports for connecting EP chips to expand the link.
[0069] Optionally, the management function of the virtual machine includes 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 analysis function. Correspondingly, as shown in FIG. 1, the virtual machine management sub-module 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 analysis unit b5. The functions of the units are as follows: Figure 4
[0070] The virtual machine lifecycle management unit b1 is configured to implement the virtual machine lifecycle management function, i.e., to manage the running state of the virtual machine. For example, the virtual machine lifecycle management unit b1 is configured to control the start and stop of the virtual machine.
[0071] The migration unit b2 is configured to implement a virtual machine migration function, i.e., to obtain to-be-migrated data of a virtual machine from the virtual memory 1122b, and perform a migration operation on the virtual machine based on the to-be-migrated data. In an implementation, the migration unit b2 can be a hot migration unit b2 configured to perform accelerated processing of the migration logic, including obtaining the to-be-migrated data of the virtual machine in the virtual memory 1122b in a DMA manner, and sending the to-be-migrated data to another server 11 to which the virtual machine is to be migrated. The hot migration module can send the to-be-migrated data to the other server 11 through a connection channel between the servers 11. For example, the to-be-migrated data can be sent to the other server 11 through a socket channel or other communication channel between the servers 11.
[0072] The virtual remote control unit b3 is configured to implement a virtual remote control function, i.e., to obtain display memory data from the virtual memory 1122b of the virtual machine, and provide the display memory data to a remote control client, so that the remote control client performs remote control on the virtual machine based on the display memory data. In an implementation, the virtual remote control unit b3 can be configured to implement a function of a virtual network console (VNC), including protocol analysis of the VNC, and a function of obtaining display memory data based on keyboard and mouse operations.
[0073] The asynchronous information processing unit b4 is configured to implement an asynchronous information processing function, i.e., to obtain information required by the virtual machine management submodule 1121b to perform an asynchronous operation from the virtual machine. During the running of the virtual machine, the virtual machine management submodule 1121b needs to perform some asynchronous operations based on data obtained from the virtual machine. At this time, the asynchronous information processing unit b4 is configured to obtain relevant information from the virtual machine in a non-busy state of the virtual machine. For example, the asynchronous information processing unit b4 can obtain some configuration information of the virtual machine when the virtual machine is started, so that the virtual machine management submodule 1121b can perform a corresponding asynchronous operation based on the configuration information.
[0074] The parameter analysis unit b5 is configured to implement a parameter analysis function, i.e., to analyze a communication protocol used by a running virtual machine and parameters required by the running virtual machine. For example, the parameter analysis unit b5 is configured to analyze parameters required for creating a virtual machine.
[0075] As described above, the functions provided by the virtual machine management submodule 1121b can be regarded as functions that are not closely related to virtual machine services and / or involve asynchronous operations. Such functions have little effect on the performance of the virtual machine itself, but consume a large amount of server resources. Therefore, by deploying the virtual machine management submodule 1121b on the offload card 12, the virtual machine simulator 112 can effectively reduce the occupation of server resources, and effectively ensure the service performance of the virtual machine.
[0076] It should be noted that the above content of the management function of the virtual machine management module 1121 is only an example of the management function of the virtual machine management module 1121, and is not intended to limit the types of the management function of the virtual machine management module 1121, which can be adjusted according to the application requirements of the virtual machine.
[0077] In an implementation manner, as shown in Figure 4 The virtual machine simulator 112 further includes a virtual machine hardware simulation module 1122, which is arranged in the server 11, and is configured to simulate the hardware of the virtual machine according to the hardware of the server 11. The virtual machine hardware simulation module 1122 is used to implement functions related to the virtual machine function, which basically does not consume server resources, so even if the virtual machine hardware simulation module 1122 is deployed in the server 11, the probability of affecting the service performance of the virtual machine is very low, which can effectively guarantee the service performance of the virtual machine.
[0078] Optionally, as shown in Figure 4 The hardware of the virtual machine includes one or more of a virtual central processing unit 1122a, a virtual memory 1122b, a virtual mainboard chip 1122c, a virtual input / output device 1122d, and a virtual bus 1122e.
[0079] The virtual machine hardware simulation module 1122 simulates the hardware of the virtual machine, which means that the virtual machine hardware simulation module 1122 provides the virtual machine with the functions of the hardware of the corresponding virtual machine. For example, the virtual machine hardware simulation module 1122 simulates the virtual processor 1122a, which means that the virtual machine hardware simulation module 1122 provides the virtual machine with the computing power of the virtual processor 1122a. For another example, the virtual machine hardware simulation module 1122 simulates the virtual memory 1122b, which means that the virtual machine hardware simulation module 1122 provides the virtual machine with the function of temporarily storing the operation data in the virtual processor 1122a and the data exchanged with the external storage such as a hard disk. For another example, the virtual machine hardware simulation module 1122 simulates the virtual mainboard chip 1122c, which means that the virtual machine hardware simulation module 1122 provides the virtual machine with the functions of connecting different virtual circuit elements, transmitting information between different virtual circuit elements, receiving external information and transmitting the external information to the corresponding virtual circuit element for processing, and the like. For another example, the virtual machine hardware simulation module 1122 simulates the virtual input and output device 1122d, which means that the virtual machine hardware simulation module 1122 provides the virtual machine with the input and output functions of the input and output device. For another example, the virtual machine hardware simulation module 1122 simulates the virtual bus 1122e, which means that the virtual machine hardware simulation module 1122 provides the virtual machine with the function of transmitting information between the virtual processor 1122a, the virtual memory 1122b, and the virtual input and output device 1122d.
[0080] Optionally, the virtual memory 1122b includes a processor memory allocated to the virtual processor 1122a, and further includes a virtual video memory. The virtual mainboard chip 1122c includes a virtual bus 1122e master bridge chip, a virtual bus 1122e south bridge chip, a virtual bus 1122e north bridge chip, and the like. The virtual input and output device 1122d includes a virtual mouse and a virtual keyboard, and the like. The type of the virtual bus 1122e can be determined according to the application requirement of the virtual machine. For example, the virtual bus 1122e can be a virtual PCIe bus, a CXL bus, a PCI bus, or an ISA bus, and the like.
[0081] It should be noted that the above content of the hardware of the virtual machine is only an example of the hardware of the virtual machine simulated by the virtual machine hardware simulation module 1122, and is not used to limit the type of the hardware of the virtual machine simulated by the virtual machine hardware simulation module 1122. The type of the hardware of the virtual machine simulated by the virtual machine hardware simulation module 1122 can be adjusted according to the application requirement of the virtual machine.
[0082] In the virtual machine simulator 112 provided by the embodiments of the present application, the virtual machine management agent submodule 1121a and the virtual machine hardware simulation module 1122 are deployed on the server 11, and the virtual machine management submodule 1121b is deployed on the offload card 12. The management function of the virtual machine needs to be realized through the cooperation of the virtual machine VM, the virtual machine management agent submodule 1121a and the virtual machine management submodule 1121b. For example, in some functions of the virtual machine, the virtual machine management submodule 1121b needs to obtain data from the storage resource of the virtual machine VM, and perform corresponding operations according to the obtained data.
[0083] The server 11 and the offload card 12 establish a connection channel, and the virtual machine management agent submodule 1121a can communicate with the virtual machine management submodule 1121b through the connection channel, so as to transmit the data obtained from the storage resource of the virtual machine to the virtual machine management submodule 1121b by the virtual machine management agent submodule 1121a. In order to reduce the occupation of the server resources by the overhead of obtaining data, at least two software-implemented communication channels can be established based on the connection channel.
[0084] In an implementable manner, the at least two software-implemented communication channels include an address obtaining channel and a DMA channel. The address obtaining channel is used for the virtual machine management agent submodule 1121a to send the storage address of data in the virtual memory to the virtual machine management submodule 1121b. The storage address can be represented by the first address and the offset of the data. Alternatively, the address obtaining channel between the virtual machine management agent submodule 1121a and the virtual machine management submodule 1121b can be a socket connection channel (such as a vsock channel). The DMA channel is used for the virtual machine management submodule 1121b to obtain the required data from the virtual memory by the DMA mode based on the storage address of the data in the virtual memory.
[0085] The storage address of the data in the virtual memory belongs to the control plane information. Since the data amount of the control plane information is small, the transmission of the control plane information through the address obtaining channel can effectively reduce the occupation of the server resources by the overhead of transmitting the control plane information. Moreover, the data is obtained from the virtual memory by the DMA mode. Since the DMA mode can allow the direct data transmission between the external device and the storage resource, the CPU does not need to participate in the data transmission process, which can effectively reduce the occupation of the server resources by the data obtaining from the storage resource.
[0086] For example, a vsock channel is established between the virtual machine management submodule 1121b and the virtual machine management agent submodule 1121a. When implementing VNC functionality, the virtual machine management submodule 1121b establishes a connection with the VNC client. When it needs to obtain video memory data, the virtual machine management submodule 1121b can send an address acquisition request to the virtual machine management agent submodule 1121a through this vsock channel. The virtual machine management agent submodule 1121a can obtain the address of the video memory data in the virtual machine's virtual video memory based on the address acquisition request, and then send the address to the virtual machine management submodule 1121b through the vsock channel. Then, the virtual machine management submodule 1121b obtains the video memory data from the virtual machine's virtual video memory using DMA based on the address, and sends the video memory data to the VNC client. Implementing VNC functionality means that the VNC client obtains video memory data from the virtual machine's virtual video memory, displays the video memory data on the VNC client, and then remotely controls the virtual machine based on the displayed content.
[0087] In one possible implementation, such as Figure 5 As shown, the specific implementation process of this VNC function may include the following steps:
[0088] Step S1: After the virtual machine starts, the virtual machine management agent submodules 1121a and 1121b begin running. The main thread of the management agent is started in server 11, and the vsk_iothread and vnc_worker threads are started in unloading card 12. A vsock channel is established between the vsk_iothread thread and the main thread of the management agent. The functionality of virtual machine management agent submodule 1121a is implemented through the main thread of the management agent in server 11, while the functionality of virtual machine management submodule 1121b is implemented through the vsk_iothread and vnc_worker threads. Virtual video memory vga.vram is allocated in virtual memory 1122b.
[0089] Step S2: The vnc_worker thread listens for connection requests sent by VNC clients. These connection requests carry the VNC client's Internet Protocol (IP) address and port address.
[0090] Step S3: The vnc_worker thread establishes a communication connection with the VNC client based on the VNC client's IP address and port address, and starts the timer in the virtual machine management submodule 1121b.
[0091] Step S4: When the timer is triggered, the vsk_iothread thread sends an address retrieval request to the management agent main thread through the vsock channel.
[0092] In step S5, the management agent main thread in the virtual machine management agent submodule 1121a listens to the messages sent through the vsock channel, parses the address acquisition request after receiving the address acquisition request, and then queries the virtual video memory vga.vram according to the parsed content to obtain the address of the video memory data in the virtual video memory, and sends the queried video memory address to the vsk_iothread thread through the vsock channel. The operating system of the virtual machine is used to update the video memory data in the virtual video memory according to the running state of the virtual machine.
[0093] 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, and the image dirty bitmap. In addition, the virtual machine management agent submodule 1121a also simulates a VGA virtual device. When implementing the VNC function, the video memory data can be stored in the video memory allocated to the VGA virtual device. Accordingly, when querying the video memory address, the video memory address in the video memory allocated to the VGA virtual device can be queried. In addition, when the virtual machine works in the graphic mode and the text mode respectively, the representation form of the address is slightly different. In the graphic mode, the address is represented by the VGA video memory physical address, the video memory dirty page bitmap, and the image dirty bitmap. In the text mode, the address is represented by the physical address and the image dirty page bitmap. At the same time, in order to facilitate the VNC client to correctly display the video memory data, in addition to obtaining the address of the video memory data in the virtual video memory, the basic component information of the video memory data also needs to be obtained, for example, in the graphic mode, the basic component information of the image also needs to be obtained. The dirty page refers to the page in the memory whose updated content has not been flushed to the disk.
[0094] In step S6, the vsk_iothread thread sends the video memory address obtained from the vsock channel to the vnc_worker thread.
[0095] In step S7, the vnc_worker thread obtains the video memory data from the virtual video memory through the DMA mode according to the received video memory address.
[0096] In addition, before the vnc_worker thread obtains the video memory data according to the video memory address, the basic component information of the video memory data also needs to be obtained to make preparations such as applying for memory space for storing the obtained video memory data.
[0097] In step S8, the vnc_worker thread encodes the obtained video memory data and sends the encoded video memory data to the VNC client.
[0098] In S9, the VNC client displays according to the received display memory data and remotely controls the virtual machine according to the displayed image.
[0099] There are various implementation scenarios of the VNC function, and the implementation process is described below by taking the implementation scenario of inputting through a mouse and a keyboard on the VNC client to remotely control the virtual machine as an example. Figure 6 An implementation process diagram of the implementation scenario provided by the embodiment of the present application is shown in FIG. 6.
[0100] As shown in FIG. 6, the implementation process of the implementation scenario provided by the embodiment of the present application includes the following steps. Figure 6As shown, in response to the input operation of the mouse and keyboard on the VNC client, the virtual input and output device emulated by the virtual machine hardware emulation module 1122 includes a virtual mouse and a virtual keyboard, and the shadow device of the mouse and keyboard is configured in the virtual machine management submodule 1121b. When the mouse or keyboard on the VNC client inputs information, the VNC client will pass the input event to the vnc_worker thread, and the vnc_worker thread will pass the input event to the console in the offload card 12. The console determines whether the input event is generated by the mouse or the keyboard according to the input event, and then feeds back the identification of the device generating the input event to the vnc_worker thread. The vnc_worker thread sends the identification to the shadow device, and the shadow device records the identification and sends the identification and the input information to the vsk_iothread thread. The vsk_iothread thread sends the identification and the input 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 and output device 1122d according to the identification, that is, when the identification indicates the keyboard, the input information is sent to the virtual keyboard, and when the identification indicates the mouse, the input information is sent to the virtual mouse. Then, the corresponding input and output device executes the 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 obtains the address of the updated video memory, and sends the address of the updated video memory to the vsk_iothread thread through the vsock channel, so that the vnc_worker thread obtains the updated video memory data according to the address, and sends the updated video memory data to the VNC client, so as to display the result generated by the input operation on the VNC client. Wherein, the process from the offload card 12 receiving the input information to the offload card 12 sending the information to the server 11 can be regarded as the process that the offload card 12 encapsulates and changes the input information of the VNC client into a remote call event, and then sends the remote call event to the server 11 through the callback registered by the corresponding shadow device and the vsock channel. The process from the server 11 receiving the information sent by the vsk_iothread thread through the vsock channel to updating the video memory according to the operation result can be regarded as the process that the server 11 reversely analyzes the remote call event, and finds the device call corresponding event processing function for processing according to the identification in the analysis result.
[0101] It should be noted that the virtual machine involves a variety of functions that need to be implemented through the cooperation of the virtual machine, the virtual machine management agent submodule 1121a and the virtual machine management submodule 1121b, and the present embodiment does not enumerate them one by one. But it should be understood that in the implementation of the functions that need to be implemented through the cooperation of the virtual machine, the virtual machine management agent submodule 1121a and the virtual machine management submodule 1121b, the implementation process can be correspondingly referred to the implementation process of the foregoing VNC function, which will not be described one by one here.
[0102] Optionally, as shown in Figure 4 The offload card 12 can be connected with the storage resource and / or 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 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 with the storage resource and network resource in the cloud data center through the network card 13.
[0103] In an implementable manner, as shown in Figure 4 The server management module 113 is also deployed in the offload card 12, which is used to manage the running state of the server system 1. For example, the server management module 113 is used to manage the virtualization platform (such as implementing the function of libvirt), is responsible for maintaining and managing the computing resources of the virtual machine (such as implementing the function of Nova), and is responsible for the functions related to system installation, upgrade, deployment and operation and maintenance in the server 11.
[0104] In addition, when the server system 1 is deployed in the cloud data center, the server management module 113 is also used to receive the management plane operation request sent by the cloud management platform 2, and perform corresponding operations according to the management plane operation request. The management plane operation request can be a request sent by the cloud management platform 2 for managing the virtual machine, or a request sent by the user through the cloud management platform 2 for managing the virtual machine.
[0105] By receiving the management plane operation request through the server management module 113 and performing corresponding operations, it is not necessary for the server 11 to receive the management plane operation request and perform corresponding operations, which reduces the overhead of server resources caused by receiving the management plane request and performing corresponding operations, and can ensure the business performance of the virtual machine.
[0106] To sum up, in the server system provided in the embodiments of the present application, by splitting the virtual machine management module into a virtual machine management agent submodule and a virtual machine management submodule and deploying the virtual machine management submodule on the offload card, the function in the virtual machine simulator that consumes more server resources is deployed on the offload card, the server resource occupied by the overhead of the virtual machine simulator itself is reduced, the influence of the overhead of the virtual machine simulator itself and the virtual machine providing services for users on the virtual machine service performance due to the competition for resources is reduced, and the virtual machine service performance is effectively ensured. Moreover, splitting the virtual machine management module into the virtual machine management agent submodule and the virtual machine management submodule does not have side effects on the virtual machine service performance (such as the scheduling performance of the virtual processor and the I / O read-write performance of the virtual machine), and therefore has a good application prospect.
[0107] The embodiments of the present application further provide a virtual machine creation method. The virtual machine creation method is applied to the server system provided in the embodiments of the present application, the server system includes a server and an offload card interposed in the server, and the server and the offload card establish a connection channel. Optionally, the offload card further deploys a server management module. Moreover, the offload card is connected with storage resources and / or network resources through a network card. Further, the server and the offload card can be connected through a bus, for example, a virtual peripheral component interconnect express (PCIe) bus.
[0108] As shown in the server system provided in the embodiments of the present application, Figure 7 The virtual machine creation method includes the following steps.
[0109] In step 701, the server receives a virtual machine creation request sent by a cloud platform.
[0110] When a user needs to use a virtual machine to implement a service, the user can operate on a client, the operation triggers sending of a virtual machine creation request for requesting creation of a virtual machine to a cloud management platform, and the cloud management platform sends the virtual machine creation request to the server.
[0111] The virtual machine creation request carries a configuration requirement of the virtual machine. The configuration requirement of the virtual machine is used to indicate the specification of the virtual machine requested to be created. Moreover, since the virtual machine needs to run based on the virtual machine hardware provided by the virtual machine simulator, the configuration requirement can indicate the specification of the virtual machine hardware required for the virtual machine to run. For example, the specification of the virtual machine hardware indicated by the configuration requirement can include: the total number of virtual processors, the topology structure of virtual processors, the type of virtual processors, the number of virtual memories, the use strategy of virtual memories, the setting mode of virtual memory slots, the type of virtual input and output devices, the specification of virtual input and output devices, the storage path of the image file of the operating system of the virtual machine, the storage path of the image file of the application program used by the virtual machine to implement a service, the configuration information of the initialization parameters of the operating system of the virtual machine, and the like.
[0112] The topology of the virtual processor is used to indicate one or more of the total number of virtual processors required to be used by the virtual machine, the total number of virtual cores included in each virtual processor, and the total number of hyper-threads included in each virtual processor. The type of the virtual processor is used to indicate the word length and model number of the virtual processor, etc. The word length of the virtual processor is the number of binary bits that can be processed in parallel by the virtual processor at one time. The usage policy of the virtual memory is used to indicate the way in which the virtual memory is used by the plurality of virtual processors used by the virtual machine. For example, the usage policy of the virtual memory is used to indicate that the plurality of virtual CPUs used by the virtual machine uses the virtual memory in a non-uniform memory access (NUMA) manner. The specification of the virtual input / output device is used to indicate 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 the description information of the queue of the virtual network card and the media access control (MAC) address and other information. When the virtual input / output device is a virtual disk, the specification of the virtual disk indicates the capacity and other information of the virtual disk. The image file of the operating system of the virtual machine is used to record the relevant information for interaction between the operating system and the hardware of the virtual machine. The image file of the application program for implementing the service of the virtual machine is used to record the relevant information for interaction between the application program for implementing the service running 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 a LINUX system, the image file of the operating system of the virtual machine can be a kernel image file, and the image file of the application program for implementing the service of the virtual machine can be an initrd image file.
[0113] In step 702, the server creates the virtual machine according to the virtual machine creation request, starts the virtual machine management agent submodule arranged in the server, and starts the virtual machine management submodule arranged in the offload card through the connection channel.
[0114] After the VMM in the server receives the virtual machine creation request, the virtual machine hardware simulation module is pulled up according to the virtual machine creation request, and the virtual machine hardware is simulated according to the hardware of the server according to the configuration requirement of the virtual machine indicated by the virtual machine creation request using the virtual machine hardware simulation module. In addition, the VMM also starts the virtual machine management agent submodule arranged in the server, and starts the virtual machine management submodule arranged in the offload card through the connection channel, so as to realize the management function of the virtual machine through the virtual machine management agent submodule and the virtual machine management submodule.
[0115] Optionally, the hardware of the virtual machine comprises one or more of the following: a virtual processor, a virtual memory, a virtual motherboard chip, a virtual input / output device and a virtual bus. For example, the virtual machine hardware simulation module can simulate the hardware of the virtual machine according to the 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 strategy of the virtual memories, the setting mode of the virtual memory slots, the type of the virtual input / output devices and the specifications of the virtual input / output devices, which are indicated by the configuration requirements.
[0116] Optionally, the virtual machine management sub-module is further configured to access data of the virtual machine from the memory of the server in a direct memory access (DMA) mode through the connection channel.
[0117] Optionally, the management functions of the virtual machine comprise one or any combination of the following: 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 parsing function.
[0118] Optionally, the server and the offload card are connected through a virtual peripheral component interconnect express (PCIe) bus or a compute express link (CXL) bus.
[0119] In summary, in the virtual machine creation method provided in the embodiments of the present application, by splitting the virtual machine management module into a virtual machine management agent sub-module and a virtual machine management sub-module and deploying the virtual machine management sub-module on the offload card, the function in the virtual machine simulator that consumes more server resources is deployed in the offload card, the occupation of the server resources by the overhead of the virtual machine simulator itself is reduced, the influence of the overhead of the virtual machine simulator itself and the virtual machine providing services for users on the virtual machine service performance due to the competition for resources is reduced, and the service performance of the virtual machine is effectively guaranteed. Moreover, splitting the virtual machine management module into the virtual machine management agent sub-module and the virtual machine management sub-module will not have side effects on the service performance of the virtual machine (such as the scheduling performance of the virtual processor and the I / O read / write performance of the virtual machine), and therefore has a good application prospect.
[0120] It should be noted that the order of the steps of the virtual machine creation method provided in the embodiments of the present application can be adjusted appropriately, and the steps can be increased or decreased as appropriate. Any person skilled in the art can easily think of changes within the technical range disclosed in the present application, which should be covered within the protection scope of the present application, and therefore will not be described herein.
[0121] Moreover, those skilled in the art can clearly understand that, for the convenience and brevity of description, the implementation process of the virtual machine creation method and its related content described above can refer to the corresponding content in the foregoing server system embodiments, which will not be described herein.
[0122] The application provides a virtual machine creation device applied to a server, wherein an offload card is inserted into the server, and a connection channel is established between the server and the offload card. Figure 8 As shown in the figure, the virtual machine creation device 80 comprises:
[0123] A receiving module 801 is configured to receive a virtual machine creation request sent by a cloud management platform.
[0124] A 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 submodule arranged in the server, and start a virtual machine management submodule arranged in the offload card through the connection channel.
[0125] The virtual machine is implemented 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 communicates with the virtual machine management submodule through the connection channel, and the virtual machine management submodule is configured to implement a management function of the virtual machine.
[0126] Optionally, the virtual machine simulator further comprises a virtual machine hardware simulation module arranged 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.
[0127] Optionally, 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) mode through the connection channel.
[0128] Optionally, the hardware of the virtual machine comprises one or more of a virtual processor, a virtual memory, a virtual motherboard chip, a virtual input / output device and a virtual bus.
[0129] 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.
[0130] Optionally, the server and the offload card are connected through a virtual peripheral component interconnect express (PCIe) bus or a compute express link (CXL) bus.
[0131] In conclusion, in the virtual machine creation apparatus provided by the embodiment of the present application, by splitting the virtual machine management module into a virtual machine management agent submodule and a virtual machine management submodule and deploying the virtual machine management submodule on the offload card, the function in the virtual machine simulator that consumes a large amount of server resources is deployed on the offload card, the server resource occupied by the overhead of the virtual machine simulator itself is reduced, the influence of the overhead of the virtual machine simulator itself and the virtual machine providing services for users on the virtual machine service performance due to competition for resources is reduced, and the virtual machine service performance is effectively ensured. Moreover, splitting the virtual machine management module into a virtual machine management agent submodule and a virtual machine management submodule does not have side effects on the virtual machine service performance (such as the scheduling performance of the virtual processor and the I / O read-write performance of the virtual machine), and therefore has a good application prospect.
[0132] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the working principle of the virtual machine creation apparatus and the modules described above can refer to the corresponding content in the foregoing server system embodiments, which will not be described herein again.
[0133] The embodiment of the present application provides a computer device. Figure 9 An exemplary possible architecture diagram of a computer device is provided. As shown in the figure, Figure 9 The computer device 90 can include a processor 901, a memory 902, a communication interface 903 and a bus 904. In the computer device, the number of processors 901 can be one or more, Figure 9 Only one processor 901 is shown. Optionally, the processor 901 can be a central processing unit (CPU). If the computer device has multiple processors 901, the types of the multiple processors 901 can be different or can be the same. Optionally, the multiple processors of the computer device can also be integrated into a multi-core processor.
[0134] The memory 902 stores computer instructions and data. The memory 902 can store computer instructions and data required to implement the virtual machine creation method provided by the present application. The memory 902 can be any one or any combination of the following storage media: non-volatile memory (such as read-only memory (ROM), solid state disk (SSD), hard disk drive (HDD), optical disk, etc.), volatile memory.
[0135] The communication interface 903 can be any one or any combination of the following devices: a network interface (such as an Ethernet interface), a wireless network card, or the like device with network access function. The communication interface 903 is used for data communication between the computer device and other nodes or other computer devices.
[0136] Figure 9 The bus 904 is also exemplarily drawn. The bus 904 can connect the processor 901 with the memory 902 and the communication interface 903. In this way, through the bus 904, the processor 901 can access the memory 902 and also can interact with other nodes or other computer devices for data through the communication interface 903.
[0137] In the present application, the computer device executes computer instructions in the memory 902, and can implement the virtual machine creation method provided by the embodiments of the present application. For example, a virtual machine creation request sent by a cloud management platform is received; a virtual machine is created in a server according to the virtual machine creation request, a virtual machine management agent submodule set in the server is started, and a virtual machine management submodule set in an offload card is started through a connection channel. Moreover, the computer device executes computer instructions in the memory 902, and the implementation process of the steps of the computer device can be correspondingly referred to the corresponding description in the above method embodiments.
[0138] The embodiments of the present application also provide a storage medium, which is a non-volatile computer readable storage medium. When instructions in the storage medium are executed by a processor, the virtual machine creation method provided by the embodiments of the present application is implemented.
[0139] The embodiments of the present application also provide a computer program product containing instructions, which, when the computer program product is run on a computer, causes the computer to execute the virtual machine creation method provided by the embodiments of the present application.
[0140] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.
[0141] In the embodiments of the present application, the terms "first", "second" and "third" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance. The term "at least one" means one or more, and the term "multiple" means two or more, unless otherwise explicitly limited.
[0142] The term "and / or", within the context of the present application, is merely descriptive and not limiting. That is, the term "and / or", within the context of the present application, means that there are three possible relationships between the associated objects, for example, A and / or B, means that there are three possible relationships: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present application generally represents an "or" relationship between the associated objects.
[0143] The above description is merely optional embodiments of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the concept and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A server system, characterized by The server system comprises a server and an offload card interposed in the server, and the server and the offload card establish a connection channel; The server is provided with a virtual machine manager VMM and a virtual machine, and the virtual machine is implemented through a virtual machine emulator, which comprises a virtual machine management module, the virtual machine management module comprising a virtual machine management agent submodule and a virtual machine management submodule; The virtual machine management agent submodule is deployed on the server, and the virtual machine management submodule is deployed on the offload card, wherein at least two communication channels are established based on the connection channel, the communication channels comprising an address acquisition channel and a direct memory access DMA channel, the address acquisition channel being used for the virtual machine management agent submodule to send a storage address of data in a virtual memory to the virtual machine management submodule, the address acquisition channel being a socket connection channel, and the DMA channel being used for the virtual machine management submodule to acquire required data from the virtual memory through a DMA mode based on the storage address of data in the virtual memory, the virtual machine management agent submodule communicating with the virtual machine management submodule through the connection channel, and the virtual machine management submodule being used to implement a management function of the virtual machine.
2. The system of claim 1, wherein, The virtual machine emulator further comprises a virtual machine hardware simulation module, which is arranged in the server and is used to simulate hardware of the virtual machine according to hardware of the server.
3. The system of claim 2, wherein, The hardware of the virtual machine comprises one or more of a virtual processor, a virtual memory, a virtual motherboard chip, a virtual input / output device and a virtual bus.
4. The system according to any one of claims 1 to 3, characterized in that, 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.
5. The system of any one of claims 1 to 3, wherein, The server and the offload card are connected through a virtual peripheral component interconnect express PCIe bus or a compute express link CXL bus.
6. A virtual machine creation method characterized by comprising: The method is applied to a server system, which comprises a server and an offload card interposed in the server, and the server and the offload card establish a connection channel, and the method comprises: The server receives a virtual machine creation request sent by a cloud management platform through a virtual machine manager VMM arranged in the server; The server creates a virtual machine in the server according to the virtual machine creation request through the VMM, starts a virtual machine management agent submodule arranged in the server, and starts a virtual machine management submodule arranged in the offload card through the connection channel; The server receives a virtual machine creation request sent by a cloud management platform through a virtual machine manager VMM arranged in the server; The virtual machine is implemented through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, the virtual machine management module comprises the virtual machine management agent submodule and the virtual machine management submodule, at least two communication channels are established based on the connection channel, the communication channels comprise an address acquisition channel and a DMA channel, the address acquisition channel is used for the virtual machine management agent submodule to send a storage address of data in a virtual memory to the virtual machine management submodule, the address acquisition channel is a socket connection channel, the DMA channel is used for the virtual machine management submodule to acquire required data from the virtual memory through a DMA mode based on the storage address of data in the virtual memory, the virtual machine management agent submodule communicates with the virtual machine management submodule through the connection channel, and the virtual machine management submodule is used to implement a management function of the virtual machine.
7. The method of claim 6, wherein, The virtual machine simulator further comprises a virtual machine hardware simulation module, the virtual machine hardware simulation module is arranged in the server, and the virtual machine hardware simulation module is used to simulate hardware of the virtual machine according to hardware of the server.
8. The method of claim 7, wherein, The hardware of the virtual machine comprises one or more of a virtual processor, a virtual memory, a virtual motherboard chip, a virtual input and output device and a virtual bus.
9. The method according to any one of claims 6 to 8, characterized in that, 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.
10. The method according to any one of claims 6 to 8, characterized in that, The server is connected with the offload card through a virtual peripheral component interconnect express (PCIe) bus or a compute express link (CXL) bus.
11. A virtual machine creation apparatus characterized by comprising: The device is applied to a server, the offload card is inserted into the server, a connection channel is established between the server and the offload card, and the device comprises: A receiving module is configured to receive a virtual machine creation request sent by a cloud management platform through a virtual machine manager (VMM) arranged in the service. A processing module is configured to create a virtual machine in the server according to the virtual machine creation request through the VMM arranged in the service, start a virtual machine management agent submodule arranged in the server, and start a virtual machine management submodule arranged in the offload card through the connection channel. The virtual machine is implemented through a virtual machine simulator, the virtual machine simulator comprises a virtual machine management module, the virtual machine management module comprises the virtual machine management agent submodule and the virtual machine management submodule, at least two communication channels are established based on the connection channel, the communication channels comprise an address acquisition channel and a DMA channel, the address acquisition channel is used for the virtual machine management agent submodule to send a storage address of data in a virtual memory to the virtual machine management submodule, the address acquisition channel is a socket connection channel, the DMA channel is used for the virtual machine management submodule to acquire required data from the virtual memory through a DMA mode based on the storage address of data in the virtual memory, the virtual machine management agent submodule communicates with the virtual machine management submodule through the connection channel, and the virtual machine management submodule is used to implement a management function of the virtual machine.
12. The apparatus of claim 11, wherein, The virtual machine simulator further comprises a virtual machine hardware simulation module, the virtual machine hardware simulation module is arranged in the server, and the virtual machine hardware simulation module is used to simulate hardware of the virtual machine according to hardware of the server.
13. The apparatus of claim 12, wherein, The hardware of the virtual machine comprises one or more of the following: a virtual processor, a virtual memory, a virtual motherboard chip, a virtual input and output device and a virtual bus.
14. The apparatus of any one of claims 11 to 13, wherein, The management function comprises one or any combination of the following: 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.
15. The apparatus of any one of claims 11 to 13, wherein, The server is connected with the offload card through a virtual peripheral component interconnect express (PCIe) bus or a compute express link (CXL) bus.
16. A computer device, comprising: The computer device comprises a processor and a memory, and the memory stores a computer program; when the processor executes the computer program, the computer device implements the method in any one of claims 6 to 10.
17. A storage medium, characterized by When the instructions in the storage medium are executed by the processor, the method in any one of claims 6 to 10 is implemented.
Citation Information
Patent Citations
Secure booting of virtualization managers
CN109564524A