Method for creating cloud host, cloud management platform, equipment and storage medium

By evaluating the target cluster resource information and calculation ratio, using the global content library to create a cloud host suitable for the architecture type, it solves the problem that the cloud management platform cannot create cloud hosts across sites, cross-clusters, and cross-architectures, and realizes intelligent resource allocation and resource avoidance squeeze.

CN118568041APending Publication Date: 2024-08-30JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410650842.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The cloud management platform cannot create cloud hosts across sites, clusters, and architectures, and cannot determine whether the number of cloud hosts to be created is appropriate, resulting in resource congestion and performance impact.

Method used

By obtaining the number of storage groups and resource information of the target cluster, calculating the ratio to evaluate resource adequacy, determining the appropriate OVA template and script set based on the global content library, creating a cloud host with the same architecture type, and realizing cross-architecture and cross-site cloud hosts. Deploy in batches and intelligently allocate resources.

Benefits of technology

It effectively avoids crowding problems caused by insufficient resources, ensures that cloud hosts are created within the appropriate resource range, realizes batch deployment of cross-architecture and cross-site cloud hosts, and improves the refinement and intelligence of resource management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568041A
    Figure CN118568041A
Patent Text Reader

Abstract

The invention relates to the technical field of cloud computing, and discloses a method for creating a cloud host, a cloud management platform, equipment and a storage medium, applied to the cloud management platform, the method comprises the following steps: calculating the number of storage groups of M target clusters to obtain the total number L of the storage groups; obtaining a first ratio through the number N of the to-be-created cloud hosts and the number M of the target clusters; obtaining a second ratio through the number N of the to-be-created cloud hosts and the total number L of the storage groups; and when both the first ratio and the second ratio are smaller than or equal to a threshold value, determining a target ova template and a corresponding target script set from the global content library based on the target architecture type, and creating N cloud hosts of which the architecture type is the target architecture type based on the target ova template and the target script set. The problems that a cloud management platform cannot create the cloud hosts across sites, clusters and frameworks and cannot determine whether the number of the cloud hosts to be created is appropriate or not can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud computing, and in particular to a method for creating a cloud host, a cloud management platform, a device and a storage medium. Background Art

[0002] With the steady advancement of the start-up industry, cloud computing technology has been widely used. Cloud computing technology can achieve resource sharing and elastic expansion by storing applications and data on cloud hosts. Therefore, it is very important to batch create cloud hosts based on clusters or hosts of different manufacturers or different central processing unit (CPU) architectures.

[0003] At present, cloud management platforms are usually used to manage sites, clusters, and hosts with different CPU architectures, and to create cloud hosts in batches. When creating cloud hosts in batches, system administrators need to log in to different sites, generate unique OVA templates on each site, and then create cloud hosts in batches. Obviously, cloud management platforms cannot create cloud hosts across sites, architectures, and clusters. At the same time, since it is impossible to determine whether the number of cloud hosts to be created is appropriate, the resources of the original hosts may be squeezed when creating cloud hosts. Summary of the invention

[0004] In view of this, the present invention provides a method for creating a cloud host, a cloud management platform, a device and a storage medium to solve the problem that the cloud management platform cannot create cloud hosts across sites, clusters and architectures and cannot determine whether the number of cloud hosts to be created is appropriate.

[0005] In a first aspect, the present invention provides a method for creating a cloud host, which is applied to a cloud management platform. The cloud management platform manages multiple clusters and a global content library. The global content library is used to provide at least one ova template and multiple script sets. The method comprises: obtaining the number of storage groups of each target cluster in M ​​target clusters, wherein the architecture type of the host in each target cluster is the same as the architecture type of the cloud host to be created, and the architecture type of the cloud host to be created is the target architecture type; calculating the sum of the number of M storage groups corresponding to the M target clusters to obtain the total number of storage groups L; determining a first value according to the number of cloud hosts N to be created and the number of target clusters M, calculating the ratio of the first value to the number of cloud hosts N to be created, and obtaining a first ratio; determining a second value according to the number of cloud hosts N to be created and the total number of storage groups L, calculating the ratio of the second value to the number of cloud hosts N to be created, and obtaining a second ratio; when both the first ratio and the second ratio are less than or equal to a threshold value, determining a target open virtualization device ova template and a target script set corresponding to the target ova template from a global content library based on the target architecture type, wherein the global content library comprises: a corresponding relationship between the target architecture type and the target ova template, and a corresponding relationship between the target ova template and the target script set; and creating N cloud hosts whose architecture type is the target architecture type based on the target ova template and the target script set.

[0006] Based on the method provided in the first aspect above, the cloud management platform obtains the number of storage groups of each target cluster in the M target clusters, calculates the sum of the number of M storage groups corresponding to the M target clusters, and obtains the total number of storage groups L; determines a first value according to the number of cloud hosts N to be created and the number of target clusters M, calculates the ratio of the first value to the number of cloud hosts N to be created, and obtains a first ratio; the first ratio reflects the number of cloud hosts to be created under a single target cluster in the M target clusters; determines a second value according to the number of cloud hosts N to be created and the total number of storage groups L, calculates the ratio of the second value to the number of cloud hosts N to be created, and obtains a second ratio, and the second ratio reflects the number of cloud hosts to be created in a single storage group in the L storage groups; when the first ratio and the second ratio are both less than or equal to a preset threshold, based on the target architecture type, determines the target ova template and the target script set corresponding to the target ova template from the global content library, and creates N cloud hosts based on the target ova template and the target script set.

[0007] The method provided by the present invention evaluates the number M of the current target cluster and the number N of cloud hosts to be created before creating at least one cloud host of the target architecture type. Specifically, by calculating a first ratio and a second ratio and comparing them with a threshold value respectively, when the first ratio and the second ratio are both less than or equal to the threshold value, it indicates that the cluster resources and storage group resources managed by the cloud management platform are sufficient to create at least one desired cloud host, and the number of cloud hosts to be created is within a suitable range, and then a cloud host is created in the target cluster using a global content library. This method effectively avoids creating at least one cloud host when the target resources are insufficient, resulting in squeezing out the resources of the original host in the target cluster and even affecting the performance of the original host.

[0008] In addition, the target architecture type can be one or more architecture types, so the architecture type of the cloud host created by the cloud management platform can also be one or more architecture types, thereby enabling the creation of cloud hosts across architectures. The cloud management platform manages multiple sites, each site includes multiple clusters, and the cloud hosts created by the cloud management platform will be deployed to the clusters included in multiple sites, so it is possible to create cloud hosts across sites and clusters.

[0009] In an optional embodiment, before obtaining the number of storage groups of each target cluster in the M target clusters, the method also includes: determining the clusters whose architecture type is the target architecture type among the multiple clusters as pre-selected clusters, the number of pre-selected clusters is M, the M pre-selected clusters include multiple target hosts, and the architecture type of each target host is the target architecture type; calculating the available memory resources, the number of available virtual central processing unit CPU cores and the available disk resources of the M pre-selected clusters; when the M preset clusters meet preset conditions, determining the M pre-selected clusters as M target clusters, the preset conditions being that the available memory resources are greater than or equal to the target memory resources, the number of available CPU cores is greater than or equal to the target CPU cores, and the available disk resources are greater than or equal to the target disk resources; the target memory resources, the target number of CPU cores and the target disk resources are all resources required to create the cloud host to be created.

[0010] Based on the above method, the cloud management platform can determine M target clusters from multiple clusters before obtaining the number of storage groups in each of the M target clusters. Since the available memory resources of the M target clusters are greater than or equal to the target memory resources, the available CPU cores are greater than or equal to the target CPU cores, and the available disk resources are greater than or equal to the target disk resources, it means that the cloud management platform has sufficient resources to create N cloud hosts in the M target clusters, and can avoid squeezing out the resources required by the original hosts in the M target clusters. Furthermore, the cloud management platform can perform refined resource management on the managed clusters or hosts, and realize intelligent resource allocation for batch deployment of cloud hosts across architectures.

[0011] In an optional implementation, the available memory resources of M pre-selected clusters are calculated, including: obtaining first information corresponding to the M pre-selected clusters and second information corresponding to multiple target hosts, the first information is used to indicate whether the M pre-selected clusters are set with a memory reservation ratio, the first information includes a first identifier or a second identifier, the first identifier is used to indicate the memory reservation ratio set for the M pre-selected clusters, the second identifier is used to indicate that the memory reservation ratio is not set for the M pre-selected clusters, the second information is used to indicate whether the multiple target hosts are set with a memory over-allocation ratio, the second information includes a third identifier or a fourth identifier, the third identifier is used to indicate the memory over-allocation ratio set for the multiple target hosts, and the fourth identifier is used to indicate that the multiple target hosts are not set with a memory over-allocation ratio.

[0012] If the first information includes the first identifier, and the second information includes the fourth identifier, the first relational expression, the total host memory A of multiple target hosts and the first identifier B are used to calculate the available memory resource P, and the first relational expression is: P = A-(A*B); if the first information includes the first identifier, and the second information includes the third identifier, the second relational expression, the total host memory A, the first identifier B, the third identifier C and the used host memory D are used to calculate the available memory resource P, and the second relational expression is: P = (A-(A*B))*CD; if the first information includes the second identifier, and the second information includes the fourth identifier, the third relational expression, the total host memory A, and the used host memory D are used to calculate the available memory resource P, and the third relational expression is: P = AD; if the first information includes the second identifier, and the second information includes the third identifier, the fourth relational expression, the total host memory A, the third identifier C and the used host memory D are used to calculate the available memory resource P, and the fourth relational expression is: P = A*CD.

[0013] Based on the above method, the cloud management platform can calculate the available memory resources of the M pre-selected clusters based on the total host memory of the multiple target hosts, the used host memory, the memory reservation ratio of the M pre-selected clusters, and the memory over-allocation ratio of the multiple target hosts. In addition, the cloud management platform can accurately determine the available memory resources of the M pre-selected clusters, and finely manage the memory resources of the managed clusters or hosts, and realize the intelligent allocation of memory resources for batch deployment of cloud hosts across cloud architectures.

[0014] In an optional implementation, the number of available CPU cores of M pre-selected clusters is calculated, including: obtaining third information corresponding to the M pre-selected clusters and fourth information corresponding to multiple target hosts, the third information is used to indicate whether the M pre-selected clusters have set a CPU core reservation ratio, the third information includes a fifth identifier or a sixth identifier, the fifth identifier is used to indicate the CPU core reservation ratio set by the M pre-selected clusters, the sixth identifier is used to indicate that the M pre-selected clusters have not set a CPU core reservation ratio, the second information is used to indicate whether the multiple target hosts have set a CPU core over-allocation ratio, the second information includes a seventh identifier or an eighth identifier, the seventh identifier is used to indicate the CPU core over-allocation ratio set by the multiple target hosts, and the eighth identifier is used to indicate that the multiple target hosts have not set a CPU core over-allocation ratio.

[0015] If the third information includes the fifth identifier and the fourth information includes the eighth identifier, the fifth relational formula, the total number of host CPU cores K of multiple target hosts and the fifth identifier E are used to calculate the number of available CPU cores Q, and the fifth relational formula is: Q=K-(K*E); if the third information includes the fifth identifier and the fourth information includes the seventh identifier, the sixth relational formula, the total number of host CPU cores K, the number of used CPU cores G, the fifth identifier E and the seventh identifier F are used to calculate the number of available CPU cores Q, and the sixth relational formula is: Q=(K-(K*E))*FG; if the third information includes the sixth identifier and the fourth information includes the eighth identifier, the seventh relational formula, the total number of host CPU cores K and the number of used CPU cores G are used to calculate the number of available CPU cores Q, and the seventh relational formula is: Q=KG; if the third information includes the sixth identifier and the fourth information includes the seventh identifier, the eighth relational formula, the seventh identifier F, the total number of host CPU cores K and the number of used CPU cores G are used to calculate the number of available CPU cores Q, and the eighth relational formula is: Q=K*FG.

[0016] Based on the above method, the cloud management platform can calculate the available CPU cores of the M pre-selected clusters based on the total number of CPU cores of multiple target hosts, the number of used CPU cores, the CPU core reservation ratio of the M pre-selected clusters, and the CPU core over-allocation ratio of the multiple target hosts. In turn, the cloud management platform can accurately determine the available CPU cores of the M pre-selected clusters, and finely manage the CPU cores of the managed clusters or hosts, and realize intelligent allocation of CPU cores for batch deployment of cloud hosts across architectures.

[0017] In an optional embodiment, the available disk resources of M pre-selected clusters are calculated, including: obtaining fifth information and sixth information corresponding to multiple target hosts in the M pre-selected clusters, the fifth information is used to indicate whether the multiple target hosts have set disk resource reservation ratios, the fifth information includes a ninth identifier or a tenth identifier, the ninth identifier is used to indicate the disk resource reservation ratios set for the multiple target hosts, the tenth identifier is used to indicate that the disk resource reservation ratios are not set for the multiple target hosts, the sixth information is used to indicate whether the multiple target hosts have set disk resource over-allocation ratios, the sixth information includes an eleventh identifier or a twelfth identifier, the eleventh identifier is used to indicate the disk resource over-allocation ratios set for the multiple target hosts, and the twelfth identifier is used to indicate that the disk resource over-allocation ratios are not set for the multiple target hosts.

[0018] If the fifth information includes the ninth identifier and the sixth information includes the twelfth identifier, the available disk resources H are calculated using the ninth relational formula, the total disk resources J and the ninth identifier R, and the ninth relational formula is: H=J-(J*R); if the fifth information includes the ninth identifier and the sixth information includes the eleventh identifier, the available disk resources H are calculated using the tenth relational formula, the total disk resources J, the used disk resources T, the ninth identifier R and the eleventh identifier S, and the tenth relational formula is: H=(J-(J*R))*ST; if the fifth information includes the tenth identifier and the sixth information includes the twelfth identifier, the available disk resources H are calculated using the eleventh relational formula, the total disk resources J and the used disk resources T, and the eleventh relational formula is: H=JT; if the fifth information includes the tenth identifier and the sixth information includes the eleventh identifier, the available disk resources H are calculated using the twelfth relational formula, the eleventh identifier S, the total disk resources J and the used disk resources T, and the twelfth relational formula is: H=J*ST.

[0019] Based on the above method, the cloud management platform can calculate the available disk resources of the M pre-selected clusters based on the total disk resources of the multiple target hosts, the used disk resources, the disk resource reservation ratios set by the M pre-selected clusters, and the disk resource over-allocation ratios set by the multiple target hosts. In turn, the cloud management platform can accurately determine the available disk resources of the M pre-selected clusters, and finely manage the disk resources of the managed clusters or hosts, and realize the intelligent allocation of disk resources for batch deployment of cloud hosts across cloud architectures.

[0020] In an optional implementation, the number of storage groups of each target cluster in M ​​target clusters is obtained, including: obtaining the number of hosts and the number of shared storage pools of each target cluster, wherein the multiple storage pools included in each host correspond to one storage group, and one shared storage pool corresponds to one storage group, and the number of shared storage pools is 0 or 1; the sum of the number of hosts and the number of shared storage pools is determined as the number of storage groups for each target cluster.

[0021] Based on the above method, the cloud management platform can determine the number of storage groups in each of the M target clusters by obtaining the number of hosts and the number of shared storage pools in each target cluster, and then obtain the total number of storage groups in the M target clusters, which is convenient for the subsequent determination of the number of cloud hosts to be created in a single storage group, and then determine whether the number of cloud hosts to be created is appropriate.

[0022] In an optional implementation, at least one ova template and multiple architecture types are obtained, and a first correspondence between the at least one ova template and the multiple architecture types is established; multiple script sets are obtained, and a second correspondence between the at least one ova template and the multiple script sets is established; the first correspondence and the second correspondence are stored in a global content library.

[0023] Based on the above method, the cloud management platform can construct the first corresponding relationship and the second corresponding relationship in the global content library, so that at least one ova template, multiple script sets and architecture types included in the global content library are matched, which facilitates the subsequent creation of a cloud host based on the target architecture type.

[0024] In a second aspect, the present invention provides a cloud management platform, including:

[0025] An acquisition module is used to acquire the number of storage groups of each of the M target clusters, wherein the architecture type of the host in each target cluster is the same as the architecture type of the cloud host to be created, and the architecture type of the cloud host to be created is the target architecture type;

[0026] A calculation module is used to calculate the sum of the number of M storage groups corresponding to the M target clusters to obtain the total number of storage groups L; round up the ratio of the number of cloud hosts N to be created to the number of target clusters M to obtain a first value, and calculate a first ratio of the first value to the number of cloud hosts N to be created; round up the ratio of the number of cloud hosts N to be created to the total number of storage groups L to obtain a second value, and calculate a second ratio of the second value to the number of cloud hosts N to be created;

[0027] A processing module is used to determine, based on the target architecture type, a target open virtualization device ova template and a target script set corresponding to the target ova template from a global content library when both the first ratio and the second ratio are less than or equal to a threshold value, wherein the global content library includes a correspondence between the target architecture type and the target ova template, and a correspondence between the target ova template and the target script set; based on the target ova template and the target script set, create N cloud hosts, and the architecture types of the N cloud hosts are all the target architecture types.

[0028] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for creating a cloud host according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0029] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for creating a cloud host according to the first aspect or any corresponding embodiment thereof.

[0030] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the method for creating a cloud host according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 is a schematic diagram of sites, clusters, and hosts managed by a cloud management platform according to an embodiment of the present invention;

[0033] Figure 2 is a flow chart of a method for creating a cloud host according to an embodiment of the present invention;

[0034] Figure 3 is a flowchart of a method for determining M target clusters according to an embodiment of the present invention;

[0035] Figure 4 is a schematic diagram of a method for calculating available memory resources of M pre-selected clusters according to an embodiment of the present invention;

[0036] Figure 5 is a schematic diagram of a method for calculating the number of available CPU cores of M pre-selected clusters according to an embodiment of the present invention;

[0037] Figure 6 is a schematic diagram of a method for calculating available disk resources of M pre-selected clusters according to an embodiment of the present invention;

[0038] Figure 7 is a structural block diagram of a cloud management platform according to an embodiment of the present invention;

[0039] Figure 8It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0041] There are many types of CPU architectures in the server architecture. The current cloud management platform can manage a single or several hyper-converged or virtualized sites with different architectures, and the resources between each site are independent. Each site is generally operated and maintained by the system administrator of each site. It is impossible to intelligently allocate cloud host templates of different architectures to the sites of the corresponding architecture through a unified portal, and it is impossible to achieve unified resource planning and refined resource control and batch execution and feedback of cloud host scripts.

[0042] As described in the background technology, the cloud management platform cannot create cloud hosts across sites, architectures, or clusters. At the same time, since it is impossible to determine whether the number of cloud hosts to be created is appropriate, the resources of the original hosts may be squeezed out when creating cloud hosts.

[0043] In order to solve the above technical problems, an embodiment of the present invention provides a method for creating a cloud host, the method comprising: obtaining the number of storage groups of each target cluster in M ​​target clusters, calculating the sum of the number of M storage groups corresponding to the M target clusters, and obtaining the total number of storage groups L; and calculating a first ratio of the number of target clusters M to the number of cloud hosts N to be created, and a second ratio of the total number of storage groups L to the number of cloud hosts N to be created; when the first ratio and the second ratio are both less than or equal to a threshold, based on the target architecture type, determining the target ova template and the target script set corresponding to the target ova template from the global content library, and creating N cloud hosts based on the target ova template and the target script set. In this way, the cloud management platform can solve the problem that the cloud management platform cannot create cloud hosts across sites, clusters, and architectures, and cannot determine whether the number of cloud hosts to be created is appropriate.

[0044] like Figure 1 FIG. 1 is a schematic diagram of sites, clusters, and hosts managed by a cloud management platform provided by an embodiment of the present invention. Figure 1 In the example, the cloud management platform 101 manages the global content library 102. The cloud management platform 101 manages the first site, the second site, the third site, the fourth site, and the fifth site.

[0045] The hosts in the first site and the fifth site are all of the first architecture type. The hosts in the second site and the fourth site are all of the second architecture type. The third site includes hosts of the first architecture type and hosts of the second architecture type. For example, the first architecture type may be an X86 architecture type. The second architecture type may be an arrch64 architecture.

[0046] The cluster under the first site is the first cluster; hosts 103 and 104 are hosts under the first cluster. The cluster under the second site is the second cluster; hosts 105 and 106 are hosts under the second cluster. The clusters under the third site are the third cluster and the fourth cluster; hosts 107 and 108 are hosts under the third cluster; hosts 109 and 110 are hosts under the fourth cluster. The cluster under the fourth site is the fifth cluster; hosts 111 and 112 are hosts under the fifth cluster. The cluster under the fifth site is the sixth cluster; hosts 113 and 114 are hosts under the sixth cluster.

[0047] The cloud management platform in the embodiment of the present invention, for example, the cloud management platform 101, can be any device with computing capabilities and a display interface. For example, the cloud management platform is a server, a cloud server, or a cloud device.

[0048] Understandably, based on application or business needs, users can enter the configuration information of the cloud management platform in the terminal corresponding to the cloud management platform, and deploy the cloud management platform in a one-click componentized manner. Afterwards, the administrator of the cloud management platform can enter the number of cloud hosts to be created and the architecture type of the cloud hosts to be created in the display interface.

[0049] The configuration information may include the ova template corresponding to the cloud management platform, the sites, clusters and hosts managed by the cloud management platform, the access IP and mask of the cloud management platform, the gateway, the system disk type and capacity of the cloud management platform, the storage pool type and capacity of the global content library, the mounted storage device corresponding to the global content library, and the mount path of the storage device. The access IP of the cloud management platform may also be automatically assigned an IP address through the Dynamic Host Configuration Protocol (DHCP).

[0050] For example, the system disk type of the cloud management platform can be a Cloud File Storage (CFS) storage pool or a local storage pool, and the capacity can be 200G. The storage pool type of the global content library can be a CFS storage pool. The mount path of the storage device can be the mnt / subdirectory path.

[0051] Optionally, the cloud management platform can adaptively adjust the global content library to an unusable state according to the mounting status of the CFS storage pool where the global content library is located, or adaptively adjust the global content library to an available state according to the mounting status of the CFS storage pool where the global content library is located. It is understandable that if the global content library needs to be expanded, the user can modify the configuration information to expand it.

[0052] The global content library in the embodiment of the present invention, for example, the global content library 102, can be any database with storage capability. The global content library is used to provide at least one ova template and multiple script sets.

[0053] In one example, the cloud management platform manages multiple script sets of the global content library. The cloud management platform uploads the target script set (or script) to the global content library in response to the administrator's upload operation. If there is already a script set in the global content library that is consistent with the name of the target script set or the check value corresponding to the target script set (for example, the check value is the fifth version of the message digest algorithm (Message Digest Algorithm 5, MD5) value), then stop uploading the target script set. If there is no check value corresponding to the name of the target script set or the target script set in the global content library, the target script set is uploaded to the global content library using the P2P network protocol, and the MD5 value corresponding to the target script set is generated. Afterwards, the cloud management platform determines whether the target script set is uploaded accurately and completely by detecting whether the generated MD5 value is correct. In addition, the cloud management platform can change the architecture type of the target script set in response to the administrator's editing operation.

[0054] In one example, the cloud management platform manages at least one ova template of the global content library. In response to the administrator's upload operation, the cloud management platform uploads a preset number of ova templates through a queue control algorithm. For example, the preset number is the number of ova templates that the cloud management platform allows to be uploaded at the same time, and the preset number can be 5. In the process of uploading 5 ova templates to the storage pool of the global content library, the 5 ova templates are first grouped and fragmented to obtain 5 groups of N pieces of data. Among them, the 5 groups include S1, S2, S3, S4, and S5. S1 is (S1P1, S1P2, S1P3…S1Pn1), and the total number of fragments in the S1 group is n1; S2 is (S2P1, S2P2, S2P3…S2Pn2), and the total number of fragments in the S2 group is n2; S3 is (S3P1, S3P2, S3P3…S3Pn3), and the total number of fragments in the S3 group is n3; S4 is (S4P1, S4P2, S4P3…S4Pn4), and the total number of fragments in the S4 group is n4; S5 is (S5P1, S5P2, S5P3…S5Pn5), and the total number of fragments in the S5 group is n5; the number of fragments of the 5 groups is n1+n2+n3+n4+n5=N.

[0055] After that, S1P1, S2P1, S3P1, S4P1, S5P1, S1P2…S5Pn5 are sorted by queue weight (time order of shards), and N pieces of data and the total number of shards N are uploaded to the global content library in order. Among them, the queue order of the shards of S1P1 is Q1, and the shard number is R1; the queue order of the shards of S2P1 is Q2, and the shard number is R2….

[0056] The cloud management platform checks whether the total number of shards N is consistent with the number of uploaded data to verify the data integrity of the 5 uploaded ova templates. If all data of S1P1, S1P2, S1P3…S1Pn1 under the S1 group are uploaded successfully, the ova template corresponding to the S1 group is set to a usable state and the MD5 value corresponding to the ova template is generated.

[0057] During the process of uploading 5 OVA templates, the cloud management platform can stop the task of uploading one or more OVA templates among the 5 OVA templates in response to the administrator's cancellation operation, and release the occupied storage space corresponding to the one or more OVA templates.

[0058] When the cloud management platform uploads multiple OVA templates concurrently, the management network bandwidth occupied by uploading multiple OVA templates is controlled to not exceed one-third of the management network bandwidth. Understandably, this can avoid jamming when uploading multiple OVA templates, and at the same time, it will not affect the normal operation of other services.

[0059] It is understandable that when uploading multiple OVA templates, the cloud management platform groups and fragments them. When the network is suddenly disconnected, the unuploaded fragments can be uploaded from the location where the upload was suspended, which can effectively avoid the situation where the entire OVA template fails to be uploaded when the network is suddenly disconnected and the entire OVA template needs to be re-uploaded. However, the cloud management platform does not need to group and fragment all OVA templates. For OVA templates whose file size is less than the preset threshold, there is no need to group and fragment them.

[0060] For example, taking the setting of each shard size to 128M, that is, the preset threshold value to 128M, if the file size of the ova template is 64M, the cloud management platform will not group and shard the ova template; if the file size of the ova template is 142M, the cloud management platform will group and shard the ova template into 1 shard of 128M and 1 shard of 14M.

[0061] It is understandable that the cloud management platform does not group and fragment the OVA templates whose file size is smaller than the preset threshold, which can reduce the number of fragments and the reorganization process and improve the transmission efficiency of the OVA file.

[0062] The host in the embodiment of the present invention, such as host 103, host 104, host 105, host 106, host 107, host 108, host 109, host 110, host 111, host 112, host 113 or host 114, can be any host. For example, the host can be a virtual host, a dedicated host, a managed host, a LINUX host or a WINDOWS host.

[0063] Figure 1 The sites, clusters and hosts managed by the cloud management platform shown are only used as examples and are not used to limit the technical solutions of the present application. Those skilled in the art should understand that in the specific implementation process, the cloud management platform 101 can also manage more hosts without limitation.

[0064] According to an embodiment of the present invention, an embodiment of a method for creating a cloud host is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0065] In this embodiment, a method for creating a cloud host is provided, which can be used in the above-mentioned cloud management platform. Figure 2 is a flow chart of a method for creating a cloud host according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0066] S201: Obtain the number of storage groups of each target cluster in M ​​target clusters.

[0067] The architecture type of the host in each target cluster is the same as the architecture type of the cloud host to be created. The architecture type of the cloud host to be created is the target architecture type.

[0068] It can be understood that the target architecture type is the CPU architecture type of the cloud host to be created. For example, the target architecture type can be an X86 architecture type or an arrch64 architecture type, or can be an X86 architecture type and an arrch64 architecture type.

[0069] In some optional implementations, the cloud management platform obtains the number of hosts and the number of shared storage pools of each target cluster, and determines the sum of the number of hosts and the number of shared storage pools as the number of storage groups of each target cluster.

[0070] The multiple storage pools included in each host correspond to a storage group.

[0071] In the embodiment of the present invention, one shared storage pool corresponds to one storage group. The number of shared storage pools is 0 or 1.

[0072] Exemplarily, taking M target clusters including the first cluster as an example, the cloud management platform obtains the number of hosts of the first cluster as 2 and the number of shared storage pools as 1, and determines the sum of the number of hosts and the number of shared storage pools as 3 as the number of storage groups of the first cluster.

[0073] S202: Calculate the sum of the numbers of M storage groups corresponding to the M target clusters to obtain the total number L of storage groups.

[0074] It is understandable that the number of each storage group in the M number of storage groups is not necessarily the same. The total number of storage groups can be used to indicate the storage resource specifications of the M target clusters.

[0075] S203: Determine a first value according to the number N of cloud hosts to be created and the number M of target clusters, and calculate a ratio of the first value to the number N of cloud hosts to be created to obtain a first ratio.

[0076] The first value represents the average number of cloud hosts to be created in a single target cluster, and the first ratio represents the average proportion of cloud hosts to be created in a single target cluster.

[0077] In one example, the cloud management platform rounds up the ratio of the number N of cloud hosts to be created to the number M of target clusters to obtain a first value, and calculates a first ratio of the first value to the number N of cloud hosts to be created.

[0078] Example 1: Taking the number of cloud hosts N to be created as 7 and the number of target clusters M as 1 as an example, the cloud management platform rounds up the ratio of 7 to 1 to obtain a first value of 7, and the first ratio of 7 to 7 is calculated to be 100%.

[0079] It is understandable that the number of cloud hosts to be created N can be any number. It is understandable that the greater the business demand, the greater the number of cloud hosts to be created.

[0080] S204: Determine a second value according to the number N of cloud hosts to be created and the total number L of storage groups, and calculate a ratio of the second value to the number N of cloud hosts to be created to obtain a second ratio.

[0081] The second value represents the average number of cloud hosts to be created in a single storage group. The second ratio represents the average proportion of cloud hosts to be created in a single storage group.

[0082] In one example, the cloud management platform rounds up the ratio of the number of cloud hosts N to be created to the total number of storage groups L to obtain a second value, and calculates a second ratio of the second value to the number of cloud hosts N to be created.

[0083] Example 2: Taking the number of cloud hosts N to be created as 7 and the total number of storage groups L as 2 as an example, the cloud management platform rounds up the ratio of 7 to 2 (3.5) to obtain a second value of 4, and the second ratio of 4 to 7 is calculated to be 57%.

[0084] S205: When the first ratio and the second ratio are both less than or equal to the threshold, based on the target architecture type, determine the target ova template and the target script set corresponding to the target ova template from the global content library.

[0085] The target ova template is a file containing the necessary information for deploying the cloud host to be created. The architecture type corresponding to the target ova template is the target architecture type.

[0086] In the embodiment of the present invention, the target script set includes multi-layer applications that can be run on the cloud host to be created, installation files of built-in middleware, etc. The target script set matches the target ova template.

[0087] It can be understood that the architecture type corresponding to the target script set is consistent with the architecture type corresponding to the target ova template, that is, the architecture type corresponding to the target script set is the target architecture type. Optionally, the administrator of the cloud management platform can modify the architecture type corresponding to the target script set.

[0088] In the embodiment of the present invention, the threshold is associated with the number of cloud hosts to be created. The threshold can be set according to actual needs and is not limited.

[0089] For example, the threshold and the number of cloud hosts to be created meet the preset rules, which are shown in the following table:

[0090] rule The number of cloud hosts to be created is Y Threshold 1 Y=1 100% 2 2≤Y≤7 67% 3 Y≥8 56%

[0091] In the embodiment of the present invention, the global content library is used to provide at least one ova template and multiple script sets. The global content library includes the corresponding relationship between the target architecture type and the target ova template, and the corresponding relationship between the target ova template and the target script set.

[0092] For example, when the number of cloud hosts to be created N is 7, the number of target clusters M is 2, the number of storage groups L is 2, the first ratio is 57%, the second ratio is 57%, and the target architecture type is x86 architecture type, the cloud management platform determines the threshold value to be 67% based on the preset rule when the number of cloud hosts to be created N is 7. Obviously, the first ratio 57% and the second ratio 57% are both less than or equal to the threshold value 67%. Based on the x86 architecture type, the cloud management platform determines the target ova template of the X86 architecture type and the target script set corresponding to the target ova template from the global content library.

[0093] In one example, when the first ratio and the second ratio do not satisfy the condition that both are less than or equal to the threshold, the cloud management platform reduces the number of cloud hosts to be created, and obtains the number of cloud hosts to be created as the target number. The first ratio and the second ratio corresponding to the target number of cloud hosts to be created are both less than or equal to the threshold.

[0094] For example, taking the number of cloud hosts to be created N as 7, the number of target clusters M as 1, and the number of storage groups L as 2 as an example, it can be seen from Example 1 that the first ratio is 100%. It can be seen from Example 2 that the second ratio is 57%. Obviously, the first ratio 100% is greater than the threshold value 67%, and the second ratio is less than the threshold value. Therefore, the first ratio and the second ratio do not satisfy that they are both less than or equal to the threshold value. The cloud management platform reduces the number of cloud hosts to be created, and the number of cloud hosts to be created is the target number, for example, the target number is 1.

[0095] Understandably, when the first ratio and the second ratio do not satisfy the requirement that they are both less than or equal to the threshold, it means that the cloud management platform will occupy too many resources to create N cloud hosts in the M target clusters, which will lead to the crowding out of the resources of the original hosts in the M target clusters. To avoid this situation, the number of cloud hosts to be created should be adjusted so that the cloud management platform can meet the demand for creating cloud hosts while ensuring the normal operation of the original hosts in the cluster.

[0096] In one example, the cloud management platform obtains at least one ova template and multiple architecture types, establishes a first correspondence between at least one ova template and multiple architecture types; obtains multiple script sets, establishes a second correspondence between at least one ova template and multiple script sets; and stores the first correspondence and the second correspondence in a global content library.

[0097] It is understandable that the cloud management platform can establish a second correspondence with any x86 architecture script set in response to the administrator's operation of selecting an ova template of the x86 architecture type. If the cloud management platform establishes a second correspondence with the script set of the x86 architecture type in response to the administrator's operation of selecting an ova template of the arrch64 architecture type, it cannot be established and a prompt message is displayed, which is used to prompt the administrator that the architecture type does not match, and vice versa.

[0098] S206: Based on the target ova template and the target script set, create N cloud hosts whose architecture type is the target architecture type.

[0099] In one example, after the cloud management platform creates N cloud hosts based on the target ova template and target script set, the cloud hosts are initialized at startup, and according to the target script set, the scripts are automatically executed inside the cloud host system (for example, the script execution is application deployment, installation of built-in middleware, etc.), and the script execution log is output to the cloud management platform. If the script execution fails, the cloud management platform outputs the failure log. Afterwards, the cloud host can re-execute the adjusted or modified target script set to complete the creation of the cloud host and complete the installation of the cloud host internal application.

[0100] Based on the above S201-S206 method, before creating at least one cloud host of the target architecture type, the cloud management platform evaluates the number M of the current target cluster and the number N of cloud hosts to be created. Specifically, by calculating the first ratio and the second ratio and comparing them with the threshold respectively, if the first ratio and the second ratio are both less than or equal to the threshold, it means that the cluster resources and storage group resources managed by the cloud management platform are sufficient to create at least one desired cloud host, and the number of cloud hosts to be created is within a suitable range, and then the cloud host is created in the target cluster using the global content library. This method effectively avoids creating at least one cloud host when the target resources are insufficient, which results in squeezing out the resources of the original host in the target cluster and even affecting the performance of the original host.

[0101] In addition, the target architecture type can be one or more architecture types, so the architecture type of the cloud host created by the cloud management platform can also be one or more architecture types, thereby enabling the creation of cloud hosts across architectures. The cloud management platform manages multiple sites, each site includes multiple clusters, and the cloud hosts created by the cloud management platform will be deployed to the clusters included in multiple sites, so it is possible to create cloud hosts across sites and clusters.

[0102] It is understandable that before obtaining the number of storage groups of each of the M target clusters, the cloud management platform needs to determine the M target clusters from the multiple clusters, such as Figure 3 As shown, Figure 3 is a flow chart of a method for determining M target clusters according to an embodiment of the present invention, the flow chart comprising the following steps:

[0103] S301: Determine, among multiple clusters, a cluster whose architecture type is the target architecture type as a pre-selected cluster.

[0104] The number of pre-selected clusters is M. The M pre-selected clusters include multiple target hosts. The architecture type of each target host is the target architecture type.

[0105] S302: Calculate available memory resources, available virtual central processing unit (CPU) cores, and available disk resources of the M pre-selected clusters.

[0106] Specifically, the above S302 specifically includes:

[0107] like Figure 4 As shown, Figure 4 is a schematic diagram of a method for calculating available memory resources of M pre-selected clusters according to an embodiment of the present invention.

[0108] In some optional embodiments, the cloud management platform calculates the available memory resources of M pre-selected clusters, including: obtaining first information corresponding to the M pre-selected clusters and second information corresponding to multiple target hosts, the first information is used to indicate whether the M pre-selected clusters are set with a memory reservation ratio, the first information includes a first identifier or a second identifier, the first identifier is used to indicate the memory reservation ratio set for the M pre-selected clusters, the second identifier is used to indicate that the memory reservation ratio is not set for the M pre-selected clusters, the second information is used to indicate whether the multiple target hosts are set with a memory over-allocation ratio, the second information includes a third identifier or a fourth identifier, the third identifier is used to indicate the memory over-allocation ratio set for the multiple target hosts, and the fourth identifier is used to indicate that the memory over-allocation ratio is not set for the multiple target hosts.

[0109] If the first information includes the first identifier and the second information includes the fourth identifier, the available memory resource P is calculated using the first relational expression, the total host memory A of multiple target hosts and the first identifier B. The first relational expression is: P=A-(A*B).

[0110] If the first information includes the first identifier and the second information includes the third identifier, the available memory resource P is calculated using the second relationship, the total host memory A, the first identifier B, the third identifier C and the used host memory D. The second relationship is: P = (A-(A*B))*CD.

[0111] If the first information includes the second identifier, and the second information includes the fourth identifier, the available memory resource P is calculated using the third relational expression, the total host memory A, and the used host memory D. The third relational expression is: P=AD.

[0112] If the first information includes the second identifier, and the second information includes the third identifier, the available memory resource P is calculated using the fourth relational expression, the total host memory A, the third identifier C and the used host memory D. The fourth relational expression is: P=A*CD.

[0113] Exemplarily, the cloud management platform takes the total host memory of multiple target hosts as 50G and the used host memory as 20G, the first information includes the first identifier, and the second information includes the third identifier as an example, and uses the second relationship, the total host memory A is 50G, the first identifier B is 30%, the third identifier C is 200% and the used host memory is 20G, to calculate the available memory resources as (50-(50*30%))*200%-20=50.

[0114] like Figure 5 As shown, Figure 5 4 is a schematic diagram of a method for calculating the number of available CPU cores of M pre-selected clusters according to an embodiment of the present invention.

[0115] In some optional embodiments, the cloud management platform calculates the available CPU cores of M pre-selected clusters, including: obtaining third information corresponding to the M pre-selected clusters and fourth information corresponding to multiple target hosts, the third information is used to indicate whether the M pre-selected clusters have set a CPU core reservation ratio, the third information includes a fifth identifier or a sixth identifier, the fifth identifier is used to indicate the CPU core reservation ratio set for the M pre-selected clusters, the sixth identifier is used to indicate that the M pre-selected clusters have not set a CPU core reservation ratio, the second information is used to indicate whether the multiple target hosts have set a CPU core over-allocation ratio, the second information includes a seventh identifier or an eighth identifier, the seventh identifier is used to indicate the CPU core over-allocation ratio set for the multiple target hosts, and the eighth identifier is used to indicate that the CPU core over-allocation ratio is not set for the multiple target hosts.

[0116] If the third information includes the fifth identifier and the fourth information includes the eighth identifier, the number of available CPU cores Q is calculated using the fifth relational expression, the total number of host CPU cores K of multiple target hosts and the fifth identifier E. The fifth relational expression is: Q=K-(K*E).

[0117] If the third information includes the fifth identifier and the fourth information includes the seventh identifier, the sixth relationship, the total number of host CPU cores K, the number of used CPU cores G, the fifth identifier E and the seventh identifier F are used to calculate the number of available CPU cores Q. The sixth relationship is: Q = (K-(K*E))*FG.

[0118] If the third information includes the sixth identifier and the fourth information includes the eighth identifier, the number of available CPU cores Q is calculated using the seventh relationship, the total number of host CPU cores K and the number of used CPU cores G, and the seventh relationship is: Q=KG.

[0119] If the third information includes the sixth identifier and the fourth information includes the seventh identifier, the available CPU cores Q are calculated using the eighth relationship, the seventh identifier F, the total number of host CPU cores K and the number of used CPU cores G, and the eighth relationship is: Q=K*FG.

[0120] Exemplarily, the cloud management platform takes the total number of CPU cores of multiple target hosts as 50 cores, the number of used host CPU cores as 20 cores, the third information including the sixth identifier, and the fourth information including the seventh identifier as 200% as an example, and uses the eighth relationship, the seventh identifier F is 200%, the total number of host CPU cores K is 50 cores, and the number of used CPU cores G is 20 cores to calculate the available CPU cores as 50*200%-20=80.

[0121] like Figure 6 As shown, Figure 6 4 is a schematic diagram of a method for calculating available disk resources of M pre-selected clusters according to an embodiment of the present invention.

[0122] In some optional embodiments, the cloud management platform calculates the available disk resources of M pre-selected clusters, including: obtaining fifth information and sixth information corresponding to multiple target hosts in the M pre-selected clusters, the fifth information is used to indicate whether the multiple target hosts have set disk resource reservation ratios, the fifth information includes a ninth identifier or a tenth identifier, the ninth identifier is used to indicate the disk resource reservation ratios set for the multiple target hosts, the tenth identifier is used to indicate that the disk resource reservation ratios are not set for the multiple target hosts, the sixth information is used to indicate whether the multiple target hosts have set disk resource over-allocation ratios, the sixth information includes an eleventh identifier or a twelfth identifier, the eleventh identifier is used to indicate the disk resource over-allocation ratios set for the multiple target hosts, and the twelfth identifier is used to indicate that the disk resource over-allocation ratios are not set for the multiple target hosts.

[0123] If the fifth information includes the ninth identifier and the sixth information includes the twelfth identifier, the available disk resources H are calculated using the ninth relational expression, the total disk resources J and the ninth identifier R. The ninth relational expression is: H=J-(J*R).

[0124] If the fifth information includes the ninth identifier and the sixth information includes the eleventh identifier, the available disk resources H are calculated using the tenth relationship, the total disk resources J, the used disk resources T, the ninth identifier R and the eleventh identifier S. The tenth relationship is: H = (J-(J*R))*ST.

[0125] If the fifth information includes the tenth identifier and the sixth information includes the twelfth identifier, the available disk resources H are calculated using the eleventh relational expression, the total disk resources J and the used disk resources T. The eleventh relational expression is: H=JT.

[0126] If the fifth information includes the tenth identifier and the sixth information includes the eleventh identifier, the available disk resources H are calculated using the twelfth relational expression, the eleventh identifier S, the total disk resources J and the used disk resources T. The twelfth relational expression is: H=J*ST.

[0127] Exemplarily, the cloud management platform takes the total disk resources of multiple target hosts as 50G, the used disk resources as 20G, the fifth information including the ninth identifier as 30%, and the sixth information including the twelfth identifier as an example, and uses the ninth relationship, the total disk resources J as 50G and the ninth identifier R as 30% to calculate the available disk resources as 50-(50*30%)=35.

[0128] It can be understood that the above disks are all non-thin provisioned disks. The available disk resources are the available local disk resources of multiple target hosts. If the M target clusters also include shared disks, the method for the cloud management platform to calculate the available shared disk resources of the M pre-selected clusters is consistent with the method for calculating the available disk resources of the M pre-selected clusters described above, and will not be repeated here.

[0129] S303: When the M preset clusters meet preset conditions, the M pre-selected clusters are determined as M target clusters.

[0130] The preset conditions are that the available memory resources are greater than or equal to the target memory resources, the available CPU cores are greater than or equal to the target CPU cores, and the available disk resources are greater than or equal to the target disk resources.

[0131] The target memory resources, target number of CPU cores, and target disk resources are all resources required to create the cloud host to be created.

[0132] It can be understood that the target memory resources, target number of CPU cores and target disk resources are associated with the number of cloud hosts to be created, N. The larger N is, the larger the target memory resources, target number of CPU cores and target disk resources are. The available memory resources of the M target clusters are greater than or equal to the target memory resources, the available number of CPU cores is greater than or equal to the target number of CPU cores, and the available disk resources are greater than or equal to the target disk resources, which means that the cloud management platform has sufficient resources to create N cloud hosts in the M target clusters, and can avoid squeezing out the resources required by the original hosts in the M target clusters. Furthermore, the cloud management platform can perform refined management of resources for the managed clusters or hosts, and realize intelligent resource allocation for batch deployment of cloud hosts across architectures.

[0133] Optionally, in response to the network address, gateway address and mask of the cloud host to be created set by the administrator on the cloud management platform, when the cloud management platform creates the cloud host, it can match the available network through the network address range and mask to meet the network resource requirements for creating the cloud host. At the same time, by controlling the ping test switch, in response to the IP address of the cloud host input by the administrator, all IP addresses under multiple sites are detected through arping. If the IP address of the cloud host has been used, it will prompt that the IP conflict of the cloud host.

[0134] It is understandable that the cloud management platform can avoid cloud host address conflicts when creating cloud hosts and improve the success rate of creating cloud hosts by setting the ping test switch and actively detecting duplicate addresses.

[0135] Furthermore, when the first ratio and the second ratio are both less than or equal to the threshold, the cloud management platform can also generate a planning report for creating a cloud host and display it on the display interface. The planning report may include the first value, the second value, target memory resource information, target CPU core number information, target disk resource information, available memory resource information, available CPU core number information and available disk resource information, cloud host address occupancy information, etc., so as to provide real data reference for subsequent cloud host creation planning.

[0136] In this embodiment, a device for creating a cloud host is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0137] This embodiment provides a cloud management platform, such as Figure 7 As shown, including:

[0138] The acquisition module 701 is used to obtain the number of storage groups of each target cluster in the M target clusters. The architecture type of the host in each target cluster is the same as the architecture type of the cloud host to be created. The architecture type of the cloud host to be created is the target architecture type.

[0139] The calculation module 702 is used to calculate the sum of the number of M storage groups corresponding to the M target clusters to obtain the total number of storage groups L. A first value is determined according to the number of cloud hosts N to be created and the number of target clusters M, and the ratio of the first value to the number of cloud hosts N to be created is calculated to obtain a first ratio; a second value is determined according to the number of cloud hosts N to be created and the total number of storage groups L, and the ratio of the second value to the number of cloud hosts N to be created is calculated to obtain a second ratio.

[0140] Processing module 703 is used to determine the target open virtualization device ova template and the target script set corresponding to the target ova template from the global content library based on the target architecture type when both the first ratio and the second ratio are less than or equal to the threshold value, wherein the global content library includes the corresponding relationship between the target architecture type and the target ova template, and the corresponding relationship between the target ova template and the target script set. Based on the target ova template and the target script set, N cloud hosts with the architecture type of the target architecture type are created.

[0141] In some optional implementations, before obtaining the number of storage groups of each target cluster in the M target clusters, the processing module 702 is also used to determine the clusters whose architecture type is the target architecture type among the multiple clusters as pre-selected clusters, the number of pre-selected clusters is M, and the M pre-selected clusters include multiple target hosts, and the architecture type of each target host is the target architecture type; the processing module 702 is also used to calculate the available memory resources, the number of available virtual central processing unit CPU cores, and the available disk resources of the M pre-selected clusters; the processing module 702 is also used to determine the M pre-selected clusters as M target clusters when the M preset clusters meet preset conditions, and the preset conditions are that the available memory resources are greater than or equal to the target memory resources, the number of available CPU cores is greater than or equal to the target CPU cores, and the available disk resources are greater than or equal to the target disk resources; the target memory resources, the target number of CPU cores, and the target disk resources are all resources required to create the cloud host to be created.

[0142] In some optional embodiments, the computing module 703 is specifically used to obtain first information corresponding to M pre-selected clusters and second information corresponding to multiple target hosts, the first information is used to indicate whether the M pre-selected clusters are set with a memory reservation ratio, the first information includes a first identifier or a second identifier, the first identifier is used to indicate the memory reservation ratio set for the M pre-selected clusters, the second identifier is used to indicate that the memory reservation ratio is not set for the M pre-selected clusters, the second information is used to indicate whether the multiple target hosts are set with a memory over-allocation ratio, the second information includes a third identifier or a fourth identifier, the third identifier is used to indicate the memory over-allocation ratio set for the multiple target hosts, and the fourth identifier is used to indicate that the memory over-allocation ratio is not set for the multiple target hosts.

[0143] The calculation module 703 is further specifically configured to calculate the available memory resource P by using the first relational expression, the total host memory amount A of the plurality of target hosts and the first identifier B if the first information includes the first identifier and the second information includes the fourth identifier, wherein the first relational expression is: P=A-(A*B);

[0144] The calculation module 703 is further specifically configured to calculate the available memory resource P by using the second relational expression, the total host memory A, the first identifier B, the third identifier C and the used host memory D if the first information includes the first identifier and the second information includes the third identifier, wherein the second relational expression is: P=(A-(A*B))*CD;

[0145] The calculation module 703 is further specifically configured to calculate the available memory resource P by using a third relational expression, a total host memory amount A, and a used host memory amount D if the first information includes a second identifier and the second information includes a fourth identifier, wherein the third relational expression is: P=AD;

[0146] The calculation module 703 is also specifically used to calculate the available memory resource P using the fourth relationship, the total host memory A, the third identifier C and the used host memory D if the first information includes the second identifier and the second information includes the third identifier. The fourth relationship is: P=A*CD.

[0147] In some optional implementations, the computing module 703 is further specifically used to obtain third information corresponding to the M pre-selected clusters and fourth information corresponding to the multiple target hosts, the third information is used to indicate whether the M pre-selected clusters are set with a CPU core reservation ratio, the third information includes a fifth identifier or a sixth identifier, the fifth identifier is used to indicate the CPU core reservation ratio set by the M pre-selected clusters, the sixth identifier is used to indicate that the M pre-selected clusters are not set with a CPU core reservation ratio, the second information is used to indicate whether the multiple target hosts are set with a CPU core over-allocation ratio, the second information includes a seventh identifier or an eighth identifier, the seventh identifier is used to indicate the CPU core over-allocation ratio set by the multiple target hosts, and the eighth identifier is used to indicate that the multiple target hosts are not set with a CPU core over-allocation ratio;

[0148] The calculation module 703 is further specifically configured to calculate the number of available CPU cores Q using the fifth relational expression, the total number of host CPU cores K of the plurality of target hosts, and the fifth identifier E if the third information includes the fifth identifier and the fourth information includes the eighth identifier, wherein the fifth relational expression is: Q=K-(K*E);

[0149] The calculation module 703 is further specifically configured to calculate the number of available CPU cores Q using the sixth relational expression, the total number of CPU cores K of the host, the number of used CPU cores G, the fifth identifier E and the seventh identifier F if the third information includes the fifth identifier and the fourth information includes the seventh identifier, wherein the sixth relational expression is: Q=(K-(K*E))*FG;

[0150] The calculation module 703 is further specifically configured to calculate the number of available CPU cores Q using the seventh relationship, the total number of host CPU cores K, and the number of used CPU cores G if the third information includes the sixth identifier and the fourth information includes the eighth identifier, wherein the seventh relationship is: Q=KG;

[0151] The calculation module 703 is also specifically used to calculate the number of available CPU cores Q using the eighth relationship, the seventh identifier F, the total number of host CPU cores K and the number of used CPU cores G if the third information includes the sixth identifier and the fourth information includes the seventh identifier. The eighth relationship is: Q=K*FG.

[0152] In some optional implementations, the computing module 703 is further specifically used to obtain fifth information and sixth information corresponding to multiple target hosts in the M pre-selected clusters, the fifth information being used to indicate whether multiple target hosts set a disk resource reservation ratio, the fifth information including a ninth identifier or a tenth identifier, the ninth identifier being used to indicate a disk resource reservation ratio set for multiple target hosts, the tenth identifier being used to indicate that multiple target hosts do not set a disk resource reservation ratio, the sixth information being used to indicate whether multiple target hosts set a disk resource over-allocation ratio, the sixth information including an eleventh identifier or a twelfth identifier, the eleventh identifier being used to indicate a disk resource over-allocation ratio set for multiple target hosts, and the twelfth identifier being used to indicate that multiple target hosts do not set a disk resource over-allocation ratio;

[0153] The calculation module 703 is further specifically configured to calculate the available disk resources H using the ninth relational expression, the total disk resources J and the ninth identifier R if the fifth information includes the ninth identifier and the sixth information includes the twelfth identifier, wherein the ninth relational expression is: H=J-(J*R);

[0154] The calculation module 703 is further specifically configured to calculate the available disk resources H using the tenth relational expression, the total disk resources J, the used disk resources T, the ninth identifier R and the eleventh identifier S if the fifth information includes the ninth identifier and the sixth information includes the eleventh identifier, wherein the tenth relational expression is: H=(J-(J*R))*ST;

[0155] The calculation module 703 is further specifically configured to calculate the available disk resources H by using the eleventh relational expression, the total disk resources J and the used disk resources T if the fifth information includes the tenth identifier and the sixth information includes the twelfth identifier, wherein the eleventh relational expression is: H=JT;

[0156] The calculation module 703 is also specifically used to calculate the available disk resources H using the twelfth relationship, the eleventh identification S, the total disk resources J and the used disk resources T if the fifth information includes the tenth identification and the sixth information includes the eleventh identification. The twelfth relationship is: H=J*ST.

[0157] In some optional implementations, the acquisition module 701 is specifically used to obtain the number of hosts and the number of shared storage pools of each target cluster, the multiple storage pools included in each host correspond to one storage group, one shared storage pool corresponds to one storage group, and the number of shared storage pools is 0 or 1; the sum of the number of hosts and the number of shared storage pools is determined as the number of storage groups for each target cluster.

[0158] In some optional embodiments, the processing module 702 is also used to obtain at least one ova template and multiple architecture types, and establish a first correspondence between at least one ova template and the architecture type; the processing module 702 is also used to obtain multiple script sets, and establish a second correspondence between at least one ova template and multiple script sets; the processing module 702 is also used to store the first correspondence and the second correspondence in the global content library.

[0159] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0160] The device for creating a cloud host in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0161] The embodiment of the present invention also provides a computer device having the above Figure 7 The device for creating a cloud host is shown.

[0162] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.

[0163] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0164] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0165] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0166] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0167] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0168] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0169] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0170] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0171] Part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0172] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for creating a cloud host, characterized in that: Applied to a cloud management platform, the cloud management platform manages multiple clusters and a global content library, the global content library is used to provide at least one ova template and multiple script sets, the method includes: Obtain the number of storage groups of each of the M target clusters, wherein the architecture type of the host in each of the target clusters is the same as the architecture type of the cloud host to be created, and the architecture type of the cloud host to be created is the target architecture type; Calculate the sum of the numbers of the M storage groups corresponding to the M target clusters to obtain a total number of storage groups L; Determine a first value according to the number N of cloud hosts to be created and the number M of the target clusters, and calculate a ratio of the first value to the number N of cloud hosts to be created to obtain a first ratio; Determine a second value according to the number N of cloud hosts to be created and the total number L of storage groups, and calculate a ratio of the second value to the number N of cloud hosts to be created to obtain a second ratio; When both the first ratio and the second ratio are less than or equal to a threshold value, based on the target architecture type, determining a target open virtualization device OVA template and a target script set corresponding to the target OVA template from the global content library, wherein the global content library includes: a correspondence between the target architecture type and the target OVA template, and a correspondence between the target OVA template and the target script set; Based on the target ova template and the target script set, N cloud hosts with an architecture type of the target architecture type are created.

2. The method according to claim 1, characterized in that Before obtaining the number of storage groups of each of the M target clusters, the method further includes: Determine, among the multiple clusters, a cluster whose architecture type is the target architecture type as a pre-selected cluster, the number of the pre-selected clusters is M, the M pre-selected clusters include multiple target hosts, and the architecture type of each of the target hosts is the target architecture type; Calculate available memory resources, available virtual central processing unit (CPU) cores, and available disk resources of the M pre-selected clusters; When the M preset clusters meet preset conditions, the M pre-selected clusters are determined as the M target clusters, and the preset conditions are that the available memory resources are greater than or equal to the target memory resources, the available number of CPU cores is greater than or equal to the target number of CPU cores, and the available disk resources are greater than or equal to the target disk resources; the target memory resources, the target number of CPU cores and the target disk resources are all resources required to create the cloud host to be created.

3. The method according to claim 2, characterized in that The calculating the available memory resources of the M pre-selected clusters includes: Obtaining first information corresponding to the M pre-selected clusters and second information corresponding to the multiple target hosts, the first information being used to indicate whether the M pre-selected clusters are set with a memory reservation ratio, the first information comprising a first identifier or a second identifier, the first identifier being used to indicate the memory reservation ratio set by the M pre-selected clusters, the second identifier being used to indicate that the M pre-selected clusters are not set with the memory reservation ratio, the second information being used to indicate whether the multiple target hosts are set with a memory over-allocation ratio, the second information comprising a third identifier or a fourth identifier, the third identifier being used to indicate the memory over-allocation ratio set by the multiple target hosts, the fourth identifier being used to indicate that the multiple target hosts are not set with the memory over-allocation ratio; If the first information includes the first identifier, and the second information includes the fourth identifier, the available memory resource P is calculated using a first relational expression, a total host memory amount A of the multiple target hosts, and the first identifier B, wherein the first relational expression is: P=A-(A*B); If the first information includes the first identifier, and the second information includes the third identifier, the available memory resource P is calculated using a second relational expression, the total host memory amount A, the first identifier B, the third identifier C, and the used host memory amount D, where the second relational expression is: P=(A-(A*B))*CD; If the first information includes the second identifier, and the second information includes the fourth identifier, the available memory resource P is calculated using a third relational expression, the total host memory amount A, and the used host memory amount D, and the third relational expression is: P=AD; If the first information includes the second identifier, and the second information includes the third identifier, the available memory resource P is calculated using the fourth relationship, the total host memory A, the third identifier C and the used host memory D, and the fourth relationship is: P=A*CD.

4. The method according to claim 2, characterized in that: The calculating the number of available CPU cores of the M pre-selected clusters includes: Obtain third information corresponding to the M pre-selected clusters and fourth information corresponding to the multiple target hosts, the third information being used to indicate whether the M pre-selected clusters are set with a CPU core reservation ratio, the third information comprising a fifth identifier or a sixth identifier, the fifth identifier being used to indicate the CPU core reservation ratio set by the M pre-selected clusters, the sixth identifier being used to indicate that the M pre-selected clusters are not set with the CPU core reservation ratio, the second information being used to indicate whether the multiple target hosts are set with a CPU core over-allocation ratio, the second information comprising a seventh identifier or an eighth identifier, the seventh identifier being used to indicate the CPU core over-allocation ratio set by the multiple target hosts, and the eighth identifier being used to indicate that the multiple target hosts are not set with the CPU core over-allocation ratio; If the third information includes the fifth identifier, and the fourth information includes the eighth identifier, the number of available CPU cores Q is calculated using the fifth relational expression, the total number of host CPU cores K of the multiple target hosts, and the fifth identifier E, and the fifth relational expression is: Q=K-(K*E); If the third information includes the fifth identifier, and the fourth information includes the seventh identifier, the number of available CPU cores Q is calculated using the sixth relational formula, the total number of CPU cores K of the host, the number of used CPU cores G, the fifth identifier E, and the seventh identifier F, and the sixth relational formula is: Q=(K-(K*E))*FG; If the third information includes the sixth identifier, and the fourth information includes the eighth identifier, the available CPU core number Q is calculated using the seventh relational expression, the total number of CPU cores K of the host CPU, and the number of used CPU cores G, and the seventh relational expression is: Q=KG; If the third information includes the sixth identifier and the fourth information includes the seventh identifier, the available CPU core number Q is calculated using the eighth relationship, the seventh identifier F, the total number of host CPU cores K and the number of used CPU cores G, and the eighth relationship is: Q=K*FG.

5. The method according to claim 2, characterized in that: The calculating the available disk resources of the M pre-selected clusters includes: Obtain fifth information and sixth information corresponding to the multiple target hosts in the M pre-selected clusters, the fifth information being used to indicate whether the multiple target hosts set a disk resource reservation ratio, the fifth information comprising a ninth identifier or a tenth identifier, the ninth identifier being used to indicate the disk resource reservation ratio set by the multiple target hosts, the tenth identifier being used to indicate that the multiple target hosts do not set the disk resource reservation ratio, the sixth information being used to indicate whether the multiple target hosts set a disk resource over-allocation ratio, the sixth information comprising an eleventh identifier or a twelfth identifier, the eleventh identifier being used to indicate the disk resource over-allocation ratio set by the multiple target hosts, the twelfth identifier being used to indicate that the multiple target hosts do not set the disk resource over-allocation ratio; If the fifth information includes the ninth identifier, and the sixth information includes the twelfth identifier, the available disk resource H is calculated using the ninth relational expression, the total disk resource J and the ninth identifier R, and the ninth relational expression is: H=J-(J*R); If the fifth information includes the ninth identifier, and the sixth information includes the eleventh identifier, the available disk resources H are calculated using the tenth relational expression, the total disk resources J, the used disk resources T, the ninth identifier R, and the eleventh identifier S. The tenth relational expression is: H=(J-(J*R))*ST; If the fifth information includes the tenth identifier, and the sixth information includes the twelfth identifier, the available disk resource H is calculated using the eleventh relational expression, the total disk resource J and the used disk resource T, and the eleventh relational expression is: H=JT; If the fifth information includes the tenth identifier and the sixth information includes the eleventh identifier, the available disk resources H are calculated using the twelfth relationship, the eleventh identifier S, the total disk resources J and the used disk resources T, and the twelfth relationship is: H=J*ST.

6. The method according to claim 1, characterized in that The obtaining the number of storage groups of each of the M target clusters includes: Obtain the number of hosts and shared storage pools of each target cluster, wherein the multiple storage pools included in each host correspond to one storage group, and one shared storage pool corresponds to one storage group, and the number of shared storage pools is 0 or 1; The sum of the number of hosts and the number of shared storage pools is determined as the number of storage groups of each target cluster.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Acquire the at least one ova template and the multiple architecture types, and establish a first corresponding relationship between the at least one ova template and the multiple architecture types; Acquire the multiple script sets, and establish a second correspondence between the at least one ova template and the multiple script sets; The first corresponding relationship and the second corresponding relationship are stored in the global content library.

8. A cloud management platform, characterized in that: The cloud management platform includes: An acquisition module is used to acquire the number of storage groups of each of the M target clusters, wherein the architecture type of the host in each of the target clusters is the same as the architecture type of the cloud host to be created, and the architecture type of the cloud host to be created is the target architecture type; A calculation module, used to calculate the sum of the number of M storage groups corresponding to the M target clusters to obtain a total number of storage groups L; determine a first value according to the number of cloud hosts N to be created and the number of target clusters M, calculate the ratio of the first value to the number of cloud hosts N to be created, and obtain a first ratio; determine a second value according to the number of cloud hosts N to be created and the total number of storage groups L, calculate the ratio of the second value to the number of cloud hosts N to be created, and obtain a second ratio; A processing module is used to determine, based on the target architecture type, a target open virtualization device ova template and a target script set corresponding to the target ova template from the global content library when both the first ratio and the second ratio are less than or equal to a threshold value, wherein the global content library includes a correspondence between the target architecture type and the target ova template, and a correspondence between the target ova template and the target script set; based on the target ova template and the target script set, create N cloud hosts with an architecture type of the target architecture type.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for creating a cloud host according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for creating a cloud host according to any one of claims 1 to 7.