Virtual machine creation processing method, related device and medium
By optimizing the virtual machine creation process, ensuring that the virtual machine and the network card are on the same resource structure, the problem of inefficient forwarding of virtual machine network requests in the cloud computing environment is solved, and network speed and access bandwidth are improved.
Patent Information
- Application Number
- CN202411253898.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-09
AI Technical Summary
In a cloud computing environment, improper allocation of resources between virtual machines and network cards leads to inefficient network request forwarding and low network speed and access bandwidth.
By responding to virtual machine creation requests, determine the target server on which the target virtual machine is located, and obtain the processing resource structure associated with the network card in the target server, optimize resource allocation to shorten the transmission path of virtual machines and network card, and ensure that the virtual machines and network card are deployed in On the same resource structure.
It improves the network request forwarding efficiency of virtual machines and solves the network speed and access bandwidth problems caused by improper resource allocation.
Smart Images

Figure CN118779068B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a virtual machine creation processing method, related devices and media. Background Art
[0002] At present, in the cloud computing environment, network function virtualization (NFV) is often implemented through virtual machines, so that the network request forwarding function can be completed by using virtual machines that can implement network function virtualization. There are both virtual machines and network cards (gateways) in the server. The network request forwarding process of the virtual machine in the server often needs to rely on the network card. When creating a virtual machine, it is necessary to allocate an internal CPU resource inside the server for the virtual machine to create the virtual machine. Once the internal CPU resource allocated to the virtual machine inside the server is far away from the network card inside the server, for example, inside the server, the network card is set on the internal slot A, but the internal CPU resource allocated to the virtual machine is set on the internal slot B, it is necessary to pass through a longer transmission path to be associated with the network card. This situation will lead to problems with low network speed and access bandwidth, which will lead to low efficiency in network request forwarding. Summary of the invention
[0003] The embodiments of the present disclosure provide a virtual machine creation processing method, related devices and media, which can improve the network request forwarding efficiency of the virtual machine.
[0004] According to one aspect of the present disclosure, a method for creating a virtual machine is provided, the method comprising:
[0005] In response to a request to create a target virtual machine, determining a target server where the target virtual machine is located, the target server including a target network card;
[0006] If the type of the target virtual machine is a first type, obtaining a processing resource body architecture associated with the target network card in the target server, wherein the first type is used to indicate that the target virtual machine needs to work in coordination with the target network card;
[0007] Obtaining target-associated resource information of the target virtual machine;
[0008] Determining a target processing resource body in the processing resource body framework based on the target associated resource information;
[0009] The target processing resource body is allocated to the target virtual machine, so as to create the target virtual machine based on the target processing resource body and the target network card.
[0010] According to one aspect of the present disclosure, a virtual machine creation processing device is provided, the device comprising:
[0011] A first determining unit, configured to determine, in response to a request to create a target virtual machine, a target server where the target virtual machine is located, wherein the target server includes a target network card;
[0012] A first acquisition unit is configured to acquire a processing resource body architecture associated with the target network card in the target server if the type of the target virtual machine is a first type, wherein the first type is used to indicate that the target virtual machine needs to work in coordination with the target network card;
[0013] A second acquisition unit, configured to acquire target-associated resource information of the target virtual machine;
[0014] A second determining unit, configured to determine a target processing resource body in the processing resource body framework based on the target associated resource information;
[0015] An allocating unit is used to allocate the target processing resource body to the target virtual machine, so as to create the target virtual machine based on the target processing resource body and the target network card.
[0016] Optionally, the processing resource body architecture includes a plurality of candidate resource body hierarchies;
[0017] The second determining unit includes:
[0018] A first determination module, configured to determine a target resource body level among the plurality of candidate resource body levels based on the target associated resource information;
[0019] The second determining module is used to determine the target processing resource body in the target resource body hierarchy.
[0020] Optionally, the first determining module is used to:
[0021] A first determination submodule is used to determine the processing resource benchmark number of each of the candidate resource body levels;
[0022] A first acquisition submodule, configured to acquire the number of processing resources required to create the target virtual machine from the target associated resource information;
[0023] The second determining submodule is configured to determine the target resource volume level among the plurality of candidate resource volume levels based on the number of processing resources and the reference number of processing resources of each of the candidate resource volume levels.
[0024] Optionally, the second determining submodule is used to:
[0025] comparing the number of processing resources with respective benchmark numbers of processing resources;
[0026] Among the plurality of candidate resource body hierarchies, the candidate resource body hierarchies whose processing resource reference number is greater than the processing resource number and whose hierarchical level is smaller are determined as the target resource body hierarchies.
[0027] Optionally, each of the candidate resource body levels includes a plurality of candidate processing resource bodies;
[0028] The first determining submodule is used for:
[0029] For each of the candidate resource body levels, obtaining the number of candidate processing resources of each of the candidate processing resource bodies in the candidate resource body level;
[0030] The maximum number of candidate processing resources is determined as the base number of processing resources at the candidate resource level.
[0031] Optionally, the target resource body hierarchy includes a plurality of candidate processing resource bodies;
[0032] The second determining module is used for:
[0033] Obtaining the number of candidate processing resources of each of the candidate processing resource bodies in the target resource body hierarchy;
[0034] For each of the candidate processing resource bodies in the target resource body level, resource scoring is performed based on the processing resource benchmark number and the number of candidate processing resources to obtain a resource scoring result;
[0035] Based on the resource scoring result, the target processing resource body is determined from a plurality of candidate processing resource bodies distributed at the target resource body level.
[0036] Optionally, performing resource scoring based on the baseline number of processing resources and the number of candidate processing resources to obtain a resource scoring result includes:
[0037] Determining the processing resource margin of the candidate processing resource body and the idle processing resource state of the target server based on the processing resource benchmark number and the candidate processing resource number;
[0038] Resource scoring is performed based on the processing resource margin and the idle processing resource status to obtain the resource scoring result.
[0039] Optionally, the first determining unit includes:
[0040] A first acquisition module, used to acquire multiple candidate servers;
[0041] A second acquisition module, configured to acquire, in response to a request to create a target virtual machine, virtual machine configuration information of the target virtual machine and target associated resource information;
[0042] The third determination module is used to determine the target server among the multiple candidate servers based on the virtual machine configuration information and the target associated resource information.
[0043] Optionally, the third determining module includes:
[0044] A second acquisition submodule is used to acquire basic server information of each candidate server;
[0045] A screening submodule, configured to screen out an intermediate server from the plurality of candidate servers based on the virtual machine configuration information, the target associated resource information, and the server basic information;
[0046] A third determination submodule, configured to determine, for each of the intermediate servers, a priority score of the intermediate server based on the basic information of the server;
[0047] The fourth determination submodule is used to determine the target server from the plurality of intermediate servers based on the priority score.
[0048] Optionally, the screening submodule is used to:
[0049] Determining a server screening condition based on the virtual machine configuration information and the target associated resource information;
[0050] Among the multiple candidate servers, the candidate server whose target index in the server basic information meets the server screening condition is determined as the intermediate server.
[0051] Optionally, the third determining submodule is used to:
[0052] For each of the intermediate servers, obtaining the number of server threads, the number of server cores, the storage type, and the memory size of the candidate server from the basic server information;
[0053] A priority score for the intermediate server is determined based on the number of server threads, the number of server cores, the storage type, and the memory size.
[0054] Optionally, determining the priority score of the intermediate server based on the number of server threads, the number of server cores, the storage type, and the memory size includes:
[0055] Determining a first score for the intermediate server based on the number of server threads;
[0056] Determining a second score for the intermediate server based on the number of server cores;
[0057] Based on the storage type, determining a third score for the intermediate server;
[0058] Based on the memory size, determining a fourth score of the intermediate server;
[0059] The priority score is obtained based on a weighted sum of the first score, the second score, the third score, and the fourth score.
[0060] Optionally, the target server includes a plurality of candidate resource body frameworks having candidate framework indexes;
[0061] The first acquisition unit is used for:
[0062] If the type of the target virtual machine is the first type, obtaining a server index of the target server;
[0063] Based on the server index, searching a preset mapping table for a target architecture index corresponding to the server index, wherein the preset mapping table is used to indicate a candidate architecture index of a candidate resource body architecture where a target network card in each candidate server is located;
[0064] Among the multiple candidate resource body frameworks, the candidate resource body framework whose candidate framework index is consistent with the target framework index is determined as the processing resource body framework.
[0065] Optionally, the virtual machine creation processing device further includes a first creation unit, and the first creation unit is used to:
[0066] If the type of the target virtual machine is the second type, obtaining a processing resource body architecture in the target server that is not associated with the target network card, wherein the second type is used to indicate that the target virtual machine does not need to work in conjunction with the target network card;
[0067] Obtaining target-associated resource information of the target virtual machine;
[0068] Determining a target processing resource body in the processing resource body framework based on the target associated resource information;
[0069] The target processing resource volume is allocated to the target virtual machine to create the target virtual machine based on the target processing resource volume.
[0070] Optionally, the virtual machine creation processing device further includes a second creation unit, and the second creation unit is used to:
[0071] If the type of the target virtual machine is the third type, obtaining an idle resource body structure in the target server, wherein the third type is used to indicate that the entire resources of the target server are required to create the target virtual machine, and the target virtual machine needs to work in conjunction with the target network card;
[0072] The processing resource bodies in the idle resource body framework are allocated to the target virtual machine, so as to create the target virtual machine based on the processing resource bodies in the idle resource body framework and the target network card.
[0073] Optionally, the virtual machine creation processing device further includes a storage unit, and the storage unit is used to:
[0074] In response to the data collection request for each candidate server, if it is determined that the target script of each candidate server has been downloaded, then based on the target script, the server basic information, the processing resource body architecture data, and the processing resource body architecture where the target network card is located of the candidate server are obtained;
[0075] Building a preset mapping table based on the target index of the processing resource body architecture of each of the candidate servers;
[0076] For each of the candidate servers, marking other resource body frameworks except the processing resource body framework;
[0077] The server basic information, the processing resource body architecture data, and the preset mapping table are stored in a preset database.
[0078] Optionally, constructing a preset mapping table based on the target index of the processing resource body architecture of each of the candidate servers includes:
[0079] For each of the candidate servers, obtaining a server index of the candidate server;
[0080] Determine the server index as a keyword, determine the target index as a value, and generate a key-value pair based on the keyword and the value;
[0081] The preset mapping table is generated based on the key-value pairs of the plurality of candidate servers.
[0082] According to one aspect of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned virtual machine creation processing method when executing the computer program.
[0083] According to one aspect of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the virtual machine creation processing method as described above is implemented.
[0084] According to one aspect of the present disclosure, a computer program product is provided. The computer program product includes a computer program. The computer program is read and executed by a processor of an electronic device, so that the electronic device executes the virtual machine creation processing method as described above.
[0085] In the embodiment of the present disclosure, in order to solve the problem of low efficiency of network request forwarding caused by the fact that after a virtual machine is created in the related art, the virtual machine needs to go through a long transmission path before it can be associated with the network card, in the embodiment of the present disclosure, when a creation request for a target virtual machine is received, the creation request for the target virtual machine will be responded to first to determine the target server where the target virtual machine is located, wherein the target server includes a target network card, so that the server that can provide sufficient CPU resources can be preferentially used as the target server. Furthermore, if the type of the target virtual machine is the first type (the first type is used to indicate that the target virtual machine needs to work in coordination with the target network card), the processing resource body architecture associated with the target network card in the target server is obtained, so that the candidate resource body architecture where the target network card is located can be preferentially selected as the processing resource body architecture for providing processing resources, which is conducive to shortening the transmission path of the target virtual machine and the target network card, and eliminating the problem of low network speed and access bandwidth caused by deploying the target virtual machine and the target network card in different resource body architectures. Furthermore, after determining the processing resource body framework, the disclosed embodiment also obtains the target associated resource information of the target virtual machine, and determines the target processing resource body in the processing resource body framework based on the target associated resource information, taking into account the situation that there may be multiple processing resource bodies in the processing resource body framework, and can reasonably allocate resources according to the target associated resource information. Finally, the target processing resource body is allocated to the target virtual machine to create a target virtual machine based on the target processing resource body and the target network card. This method selects a target processing resource body on the processing resource body framework associated with the target network card to provide the CPU resources required to create the target virtual machine, and can realize the deployment of the target virtual machine and the target network card in the same processing resource body framework. When the target virtual machine needs to forward a network request, it does not need to go through the transmission protocol and a longer transmission path to establish a connection with the target network card, which can improve the network request forwarding efficiency of the virtual machine.
[0086] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] The accompanying drawings are used to provide further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation on the technical solution of the present disclosure.
[0088] Figure 1 is an architecture diagram of a system to which the virtual machine creation processing method according to an embodiment of the present disclosure is applied;
[0089] Figure 2A-2F A schematic diagram showing the application of the virtual machine creation processing method according to an embodiment of the present disclosure in a virtual machine creation scenario;
[0090] Figure 3 is a flowchart of a virtual machine creation processing method according to an embodiment of the present disclosure;
[0091] Figure 4 is a flowchart of determining a target server among multiple candidate servers according to an embodiment of the present disclosure;
[0092] Figure 5 is a flow chart of determining a target server among multiple intermediate servers according to an embodiment of the present disclosure;
[0093] Figure 6 is a flow chart for determining an intermediate server according to an embodiment of the present disclosure;
[0094] Figure 7 is a schematic diagram of an implementation process of determining an intermediate server according to an embodiment of the present disclosure;
[0095] Figure 8 is a flow chart for determining a priority score of an intermediate server according to one embodiment of the present disclosure;
[0096] Fig. 9 is a schematic diagram of an implementation process of determining a priority score of an intermediate server according to an embodiment of the present disclosure;
[0097] Fig.10 is a flow chart for determining a processing resource body architecture according to an embodiment of the present disclosure;
[0098] Fig.11 is a schematic diagram of an implementation process of determining a processing resource body architecture according to an embodiment of the present disclosure;
[0099] Fig.12 is a flow chart of determining a target processing resource body according to an embodiment of the present disclosure;
[0100] Fig.13 is a flowchart of determining a target resource body level according to an embodiment of the present disclosure;
[0101] Figure 14A-14B is a schematic diagram of an implementation process of determining a target resource body level according to an embodiment of the present disclosure;
[0102] Fig.15 is a flow chart of determining a target processing resource body according to an embodiment of the present disclosure;
[0103] Fig.16 is a schematic diagram of an implementation process of determining a target processing resource body according to an embodiment of the present disclosure;
[0104] Fig.17 is a flowchart of creating a second type of target virtual machine according to an embodiment of the present disclosure;
[0105] Fig.18 is a flowchart of creating a third type of target virtual machine according to an embodiment of the present disclosure;
[0106] Fig.19 is a flow chart of adapting each candidate server according to an embodiment of the present disclosure;
[0107] Fig. 20 is a schematic diagram of implementation details of adaptation of each candidate server according to an embodiment of the present disclosure;
[0108] Fig.21 is a schematic diagram of implementation details of a virtual machine creation processing method according to an embodiment of the present disclosure;
[0109] Fig. 22 is a module diagram of a virtual machine creation processing device according to an embodiment of the present disclosure;
[0110] Fig.23 is a terminal structure diagram of a virtual machine creation processing method according to an embodiment of the present disclosure;
[0111] Fig.24 The server structure diagram of a virtual machine creation processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0112] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.
[0113] The following describes the system architecture and scenarios for application of the embodiments of the present disclosure.
[0114] Figure 1It is a system architecture diagram used by the virtual machine creation processing method according to an embodiment of the present disclosure, and includes a target terminal 140, the Internet 130, a gateway 120, a virtual machine creation server 110, a candidate server 150, and the like.
[0115] The object terminal 140 includes various forms such as desktop computers, laptop computers, PDAs (personal digital assistants), mobile phones, vehicle-mounted terminals, home theater terminals, and dedicated terminals. In addition, it can be a single device or a collection of multiple devices. The object terminal 140 can communicate with the Internet 130 in a wired or wireless manner to exchange data. Among them, the object terminal 140 includes a virtual machine creation processing platform, which is used to provide the target object with some parameters required to set up a virtual machine.
[0116] The virtual machine creation server 110 and multiple candidate servers 150 for providing processing resources refer to computer systems that can provide certain services to the object terminal 140. Compared with the ordinary object terminal 140, the virtual machine creation server 110 and the candidate server 150 have higher requirements in terms of stability, security, performance, etc. The virtual machine creation server 110 and the candidate server 150 can be a high-performance computer in the network platform, a cluster of multiple high-performance computers, a part of a high-performance computer (such as a virtual machine), a combination of parts of multiple high-performance computers (such as virtual machines), etc. The virtual machine creation server 110 and the candidate server 150 include multiple types of services, wherein the implementation of each service of the virtual machine creation server 110 and the candidate server 150 is often associated with some intermediate databases or storage media. The virtual machine creation server 110 is used to receive a virtual machine creation request of the target object, and select a candidate server that is most suitable for creating a virtual machine from multiple candidate servers for providing processing resources (such as candidate server 1, candidate server 2 and candidate server 3) according to the virtual machine creation request, and determine a specific module in the server that provides processing resources for creating a virtual machine. The candidate server 150 is used to provide internal CPU resources to facilitate the creation of various types of virtual machines.
[0117] The gateway 120 is also called an internetwork connector or a protocol converter. The gateway realizes network interconnection at the transport layer and is a computer system or device that acts as a converter. The gateway is a translator between two systems that use different communication protocols, data formats or languages, or even have completely different architectures. At the same time, the gateway can also provide filtering and security functions. The message sent by the object terminal 140 to the virtual machine creation server 110 and the candidate server 150 is sent to the corresponding virtual machine creation server 110 and the candidate server 150 through the gateway 120. The message sent by the virtual machine creation server 110 and the candidate server 150 to the object terminal 140 is also sent to the corresponding object terminal 140 through the gateway 120.
[0118] The embodiments of the present disclosure can be applied in various scenarios, such as Figure 2A-2F The virtual machine creation scenario shown, etc.
[0119] like Figure 2A As shown, when the target object wants to create a virtual machine, the target object will log in to the virtual machine creation processing platform through the object terminal and enter the virtual machine creation process. At this time, a prompt field "Please enter the name, type, required number of CPU cores and memory size of the virtual machine to be created" is displayed on the page, and an editing area for entering the virtual machine name, an editing area for entering the virtual machine type, an editing area for entering the number of CPU cores required to create the virtual machine, and an editing area for entering the memory size required to create the virtual machine are provided. Based on this, the target object enters "K" in the editing area for entering the virtual machine name, enters "NFV virtual machine not deployed on the whole machine" in the editing area for entering the type of virtual machine, enters "8 cores" in the editing area for entering the number of CPU cores required to create the virtual machine, enters "8g" in the editing area for entering the memory size required to create the virtual machine, and clicks the "Confirm" button to confirm the creation of a NFV virtual machine K not deployed on the whole machine, and the creation of virtual machine K requires the server to provide 8 cores of CPU resources and 8G of memory size.
[0120] like Figure 2B As shown, after the target object clicks the "Confirm" button, a prompt field "The following are the details of the servers that meet the resource requirements." will be displayed on the page, and a list indicating the number of CPU cores, memory size and priority score of each candidate server will be displayed. Since the number of CPU cores of server 5 is 64 and the memory size is 256G, the processing resources in server 5 are the most sufficient, so when creating virtual machine K, server 5 is determined as the target server for providing CPU resources.
[0121] like Figure 2CAs shown, after determining the target server, the virtual machine creation server will search for the CPU topology structure where the target network card inside server 5 is located, and display a prompt field on the page "The target network card of server 5 is located on the CPU topology structure Socket1, where the specific hierarchical structure of the CPU topology structure Socket1 is as follows", and at the same time, the page also displays the specific hierarchical structure diagram of the CPU topology structure Socket1. The target object can view the nested hierarchies contained in the specific hierarchical structure diagram on the interface, as well as the specific number of CPU resources contained in each hierarchy. Among them, the CPU topology structure Socket1 is composed of 4 CCD structures, and each CCD structure is composed of two CCX structures. Based on the processing resource information and specific hierarchical structure initially configured by the target object, a prompt field will also be displayed on the page "Since the CCD level of the above CPU topology structure Socket1 is the minimum level that can provide 8-core CPU resources, the CCD level is used as the target level." to prompt the target object to select a CCD structure on the CCD level as a carrier for providing CPU resources.
[0122] like Figure 2D As shown, after determining that the target level is the CCD level, the virtual machine creation server will perform resource scoring on each CCD structure of the CCD level of server 5. At this time, a prompt field will be displayed on the page, "The following is the resource scoring of each structure of the target level in server 5.", and the resource scoring details of each CCD structure will be displayed. Among them, the resource scoring score of structure CCD0 containing 8-core CPU resources is 85; the resource scoring score of structure CCD1 containing 4-core CPU resources is 45; the resource scoring score of structure CCD2 containing 6-core CPU resources is 55; the resource scoring score of structure CCD3 containing 6-core CPU resources is 55. Based on this, the virtual machine creation server will select structure CCD0 with the largest resource scoring score as the carrier for providing CPU resources.
[0123] like Figure 2E As shown, after the carrier providing the CPU resources is determined, a prompt window will be displayed on the page, with a prompt field "CPU resources in the structure CCD0 will be used to create virtual machine K, virtual machine K is being created, please wait patiently..." to prompt the specific location of the virtual machine K to be created inside the server 5.
[0124] like Figure 2F As shown, after the virtual machine K is created, a prompt window will be displayed on the page, with a prompt field "Virtual machine K has been created, and network request forwarding operations can be performed through virtual machine K and the target network card" in the prompt window to prompt the target object that virtual machine K has been successfully created.
[0125] It should be noted that Socket refers to the physical CPU topology structure inside the server, CCD refers to the computing chip inside the server (full name is Core Chiplet Die), and CCX refers to the computing core inside the server (full name is CPU Complex). Inside the server, CCX is often set on the CCD chip, and the CCD chip is deployed on the physical CPU topology structure Socket. A server often contains at least two Socket structures.
[0126] The following is a general description of the embodiments of the present disclosure.
[0127] According to an embodiment of the present disclosure, a method for creating a virtual machine is provided.
[0128] The virtual machine creation processing method is generally applied to business scenarios where processing resources of a server are allocated to different types of virtual machines for virtual machine creation, such as Figure 2A-2F The virtual machine creation scenario shown. The disclosed embodiment provides a solution for allocating processing resources to a virtual machine based on the performance indicators of a server and the location of a network card in the creation of a virtual machine that implements a network request forwarding function, which can improve the network request forwarding efficiency of the virtual machine.
[0129] like Figure 3 As shown, a virtual machine creation processing method according to an embodiment of the present disclosure may include:
[0130] Step 310: In response to the creation request of the target virtual machine, determine the target server where the target virtual machine is located;
[0131] Step 320: If the type of the target virtual machine is the first type, obtain a processing resource body architecture associated with the target network card in the target server;
[0132] Step 330: Obtain target-related resource information of the target virtual machine;
[0133] Step 340: Determine the target processing resource body in the processing resource body framework based on the target associated resource information;
[0134] Step 350: Allocate the target processing resource body to the target virtual machine to create the target virtual machine based on the target processing resource body and the target network card.
[0135] Steps 310 - 350 are described in detail below.
[0136] In step 310, in response to a request to create a target virtual machine, a target server where the target virtual machine is located is determined.
[0137] The target virtual machine refers to a virtual machine to be created, wherein the creation of the target virtual machine requires the use of processing resources such as the number of CPU cores and memory of the server.
[0138] The creation request is a request sent by a user to a virtual machine creation server through an object terminal when the user wants to create a virtual machine. The creation request often records resource information such as the number of CPU cores and memory size required to create the target virtual machine configured by the user.
[0139] The target server refers to a candidate server selected by the virtual machine creation server from multiple candidate servers to provide processing resources for creating the target virtual machine. After the target virtual machine is created, it will be deployed on the target server. The target server includes a target network card, which is used by the target virtual machine to forward network requests.
[0140] In the specific implementation of this embodiment, when an object needs to create a target virtual machine in a server, the object will send a creation request for the target virtual machine to the virtual machine creation server through the object terminal. Based on this, the virtual machine creation server will first respond to the creation request of the target virtual machine and obtain the server performance and processing resource requirements that the server for creating the target virtual machine must meet. Then, according to the server performance and processing resources required for creating the target server, the target server is determined from multiple selectable servers to determine that the target virtual machine is to be deployed on the target server.
[0141] To save space, the specific implementation process of determining the target server where the target virtual machine is located in the embodiment of the present disclosure will be described in detail below, but will not be repeated here.
[0142] In step 320, if the type of the target virtual machine is the first type, a processing resource body architecture associated with the target network card in the target server is obtained.
[0143] The first type is used to indicate that the target virtual machine needs to work in conjunction with the target network card.
[0144] The processing resource body architecture refers to the resource body architecture where the target network card is located inside the target server.
[0145] In the specific implementation of this embodiment, if the type of the target virtual machine is the first type, it indicates that the target virtual machine is a virtual machine that can implement network request forwarding (NFV virtual machine not deployed as a whole machine), and the target virtual machine needs to work with the target network card when performing network request forwarding. Based on this, on the target server, the processing resource body architecture associated with the target network card is determined, wherein the processing resource body architecture associated with the target network card inside the target server refers to the processing resource body architecture where the target network card is located.
[0146] In step 330, target-associated resource information of the target virtual machine is obtained.
[0147] The target-associated resource information is used to indicate specific resource information such as the specific number of CPU cores and specific memory size required to create the target virtual machine.
[0148] In the specific implementation of this embodiment, when the object sends a creation request for the target virtual machine, the object will configure resources for the target virtual machine on the front-end interface of the object terminal, and set the processing resources required for the target virtual machine when creating it (for example, memory size, computing resources, etc.). Based on this, if authorized, the creation request is parsed to obtain the target-related resource information of the target virtual machine.
[0149] In step 340, a target processing resource body is determined in the processing resource body framework based on the target associated resource information.
[0150] The target processing resource body refers to a module determined inside the target server that provides resources for creating a target virtual machine. The target processing resource body may indicate a specific location of the target virtual machine inside the target server.
[0151] To save space, the specific implementation process of determining the target processing resource body in the processing resource body framework based on the target associated resource information in the embodiment of the present disclosure will be described in detail below.
[0152] In step 350, the target processing resource volume is allocated to the target virtual machine to create a target virtual machine based on the target processing resource volume and the target network card.
[0153] In the specific implementation of this embodiment, first, the processing resources carried by the target processing resource body are allocated to the target virtual machine. Then, the processing resources carried by the target processing resource body are used to create a target virtual machine inside the target server, and the target virtual machine is associated with the target network card to complete the creation of the target virtual machine.
[0154] Through the above steps 310-350, in the embodiment of the present disclosure, in view of the problem of low efficiency of network request forwarding caused by the fact that after a virtual machine is created in the related art, the virtual machine needs to go through a long transmission path before it can be associated with the network card, in the embodiment of the present disclosure, when a creation request for a target virtual machine is received, the creation request for the target virtual machine will be responded to first, and the target server where the target virtual machine is located will be determined, wherein the target server includes a target network card, so that the server that can provide sufficient CPU resources can be preferentially used as the target server. Further, if the type of the target virtual machine is the first type (the first type is used to indicate that the target virtual machine needs to work in conjunction with the target network card), the processing resource body architecture associated with the target network card in the target server is obtained, so that the candidate resource body architecture where the target network card is located can be preferentially selected as the processing resource body architecture for providing processing resources, which is conducive to shortening the transmission path of the target virtual machine and the target network card, and eliminating the problem of low network speed and access bandwidth caused by deploying the target virtual machine and the target network card in different resource body architectures. Furthermore, after determining the processing resource body framework, the disclosed embodiment also obtains the target associated resource information of the target virtual machine, and determines the target processing resource body in the processing resource body framework based on the target associated resource information, taking into account the situation that there may be multiple processing resource bodies in the processing resource body framework, and can reasonably allocate resources according to the target associated resource information. Finally, the target processing resource body is allocated to the target virtual machine to create a target virtual machine based on the target processing resource body and the target network card. This method selects a target processing resource body on the processing resource body framework associated with the target network card to provide the CPU resources required to create the target virtual machine, and can realize the deployment of the target virtual machine and the target network card in the same processing resource body framework. When the target virtual machine needs to forward a network request, it does not need to go through the transmission protocol and a longer transmission path to establish a connection with the target network card, which can improve the network request forwarding efficiency of the virtual machine.
[0155] The above is a general description of steps 310 to 350. Since steps 330 and 350 have been described in detail in the above general description, the specific implementation of steps 310, 320 and 340 will be described in detail below.
[0156] Step 310 is described in detail below.
[0157] In step 310, in response to a request to create a target virtual machine, a target server where the target virtual machine is located is determined, and the target server includes a target network card.
[0158] Please refer to Figure 4 In one embodiment, the process of determining the target server where the target virtual machine is located includes but is not limited to the following steps 410-430:
[0159] Step 410: Obtain multiple candidate servers;
[0160] Step 420: In response to the creation request of the target virtual machine, obtain virtual machine configuration information and target associated resource information of the target virtual machine;
[0161] Step 430: Determine a target server from multiple candidate servers based on the virtual machine configuration information and the target associated resource information.
[0162] Steps 410 - 430 are described in detail below.
[0163] In step 410, a plurality of candidate servers are obtained.
[0164] A candidate server refers to a server that can provide processing resources for creating a target virtual machine.
[0165] In the specific implementation of this embodiment, since the candidate servers that can provide processing resources for the creation of various virtual machines are stored in the server resource pool, based on this, multiple candidate servers can be obtained from the server resource pool under the condition of authorization, so as to screen the target server from the multiple candidate servers.
[0166] In step 420, in response to the creation request of the target virtual machine, virtual machine configuration information and target-associated resource information of the target virtual machine are obtained.
[0167] The virtual machine configuration information is used to indicate the specific type, specification size and other information of the target virtual machine.
[0168] In the specific implementation of this embodiment, since the model specification configuration information of different types of virtual machines is often fixed, the model specification configuration information of each type of virtual machine can be stored in the virtual machine database. Based on this, when the virtual machine creation server receives a creation request for the target virtual machine, it first determines the specific type of the target virtual machine according to the creation request. Then, with authorization, according to the specific type of the target virtual machine, the model specification configuration information corresponding to the specific type is extracted from the virtual machine database, and the extracted model specification configuration information is determined as the virtual machine configuration information of the target virtual machine.
[0169] The specific process of obtaining the target-associated resource information of the target virtual machine in this embodiment is similar to the above step 330. To save space, it will not be described in detail.
[0170] In step 430, a target server is determined from a plurality of candidate servers based on the virtual machine configuration information and the target associated resource information.
[0171] In the specific implementation of this embodiment, the server resource usage and performance of each candidate server are compared with the virtual machine configuration information and the target associated resource information, and the candidate server that can meet the processing resource requirements for creating the target virtual machine and has better performance is selected as the target server.
[0172] The advantage of this embodiment is that when determining the target server, multiple candidate servers in the server resource pool are screened according to the virtual machine configuration information of the target virtual machine and the target associated resource information, which can improve the accuracy of server screening.
[0173] Please refer to Figure 5 In one embodiment, step 430 specifically includes but is not limited to the following steps 510-540:
[0174] Step 510: Obtain basic server information of each candidate server;
[0175] Step 520: Filter out an intermediate server from multiple candidate servers based on the virtual machine configuration information, target-related resource information, and server basic information;
[0176] Step 530: for each intermediate server, determine the priority score of the intermediate server based on the basic information of the server;
[0177] Step 540: Determine a target server from among multiple intermediate servers based on the priority scores.
[0178] Steps 510 - 540 are described in detail below.
[0179] In step 510, basic server information of each candidate server is obtained.
[0180] The basic server information is used to indicate the candidate server's CPU core count, memory size, storage type, network bandwidth, CPU usage, and other resource usage and various performance indicators.
[0181] In the specific implementation of this embodiment, since the basic information of each candidate server in the server resource pool is recorded in the preset database in the server adaptation stage before the virtual machine creation stage, the basic information of each candidate server can be obtained from the preset database with authorization.
[0182] In step 520, an intermediate server is screened out from a plurality of candidate servers based on the virtual machine configuration information, the target associated resource information, and the server basic information.
[0183] The intermediate server refers to a candidate server that meets the basic requirements for creating a target virtual machine, such as performance indicators and resource usage.
[0184] In the specific implementation of this embodiment, for each candidate server, the server basic information is compared with the virtual machine configuration information, and the server basic information is compared with the target associated resource information. Then, the candidate server whose server basic information can meet the virtual machine configuration information and the virtual machine creation requirements of the target associated resource information is determined as an intermediate server.
[0185] For example, the number of CPU cores and the memory size of the intermediate server need to be no less than the number of CPU cores and the memory size required in the target-related resource information.
[0186] In step 530, for each intermediate server, a priority score of the intermediate server is determined based on the server basic information.
[0187] The priority score is used to indicate the priority of using the intermediate server as the target server for creating the target virtual machine. The larger the priority score, the higher the priority of considering the intermediate server as the target server.
[0188] In the specific implementation of this embodiment, since the server basic information of each intermediate server includes multiple indicators, for each candidate server, each indicator in the server basic information can be scored to obtain the priority sub-score corresponding to each indicator. Then, the priority sub-scores of all indicators are integrated into the priority score of the intermediate server.
[0189] In step 540, a target server is determined from among the plurality of intermediate servers based on the priority scores.
[0190] In the specific implementation of this embodiment, first, according to the priority score, each intermediate server is sorted in order from the largest to the smallest priority score to obtain a server sequence. Then, in the server sequence, the intermediate server ranked first is used as the target server.
[0191] Furthermore, since the server status of each intermediate server changes dynamically, in order to improve the availability of the screened intermediate servers, an intermediate server may be randomly selected from the first predetermined number of intermediate servers in the server sequence as the target server.
[0192] The advantage of this embodiment is that, when determining the target server, a combination of conditional filtering and priority scoring is adopted. For each candidate server, the server basic information that can meet the basic requirements (virtual machine configuration information, and virtual machine creation requirements of target associated resource information) is first screened out as an intermediate server; then the priority score of each intermediate server is determined according to the scoring strategy, and the priority score is used to quantify the selection priority of each intermediate server when creating a virtual machine, so that the candidate server that meets the basic requirements and has better performance indicators can be preferentially selected as the target server, which improves the accuracy and rationality of server screening.
[0193] Please refer to Figure 6 In one embodiment, step 520 specifically includes but is not limited to the following steps 610-620:
[0194] Step 610: Determine server screening conditions based on virtual machine configuration information and target associated resource information;
[0195] Step 620: Among multiple candidate servers, determine the candidate server whose target index in the basic information of the server meets the server screening condition as the intermediate server.
[0196] Steps 610-620 are described in detail below.
[0197] In step 610, server screening conditions are determined based on the virtual machine configuration information and the target associated resource information.
[0198] Server filter criteria are used to indicate the minimum performance indicators that the target server needs to meet.
[0199] In the specific implementation of this embodiment, first, various indicators related to the server are obtained from the virtual machine configuration information and the target-related resource information, and the obtained indicators are used as target indicators, and the indicator values of the indicators in the virtual machine configuration information and the target-related resource information are used as the indicator thresholds of the target indicators. Then, the target indicators and their indicator thresholds are integrated into server screening conditions.
[0200] For example, in the virtual machine configuration information and the target-related resource information, the server-related indicator is "the number of CPU cores required to create the target virtual machine is 4 cores, and the memory size is 8G." Based on this, the server screening condition is determined as "the number of CPU cores of the target server is not less than 4 cores, and the memory size is not less than 8G."
[0201] In step 620, for each candidate server, first obtain the specific index value of the target index in the server basic information. Then, compare the specific index value of the target index with the minimum index value of the target index in the server screening condition. Further, according to the comparison result, the candidate server whose specific index values of all target indicators are not less than the minimum index value of the target indicator in the server screening condition is selected as the intermediate server.
[0202] like Figure 7 As shown, the server screening condition determined based on the virtual machine configuration information of the target virtual machine and the target associated resource information is "the number of CPU cores is not less than 8 cores, and the memory is not less than 4G". According to the basic server information of each candidate server in the server resource pool, the number of CPU cores and the memory size of each candidate server are determined respectively. Among them, the number of CPU cores of server 1 is 32 cores, and the memory size is 32G; the number of CPU cores of server 2 is 8 cores, and the memory size is 16G; the number of CPU cores of server 3 is 8 cores, and the memory size is 256G; the number of CPU cores of server 4 is 16 cores, and the memory size is 64G; the number of CPU cores of server 5 is 64 cores, and the memory size is 256G; the number of CPU cores of server 6 is 2 cores, and the memory size is 2G; the number of CPU cores of server 7 is 2 cores, and the memory size is 4G. Based on this, the number of CPU cores and the memory size of each candidate server are compared with the server screening condition, and the candidate servers whose CPU cores and memory sizes meet the server screening condition are screened out. Since the number of CPU cores and the memory size of server 6 and server 7 cannot meet the server screening condition, server 1, server 2, server 3, server 4 and server 5 are determined as intermediate servers.
[0203] The advantage of this embodiment is that, by using conditional filtering, candidate servers that cannot meet the processing resources and performance indicators required by the virtual machine configuration information and target-associated resource information can be eliminated, and candidate servers whose basic server information can meet the basic requirements can be retained as intermediate servers. This can reduce the adverse impact of unqualified candidate servers on the determination of the target server, which is conducive to improving the efficiency and accuracy of determining the target server.
[0204] Please refer to Figure 8 In one embodiment, step 530 specifically includes but is not limited to the following steps 810-820:
[0205] Step 810: For each intermediate server, obtain the server thread number, server core number, storage type, and memory size of the candidate server from the server basic information;
[0206] Step 820: Determine the priority score of the intermediate server based on the number of server threads, the number of server cores, the storage type, and the memory size.
[0207] Steps 810-820 are described in detail below.
[0208] In step 810, for each intermediate server, the number of server threads, the number of server cores, the storage type, and the memory size of the candidate server are obtained from the basic server information.
[0209] The number of server threads is used to indicate the total number of threads in the server that can execute tasks independently.
[0210] The server core count indicates the total number of CPU cores in the server.
[0211] Storage type indicates the type of hardware device used in the server to store data.
[0212] The memory size is used to indicate the size of the resource storage space that can be provided within the server.
[0213] In the specific implementation of this embodiment, basic server information is extracted for each intermediate server, thereby obtaining the number of server threads, the number of server cores, the storage type, and the memory size of the candidate server.
[0214] In step 820, a priority score for the intermediate server is determined based on the number of server threads, the number of server cores, the storage type, and the memory size.
[0215] In the specific implementation of this embodiment, step 820 specifically includes but is not limited to the following steps:
[0216] Determining a first score of the intermediate server based on the number of server threads;
[0217] Determining a second score for the middle server based on the number of cores in the server;
[0218] determining a third score for the intermediate server based on the storage type;
[0219] Determining a fourth score of the middle server based on the memory size;
[0220] Based on a weighted sum of the first score, the second score, the third score, and the fourth score, a priority score is obtained.
[0221] The first score is used to indicate the priority of the number of server threads of the candidate server in the screening. The second score is used to indicate the priority of the number of server cores of the candidate server in the screening. The third score is used to indicate the priority of the storage type of the candidate server in the screening. The fourth score is used to indicate the priority of the memory size of the candidate server in the screening.
[0222] Specifically, since the number of server threads, the number of server cores, and the memory size are all numerical data. Based on this, first, a first function can be pre-constructed with the number of server threads as the independent variable (input) and the first score as the dependent variable (output); a second function can be constructed with the number of server cores as the independent variable (input) and the second score as the dependent variable (output); a third function can be constructed with the memory size as the independent variable (input) and the fourth score as the dependent variable (output). Among them, the first function, the second function, and the third function are all increasing functions. Then, the number of server threads of the intermediate server is input into the first function to obtain the first score of the intermediate server; the number of server cores of the intermediate server is input into the second function to obtain the second score of the intermediate server; the memory size of the intermediate server is input into the third function to obtain the fourth score of the intermediate server.
[0223] Furthermore, since the storage type is non-numeric data, based on this, a table lookup method can be used to obtain the third score. Specifically, first, a preset relationship mapping table is called, wherein the relationship mapping table is used to indicate the candidate scores corresponding to each candidate storage type, and the candidate storage type refers to the storage type that can exist in the server. Then, the storage type of the intermediate server is compared with each candidate storage type in the relationship mapping table, and the candidate score corresponding to the candidate storage type that is consistent with the storage type is used as the third score of the intermediate server.
[0224] Finally, the score weights of the first score, the second score, the third score, and the fourth score are obtained respectively; then, according to the score weights, the first score, the second score, the third score, and the fourth score are weighted and calculated to obtain the priority score.
[0225] like Fig. 9As shown, it is a ranking table of multiple intermediate servers that meet the server screening conditions. Specifically, the score weights of the first score, the second score, the third score and the fourth score are all 0.25. Based on this, the priority score of server 1 with a first score of 72, a second score of 84, a third score of 55 and a fourth score of 75 is 71.5. The priority score of server 2 with a first score of 66, a second score of 72, a third score of 80 and a fourth score of 70 is 72. The priority score of server 3 with a first score of 54, a second score of 72, a third score of 76 and a fourth score of 86 is 72. The priority score of server 4 with a first score of 83, a second score of 80, a third score of 63 and a fourth score of 78 is 76. The priority score of server 5 with a first score of 78, a second score of 90, a third score of 82 and a fourth score of 84 is 83.5. Based on this, these 5 intermediate servers are sorted into [server 5, server 4, server 3, server 2, server 1] according to the priority scores. It can be seen that server 5 is the intermediate server with the highest priority and has the best performance index, so server 5 is preferentially selected as the target server.
[0226] The advantage of this embodiment is that multiple performance indicators of the intermediate server in the basic information of the server are scored separately, and a combination of table lookup method and function calculation method is adopted in the scoring, which can achieve multi-dimensional scoring of the intermediate server, making the scoring dimensions more comprehensive, thereby improving the accuracy and rationality of the priority score.
[0227] Step 320 is described in detail below.
[0228] In step 320, if the type of the target virtual machine is the first type, a processing resource body architecture associated with the target network card in the target server is obtained, and the first type is used to indicate that the target virtual machine needs to work in coordination with the target network card.
[0229] In the disclosed embodiment, the target server includes a plurality of candidate resource body frameworks having candidate framework indexes.
[0230] The candidate resource body architecture refers to an internal CPU resource structure on the target server. The candidate resource body architecture can also be called a physical CPU structure inside the target server. Different candidate resource body architectures can communicate and interact with each other through the IFOP protocol.
[0231] The candidate framework index is used to uniquely identify each candidate resource body framework in the target server, and the candidate framework indexes of different candidate resource body frameworks are different.
[0232] Please refer to Fig.10In one embodiment, the process of determining the target server where the target virtual machine is located includes but is not limited to the following steps 1010-1030:
[0233] Step 1010: If the type of the target virtual machine is the first type, obtain a server index of the target server;
[0234] Step 1020: Based on the server index, search the preset mapping table for a target architecture index corresponding to the server index;
[0235] Step 1030: Determine, among multiple candidate resource body frameworks, a candidate resource body framework whose candidate framework index is consistent with the target framework index as a processing resource body framework.
[0236] Steps 1010-1030 are described in detail below.
[0237] In step 1010, if the type of the target virtual machine is the first type, a server index of the target server is obtained.
[0238] The server index is used to uniquely identify the target server. Each candidate server has a server index, and the server indexes of different candidate servers are different.
[0239] In a specific implementation of this embodiment, if the type of the target virtual machine is the first type, then with authorization permission, the server index of the target server is extracted from the basic server information of the target server.
[0240] In step 1020, based on the server index, a target architecture index corresponding to the server index is searched in a preset mapping table.
[0241] The preset mapping table is used to indicate the candidate architecture index of the candidate resource body architecture where the target network card in each candidate server is located.
[0242] The target architecture index is used to identify the candidate resource body architecture where the target network card in the target server is located.
[0243] In the specific implementation of this embodiment, first, the server index of the target server is compared with the server indexes of multiple candidate servers in the preset mapping table. Then, the candidate architecture index corresponding to the candidate server whose server index in the preset mapping table is consistent with the server index of the target server is determined as the target architecture index.
[0244] In step 1030, for the target server, among the multiple candidate resource body frames, the candidate frame index of each candidate resource body frame is compared with the target frame index. Then, if the candidate frame index of a candidate resource body frame is consistent with the target frame index, indicating that the target network card of the target server is located in this candidate resource body frame, the candidate resource body frame whose candidate frame index is consistent with the target frame index is determined as the processing resource body frame.
[0245] like Fig.11 As shown, the preset mapping table records the server indexes of 7 candidate servers and the target index of the processing resource body architecture where the target network card is located. Among them, the target index corresponding to the candidate server whose server index is server 1 is SocketAA1; the target index corresponding to the candidate server whose server index is server 2 is SocketNK1; the target index corresponding to the candidate server whose server index is server 3 is SocketLQ3; the target index corresponding to the candidate server whose server index is server 4 is SocketYY3; the target index corresponding to the candidate server whose server index is server 5 is SocketQ11; the target index corresponding to the candidate server whose server index is server 6 is SocketXQ3; the target index corresponding to the candidate server whose server index is server 7 is SocketT01. Based on this, when the server index of the target server is server 3, it can be queried in the preset mapping table that the target index of the processing resource body architecture where the target network card of the target server is located is SocketLQ3.
[0246] The advantage of this embodiment is that a preset mapping table is constructed to record the location of the target network card of each candidate server inside the candidate server, and the preset mapping table stores the mapping relationship between the server index of each candidate server and the candidate frame index of the candidate resource body frame where the target network card is located, so that when creating a target virtual machine, this mapping relationship can be relied upon to give priority to selecting the candidate resource body frame where the target network card is located as the processing resource body frame for providing processing resources, and priority is given to deploying the target virtual machine to the processing resource body frame. This method can effectively shorten the transmission path of the target virtual machine and the target network card, eliminate the problem of low network speed and access bandwidth caused by deploying the target virtual machine and the target network card in different resource body frames, thereby improving the network card request forwarding efficiency of the virtual machine.
[0247] Step 340 is described in detail below.
[0248] In step 340, a target processing resource body is determined in the processing resource body framework based on the target associated resource information.
[0249] In the disclosed embodiment, the processing resource body architecture includes a plurality of candidate resource body levels.
[0250] The candidate resource body level is used to indicate the specific hierarchical structure of the processing resource body architecture, wherein a certain subordinate relationship or nested relationship exists between multiple candidate resource body levels.
[0251] Please refer to Fig.12 In one embodiment, step 340 specifically includes the following steps 1210-1220:
[0252] Step 1210: Determine a target resource body level from among multiple candidate resource body levels based on the target associated resource information;
[0253] Step 1220: Determine the target processing resource body in the target resource body hierarchy.
[0254] Steps 1210 - 1220 are described in detail below.
[0255] In step 1210 , a target resource body level is determined from a plurality of candidate resource body levels based on the target-associated resource information.
[0256] The target resource body level is used to indicate the hierarchical position of the target virtual machine within the target server after it is created.
[0257] To save space, the specific process of determining the target resource body level among multiple candidate resource body levels in the embodiment of the present disclosure will be described in detail below and will not be repeated here.
[0258] In step 1220, a target processing resource volume is determined in the target resource volume hierarchy.
[0259] In the specific implementation of this embodiment, since the target resource body level contains more than one candidate processing resource body that can provide processing resources, and the number of processing resources that different candidate processing resource bodies can provide often differs. Based on this, in consideration of reducing the degree of resource fragmentation at the target resource body level, a candidate processing resource body that can provide processing resources for creating a target virtual machine can be selected from the target resource body level, and after the target virtual machine is created on the candidate processing resource body, the processing resources at the target resource body level are still in a relatively complete state, and this candidate processing resource body is used as the target processing resource body.
[0260] The benefit of this embodiment is that, based on the target-associated resource information, the target resource body level is determined from multiple candidate resource body levels, and the target virtual machine can be created at the right resource body level as much as possible according to the actual processing resource requirements, avoiding the problem of insufficient bandwidth or low access efficiency caused by crossing resource body levels. Furthermore, when determining the target processing resource body, the problem of resource fragmentation is taken into account, and a candidate processing resource body that can provide processing resources for creating the target virtual machine and keep the processing resources of the target server regular is selected as the target processing resource body as much as possible, which can improve the rationality of resource allocation when creating the virtual machine.
[0261] Please refer to Fig.13 In one embodiment, step 1210 specifically includes the following steps 1310-1330:
[0262] Step 1310, determining the processing resource benchmark number of each candidate resource body level;
[0263] Step 1320: Obtain the number of processing resources required to create the target virtual machine from the target associated resource information;
[0264] Step 1330 : Determine a target resource volume level among multiple candidate resource volume levels based on the number of processing resources and the processing resource benchmark number of each candidate resource volume level.
[0265] Steps 1310 - 1330 are described in detail below.
[0266] In step 1310 , the base number of processing resources for each candidate resource level is determined.
[0267] The processing resource baseline number is used to indicate the maximum number of processing resources that the candidate resource body level can provide for creating a target virtual machine.
[0268] In this embodiment, each candidate resource volume level includes a plurality of candidate processing resource volumes.
[0269] The candidate processing resource body refers to a module distributed in the candidate resource body hierarchy that can provide resources for creating a target virtual machine.
[0270] In the specific implementation of this embodiment, step 1310 specifically includes but is not limited to the following steps:
[0271] For each candidate resource body level, obtaining the number of candidate processing resources of each candidate processing resource body in the candidate resource body level;
[0272] The maximum number of candidate processing resources is determined as a base number of processing resources at the candidate resource body level.
[0273] The number of candidate processing resources is used to indicate the maximum number of processing resources that each candidate processing resource body distributed in the candidate resource body hierarchy can provide for creating a target virtual machine.
[0274] Specifically, first, for each candidate resource body level, each candidate processing resource body in the candidate resource body level is processed and statistics are performed to obtain the maximum number of processing resources that each candidate processing resource body can provide for creating a target virtual machine. Then, the maximum number of processing resources that can be provided for creating a target virtual machine is used as the candidate processing resource number of the candidate processing resource body.
[0275] In step 1320, the number of processing resources required to create the target virtual machine is obtained from the target associated resource information.
[0276] The number of processing resources is used to indicate the amount of processing resources required to create the target virtual machine.
[0277] In the specific implementation of this embodiment, since the target-associated resource information records the specific conditions of various resources required to create the target virtual machine, the target-associated resource information can be extracted to obtain the number of processing resources required to create the target virtual machine.
[0278] The number of processing resources may be the number of CPU cores required to create a target virtual machine.
[0279] In step 1330 , a target resource volume level is determined from among a plurality of candidate resource volume levels based on the number of processing resources and the base number of processing resources of each candidate resource volume level.
[0280] In the specific implementation of this embodiment, step 1330 specifically includes but is not limited to the following steps:
[0281] comparing the number of processing resources to respective processing resource benchmark numbers;
[0282] Among the plurality of candidate resource body hierarchies, a candidate resource body hierarchy having a processing resource reference number greater than the processing resource number and a smaller hierarchical level is determined as a target resource body hierarchy.
[0283] Specifically, first, the processing resource benchmark numbers of each candidate resource body hierarchy are compared. Then, among multiple candidate resource body hierarchies, the candidate resource body hierarchy whose processing resource benchmark number is greater than the processing resource number and whose hierarchy level is smaller is determined as the target resource body hierarchy.
[0284] For example, in a specific example, the rule followed by the above-mentioned determination of the target resource body level is defined as the minimum level rule. Specifically, the number of processing resources (CPU cores) required for the creation of the target virtual machine is recorded as N, where N is an integer greater than 0. For the processing resource body architecture, it includes the Socket level, the CCD level, and the CCX level, the Socket level is higher than the CCD level, and the CCD level is higher than the CCX level. The processing resource benchmark number of the Socket level is recorded as Socket CPUs; the processing resource benchmark number of the CCD level is recorded as CCD CPUs; the processing resource benchmark number of the CCX level is recorded as CCXCPUs, where Socket CPUs, CCD CPUs, and CCX CPUs are all integers greater than 0, and Socket CPUs is not less than CCD CPUs, and CCD CPUs is not less than CCX CPUs. Based on this, when N is less than or equal to CCX CPUs, the target resource body level is determined to be the CCX level. When N is less than or equal to CCD CPUs, and N is greater than CCX CPUs, the target resource body level is determined to be the CCD level. When N is less than or equal to Socket CPUs, and N is greater than CCD CPUs, the target resource body level is determined to be the Socket level. In particular, when N is greater than Socket CPUs, it indicates that a single processing resource body architecture cannot meet the processing resources required to create the target virtual machine. Therefore, the target resource body level is determined to be the entire target server, and the processing resource body architecture in the target server and other candidate processing resource body architectures are used to provide the processing resources required to create the target virtual machine.
[0285] like Fig.14AAs shown, the processing resource body architecture where the target network card inside the target server is located is Socket1 with 38-core CPU resources. Socket1 is the target architecture index of the processing resource body architecture. The processing resource body architecture has three levels, and the largest candidate resource body level in the processing resource body architecture is the Socket level. The processing resource body architecture Socket1 contains 4 CCD structures, which are CCD0 structure with 8-core CPU resources, CCD1 structure with 4-core CPU resources, CCD2 structure with 6-core CPU resources, and CCD3 structure with 20-core CPU resources. Furthermore, the CCD0 structure has two substructures, namely, CCX0 structure with 4-core CPU resources and CCX1 structure with 4-core CPU resources. The CCD1 structure has two substructures, namely, CCX0 structure with 2-core CPU resources and CCX1 structure with 2-core CPU resources. The CCD2 structure has two substructures, namely, the CCX0 structure with 2-core CPU resources and the CCX1 structure with 4-core CPU resources. The CCD3 structure has two substructures, namely, the CCX0 structure with 4-core CPU resources and the CCX1 structure with 16-core CPU resources. Based on this, the entire processing resource body architecture Socket1 is hierarchical, and the processing resource body architecture Socket1 can be divided into the first level, the second level and the third level, which are successively smaller, that is, the candidate resource body level includes the first level, the second level and the third level. The largest candidate resource body level (first level) has one candidate processing resource body, which is Socket1 with 38-core CPU resources. The second level has four candidate processing resource bodies, which are the candidate processing resource body CCD0 with 8-core CPU resources, the candidate processing resource body CCD1 with 4-core CPU resources, the candidate processing resource body CCD2 with 6-core CPU resources, and the candidate processing resource body CCD3 with 20-core CPU resources. The third level has 8 candidate processing resource bodies, namely candidate processing resource body CCD0-CCX0 with 4-core CPU resources (CCX0 structure in the candidate processing resource body CCD0 structure), candidate processing resource body CCD0-CCX1 with 4-core CPU resources, candidate processing resource body CCD1-CCX0 with 2-core CPU resources, candidate processing resource body CCD1-CCX1 with 2-core CPU resources, candidate processing resource body CCD2-CCX0 with 2-core CPU resources, candidate processing resource body CCD2-CCX1 with 4 cores, candidate processing resource body CCD3-CCX0 with 4 cores, and candidate processing resource body CCD3-CCX1 with 16-core CPU resources.Based on this, according to the CPU resources that can be provided by each candidate processing resource body at each level, the benchmark number of processing resources at the first level is determined to be 38; the benchmark number of processing resources at the second level is determined to be 20; and the benchmark number of processing resources at the third level is determined to be 16.
[0286] like Fig. 14B As shown, after determining the baseline number of processing resources of the first level, the second level, and the third level, when the number of processing resources of the target virtual machine is 8 cores, since 8 is less than 16, the target virtual machine can be created using the processing resources provided in the candidate processing resource bodies of the third level. Therefore, the third level (CCX level) is taken as the target level, and the target processing resource body is selected from the 8 candidate processing resource bodies in the CCX level.
[0287] The benefit of this embodiment is that when determining a target resource body level among multiple candidate resource body levels, the maximum number of processing resources that can be provided by each candidate resource body level (the baseline number of processing resources) and the number of processing resources required for creating a target virtual machine are first determined. After comparing the baseline number of processing resources and the number of processing resources, a candidate resource body level with a smaller level but that can meet the required processing resources is preferentially selected as the target resource body level. In this way, the resource level of the smallest unit can be selected so that the target virtual machine can be deployed as precisely as possible to the appropriate topology level (target resource body level), thereby avoiding the access performance problem caused by the need to cross resource body levels or cross resource bodies (for example, cross CCD or cross CCX), and improving the rationality of resource allocation when creating a virtual machine.
[0288] In the embodiment of the present disclosure, the target resource body level includes a plurality of candidate processing resource bodies.
[0289] Please refer to Fig.15 In one embodiment, step 1220 specifically includes the following steps 1510-1530:
[0290] Step 1510, obtaining the number of candidate processing resources of each candidate processing resource body in the target resource body hierarchy;
[0291] Step 1520: For each candidate processing resource body in the target resource body level, resource scoring is performed based on the processing resource benchmark number and the candidate processing resource number to obtain a resource scoring result;
[0292] Step 1530 : Based on the resource scoring result, determine a target processing resource body from a plurality of candidate processing resource bodies distributed at the target resource body level.
[0293] Steps 1510-1530 are described in detail below.
[0294] In step 1510, the number of candidate processing resources of each candidate processing resource body in the target resource body hierarchy is obtained.
[0295] The number of candidate processing resources is used to indicate the maximum number of processing resources that each candidate processing resource body distributed in the target resource body hierarchy can provide for creating a target virtual machine.
[0296] In the specific implementation of this embodiment, the specific process of step 1510 is similar to the specific process of obtaining the number of candidate processing resources of each candidate processing resource body in the candidate resource body level in the above step 1310. To save space, it will not be repeated.
[0297] In step 1520, resource scoring is performed for each candidate processing resource body in the target resource body hierarchy based on the processing resource benchmark number and the candidate processing resource number to obtain a resource scoring result.
[0298] The resource scoring result is used to indicate the suitability of the candidate processing resource body as a carrier for providing processing resources for creating a target virtual machine.
[0299] In the specific implementation of this embodiment, step 1520 specifically includes but is not limited to the following steps:
[0300] Determine the processing resource margin of the candidate processing resource body and the idle processing resource state of the target server based on the processing resource benchmark number and the candidate processing resource number;
[0301] Resource scoring is performed based on the processing resource margin and the idle processing resource status to obtain a resource scoring result.
[0302] Among them, the processing resource margin is used to indicate the number of processing resources remaining in a candidate processing resource body after the processing resources of a candidate processing resource body are used to create a target virtual machine; the idle processing resource status is used to indicate the degree of fragmentation of idle processing resources inside the target server after the processing resources of a candidate processing resource body are used to create a target virtual machine.
[0303] Specifically, for each candidate processing resource body, first, the difference between the processing resource baseline number and the candidate processing resource number is calculated to calculate the processing resource margin of the candidate processing resource body. Then, assuming that the candidate processing resource body is used to create the target virtual machine, the degree of fragmentation of the idle processing resources on each candidate processing resource body inside the target server is calculated after the processing resources of a certain candidate processing resource body are used to create the target virtual machine. Further, the processing resource margin is substituted into the first scoring function, and the output of the first scoring function is used as the first resource score, wherein the first scoring function is a decreasing function with the processing resource margin as the independent variable and the first resource score as the dependent variable, and the larger the processing resource margin, the smaller the first resource score, so as to use up the processing resources of the candidate processing resource body as much as possible to create the target virtual machine. Similarly, for the degree of fragmentation of idle processing resources on each candidate processing resource body, the idle processing resource state is input into the second scoring function, and the second resource score is output by the second scoring function, wherein the second scoring function is a decreasing function with the idle processing resource state as the independent variable and the second resource score as the dependent variable. When the degree of fragmentation indicated by the idle processing resource state is greater, the second resource score is smaller, so as to minimize the resource fragmentation of the target server after using the processing resources of the candidate processing resource body to create the target virtual machine as much as possible. Since there are multiple idle processing resource states, there are also multiple second resource scores. The multiple second resource scores are averaged to obtain the second resource score mean. Finally, the first resource score and the second resource score mean are averaged to obtain the resource scoring result. In this way, when scoring resources, it is possible to take into account the two considerations of exhausting the processing resources of the candidate processing resource body to create the target virtual machine and minimizing the degree of resource fragmentation after creating the target virtual machine, which is conducive to improving the rationality of processing resource body screening.
[0304] In step 1530, based on the resource scoring result, a target processing resource body is determined from a plurality of candidate processing resource bodies distributed in the target resource body hierarchy.
[0305] In the specific implementation of this embodiment, first, the resource scoring results of multiple candidate processing resource bodies distributed at the target resource body level are compared. Then, according to the comparison results, a candidate processing resource body with the largest resource scoring result is selected as the target processing resource body.
[0306] like Fig.16As shown, when the object wants to create a target virtual machine, the object will first configure the number of CPU cores required to create the target virtual machine to be 8 cores and the memory size to be 8g on the object terminal application. Then, the virtual machine creation server will filter, set the impact factor and sort the multiple candidate servers in the server resource pool according to the processing resource parameters configured by the object, and obtain a server sequence that can provide the processing resources required to create the target virtual machine, and the server sequence has server 3, server 2 and server n arranged in sequence. Based on this, server 3 ranked first in the server sequence is determined as the target server to be deployed to the target virtual machine, wherein the specific process of filtering, setting the impact factor and sorting the multiple candidate servers in the server resource pool is similar to the above steps 510-540. Further, the processing resource body architecture where the target network card in server 3 is located is Socket1 with 38-core CPU resources. Among them, the processing resource body architecture Socket1 is composed of 4 CCD structures, and each CCD structure is composed of two CCX structures. Specifically, the four CCD structures are CCD0 with 8-core CPU resources, CCD1 with 4-core CPU resources, CCD2 with 6-core CPU resources, and CCD3 with 20-core CPU resources. The CCD0 structure includes CCX0 with 4-core CPU resources (recorded as candidate processing resource body CCD0-CCX0) and CCX1 with 4-core CPU resources (recorded as candidate processing resource body CCD0-CCX1). The CCD1 structure includes CCX0 with 2-core CPU resources (recorded as candidate processing resource body CCD1-CCX0) and CCX1 with 2-core CPU resources (recorded as candidate processing resource body CCD1-CCX1). The CCD2 structure includes CCX0 with 2-core CPU resources (recorded as candidate processing resource body CCD2-CCX0) and CCX1 with 4-core CPU resources (recorded as candidate processing resource body CCD2-CCX1). The CCD3 structure includes CCX0 with 4-core CPU resources (recorded as candidate processing resource body CCD3-CCX0) and CCX1 with 16-core CPU resources (recorded as candidate processing resource body CCD3-CCX1). When the candidate processing resource body CCD3-CCX1 is used to create the target virtual machine, the complete 16-core CPU resources will be split into two 8-core CPU resources, making the target server unable to meet the needs of tasks that require 16-core CPU resources, causing the server resource fragmentation to deepen.When CCX0 or CCX1 belonging to different CCD structures are combined to provide the processing resources required by the target virtual machine, it will cause the problem of crossing the CCD structure, and there will be some defects such as slow access speed or insufficient bandwidth. If two CCX structures of the CCD2 structure or two CCX structures in CCD1 are used as candidate processing resource bodies for providing processing resources, insufficient processing resources will be provided. Therefore, the candidate processing resource bodies CCD0-CCX0 and the candidate processing resource bodies CCD0-CCX1 in the CCD0 structure should be preferentially selected to jointly provide the processing resources required for creating the target virtual machine. In this way, the processing resources of other candidate processing resource bodies of the target server can be complete or regular to the greatest extent while fully using the processing resources in the CCD0 structure.
[0307] The advantage of this embodiment is that when determining the target processing resource body, the problem of resource fragmentation is taken into consideration, and the fragmentation of the processing resources in the target server is calculated by using resource scoring to separately calculate the processing resources in the candidate processing resource body when creating the target virtual machine. This allows a candidate processing resource body that can provide the processing resources for creating the target virtual machine and keep the processing resources of the target server regular to be selected as the target processing resource body as much as possible, which can improve the rationality of resource allocation when creating the virtual machine.
[0308] The following describes in detail a process of creating virtual machines of other types than the first type according to an embodiment of the present disclosure.
[0309] In actual application, the created virtual machine may be of other types besides the first type, for example, a virtual machine that needs to utilize the processing resources provided by the server and needs to work with the target network card; a common virtual machine that is not used to implement network card request forwarding and does not need to work with the target network card, etc. Based on this, the disclosed embodiment also provides a solution for creating virtual machines of other types besides the first type, which can improve the universality of virtual machine creation and meet the virtual machine creation needs in various scenarios.
[0310] Please refer to Fig.17 In one embodiment, after determining the target server where the target virtual machine is located, the virtual machine creation method further includes the following steps 1710-1740:
[0311] Step 1710: If the type of the target virtual machine is the second type, obtain a processing resource body architecture in the target server that is not associated with the target network card;
[0312] Step 1720: Obtain target-related resource information of the target virtual machine;
[0313] Step 1730: Determine the target processing resource body in the processing resource body framework based on the target associated resource information;
[0314] Step 1740: Allocate the target processing resource volume to the target virtual machine to create the target virtual machine based on the target processing resource volume.
[0315] Steps 1710-1740 are described in detail below.
[0316] In step 1710, if the type of the target virtual machine is the second type, a processing resource body architecture that is not associated with the target network card in the target server is obtained.
[0317] The second type is used to indicate that the target virtual machine does not need to work with the target network card.
[0318] When this embodiment is implemented, the specific process of step 1710 is similar to the above step 320. To save space, it will not be described again.
[0319] In steps 1720-1740, the specific process of steps 1720-1740 is similar to the above steps 330-350, and will not be described in detail to save space.
[0320] The benefit of this embodiment is that, for ordinary virtual machines (target virtual machines of the second type) that are not used to implement network card request forwarding and do not need to work in coordination with the target network card, the candidate processing resource body architecture where the target network card is not located is preferentially selected within the target server as the processing resource body architecture that provides the processing resources required to create the target virtual machine, and the processing resources on the candidate processing resource body architecture where the target network card is located can be used to create the first type of virtual machine, which can effectively improve the rationality of the allocation of CPU resources within the server and the resource utilization efficiency. At the same time, when creating the second type of target virtual machine, the screening of multiple candidate resource body levels and the screening of candidate processing resource bodies at the target resource body level are also adopted, which can achieve the regularity of resource allocation, so that after the target virtual machine is created, the processing resources on the processing resource body architecture that is not associated with the target network card have better integrity, reducing the degree of resource fragmentation. This method meets the creation of ordinary virtual machines, can improve the universality of virtual machine creation, and meet the virtual machine creation needs in various scenarios.
[0321] Please refer to Fig.18 In another embodiment, after determining the target server where the target virtual machine is located, the virtual machine creation method further includes the following steps 1810-1820:
[0322] Step 1810: If the type of the target virtual machine is the third type, obtain the idle resource structure in the target server;
[0323] Step 1820: Allocate the processing resource body in the idle resource body framework to the target virtual machine, so as to create the target virtual machine based on the processing resource body in the idle resource body framework and the target network card;
[0324] Steps 1810-1820 are described in detail below.
[0325] In step 1810, if the type of the target virtual machine is the third type, the idle resource structure in the target server is obtained.
[0326] The third type is used to indicate that the creation of the target virtual machine requires the entire resources of the target server, and the target virtual machine needs to work in coordination with the target network card.
[0327] The idle resource body architecture refers to a candidate processing resource body architecture in which unused processing resources exist on the target server.
[0328] When this embodiment is implemented, the specific process of step 1810 is similar to the above step 320. To save space, it will not be repeated.
[0329] In step 1820, the processing resource volume in the idle resource volume framework is allocated to the target virtual machine, so as to create the target virtual machine based on the processing resource volume in the idle resource volume framework and the target network card.
[0330] In the specific implementation of this embodiment, the specific process of step 1820 is similar to the above steps 330-350, and will not be described in detail to save space.
[0331] The benefit of this embodiment is that for ordinary virtual machines (third type of target virtual machines) that need to use the entire server to implement network card request forwarding and need to work in conjunction with the target network card, all unused processing resources of the target server are directly provided to the target virtual machine for creation, and when creating, the same screening of multiple candidate resource body levels and the screening of candidate processing resource bodies at the target resource body level are adopted, so that after the target virtual machine is created, the processing resources on the architecture of each candidate processing resource body inside the target server have better integrity, reducing the degree of resource fragmentation of the target server. This method meets the needs of creating virtual machines that need to use the entire server to implement network card request forwarding and need to work in conjunction with the target network card, can improve the universality of virtual machine creation, and meet the needs of virtual machine creation in various scenarios.
[0332] The following describes in detail the process of adapting and configuring each candidate server in the embodiment of the present disclosure.
[0333] Since the basic server information and other relevant data of each candidate server are needed in the process of creating the target virtual machine, in order to improve the creation efficiency of the target virtual machine and the rationality of resource allocation, the embodiment of the present disclosure provides a solution for collecting and storing the relevant data of each candidate server before executing the virtual machine creation process, which can improve the efficiency of data acquisition and data query in the virtual machine creation stage.
[0334] Please refer to Fig.19 In one embodiment, before determining the target server where the target virtual machine is located, the virtual machine creation method further includes the following steps 1910-1940:
[0335] Step 1910: In response to the data collection request for each candidate server, if it is determined that the target script of each candidate server has been downloaded, then based on the target script, obtain the server basic information, processing resource body architecture data, and the processing resource body architecture where the target network card is located of the candidate server;
[0336] Step 1920: construct a preset mapping table based on the target index of the processing resource body architecture of each candidate server;
[0337] Step 1930: for each candidate server, mark the resource body frameworks other than the processing resource body framework;
[0338] Step 1940: store the basic information of the server, the processing resource structure data, and the preset mapping table into the preset database.
[0339] Steps 1910-1940 are described in detail below.
[0340] In step 1910, in response to data collection requests for each candidate server, if it is determined that the target script of each candidate server has been downloaded, based on the target script, the basic server information, processing resource body architecture data, and the processing resource body architecture where the target network card is located of the candidate server are obtained.
[0341] The data collection request refers to a request triggered when collecting server data of each candidate server before creating a target virtual machine.
[0342] The target script refers to a series of script codes related to creating a target virtual machine, wherein the target script includes but is not limited to a data collection script for collecting server data of each candidate server.
[0343] The processing resource body architecture data is used to indicate the specific hierarchical structure of each candidate resource body architecture contained in the candidate server, and the processing resources contained in the candidate processing resource body at each candidate processing resource body level in the specific hierarchical structure.
[0344] In the specific implementation of this embodiment, when data collection is to be performed on each candidate server, a data collection event will be triggered. Based on this, each candidate server will respond to the data collection request and first detect the relevant scripts for executing data collection. When it is determined that the candidate server has downloaded the target script, the target script can be executed to collect various server data such as the basic server information of the candidate server, the processing resource body architecture data, and the processing resource body architecture where the target network card is located.
[0345] In step 1920, a preset mapping table is constructed based on the target index of the processing resource body architecture of each candidate server.
[0346] In the specific implementation of this embodiment, step 1920 specifically includes but is not limited to the following steps:
[0347] For each candidate server, obtain the server index of the candidate server;
[0348] Determine the server index as a keyword, determine the target index as a value, and generate a key-value pair based on the keyword and the value;
[0349] A preset mapping table is generated based on the key-value pairs of multiple candidate servers.
[0350] Specifically, first, for each candidate server, the server index of the candidate server is obtained from the server basic information. Then, the server index is determined as the keyword key, and the target index of the processing resource body architecture where the target network card is located is determined as the value value, and the key-value pair of the candidate server is constructed. Furthermore, the key-value pairs of multiple candidate servers are stored into a key-value pair table, and the key-value pair table is used as a preset mapping table.
[0351] In step 1930, for each candidate server, other resource body frameworks except the processing resource body framework are marked.
[0352] In the specific implementation of this embodiment, for each candidate server, a preset identifier is used to mark other resource body frameworks in the candidate server except for the processing resource body framework, so as to distinguish the processing resource body framework where the target network card is located from other resource body frameworks, which is beneficial to the efficiency of obtaining the processing resource body framework where the target network card is located from the target server during the stage of creating the target virtual machine.
[0353] In step 1940, the server basic information, processing resource body architecture data, and preset mapping table are stored in the preset database.
[0354] The preset database refers to a data space that can provide data storage. The storage space size of the preset database is fixed.
[0355] In the specific implementation of this embodiment, for each candidate server, the server basic information and processing resource body architecture data of the candidate server are integrated into a data block, and the data block of the candidate server is stored in a preset database, so that the relevant data of each candidate server can be stored in blocks. In addition, the preset mapping table is directly stored in the preset database, so as to use the preset mapping table to indicate the corresponding relationship between each candidate server and the processing resource body architecture where the internal target network card is located.
[0356] The benefit of this embodiment is that before executing the virtual machine creation process, the relevant data of each candidate server is collected and stored, and the mapping relationship between the server index of each candidate server and the target index of the processing resource body architecture where the internal target network card is located is stored in the form of a key-value pair table, which can improve the efficiency and accuracy of determining the processing resource body architecture where the target network card is located during the virtual machine creation stage. Storing the basic information of the server and the processing resource body architecture data can provide a more reliable and comprehensive data reference for determining the target server, which can improve the accuracy of determining the target server during the virtual machine creation stage.
[0357] The following describes implementation details of a virtual machine creation processing method according to an embodiment of the present disclosure.
[0358] Refer to the following Fig. 20 and Fig.21 A specific implementation process of the virtual machine creation processing method according to an embodiment of the present disclosure is described in detail.
[0359] like Fig. 20As shown, it is a specific implementation process of adapting each candidate server before creating the target virtual machine. Specifically, first, in response to the triggering of the server adaptation process, the scripts and proxy applications adapted to the candidate server are first determined. Next, the adaptation script is downloaded and installed to the candidate server, and the proxy application is started. Further, a data collection instruction is sent to the candidate server, and the candidate server will call the data collection script on the candidate server in response to the data collection instruction to collect various server data of the candidate server, wherein the server data includes the CPU topology of the candidate server, the processing resource body architecture (Socket) where the target network card is located, and other information. Finally, the relevant data of the candidate server is stored in the preset database DB to complete the adaptation operation of the candidate server, and the specific process is similar to the above steps 1910-1940. To save space, it will not be repeated.
[0360] like Fig.21As shown, when the object wants to create a target virtual machine, the object will first configure the processing resource parameters such as the number of CPU cores and memory size required to create the target virtual machine on the object terminal application. Then, the virtual machine creation server will filter, set the impact factor and sort the multiple candidate servers in the server resource pool according to the processing resource parameters configured by the object, and obtain a server sequence that can provide the processing resources required to create the target virtual machine, and the server sequence has server 3, server 2 and server n arranged in sequence. Based on this, server 3, which ranks first in the server sequence, is determined as the target server to be deployed to the target virtual machine, wherein the specific process of filtering, setting the impact factor and sorting the multiple candidate servers in the server resource pool is similar to the above steps 510-540. Further, server 3 has two candidate resource body architectures (Socket 1 where the target network card is located, and Socket 0 where the target network card is not located), wherein the processing resources of Socket 1 where the target network card is located are used when creating a non-whole machine NFV virtual machine, and the processing resources of Socket 0 where the target network card is not located are used when creating a whole machine NFV virtual machine or when creating a non-NFV virtual machine. Therefore, Socket1 where the target network card is located is used as the processing resource body framework. Then, since the processing resource body framework Socket1 is composed of 4 CCD structures, and each CCD structure is composed of two CCX structures, it can be determined that the processing resource body framework Socket1 has three candidate resource body levels (Socket level, CCD level and CCX level). Based on this, the CCX level is first determined as the target resource body level among the multiple candidate resource body levels in the processing resource body framework Socket1, and its specific implementation process is similar to the above steps 1310-1330. Then, each candidate processing resource body of the CCX level is scored, and the candidate processing resource body CCX0 and the candidate processing resource body CCX1 in the CCD0 structure are selected as the target processing resource body according to the scoring situation, and its specific implementation process is similar to the above steps 1510-1530. Finally, a target virtual machine (NFV virtual machine) is created based on the processing resources in the target processing resource body, and its specific implementation process is similar to the above step 350. In order to save space, it will not be repeated.
[0361] The following describes the apparatus and devices of the embodiments of the present disclosure.
[0362] It is to be understood that, although the steps in the above-mentioned flowcharts are sequentially displayed according to the characterization of arrows, these steps are not necessarily executed in sequence according to the order of arrow characterization. Unless there is a clear description in the present embodiment, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the above-mentioned flowcharts can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0363] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object such as the target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the embodiment of the present application needs to obtain the attribute information of the target object, the separate permission or separate consent of the target object will be obtained through a pop-up window or jump to a confirmation page. After clearly obtaining the separate permission or separate consent of the target object, the necessary target object-related data used to enable the normal operation of the embodiment of the present application is obtained.
[0364] Fig. 22 The structure diagram of the virtual machine creation processing device 2200 provided in the embodiment of the present disclosure. The virtual machine creation processing device 2200 includes:
[0365] The first determining unit 2210 is configured to determine, in response to a request to create a target virtual machine, a target server where the target virtual machine is located, the target server including a target network card;
[0366] A first acquisition unit 2220 is configured to acquire a processing resource body architecture associated with a target network card in a target server if the type of the target virtual machine is a first type, wherein the first type is used to indicate that the target virtual machine needs to work in coordination with the target network card;
[0367] The second acquisition unit 2230 is used to acquire target-related resource information of the target virtual machine;
[0368] A second determining unit 2240 is configured to determine a target processing resource body in a processing resource body framework based on the target associated resource information;
[0369] The allocating unit 2250 is configured to allocate the target processing resource body to the target virtual machine, so as to create the target virtual machine based on the target processing resource body and the target network card.
[0370] Optionally, the processing resource body structure includes a plurality of candidate resource body hierarchies;
[0371] The second determining unit 2240 includes:
[0372] A first determination module (not shown) is used to determine a target resource body level among a plurality of candidate resource body levels based on target-associated resource information;
[0373] The second determining module (not shown) is configured to determine a target processing resource body in a target resource body hierarchy.
[0374] Optionally, the first determining module (not shown) is used to:
[0375] A first determination submodule (not shown) is used to determine the baseline number of processing resources at each candidate resource body level;
[0376] A first acquisition submodule (not shown), configured to acquire the number of processing resources required to create a target virtual machine from the target associated resource information;
[0377] The second determining submodule (not shown) is configured to determine a target resource volume level among a plurality of candidate resource volume levels based on the number of processing resources and the reference number of processing resources of each candidate resource volume level.
[0378] Optionally, the second determining submodule (not shown) is used to:
[0379] comparing the number of processing resources to respective processing resource benchmark numbers;
[0380] Among the plurality of candidate resource body hierarchies, a candidate resource body hierarchy having a processing resource reference number greater than the processing resource number and a smaller hierarchical level is determined as a target resource body hierarchy.
[0381] Optionally, each candidate resource body level includes a plurality of candidate processing resource bodies;
[0382] The first determination submodule (not shown) is used to:
[0383] For each candidate resource body level, obtaining the number of candidate processing resources of each candidate processing resource body in the candidate resource body level;
[0384] The maximum number of candidate processing resources is determined as a base number of processing resources at the candidate resource body level.
[0385] Optionally, the target resource body hierarchy includes a plurality of candidate processing resource bodies;
[0386] The second determination module (not shown) is used to:
[0387] Obtaining the number of candidate processing resources for each candidate processing resource body in the target resource body hierarchy;
[0388] For each candidate processing resource body in the target resource body level, resource scoring is performed based on the processing resource benchmark number and the candidate processing resource number to obtain a resource scoring result;
[0389] Based on the resource scoring result, a target processing resource body is determined from a plurality of candidate processing resource bodies distributed in a target resource body hierarchy.
[0390] Optionally, resource scoring is performed based on the number of processing resource benchmarks and the number of candidate processing resources to obtain a resource scoring result, including:
[0391] Determine the processing resource margin of the candidate processing resource body and the idle processing resource state of the target server based on the processing resource benchmark number and the candidate processing resource number;
[0392] Resource scoring is performed based on the processing resource margin and the idle processing resource status to obtain a resource scoring result.
[0393] Optionally, the first determining unit 2210 includes:
[0394] A first acquisition module (not shown), configured to acquire multiple candidate servers;
[0395] A second acquisition module (not shown), configured to acquire virtual machine configuration information and target-associated resource information of the target virtual machine in response to a request to create the target virtual machine;
[0396] The third determination module (not shown) is configured to determine a target server from among multiple candidate servers based on the virtual machine configuration information and the target associated resource information.
[0397] Optionally, the third determining module (not shown) includes:
[0398] A second acquisition submodule (not shown) is used to acquire basic server information of each candidate server;
[0399] A screening submodule (not shown) is used to screen out an intermediate server from a plurality of candidate servers based on virtual machine configuration information, target-related resource information, and server basic information;
[0400] A third determination submodule (not shown) is used to determine the priority score of each intermediate server based on the basic information of the server;
[0401] The fourth determination submodule (not shown) is used to determine a target server from a plurality of intermediate servers based on the priority score.
[0402] Optionally, a screening submodule (not shown) is used to:
[0403] Determine server screening conditions based on virtual machine configuration information and target-related resource information;
[0404] Among multiple candidate servers, a candidate server whose target indicator in the basic information of the server meets the server screening condition is determined as an intermediate server.
[0405] Optionally, the third determining submodule (not shown) is used to:
[0406] For each intermediate server, obtain the server thread number, server core number, storage type, and memory size of the candidate server in the server basic information;
[0407] Determines the priority score for the intermediate server based on the number of server threads, number of server cores, storage type, and memory size.
[0408] Optionally, a priority score for the intermediate server is determined based on the number of server threads, the number of server cores, the storage type, and the memory size, including:
[0409] Determining a first score of the intermediate server based on the number of server threads;
[0410] Determining a second score for the middle server based on the number of cores in the server;
[0411] determining a third score for the intermediate server based on the storage type;
[0412] Determining a fourth score of the middle server based on the memory size;
[0413] Based on a weighted sum of the first score, the second score, the third score, and the fourth score, a priority score is obtained.
[0414] Optionally, the target server includes a plurality of candidate resource body schemas having candidate schema indexes;
[0415] The first acquisition unit 2220 is used for:
[0416] If the type of the target virtual machine is the first type, obtaining a server index of the target server;
[0417] Based on the server index, searching for a target architecture index corresponding to the server index in a preset mapping table, wherein the preset mapping table is used to indicate a candidate architecture index of a candidate resource body architecture where a target network card in each candidate server is located;
[0418] Among the multiple candidate resource body frameworks, a candidate resource body framework whose candidate framework index is consistent with the target framework index is determined as the processing resource body framework.
[0419] Optionally, the virtual machine creation processing device 2200 further includes a first creation unit (not shown), and the first creation unit (not shown) is used to:
[0420] If the type of the target virtual machine is the second type, obtaining a processing resource body architecture in the target server that is not associated with the target network card, the second type is used to indicate that the target virtual machine does not need to work in conjunction with the target network card;
[0421] Obtain target-related resource information of the target virtual machine;
[0422] Determining a target processing resource body in a processing resource body framework based on the target associated resource information;
[0423] The target processing resource volume is allocated to the target virtual machine to create the target virtual machine based on the target processing resource volume.
[0424] Optionally, the virtual machine creation processing device 2200 further includes a second creation unit (not shown), and the second creation unit (not shown) is used to:
[0425] If the type of the target virtual machine is the third type, obtaining the idle resource structure in the target server, the third type is used to indicate that the entire resources of the target server are required to create the target virtual machine, and the target virtual machine needs to work with the target network card;
[0426] The processing resource volume in the idle resource volume framework is allocated to the target virtual machine, so as to create the target virtual machine based on the processing resource volume in the idle resource volume framework and the target network card.
[0427] Optionally, the virtual machine creation processing device 2200 further includes a storage unit (not shown), and the storage unit (not shown) is used to:
[0428] In response to the data collection request for each candidate server, if it is determined that the target script of each candidate server has been downloaded, then based on the target script, the server basic information, processing resource body architecture data, and the processing resource body architecture where the target network card is located of the candidate server are obtained;
[0429] Building a preset mapping table based on the target index of the processing resource body architecture of each candidate server;
[0430] For each candidate server, mark the resource body structures other than the processing resource body structure;
[0431] The basic information of the server, the processing resource structure data, and the preset mapping table are stored in the preset database.
[0432] Optionally, based on the target index of the processing resource body architecture of each candidate server, a preset mapping table is constructed, including:
[0433] For each candidate server, obtain the server index of the candidate server;
[0434] Determine the server index as a keyword, determine the target index as a value, and generate a key-value pair based on the keyword and the value;
[0435] A preset mapping table is generated based on the key-value pairs of multiple candidate servers.
[0436] Reference Fig.23 , Fig.23 The structural block diagram of the terminal part for implementing the virtual machine creation processing method of the embodiment of the present disclosure includes: a radio frequency (RF) circuit 2310, a memory 2315, an input unit 2330, a display unit 2340, a sensor 2350, an audio circuit 2360, a wireless fidelity (WiFi) module 2370, a processor 2380, and a power supply 2390. Those skilled in the art can understand that Fig.23 The terminal structure shown does not constitute a limitation on the mobile phone or computer, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0437] The RF circuit 2310 may be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information from the base station, it is sent to the processor 2380 for processing; in addition, the designed uplink data is sent to the base station.
[0438] The memory 2315 may be used to store software programs and modules. The processor 2380 executes various functional applications and data processing of the target terminal by running the software programs and modules stored in the memory 2315 .
[0439] The input unit 2330 may be used to receive input digital or character information and generate key signal input related to the setting and function control of the target terminal. Specifically, the input unit 2330 may include a touch panel 2331 and other input devices 2332.
[0440] The display unit 2340 may be used to display input information or provided information and various menus of the target terminal. The display unit 2340 may include a display panel 2341.
[0441] The audio circuit 2360, the speaker 2361, and the microphone 2362 may provide an audio interface.
[0442] In this embodiment, the processor 2380 included in the terminal can execute the virtual machine creation processing method of the previous embodiment.
[0443] The terminals of the embodiments of the present disclosure include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to data security, blockchain, computers, cloud computing, information technology, etc.
[0444] Fig.24 A block diagram of a portion of a server for implementing a virtual machine creation processing method of an embodiment of the present disclosure. The server may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 2422 (e.g., one or more processors) and memory 2432, and one or more storage media 2430 (e.g., one or more mass storage devices) storing application programs 2442 or data 2444. Among them, the memory 2432 and the storage medium 2430 may be temporary storage or permanent storage. The program stored in the storage medium 2430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 2422 may be configured to communicate with the storage medium 2430 to execute a series of instruction operations in the storage medium 2430 on the server.
[0445] The server may also include one or more power supplies 2426, one or more wired or wireless network interfaces 2450, one or more input and output interfaces 2458, and / or one or more operating systems 2441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0446] The central processor 2422 in the server can be used to execute the virtual machine creation processing method of the embodiment of the present disclosure.
[0447] The embodiments of the present disclosure further provide a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the virtual machine creation processing method of each of the aforementioned embodiments.
[0448] The embodiment of the present disclosure further provides a computer program product, which includes a computer program. A processor of an electronic device reads and executes the computer program, so that the electronic device executes the above-mentioned virtual machine creation processing method.
[0449] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0450] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0451] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood as not including the number, and above, below, within, etc. are understood as including the number.
[0452] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0453] In the embodiments of the present disclosure, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0454] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0455] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0456] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0457] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.
[0458] The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present disclosure.
Claims
1. A virtual machine creation processing method, characterized in that: The method comprises: In response to a request to create a target virtual machine, determining a target server where the target virtual machine is located, the target server including a target network card; If the type of the target virtual machine is the first type, obtaining a processing resource body architecture associated with the target network card in the target server, wherein the first type is used to indicate that the target virtual machine needs to work in coordination with the target network card; wherein the processing resource body architecture refers to a physical topological structure of the target network card located inside the target server; and the processing resource body architecture associated with the target network card in the target server refers to a processing resource body architecture where the target network card is located; Obtaining target-associated resource information of the target virtual machine; Based on the target associated resource information, determining a target processing resource body in a processing resource body framework associated with the target network card in the target server; Allocating the target processing resource body to the target virtual machine to create the target virtual machine based on the target processing resource body and the target network card to shorten the transmission path between the target virtual machine and the target network card; If the type of the target virtual machine is the second type, then obtain a processing resource body architecture that is not associated with the target network card in the target server, and the second type is used to indicate that the target virtual machine does not need to work with the target network card; obtain target-associated resource information of the target virtual machine; based on the target-associated resource information, determine a target processing resource body in the processing resource body architecture that is not associated with the target network card in the target server; and allocate the target processing resource body to the target virtual machine to create the target virtual machine based on the target processing resource body.
2. The method according to claim 1, characterized in that The processing resource body architecture includes a plurality of candidate resource body hierarchies; The step of determining a target processing resource body in a processing resource body framework associated with the target network card in the target server based on the target associated resource information includes: Based on the target-associated resource information, determining a target resource body level among the plurality of candidate resource body levels; The target processing resource volume is determined in the target resource volume hierarchy.
3. The method according to claim 2, characterized in that The step of determining a target resource body level among the plurality of candidate resource body levels based on the target-associated resource information includes: Determining a baseline number of processing resources for each of the candidate resource body levels; Obtaining the number of processing resources required to create the target virtual machine from the target associated resource information; The target resource volume hierarchy is determined from among the plurality of candidate resource volume hierarchies based on the number of processing resources and the reference number of processing resources of each of the candidate resource volume hierarchies.
4. The method according to claim 3, characterized in that: The determining the target resource body level among the plurality of candidate resource body levels based on the number of processing resources and the processing resource benchmark number of each of the candidate resource body levels comprises: comparing the number of processing resources with respective benchmark numbers of processing resources; Among the plurality of candidate resource body hierarchies, the candidate resource body hierarchies whose processing resource reference number is greater than the processing resource number and whose hierarchical level is smaller are determined as the target resource body hierarchies.
5. The method according to claim 3, characterized in that: Each of the candidate resource body levels includes a plurality of candidate processing resource bodies; The determining of the processing resource benchmark number of each of the candidate resource body levels includes: For each of the candidate resource body levels, obtaining the number of candidate processing resources of each of the candidate processing resource bodies in the candidate resource body level; The maximum number of candidate processing resources is determined as the base number of processing resources at the candidate resource level.
6. The method according to claim 3, characterized in that: The target resource body hierarchy includes a plurality of candidate processing resource bodies; The determining the target processing resource body in the target resource body level includes: Obtaining the number of candidate processing resources of each of the candidate processing resource bodies in the target resource body hierarchy; For each of the candidate processing resource bodies in the target resource body level, resource scoring is performed based on the processing resource benchmark number and the number of candidate processing resources to obtain a resource scoring result; Based on the resource scoring result, the target processing resource body is determined from a plurality of candidate processing resource bodies distributed at the target resource body level.
7. The method according to claim 1, characterized in that The step of determining, in response to a request to create a target virtual machine, a target server where the target virtual machine is located, comprises: Get multiple candidate servers; In response to a request to create a target virtual machine, obtaining virtual machine configuration information of the target virtual machine and target-associated resource information; The target server is determined from among the multiple candidate servers based on the virtual machine configuration information and the target associated resource information.
8. The method according to claim 7, characterized in that The step of determining the target server from among the plurality of candidate servers based on the virtual machine configuration information and the target associated resource information includes: Obtaining basic server information of each of the candidate servers; Filtering out an intermediate server from the plurality of candidate servers based on the virtual machine configuration information, the target-associated resource information, and the server basic information; For each of the intermediate servers, determining a priority score of the intermediate server based on the basic information of the server; Based on the priority score, the target server is determined from among the plurality of intermediate servers.
9. The method according to claim 8, characterized in that The step of selecting an intermediate server from the plurality of candidate servers based on the virtual machine configuration information, the target-associated resource information, and the server basic information includes: Determining a server screening condition based on the virtual machine configuration information and the target associated resource information; Among the multiple candidate servers, the candidate server whose target index in the server basic information meets the server screening condition is determined as the intermediate server.
10. The method according to claim 8, characterized in that The step of determining the priority score of each intermediate server based on the basic information of the server includes: For each of the intermediate servers, obtaining the number of server threads, the number of server cores, the storage type, and the memory size of the candidate server from the basic server information; A priority score for the intermediate server is determined based on the number of server threads, the number of server cores, the storage type, and the memory size.
11. The method according to claim 10, characterized in that Determining the priority score of the intermediate server based on the number of server threads, the number of server cores, the storage type, and the memory size includes: Determining a first score for the intermediate server based on the number of server threads; Determining a second score for the intermediate server based on the number of server cores; Based on the storage type, determining a third score for the intermediate server; Based on the memory size, determining a fourth score of the intermediate server; The priority score is obtained based on a weighted sum of the first score, the second score, the third score, and the fourth score.
12. The method according to claim 1, characterized in that The target server includes a plurality of candidate resource body frameworks having candidate framework indexes; If the type of the target virtual machine is the first type, obtaining a processing resource body architecture associated with the target network card in the target server includes: If the type of the target virtual machine is the first type, obtaining a server index of the target server; Based on the server index, searching a preset mapping table for a target architecture index corresponding to the server index, wherein the preset mapping table is used to indicate a candidate architecture index of a candidate resource body architecture where a target network card in each candidate server is located; Among the multiple candidate resource body frameworks, the candidate resource body framework whose candidate framework index is consistent with the target framework index is determined as the processing resource body framework.
13. The method according to claim 1, characterized in that After determining the target server where the target virtual machine is located, the method further includes: If the type of the target virtual machine is the third type, obtaining an idle resource body structure in the target server and a processing resource body structure in the target server associated with the target network card, wherein the third type is used to indicate that the entire resources of the target server are required to create the target virtual machine, and the target virtual machine needs to work in coordination with the target network card; Obtaining target-associated resource information of the target virtual machine; Based on the target associated resource information, a target processing resource body is determined in the processing resource body framework associated with the target network card in the target server, and the target processing resource body provides cpu resources; Based on the target-associated resource information, determining a processing resource body in the idle resource body framework, and providing other resources by the processing resource body in the idle resource body framework; The processing resource body and the target processing resource body in the idle resource body framework are allocated to the target virtual machine, so as to create the target virtual machine based on the processing resource body in the idle resource body framework, the target processing resource body and the target network card.
14. The method according to claim 1, characterized in that Before determining the target server where the target virtual machine is located, the method further includes: In response to the data collection request for each candidate server, if it is determined that the target script of each candidate server has been downloaded, then based on the target script, the server basic information, the processing resource body architecture data, and the processing resource body architecture where the target network card is located of the candidate server are obtained; Building a preset mapping table based on the target index of the processing resource body architecture of each of the candidate servers; For each of the candidate servers, marking other resource body frameworks except the processing resource body framework; The server basic information, the processing resource body architecture data, and the preset mapping table are stored in a preset database.
15. A virtual machine creation processing device, characterized in that: The device comprises: A first determining unit, configured to determine, in response to a request to create a target virtual machine, a target server where the target virtual machine is located, wherein the target server includes a target network card; A first acquisition unit is used to acquire a processing resource body architecture associated with the target network card in the target server if the type of the target virtual machine is a first type, wherein the first type is used to indicate that the target virtual machine needs to work in coordination with the target network card; wherein the processing resource body architecture refers to a physical topological structure of the target network card located inside the target server; and the processing resource body architecture associated with the target network card in the target server refers to a processing resource body architecture where the target network card is located; A second acquisition unit, configured to acquire target-associated resource information of the target virtual machine; A second determining unit, configured to determine a target processing resource body in a processing resource body framework associated with the target network card in the target server based on the target associated resource information; an allocating unit, configured to allocate the target processing resource body to the target virtual machine, so as to create the target virtual machine based on the target processing resource body and the target network card, so as to shorten the transmission path between the target virtual machine and the target network card; The first creation unit is used to: if the type of the target virtual machine is the second type, obtain a processing resource body architecture that is not associated with the target network card in the target server, and the second type is used to indicate that the target virtual machine does not need to work with the target network card; obtain target-associated resource information of the target virtual machine; based on the target-associated resource information, determine a target processing resource body in the processing resource body architecture that is not associated with the target network card in the target server; and allocate the target processing resource body to the target virtual machine to create the target virtual machine based on the target processing resource body.
16. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the virtual machine creation processing method according to any one of claims 1 to 14 is implemented.
17. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the virtual machine creation processing method according to any one of claims 1 to 14 is implemented.
18. A computer program product, comprising a computer program, wherein the computer program is read and executed by a processor of an electronic device, so that the electronic device executes the virtual machine creation processing method according to any one of claims 1 to 14.
